News for hackers. Stuff that matters.
Re:Porting a Golang and Rust CLI tool to D by eggy on Thursday August 20, 2020 @09:31AM (#24223014)
The 3kb demoscene example is just to open a window, not a full, self-contained 64k demo in 3kb. Is the program basically calling the Win API through unsafe functions? I am trying to learn Rust, and I am wondering how it might actually be used here or more beneficial than C in this case if it is all done "unsafe"? I am still comparing Zig and Rust to see which I am going to go with. I don't think I'll ever give up C though.
Re:Porting a Golang and Rust CLI tool to D by littlestymaar on Thursday August 20, 2020 @11:00AM (#24223980)
> I am still comparing Zig and Rust to see which I am going to go with

This is really puzzling to me: in what context are you working to have hesitations between Rust and Zig? One is a production language, the other is an exciting experimental language mostly written by a single genius. Go for Zig if you want to have fun, and Rust if you want to actually build something. It's like hesitating between Kotlin and Idris!

Re:Porting a Golang and Rust CLI tool to D by eggy on Friday August 21, 2020 @05:30AM (#24233413)
For a low-level, systems programming language it really comes down to Rust and Zig if you are migrating from C. I like Idris, but I don't see it in this category, nor Kotlin, although Kotlin Native perhaps? Yes, Zig is exciting! I find it easier than Rust and I have given both equal time so far.
Re:Porting a Golang and Rust CLI tool to D by deckarep on Thursday August 20, 2020 @03:29PM (#24227631)
Haha at: written by a single genius. And so true.
Re:Porting a Golang and Rust CLI tool to D by steveklabnik on Thursday August 20, 2020 @09:37AM (#24223080)
That post is, but https://www.codeslow.com/2020/07/writing-winning-4k-intro-in... is a 4k demo.

And yes, a lot of it is unsafe, because it's calling into all of that stuff directly, and doing pointer arithmetic, etc. Check the post, it's good, the Conclusion section talks about this specifically.