Live data from Hacker News

Implications of Rewriting a Browser Component in Rust

hacks.mozilla.org

241–250 of 279 posts

Re: Implications of Rewriting a Browser Component in Rust

#241
Meh. The whole thing seems weird to me.

We totally tried to write this twice then we switched to language x and everything is great. Feels like something a language zealot would say. I would scoff if someone at my company rewrote a core section in a different language. It is their language so maybe they just told them to do it that way ha.

Re: Implications of Rewriting a Browser Component in Rust

#242
post #215

Earlier quoted context omitted.

I knew you could turn off the runtime but not about the formal verification lint tools that make it safe to do so. My reference for performance is the benchmark game. If you or someone else can mod those programs to beat rust I'd be thrilled. I like Ada.

Many planes, trains, rockets and medical devices run on Ada. There is more to commercial compilers than winning the benchmarks game.

Those things don't need to be particularly fast. What they need is consistent and predictable performance and resource usage.

Re: Implications of Rewriting a Browser Component in Rust

#243

Earlier quoted context omitted.

I write Java daily, I haven't seen one in a production environment in... at least recent memory. Most common NPEs I've seen can be resolved by doing two things: 1) for returning a single, nullable value, wrap it in Optional. 2) Never return null collections, always default to an empty collection instead. More nuanced ones can often be caught by using all args constructors and requiring the constructor values with Obj…

NPEs literally The Billion Dollar Mistake, and you don't think they are a big deal? https://www.infoq.com/presentations/Null-References-The-Bill...

In my experience null pointers and unassigned variables were a big problem in C an C++. But in java? They were never something that really caused a major issue. Most of them turn up in tests and are really easy to fix because you get an exception stack. Very few turn up in production and often it is because something else failed at runtime to cause it. If the null pointer wasn't there you would have had to deal with that other failure anyway.

Re: Implications of Rewriting a Browser Component in Rust

#244
post #227

Earlier quoted context omitted.

A system crash is a bug. Period. In many cases it could lead to Denial of Service. An insulin pump can stop working. I remember when C# came out almost 20 years ago. People said "I can forget about managing memory so I can focus on the logic". Programs kept crashing, memory problems were still there. The article goes with "...remove the burden of memory safety from our shoulders, allowing us to focus on logical corre…

A crash is a bug but not a security problem.

Such affirmation requires that a crash will never produce a security problem. But for example...

"Families are LOCKED OUT of or INSIDE their homes as Yale 'smart' security app crashes leaving dozens stranded"

https://www.dailymail.co.uk/news/article-6268379/People-lock...

"Households up and down the UK were unable to lock or unlock their doors"

An unlocked door it's a security problem too...

Re: Implications of Rewriting a Browser Component in Rust

#245
post #215

Earlier quoted context omitted.

I knew you could turn off the runtime but not about the formal verification lint tools that make it safe to do so. My reference for performance is the benchmark game. If you or someone else can mod those programs to beat rust I'd be thrilled. I like Ada.

Many planes, trains, rockets and medical devices run on Ada. There is more to commercial compilers than winning the benchmarks game.

Most of my experience is embedded c++ but I have written ada rust and a fair bit of jovial73. Rust is a perfect fit for those same domains. Most o the things that ran Ada in the US have now switched to c++. Do178b certified safety critical c++ is a horrible thing to develop. I'm hoping rust comes in to fix that.

Re: Implications of Rewriting a Browser Component in Rust

#246
post #215

Earlier quoted context omitted.

Many planes, trains, rockets and medical devices run on Ada. There is more to commercial compilers than winning the benchmarks game.

Those things don't need to be particularly fast. What they need is consistent and predictable performance and resource usage.

Planes trains and rockets have more sensors than ever and speed is very important.

Re: Implications of Rewriting a Browser Component in Rust

#247
post #215

Earlier quoted context omitted.

Many planes, trains, rockets and medical devices run on Ada. There is more to commercial compilers than winning the benchmarks game.

Those things don't need to be particularly fast. What they need is consistent and predictable performance and resource usage.

[deleted]

Re: Implications of Rewriting a Browser Component in Rust

#248

Earlier quoted context omitted.

>> [...] solves the same problems without a runtime, and about 3 times the performance. I think you should look more into Ada. The only "runtime" is for the exception handling and bounds checking, both of which can be turned off if needed. And I don't know where you got that "3 times" figure from? Do you have an example you are referring to?

I knew you could turn off the runtime but not about the formal verification lint tools that make it safe to do so. My reference for performance is the benchmark game. If you or someone else can mod those programs to beat rust I'd be thrilled. I like Ada.

I believe the performance differences on The Computer Language Benchmarks Game is largely due to the implementations themselves. For one, pidigits have been translated from Pascal to Ada using p2ada. I do not think that this is a fair comparison at all.

Re: Implications of Rewriting a Browser Component in Rust

#249

Earlier quoted context omitted.

For me, also primarily a Java person before Rust, it’s datarace safety that captured me. Java’s executors improve the world, but I can’t count the number of concurrency bugs that I had in Java that are not possible in safe Rust. This isn’t just my code, btw, but large teams where it’s hard to disseminate good practices when building threadsafe code. If it had been in Rust, those issues wouldn’t have happened. Other t…

Curious about memory usage too

I think the best way to look at it is that memory usage becomes predictable and GC pause free. An application of similar scale and implementation between Java and Rust won't necessarily use less memory when in Rust.

Re: Implications of Rewriting a Browser Component in Rust

#250

Earlier quoted context omitted.

I knew you could turn off the runtime but not about the formal verification lint tools that make it safe to do so. My reference for performance is the benchmark game. If you or someone else can mod those programs to beat rust I'd be thrilled. I like Ada.

I believe the performance differences on The Computer Language Benchmarks Game is largely due to the implementations themselves. For one, pidigits have been translated from Pascal to Ada using p2ada. I do not think that this is a fair comparison at all.

I agree on that one, I'm rusty at ada, bad pun, but someone should profile and fix it. The n body one is half the speed of rust and it is hand tweaked using simd instructions. I wouldn't mind at all goin back to Ada. Most of the people that switched to c++ did so in order to have a larger hiring pool or to seem more modern. Some of them are switching to safety critical Java now for the same reasons. I suspect safety critical python is on the horizon. If airliners have to start worrying about python 2/3 headaches I'll know it is time to retire.
Post reply on HN