I've had an unpleasant amount of crashes with Rust software because people are way too quick to grab `panic!` as an out. This was most shocking to me in some of the Rust code Mozilla had integrated into Firefox (the CSS styling code). There was some font cache shenanigans that was causing their font loading to work only semi-consistently, and that would outright crash this subsystem, and tofu-ify CJK text entirely as…
At least sources of panic! are easily greppable. Cutting corners on error handling is usually pretty obvious
No-Panic Rust: A Nice Technique for Systems Programming
21–30 of 143 posts
Re: No-Panic Rust: A Nice Technique for Systems Programming
#22Re: No-Panic Rust: A Nice Technique for Systems Programming
#23Earlier quoted context omitted.
At least sources of panic! are easily greppable. Cutting corners on error handling is usually pretty obvious
I mean... rust modules aren't typically in your CWD, no? they're not in some node_modules that you can grep, but in a cargo folder with /all of the libraries you ever used/, not just the ones you have for this one project.
But I would assume that for mozilla their entire CSS subsystem is pulled in as a git (hg?) submodule or something anyways.
Re: No-Panic Rust: A Nice Technique for Systems Programming
#24Earlier quoted context omitted.
At least sources of panic! are easily greppable. Cutting corners on error handling is usually pretty obvious
I mean... rust modules aren't typically in your CWD, no? they're not in some node_modules that you can grep, but in a cargo folder with /all of the libraries you ever used/, not just the ones you have for this one project.
Re: No-Panic Rust: A Nice Technique for Systems Programming
#25I've had an unpleasant amount of crashes with Rust software because people are way too quick to grab `panic!` as an out. This was most shocking to me in some of the Rust code Mozilla had integrated into Firefox (the CSS styling code). There was some font cache shenanigans that was causing their font loading to work only semi-consistently, and that would outright crash this subsystem, and tofu-ify CJK text entirely as…
Re: No-Panic Rust: A Nice Technique for Systems Programming
#26Re: No-Panic Rust: A Nice Technique for Systems Programming
#27Does anyone know if there's an obvious reason that adding a `no_panic` crate attribute wouldn't be feasible? It certainly seems like an "obvious" thing to add so I'm hesitant to take the obvious nerd snipe bait.
Re: No-Panic Rust: A Nice Technique for Systems Programming
#28Earlier quoted context omitted.
I mean... rust modules aren't typically in your CWD, no? they're not in some node_modules that you can grep, but in a cargo folder with /all of the libraries you ever used/, not just the ones you have for this one project.
Putting them all in the project root takes just a single `cargo vendor` command. But I would assume that for mozilla their entire CSS subsystem is pulled in as a git (hg?) submodule or something anyways.
Re: No-Panic Rust: A Nice Technique for Systems Programming
#29Instead of serializing data (to disk, not the network), it would be much faster if Rust allowed us to allocate datastructures directly in an mmapped file, and allowed us to read back the data (basically patching the pointers so they become valid if the base address changed).
Re: No-Panic Rust: A Nice Technique for Systems Programming
#30I've had an unpleasant amount of crashes with Rust software because people are way too quick to grab `panic!` as an out. This was most shocking to me in some of the Rust code Mozilla had integrated into Firefox (the CSS styling code). There was some font cache shenanigans that was causing their font loading to work only semi-consistently, and that would outright crash this subsystem, and tofu-ify CJK text entirely as…