Live data from Hacker News

Rue: Higher level than Rust, lower level than Go

rue-lang.dev

111–120 of 274 posts

Re: Rue: Higher level than Rust, lower level than Go

#111

I always thought of Go as low level and Rust as high level. Go has a lot of verbosity as a "better C" with GC. Rust has low level control but many functional inspired abstractions. Just try writing iteration or error handling in either one to see.

All are high level as long as they don't expose CPU capabilities, even ISO C is high level, unless we count in language extensions that are compiler specific, and any language can have compiler extensions.

Re: Rue: Higher level than Rust, lower level than Go

#113

Earlier quoted context omitted.

Since it's framed as 'in between' Rust and Go, is it trying to target an intersection of both languages' use-cases?

I don't think you'd want to write an operating system in Rue. I may not include an "unsafe" concept, and will probably require a runtime. So that's some areas where Rust will make more sense. As for Go... I dunno. Go has a strong vision around concurrency, and I just don't have one yet. We'll see.

Do you have plans for handling C FFI without "unsafe"? Will it require some sort of extension module written in C/C++/Rust?

Re: Rue: Higher level than Rust, lower level than Go

#114
post #65

Earlier quoted context omitted.

Rue author here, yeah I'm not the hugest fan of "low level vs high level" framing myself, because there are multiple valid ways of interpreting it. As you yourself demonstrate! As some of the larger design decisions come into place, I'll find a better way of describing it. Mostly, I am not really trying to compete with C/C++/Rust on speed, but I'm not going to add a GC either. So I'm somewhere in there.

Is this a simplified / distilled version of Rust ? Or Subset of Rust with some changes ?

Simplified as in easier to use, or simplified as in less language features? I'm all for the former, while the latter is also worth considering (but hard to get right, as all the people who consider Go a "primitive" language show)...

Re: Rue: Higher level than Rust, lower level than Go

#115

Earlier quoted context omitted.

Check out V-lang ... it has the details. It's a beautiful language... but, mostly unknown.

Oh, it's known. It just has an incredibly negative reputation on this site.

I kinda expected.. just hesitated to point it out.

Re: Rue: Higher level than Rust, lower level than Go

#116
post #74
post #9

Earlier quoted context omitted.

Would someone please explain to me why TCO—seemingly alone amongst the gajillions of optimization passes performed by modern compilers—is so singularly important to some people?

It virtue-signals that they're part of the hip functional crowd. (To be fair, if you are programming functionally, it is essential. But to flat-out state that a language that doesn't support isn't "serious" is a bit rude, at best.)

Supporting recursion only to a depth of 1000 (or whatever) is equivalent to supporting loops of up to 1000 iterations.

If I put out a language that crashed after 1000 iterations of a loop, I'd welcome the rudeness.

Re: Rue: Higher level than Rust, lower level than Go

#117
post #8

I wince every time I see naive recursive fibonacci as a code example. It is a major turnoff because it hints at a lack of experience with tail call optimization, which I consider a must have for a serious language.

"Well you can judge the whole world on the sparkle that you think it lacks. Yes, you can stare into the abyss, but it's staring right back"

Please, it supports a hole at best. Maybe a pit. No way will this let you construct an abyss.

Re: Rue: Higher level than Rust, lower level than Go

#118

Earlier quoted context omitted.

Check out V-lang ... it has the details. It's a beautiful language... but, mostly unknown.

> Check out V-lang ... it has the details. Does it? From its docs [0]: > There are 4 ways to manage memory in V. > The default is a minimal and a well performing tracing GC. > The second way is autofree, it can be enabled with -autofree. It takes care of most objects (~90-100%): the compiler inserts necessary free calls automatically during compilation. Remaining small percentage of objects is freed via GC. The devel…

"none of those stand out as "memory safety without GC" to me" ... can you explain why you believe they are not memory safe without GC? Im more interested to know the points in relation to autofree.

Regarding the details, here is a pretty informative github discussion thread on same topic: https://github.com/vlang/v/discussions/17419

It is also accompanied with a demo video (pretty convincing in case you would like to watch).

V-lang is not shiny as other languages are, but, it does have a lot to learn from.

Re: Rue: Higher level than Rust, lower level than Go

#119

> Memory Safe > No garbage collector, no manual memory management. A work in progress, though. I couldn't find an explanation in the docs or elsewhere how Rue approaches this. If not GC, is it via: a) ARC b) Ownership (ala Rust) c) some other way?

I am playing around with this! I'm mostly interested in something in the space of linear types + mutable value semantics.

Also working on a language / runtime in this space.

It transpiles to Zig, so you have native access to the entire C library.

It uses affine types (simple ownership -> transfers via GIVE/TAKES), MVCC & transactions to safely and scalably handle mutations (like databases, but it scales linearly after 32 cores, Arc and RwLock fall apart due to Cache Line Bouncing).

It limits concurrent complexity only to the spot in your code WHERE you want to mutate shared memory concurrently, not your entire codebase.

It's memory and liveness safe (Rust is only memory safe) without a garbage collector.

It's simpler than Go, too, IMO - and more predictable, no GC.

But it's nearly impossible to beat Go at its own game, and it's not zero overhead like Rust - so I'm pessimistic it's in a "sweet spot" that no one will be interested in.

Time will tell.

Post reply on HN