423 points · by wycats · 11y ago · 131 comments
We've been using Rust in production for awhile now, specifically because of its combo of native speed and memory safety[1]. This bending of traditional tradeoffs has let us implement features that would have been otherwise impossible.
Interfacing with Ruby via its C APIs, we are able to do some pretty crazy stuff, like sample memory allocations in production with imperceptible overhead[2]. Most importantly, we can do it without fear of segfaulting our customers' servers.
It's really great to see people other than low-level bitbangers being added to the core team. In this case, having a production user and someone focused on new users demonstrates the Rust team's commitment to building a functionally diverse community.
Lastly, I think opening up the core team to a wide coalition of companies is the right way to build a robust, long-lived open source project. Yehuda talked a little bit about this in his Indie OSS talk[2]. There are several "pathogens" that can affect open source projects, and the more diverse the distribution of power, the more likely you are to be immune to these pathogens.
1: http://blog.skylight.io/bending-the-curve-writing-safe-fast-...
Could you talk more about what sort of features these are?
The closest I can get to a single "secret" is aggressively delegating. What I mean by this is delegating before you feel comfortable delegating. The only way I know of to get everything done that I want to get done is to set the vision for something, do some initial implementation work, and find people who share the vision to help as early as possible. The primary reason I end up working on so many things is that things are way more connected than you might expect, and the full picture of something like Ember involves both day-to-day work on Ember and advocacy around a whole host of related technologies. I'm very grateful for the number of groups that have welcomed my participation.
I got involved in Rust largely because it was the shortest path to a low-overhead, non-crashy agent for Skylight, even counting the work we had to do to keep up with ongoing development over the past year. When getting involved in a technology so early, I tend to get really invested, and try to find holes that I know how to fill and fill them. That's what happened with Cargo and a whole bunch of other areas in Rust.
Whether this perception is right or wrong, there are a number of prominent individuals within the open source community who are widely seen as rapidly jumping between trendy or hyped projects as they arise, to benefit from the exposure that this involvement can bring.
I'm not passing any judgment, mind you. I personally don't care which projects you choose to get involved with. However, I do know that other people have noticed certain trends around how certain open source developers move among projects, and this does negatively affect the impressions these people have of these open source developers and the projects they get involved with.
That just might be the best piece of advice I've heard in a long time.
—Linus Torvalds (2000-05-02)
Much of the software our company use has been shaped, at least in part, by Yehuda. I hope we'll grow the company, so that at some point we'll be able to reciprocate.
The rust community is lucky to have these two. I recently went through the rust guide and it's terrific! And as a happy rubygems user, I'm glad to see crates following a similar path.
> What exactly does this change entail, then?
The core team is listed at https://github.com/rust-lang/rust/wiki/Note-core-team . Basically, like most projects, it just adds weight to our opinions in decisions that are made, and that we're sure to be involved in making those decisions. In general, we try to get rough consensus for major decisions from the team + community.
Also, both Ember and Rust are critical for my business (Skylight), and keeping them both strong and effective are key to my business interests ;)
I'm looking forward to dumping Go in favor of Rust once it's competitive in terms of libraries/stdlib. I've been building some big stuff in Go recently (mostly around financial market simulation) and the language shortcomings have hurt a lot. I've been using Go since January 2013 as my primary language, but everything I've seen of and tried with Rust is amazing.
I'm not an expert in Go, so feel free to correct me there. Additionally, IIRC Rust wanted to take the same route like GO regarding interfaces and generics, but Niko made an argument that it is wrong turn to make.
http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan...
Is that not representative, or is the idea that Rust speeds the learning curve with its similarity to Ruby?
(2) The Haskell code is nowhere near idiomatic.
It is still useful to know that Haskell can be quite fast if necessary, but it likely does not reflect what your actual experience using Haskell would be.
TL;DR embedding small libraries with high-performance or low-memory requirements into programs written in high-level languages.
This means that, in theory, one could make a pretty good web framework in Rust that would be both quite fast and ergonomic. That said, writing those abstractions will take time, so we'll probably see lower-level HTTP libraries, followed by Express-style abstractions, followed further on by full-stack solutions like Rails.
The earlier parts of the stack are coming along quite well, so give it a few years and I think we'll have a pretty good story to tell. In the meantime, you can use Rust today very effectively as a language that you embed inside a high-level language, and I think a sizable chunk of the Rust community will use Rust for those kinds of embedding use-cases in perpetuity.
To be honest, if you think about your Rails controllers/models, 1. There isn't really all that much there(fat-models/controllers are pretty slim when you're language was built for web browsers/operating systems). 2. Think about your priorities. I can guarantee its not performance or safety. You want to build a content-rich/feature-full application. Basically, prioritize iteration speed, at all costs. No matter how good the Rust frameworks get, I don't think Rust will be the "iteration speed" language.
Meanwhile, I think, in the spirit of wycats' comment, image if ActiveRecord, Unicorn, Rack, the template renderers, etc, were all built with Rust, but still used through a Ruby interface. That would be quite the performance improvement for Rails and it would be interesting to compare its performance characteristics to a fully Rust web framework/application.
For example, you might implement a few parts of your rails app with rust to make them faster.