Hacker News new | past | comments | ask | show | jobs | submit login

Does anyone have information on the success of Rust rewrites? Rewrites in general have a bad reputation, but I'm wondering if it's better for Rust since this course of action is so popular.



> Rewrites in general have a bad reputation

This is because of Spolsky's classic essay deriding rewrites, but that was in the context of a software company in a competitive market where the cost of a rewrite had to be weighed against the opportunity cost of letting your competitors erode your market share with shiny new features that you could have been matching otherwise.

Absent a competitive market (e.g. in volunteer OSS) rewrites are often quite successful, as long as they're undertaken by the original authors of the tool and as long as they avoid the second-system effect. (Note that nowhere does it say that rewrites must be in a new language.)


I've rewritten two personal, non-trivial projects in Rust and both have been successful. The most recent Python -> Rust conversion did take a bit more time than expected but it's stable and has already saved me a few hundred in AppEngine hosting bills.


I'd be interested in some elaboration. How did switching languages save you money?


Presumably the normal way (since they're talking about hosting bills). Rust is faster than Python assuming you don't go out of your way to make an inefficient program, and typically consumes fewer resources (though not always, but for roughly equivalent programs it should). This means you can get away with either fewer instances to perform the same amount of work, or the same number instances but for less total time. (Which benefit you get depends on the style of your system, but both will save you money.)


I moved from AppEngine hosting to self-hosting (on a Pi). The server was expensive to run on AppEngine and effectively free to run at home. The CPU barely ticks up, even when running a load test.


I didn't realize that AppEngine supported Rust. Are you compiling to wasm and then using their JavaScript runtime?


Rewrites have a bad reputation in the business world because it's nearly impossible to sustain the political will to make it happen for long enough to actually complete the transition, so you get partial rewrites that were supposed to be full rewrites. Open source projects are usually governed by the contributors, so there's less pressure for them to call a rewrite off early if they were all on board to begin with.


idk, I've always found rewrites to almost always pay off. You get to start with a clean slate, roughly know what it needs to look like, and know where most if not all of the dragons lie. Maybe very large systems that can't reasonably be rewritten by a single person wouldn't benefit from it, but anything below that scale probably can.


afaik some famous ones are like InfluxDB, Fish, and of course some parts of linux kernel (v4l2) that most of them improved the performance while rust provides abstraction at zero cost so it does make life easier




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: