Live data from Hacker News

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

github.com

51–55 of 55 posts

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

#51
post #46

this must be parody. what exactly is the threatmodel where memory-safety matters for a calculator? did these devs miss the point of popping a calc.exe? surely no bc has ever been used for LPE or RCE.

The entire repo is written in Rust. bc is one of 145 utils specified by POSIX.

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

#52
post #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…

Rust does not guarantee the absence of memory leaks, that's correct.

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

#53
post #32
post #22

Earlier quoted context omitted.

What is the lack of a Rust equivalent to all those projects is because they already exist and work well, and Rust programmers aren't as mad to rewrite things as the stereotype suggests?

I disagree that they work well. A quick search of the CVE database will find many vulnerabilities that could have been prevented by rewriting in a memory safe language. Ideally, it should be done. However, rewriting those large projects would be a very difficult task, so it's probably not the best use of resources when there are still relatively easy security improvements available, such as implementing OpenBSD's ple…

> so it's probably not the best use of resources

Cool, so what useful software are rust programmers writing with all that free time? Where is it?

Where's the "killer app"? Whatever it is, nobody is talking about it.

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

#54
post #32

Earlier quoted context omitted.

I disagree that they work well. A quick search of the CVE database will find many vulnerabilities that could have been prevented by rewriting in a memory safe language. Ideally, it should be done. However, rewriting those large projects would be a very difficult task, so it's probably not the best use of resources when there are still relatively easy security improvements available, such as implementing OpenBSD's ple…

> so it's probably not the best use of resources Cool, so what useful software are rust programmers writing with all that free time? Where is it? Where's the "killer app"? Whatever it is, nobody is talking about it.

There’s millions of lines of production Rust at tons of companies. It’s beyond one single killer app. Basically every major tech company relies on at least some Rust at this point.

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

#55
post #32

Earlier quoted context omitted.

I disagree that they work well. A quick search of the CVE database will find many vulnerabilities that could have been prevented by rewriting in a memory safe language. Ideally, it should be done. However, rewriting those large projects would be a very difficult task, so it's probably not the best use of resources when there are still relatively easy security improvements available, such as implementing OpenBSD's ple…

> so it's probably not the best use of resources Cool, so what useful software are rust programmers writing with all that free time? Where is it? Where's the "killer app"? Whatever it is, nobody is talking about it.

[deleted]
Post reply on HN