5 ms·
Compiler for the B Programming Language
- treyd 1y agoInteresting 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.
- kzrdude 1y agoThat'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.
- IshKebab 1y agoI 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.
- month13 1y agoThis is mainly for fun, really. Tsoding's main lesson is how simple systems can be and the desire and demand for complex build systems is silly.
- IshKebab 1y ago> the desire and demand for complex build systems is silly No it isn't. "Simple" build systems like Make don't solve many of the problems that "complex" build systems like Bazel do. At my current company I tried to convince my boss at the start of our project to use Bazel (it's very difficult to change build systems once your project is big), because I knew from experience it would solve many problems we would eventually run into. He wouldn't let me and wanted to keep things "simple". Guess what happened? Now we have to run dozens of hours of CI just to fix a typo in a comment. CI regularly breaks because people forget dependencies. Etc.
- sureglymop 1y agoMake is definitely not a simple system. In tsodings latest stream about this project he actually implemented a small build/test runner system for it that is really simple. But actually I would disagree with the commenter you replied to. I think the main goal of this project seems to just be doing it for fun.
- int_19h 1y agoI would argue that the baseline for a "simple build system" is DJB Redo.
- DiabloD3 1y agoThis is the most tsoding thing possible.
- elvircrn 1y agoHad a go at this a while back: https://github.com/elvircrn/bcomp https://github.com/elvircrn/bcomp.
- pveierland 1y agoFun to see that it implements codegen for Uxn :) https://github.com/tsoding/b/blob/main/src/codegen/uxn.rs https://github.com/tsoding/b/blob/main/src/codegen/uxn.rs https://wiki.xxiivv.com/site/uxn.html https://wiki.xxiivv.com/site/uxn.html
- avmich 1y agoA pretty recent work: https://github.com/sergev/BCause https://github.com/sergev/BCause .
- int_19h 1y agoNice, but it really needs to be written in B and self-hosted.
- ZeroAurora 1y ago[dead]
- aap_ 1y agoAlways nice to see more B. Here's mine: https://github.com/aap/b https://github.com/aap/b
- louis771 1y agoHate to see Tsoding was using Rust for this. Rust is as far removed from recreational programming than any other language.
- paddw 1y agoI think Rust is quite a recreational language. The least recreational languages are probably like Java,C#
- renerick 1y agoIdk, java maybe, but c# doesn't even require .csproj files nowadays, it's really nice to use
- IshKebab 1y agoWhy? It's a great language. Very productive. Ideal for compilers too.
- desumeku 1y agoIt's not rust. It's crust. https://github.com/tsoding/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."
- sureglymop 1y agoIs 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 https://github.com/tsoding/Crust