5 ms·
The Rust ecosystem has lost sight of the forest for the trees in my opinion. I highly agree with Graydon's opinion in "Rust is mostly safety" [1] that it's rais
by tmccrmck 9y ago
The Rust ecosystem has lost sight of the forest for the trees in my opinion. I highly agree with Graydon's opinion in "Rust is mostly safety" [1] that it's raison d'être is memory safety and concurrency in the systems space. But strangely a significant amount of time is being put in to making it usable for other tasks. I think this has to do with the different cultures between C/C++ developers versus other developers, namely that developers coming from web development are younger and more used to jumping around to new languages and frameworks.
With it's borrowing semantics and steep learning curve, Rust will never gain significant market share in the world of web development. And why should it? Time to market matters more than speed. It's much easier to ramp up new hires on a C# or Go code base than on a Rust one. And the borrow checker will always create friction for people new to the language. As someone with a C++ background, it still took me over a month before I stopped fighting with the borrow checker and with lifetimes. I can't imagine how long it would take to get a completely new programmer up to speed.
[1] http://graydon2.dreamwidth.org/247406.html http://graydon2.dreamwidth.org/247406.html
- mmstick 9y agoWeb developers have zero issues with using Rust for web development though. The Rocket web framework is rather intuitive. I even built my website entirely in Rust with it. http://mmstick.tk http://mmstick.tk
- burntsushi 9y ago"zero issues" is a bridge too far. Rocket, for example, only works on nightly Rust, and that might be a non-starter for a lot of people.
- flukus 9y agoThis has been my biggest issue trying to learn rust, there are too many projects that only support the bleeding edge.
- burntsushi 9y agoRocket is one big one. Just recently though, serde and diesel started working well on stable Rust. Other than that, unless you're doing embedded stuff or SIMD, you should be fine on stable. Unfortunately, Rocket does not appear to be on track to work on stable Rust for the foreseeable future.
- flukus 9y agoI was hoping with serde being on stable things would settle down. What's keeping rocket on nightlies?
- steveklabnik 9y agoLots of things: https://github.com/SergioBenitez/Rocket/issues/19 https://github.com/SergioBenitez/Rocket/issues/19
- pingveno 9y agoThis issue has been greatly reduce since Rust 1.0 came out as more language features are stabilized. Just in 2017, Diesel (ORM) and Serde (serialization) have started being fully functional on stable Rust. Rocket is one of a rapidly shrinking set of libraries that relies on unstable features. As long as Rocket doesn't add a dependency on more unstable features, it too will join the ranks of stable-compatible crates soon.
- neandrake 9y agoMaybe it's nostalgia for pre-Web 2.0 designs but I love your website; it has character and feels personal compared to most pages I peruse.
- mmstick 9y agoThanks. I've never built a website before, but now I've built a website, and a web server + cms client at the same time. I've been thinking of open sourcing the code at some point in the future. The website stores all the content in a database, uses handlebar templates to generate HTML pages, stores the generated HTML pages in a concurrent hash map compressed with the native Rust implementation of Zopfli, and only regenerates pages after a set amount of time -- all in pure Rust. I can serve an unrealistic amount of requests per second -- just bottlenecked by a consumer-grade network connection.
- whyever 9y agoCouldn't you just gzip the HTML and serve it directly to the browser?
- mmstick 9y agoThe HTML pages are generated dynamically from content in my database, in the same manner that Wordpress works. Once a page for a URL has been generated, it is indeed gzipped with zopfli and stored in a concurrent hash map so that future requests for the same content will serve the already-compressed content. If the timestamp has expired and a user requests expired content, only then will that page be re-generated, re-compressed and updated. Without this, I would have to re-generate and re-compress the content each time I get a request.
- deleted 9y ago[deleted]
- deleted 9y ago[deleted]