Live data from Hacker News

Memory-safe, clean implementation of classic Posix "BC" calculator

github.com

11–20 of 55 posts

Re: Memory-safe, clean implementation of classic Posix "BC" calculator

#11
Am I the only one who thinks we need less short-lived tools written in memory-safe languages an more system infrastructure written in said languages?

Don't take me wrong, I like when someone creates a better version of something existing. For example, ripgrep is fantastic. But seeing the recent trend of rewriting whatever in Rust just because, I can't help wondering why I should bother whether bc leaks or not...

Re: Memory-safe, clean implementation of classic Posix "BC" calculator

#13
I am still waiting for Rust people to do something new and innovative. I acknowledge that Rust itself is innovative, don't get me wrong, But where are the true proof-of-concept projects such as the Linux kernel, qemu, git, postgresql, vim, etc. of the Rust world? Rewriting code is a waste of time of time, fragments the eco system, and introduces new bugs. And with a new focus on memory safety and analysis tools and sanitizers evolving, a lot of C code will be made memory safe in the future without needing a rewrite in Rust.

Re: Memory-safe, clean implementation of classic Posix "BC" calculator

#14
post #13

I am still waiting for Rust people to do something new and innovative. I acknowledge that Rust itself is innovative, don't get me wrong, But where are the true proof-of-concept projects such as the Linux kernel, qemu, git, postgresql, vim, etc. of the Rust world? Rewriting code is a waste of time of time, fragments the eco system, and introduces new bugs. And with a new focus on memory safety and analysis tools and s…

Aren't most of the standalone wasm runtimes written in rust?

Re: Memory-safe, clean implementation of classic Posix "BC" calculator

#15
post #13

I am still waiting for Rust people to do something new and innovative. I acknowledge that Rust itself is innovative, don't get me wrong, But where are the true proof-of-concept projects such as the Linux kernel, qemu, git, postgresql, vim, etc. of the Rust world? Rewriting code is a waste of time of time, fragments the eco system, and introduces new bugs. And with a new focus on memory safety and analysis tools and s…

There's tons of stuff of the kind you're describing in Rust, more than I care to list but I'll offer you some [1-3] that I think would interest you (based on this comment alone). If your perception of what people are doing in Rust is driven by what people post to HN, it may not reflect everything that is going on in that ecosystem.

[1] https://os.phil-opp.com/

[2] https://gitlab.redox-os.org/redox-os/redox

[3] https://oxide.computer/

Re: Memory-safe, clean implementation of classic Posix "BC" calculator

#16

Am I the only one who thinks we need less short-lived tools written in memory-safe languages an more system infrastructure written in said languages? Don't take me wrong, I like when someone creates a better version of something existing. For example, ripgrep is fantastic. But seeing the recent trend of rewriting whatever in Rust just because, I can't help wondering why I should bother whether bc leaks or not...

Rust does not guarantee absence of memory leaks, does it?

I think this is the general "rewriting solves all problems" fallacy, which is rarely true, but who wants to maintain existing code, if there is something new and cool? So we get rewrites which largely just add new projects that then have to be maintained in parallel, because they rarely are to completely replace the old (if at all) and at some point the new is not cool anymore and that it is just another thing. I like some key ideas of Rust, but overall I still like many things about C much more (stability, fast compile times, simplicity), so I would much prefer people improving memory safety in C projects.

Re: Memory-safe, clean implementation of classic Posix "BC" calculator

#17

Lost as to why there is a tests folder yet the test function marked with the #[test] attribute is being added to /src: https://github.com/rustcoreutils/posixutils-rs/pull/132/comm... edit: Since the change was to the grammar saved in a separate .pest file, which is separated from the procedural code, then would that make the test an integration rather than a unit test as the "parse_program" function is public?

The `parse_program` function is public inside the `bc_util::parser` module, and the parser module is marked public inside `bc_util`, but in the `calc/src/bc.rs` file the `bc_util` mod isn't public, and can't be accessed from a test inside the `tests/` folder, which only has access to the public API exported by the library.

Re: Memory-safe, clean implementation of classic Posix "BC" calculator

#18
post #15
post #13

I am still waiting for Rust people to do something new and innovative. I acknowledge that Rust itself is innovative, don't get me wrong, But where are the true proof-of-concept projects such as the Linux kernel, qemu, git, postgresql, vim, etc. of the Rust world? Rewriting code is a waste of time of time, fragments the eco system, and introduces new bugs. And with a new focus on memory safety and analysis tools and s…

There's tons of stuff of the kind you're describing in Rust, more than I care to list but I'll offer you some [1-3] that I think would interest you (based on this comment alone). If your perception of what people are doing in Rust is driven by what people post to HN, it may not reflect everything that is going on in that ecosystem. [1] https://os.phil-opp.com/ [2] https://gitlab.redox-os.org/redox-os/redox [3] https:…

Fair enough, I may not have the full picture. But "writing an OS in Rust" sounds also seems the "innovative" part is that something is written in Rust. I do not need a new OS in written in a different language. I could use a good open-source CAD tool, or a good open-source FPGA tool chain (maybe those exist, I need to do some research). A language and projects written in it do not impress me if its own novelty is the selling point, but if the language can be used to solve problem I have. But yes, maybe those projects do exist somewhere...

Re: Memory-safe, clean implementation of classic Posix "BC" calculator

#19
post #13

I am still waiting for Rust people to do something new and innovative. I acknowledge that Rust itself is innovative, don't get me wrong, But where are the true proof-of-concept projects such as the Linux kernel, qemu, git, postgresql, vim, etc. of the Rust world? Rewriting code is a waste of time of time, fragments the eco system, and introduces new bugs. And with a new focus on memory safety and analysis tools and s…

Aren't most of the standalone wasm runtimes written in rust?

No idea, but according to this site: https://github.com/appcypher/awesome-wasm-runtimes there a wasm runtimes written in all kinds of languages. This does not appear to be a very challenging thing to do, but I haven't look at this closely.

Re: Memory-safe, clean implementation of classic Posix "BC" calculator

#20
post #18
post #15

Earlier quoted context omitted.

There's tons of stuff of the kind you're describing in Rust, more than I care to list but I'll offer you some [1-3] that I think would interest you (based on this comment alone). If your perception of what people are doing in Rust is driven by what people post to HN, it may not reflect everything that is going on in that ecosystem. [1] https://os.phil-opp.com/ [2] https://gitlab.redox-os.org/redox-os/redox [3] https:…

Fair enough, I may not have the full picture. But "writing an OS in Rust" sounds also seems the "innovative" part is that something is written in Rust. I do not need a new OS in written in a different language. I could use a good open-source CAD tool, or a good open-source FPGA tool chain (maybe those exist, I need to do some research). A language and projects written in it do not impress me if its own novelty is the…

You might be interested in https://mattferraro.dev/posts/cadmium

People are building cool stuff, and happen to do it in Rust.

Post reply on HN