Re:Ncdu 2: Less hungry and more Ziggy
by formerly_proven on Sunday July 25, 2021 @12:29PM
(#27950457)
D vs Zig vs Go for practical, pragmatic development of possibly-cross-platform tools? Fight.
[ Parent
| on HN ]
I don't like any of those languages very much, but Zig seems perfectly fine for this sort of stuff. From the very beginning, I've seen people say that Zig should be used to offer easy, human-readable rewrites of basic C utilities without sacrificing execution speed. Meanwhile, I think Go would be much too heavy for a program like this, and D seems to be a little out of it's depths in this conversation.
I'm not sure if it's really a problem for ncdu use case, but in Golang all the file I/O operations consume threads (in contrast with network ones), so is not easy to parallelize them: https://github.com/golang/go/issues/6817
Btw, you forgot Rust :)
In Rust, it's easy: https://github.com/bootandy/dust/blob/master/src/dir_walker....
(Dust is "du + rust").
CLIs: For now, go. In 3 years? Zig.
Nim
Nim
Re:Ncdu 2: Less hungry and more Ziggy
by sausage_dog on Monday July 26, 2021 @08:09AM
(#27958435)
Nim!