NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Doo: A Simple, Fast Programming Language Built on Rust and LLVM
pavelai 1 days ago [-]
The idea and syntax looks good for me. I like it's clean an minimalistic design. But still it's to early to say is it good or not. Because there is no obvious features. You should answer the question what's the goal of the language and find the auditory who is right for you.

Did you write it or generate? If the later, then it's could be even more impressive in some way.

pavelai 1 days ago [-]
I think there is a bit of a additional value here. It's very good as a learning project, like "how to make you own programming language and compile it into executable". Due to the simplicity and minimalism, it could be very useful.
nynrathod 1 days ago [-]
Hi,

Yeah make sense, but I don't have any buzzing goal right now, doolang is not any dsl, just to ensure high level syntax for developer writing backend servers apis. And not started as learning project. Will move forward as per feedback of community and requirement but not such specific target im aiming. so again simple concept is keep it simple to write with speed and security

Panzerschrek 1 days ago [-]
Is it safe?

Does it require using traits everywhere, like Rust does?

Does it have proper references (C++ style)?

nynrathod 15 hours ago [-]
Saying safe will be too early, but design philosophy is no compromise with security and speed with easy syntax. It passed with 550+ test cases including unit test, memory stress, integration, circular dep, regresssion, valgrind memory leak, fuzz testing, also i added conservative limits max depth for recursion and data length for stability. Find here https://github.com/nynrathod/doolang/blob/main/src/limits.rs

Doolang not uses any traits like rust. Rust is great language, but its expose everything in syntax that is also great but as developer who want security+speed with fast development may found issue writing rust, that is main goal of doolang simlicity. I'm still figuring out further design principle of syntax to have less exposing syntax.

Doolang have auto memory management with reference counting. Just simple mut keyword introduced for mutating variable let mut data = "data"; no other syntax expose all handling automatic with rc and auto type define if not defined explicitly

paulf38 9 hours ago [-]
Nooooo! "valgrind memory leak". Aaargh. Valgrind (memcheck) is not just a leak detection tool. Leak detection is so unimportant that it isn't even turned on by default.
nynrathod 8 hours ago [-]
Thanks for pointing that out. I didn’t actually know all the details about how Valgrind works under the hood just that it does memory checking. I'll definitely read up more on it. If you have any good resources or tips, I'd appreciate your suggestions!
Panzerschrek 14 hours ago [-]
When I say safety I mean inability of the programmer to trigger UB using normal language features, like it's impossible in Rust and several other (less known) languages. Does Doo support it? Or I just can shoot the leg and compiler lets me do this?

About references: am I correct, that any value is reference-counted and one can pass it to a function and mutate it (the original, not a copy).

nynrathod 14 hours ago [-]
Doolang aims for memory safety with static typing and automatic reference counting, so you won't see classic C/C++ bugs. But it does not claim Rust's level of safety there’s no formal guarantee that safe code can't cause undefined behavior. It's quite safe in practice, just not as strict as Rust.

For complex types (strings, arrays, maps), values are reference-counted and passed by reference. If you pass such a value to a function, you're sharing the same object—mutations affect the original. For primitives (Int, Bool), it's pass-by-value (copy).

Panzerschrek 13 hours ago [-]
So, what if I want to pass a value of a primitive type by-reference? How the equivalent code for the following C++ example looks like?

  void Foo( int& x )
  {
      x= 123;
  }
  
  void Bar()
  {
      int x= 0;
      Foo(x);
  }
nynrathod 13 hours ago [-]
Doolang currently does not allow you to mutate a primitive variable from another function.

Only support this as of now

fn Foo(x: Int) { x = 123; // Only modifies Foo's local copy print("inside Foo", x); // Print 123 } fn main() { let x: Int = 0; Foo(x); // x is still 0 here after Foo returns print("out x", x); // Print 0 }

nynrathod 14 hours ago [-]
But your points make sense, i should learn those UB works and will check how its behaving
sim7c00 1 days ago [-]
what are the kind of things you are building yourself with this?
nynrathod 1 days ago [-]
Hi,

So main goal of this language is to have simplicity while writing code. Rust is great will dominate, but as dev who want speed and security but with high level syntax, doolang is best for them. Right now im working on std library and inbuilt function, and moving forward I will integrate doolang with my own note taking app uoozer note https://play.google.com/store/apps/details?id=com.uoozer.not... , 550+ test cases covered by doolang already with valgrind memroy test too.

so for roadmap, after inbuilt functions and standard library deployment will build http router and will test real world scenario for api dev. IF all well then will integrate with uoozer note.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 20:18:26 GMT+0000 (Coordinated Universal Time) with Vercel.