Live data from Hacker News

Compiler for the B Programming Language

github.com

11–20 of 25 posts

Re: Compiler for the B Programming Language

#15
post #9
post #4

Earlier quoted context omitted.

That's a little bit interesting. It remains then a C-like language with generics, and that sounds a lot more fun than regular C. I don't yet understand the point of avoiding references or libstd, though.

Avoiding references means avoiding the borrow checker, and I don't think you can use much of stdlib if you avoid references...

At the beginning of one of his videos on Crust, he's trying to avoid stdlib exactly for that reason.

Re: Compiler for the B Programming Language

#18
post #2

Interesting that this is in a self-developed subset/dialect of Rust called Crust which attempts to treat it as a better C, using unsafe everywhere among other things.

I don't know why you'd see that as desirable and not use Zig. Unsafe Rust is actually harder to get right than C or Zig.

Re: Compiler for the B Programming Language

#19

Hate to see Tsoding was using Rust for this. Rust is as far removed from recreational programming than any other language.

It's not rust. It's crust. https://github.com/tsoding/crust

"The Rules of Crust

Every function is unsafe. No references, only pointers. No cargo, build with rustc directly. No std, but libc is allowed. Only Edition 2021. All user structs and enums #[derive(Clone, Copy)]. Everything is pub by default."

Re: Compiler for the B Programming Language

#20

Hate to see Tsoding was using Rust for this. Rust is as far removed from recreational programming than any other language.

Is this satire or did you actually watch the streams?

He doesn't actually use rust "idiomatically". He calls this "crust":

1. Every function is unsafe

2. No references, only pointers

3. No cargo, just rustc

4. No std, only libc

...

I don't know if he is sticking to these rules throughout but that was the idea in the beginning of this project.

https://github.com/tsoding/Crust

Post reply on HN