22 ms·
Rust went from side project to world’s fastest growing language
- aliqot 4y agoim so tired of non-substance rust content on hn. i dont want to know THAT it is written in rust (shocking, i know!) I want to know WHAT made it better to be in rust rather than x. I'd read the shit out of an article about that. its starting to become a meme cheatcode, just add "in rust!" to the end of your post title and you'll get a baseline starter pack of hn votes
- ClapperHeid 4y agoI was going to add a boring "me too" reply. But then I re-wrote it in Rust and it's now 10 times more insightful!
- ihatepython 4y agoI am going to have to borrow this comment.
- jonpalmisc 4y agoFor how long?
- SCLeo 4y agoFor their entire 'lifetime.
- mrkeen 4y agoIt's just over-correction for past criticisms of other loved languages. "Oh yeah? If X is so good, why aren't there any real software projects written in it?" etc.
- pclmulqdq 4y agoThe constant Rust spam on the front page makes me think that there may be some sort of pro-rust bot that upvotes them. There probably isn't, just a lot of enthusiasm, but it's tiring. However, it has also convinced me that Rust isn't faster than C++ in practical applications, thanks to the number of "we moved our C++ codebase to Rust" blog posts that have 0 benchmarks. You can practically guarantee that if their code had gotten faster, they would have said something about it. That has dulled my enthusiasm for the language significantly. Also, it is humorous to me to see blog posts that say, "[Rust feature that causes inconvenience] enables compilers to do [compiler optimization that C++ compilers already do]."
- deleted 4y ago[deleted]
- imtringued 4y ago>Also, it is humorous to me to see blog posts that say, "[Rust feature that causes inconvenience] enables compilers to do [compiler optimization that C++ compilers already do]." What? You can't safely do strict aliasing in C++ and even if you did, it was broken anyway to the point where the Rust compiler had to disable it because of LLVM bugs. https://github.com/rust-lang/rust/issues/54878#issuecomment-429578187 https://github.com/rust-lang/rust/issues/54878#issuecomment-... https://news.ycombinator.com/item?id=25624538 https://news.ycombinator.com/item?id=25624538
- jcranmer 4y agoStrict aliasing maps to TBAA in LLVM; the buggy feature is noalias, which corresponds to C's restrict.
- pclmulqdq 4y agoThe restrict keyword historically has meant "I know these pointers are different, please optimize as though they are." It had nothing to do with correctness. It is quite tricky to check for correctness in the general case of this kind of keyword.
- hdhrufjdi 4y agoUsually everyone knows what made it better to be in Rust, especially when it comes to C and C++.
- andruby 4y agoN=1, but I don't always know what made it better in Rust.
- tiledjinn 4y agoI've never seen a need to use rust, and regularly work on small projects in C. As far as I can tell, there isn't really a compelling reason to switch.
- surfmike 4y agoSecurity / memory safety and preventing concurrency bugs Security is an especially big one for lots of systems
- aliqot 4y agoYou can just toss out names of qualities and it might impress someone with no experience but to the rest of us we're just waving our hands like "ok.. and then?" waiting for the substance, which this comment provides none of
- hardwaregeek 4y agoI'm not sure I agree. If anything someone with experience has first-hand knowledge of the perils of buffer overflows, double frees, and other memory bugs. Sure we can go into more detail but it's a little disingenuous to act as if someone with experience writing C would not be able to fill in the blanks.
- aliqot 4y ago>someone with experience writing C would not be able to fill in the blanks. "yeah well if you're smart you wouldn't need explanation" except the people you're swaying with such remarks aren't the ones who already know, its the ones who are afraid to ask lest they be judged so they just kinda laugh along and parrot the smartest-bully.
- timeon 4y ago> shocking, i know! How is most generic comment under HN Rust topic shocking?
- turtlebits 4y agoRust and Golang projects are generally more interesting as they generally are small static binaries and have the lowest friction to try out/deploy. It's almost the opposite effect of all the comments that appear on Electron projects regarding bloat.
- agumonkey 4y agoThere was an accumulation of trust in the fact that most rust rewrites would yield interesting results. So the gates are wide open now.
- ecmascript 4y agoI think Rust is probably great for certain types of projects that need effecient programs but the main problem I have always had is not having enough time and Rust does the reverse for me in that regard. It is hard to learn and takes quite some time to write compared to many other popular languages. For what benefit? Most languages are fast enough and the bugs I encounter is not bugs that Rust solves. I do web dev stuff, like I would assume most of us do, and the performance bottlenecks are pretty much never due to the language being too slow. Granted, I understand completely why large companies that work on complex systems have a use case for Rust, the main issue I have with the community is that it tries to sell itself as a solution to everything when in reality the most likely scenario for most of us is that we would be more productive and successful in basically any other language.
- chem83 4y agoRust has a nice implementation of discriminated unions/algebraic data types, which makes it easy to write the business logic with composability over inheritance. Which lang does that well with also pattern matching, non-nullability, explicit mutability etc.? Maybe OCalm? F#? Elm?
- ecmascript 4y agoMaybe I'm stupid but I don't really understand your first sentence. What does it mean? Care to elaborate?
- jjtheblunt 4y agoThere's no concise answer, but there's a fantastic book covering and motivating his first sentence. https://a.co/d/bZFsIyg https://a.co/d/bZFsIyg Domain Modelling Made Functional
- runevault 4y agoSame guy posts a lot of information about the topics on his website[1] as well. For anyone who isn't anti dotNet for various reasons such as being from Microsoft I recommend giving F# a try, it is a very nice language. [1] - https://fsharpforfunandprofit.com/ https://fsharpforfunandprofit.com/
- zabzonk 4y agoi may not have read the article correctly, but i see no actual evidence there that it is the "world's fastest growing language", whatever that might mean, except that there a lot of questions about it on SO (and of course posts like this on HN). also, possibly related, isn't it strange you see almost no more haskell posts here these days?
- yellow_lead 4y agoIt seems the title changed. It's now "How Rust went from a side project to the world’s most-loved programming language." The URL slug shows the old title perhaps.
- zabzonk 4y agoi can't believe there is ANY evidence for "most-loved"! most programmers have almost certainly never used it, much less loved it.
- sebzim4500 4y agoIt wins 'most loved' in the stackoverflow survey every year, so that is certainly some evidence.
- B8MGHCBekDuRi 4y agothe evidence is the same of the elections: if only 30% of the people vote, the most loved vote was non voting. I don't see PHP programmers going to Stackoverflow to vote for PHP, but it still gets a lot more things done than Rust, for sure. And not because they don't like the language, but because "normies" don't go out talking about their love for the hammer or their drill or their kitchen too... no wait, chefs talk about their knives constantly!
- hdhrufjdi 4y agoEver used Stackoverflow? They do yearly surveys. I am surprised there are people not aware of them
- sylware 4y agoIt is still missing some alternative rust-written rust compilers.
- winstonprivacy 4y agoThese days I code primarily in C++, which is what Rust seemingly is designed to replace. It doesn't, as far as I can tell. I optimize directly for the hardware I'm running on, which typically gives me 10-100x performance improvements. Controlling how memory is managed is critical. It's great when something new and better comes along if that's really the case, but I've seen the "incrementally better in certain use cases" play many times before.
- nitsky 4y ago> I optimize directly for the hardware I'm running on, which typically gives me 10-100x performance improvements. Controlling how memory is managed is critical. What makes you think you can't control how memory is managed in Rust? Rust doesn't have "automatic" memory management, it has a compiler that can help ensure you are managing memory correctly, and force you to type "unsafe" when you are doing things it doesn't understand.
- Galanwe 4y ago> it has a compiler that can help ensure you are managing memory correctly, and force you to type "unsafe" when you are doing things it doesn't understand. Well it's a bit more subtle than that if we're honest. Arguably, Rust does make a number of memory layouts (self referential structs, per struct allocators, non thread local addresses, etc) much harder to accomplish than "typing unsafe".
- wizzwizz4 4y agoIf you self-reference using pointers and guarantee the struct will never move, you don't even need unsafe. If you self-reference using offsets from the struct's base pointer, you need a splash of unsafe but your struct can be freely moved without invalidating its self-referential "pointers". Per-struct allocators are a work in progress (see https://github.com/rust-lang/wg-allocators/issues/48 https://github.com/rust-lang/wg-allocators/issues/48). Not sure what "non thread local addresses" means, but in my experience Rust is pretty good at sending data between threads (without moving it).
- Havoc 4y agoSeems like a bit of survivor bias at play too in that narrative. Don’t pretty much all languages start off that way?
- k__ 4y agoI'd guess, "pretty much all languages" don't have any growth at all.
- logifail 4y agoGoing from almost zero to some small number may present a rate of increase that appears huge. Going from very large to even larger still may be a much lower rate of increase. Never let the facts get the way of a good headline?
- k__ 4y agoTrue. But I'd assume that most are just used by their creators.
- marcosdumay 4y agoWell, if you use relative rates of growth, following an exponential curve, yes, that happens. If you use absolute rates of growth, following a linear curve, no, that's bullshit. The article has no numbers, but appears very strongly to use the second definition.
- logifail 4y ago> If you use absolute rates of growth I'm not sure what an "absolute rate" (of growth) is, can you explain? Aren't growth rates usually (always?) expressed as a percentage change of a variable over time? How could that be anything other than relative?
- B8MGHCBekDuRi 4y agogrowth, definition: the act or process, or a manner of growing; development; gradual increase. If something grows from 1 to 2 it doubled. If something grows from 100 to 101 its growth was 1%. In absolute terms it's the same amount. So you got it backwards.
- satvikpendem 4y agoNote that Rust changed significantly from the side project days to 1.0 and above. It used to have features like Go-like green threads, for instance.
- ModernMech 4y agoRemember the ~ operator? https://github.com/rust-lang/rfcs/pull/59 https://github.com/rust-lang/rfcs/pull/59
- satvikpendem 4y agoAnd now ~ seems to be used for keyword generics.
- no_wizard 4y agoI still think this is one area Rust missed the mark. Go concurrency is quite amazing. Its fast and easy to reason about. Every language can learn something by how goroutines work here. Most importantly, it feels like you're just interacting with synchronous code. There is no "what color is your function?"[0] problem. The fundamental primitives Rust decided to adopt are just not ergonomic by comparison, and suffers from the aforementioned "What Color Is Your Function?" problem. An otherwise great language decided to adopt an old hand grenade in regards to async primitives [0]: https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/ https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...
- satvikpendem 4y agoThey are looking to fix that problem with keyword generics.
- no_wizard 4y agois there anywhere we can see whats being proposed there? I couldn't find anything, but I also may not know exactly where to look
- Thaxll 4y agoWhere in the article it says that it's the fastest growing language?
- forgotpwd16 4y agoConsidering it can seen on slug, was probably the original title.
- jasfi 4y agoIt's great the memory-safe languages that don't sacrifice performance are growing in popularity. But I must ask, what does Rust do better than Nim?
- ursuscamp 4y agoIt's been a few years since I've used Nim, but outside of the language itself, the tooling around Rust is absolutely incredible. Rust Analyzer, Clippy, Cargo, etc.
- TheNorthman 4y agoNim, while providing the same memory safety as Rust, doesn't do so without overhead. So Nim very expressly sacrifices performance for safety. In rust, for example, it's possible to safely share data between threads without incurring costs of a garbage collector. Nim uses a different GC for each thread, so it naturally increases costs on a per-thread basis.
- planetis 4y agoNo more GC in Nim now there is an optional cycle collector https://nim-lang.org/blog/2020/12/08/introducing-orc.html https://nim-lang.org/blog/2020/12/08/introducing-orc.html it also offers experimental view types.
- TheNorthman 4y agoI was sort of vaguely aware of this but thank you for pointing it out! I think the point still stands, and that reference counting like this is just a different kind of garbage collection.
- samsquire 4y agoI would love to know how you build a language that: A) is easy to write one off scripts that do a job fast, with minimal thinking and effort. I am thinking of Python and Ruby. For me I can write code with high velocity in these languages. B) Executes loops very fast and does automatic vectorization C) Can scale toward large teams, such as that you can do drastic changes with faith that things shall not break at runtime. D) zero cost abstractions and minimal indirections. E) predictable runtime performance, no random pauses F) powerful tooling, such as package manager and IDE integration
- epage 4y ago> A) is easy to write one off scripts that do a job fast, with minimal thinking and effort. I am thinking of Python and Ruby. For me I can write code with high velocity in these languages. Once I wrap up some other projects, I plan to explore this space a little bit within Rust. imo the biggest bang for the buck is just having good `#!` support. Probably mid-year I expect to have a Pre-RFC up for single-file cargo packages. See https://github.com/epage/cargo-script-mvs/discussions/15 https://github.com/epage/cargo-script-mvs/discussions/15. A bigger effort is a batteries included, non-zero cost stdlib. I've started writing up my thoughts at https://github.com/ergo-rs/ergo https://github.com/ergo-rs/ergo. For more background on why I think these are important, see https://epage.github.io/blog/2021/09/learning-rust/ https://epage.github.io/blog/2021/09/learning-rust/. Would love feedback on these ideas and other ways to make Rust easy to use without sacrificing what makes Rust it is.
- duped 4y ago> imo the biggest bang for the buck is just having good `#!` support. Shebangs don't really make sense for AOT compiled languages and I don't know why you would really want one, but you can add `#!/usr/bin/env -S cargo run` to the top of a Cargo.toml file today and it will "work." I just think the premise of "why didn't you write your last script in Rust" is flawed. It's a systems programming language, if I'm writing scripts I don't really care about the same things - like static typing or meticulous error handling. It sounds like high effort and low reward imo. A REPL though (not a true one necessarily - but live-reloading of dynamic rlibs and using dynamic dispatch in place of monomorphization for REPL-builds) would be extremely useful as a workflow tool.
- bmitc 4y agoI just wish it was simpler. I never saw it in its infancy, but from what I can gather, it seems a huge amount of bloat was added to the original design.
- hdhrufjdi 4y agoBloat like?
- bmitc 4y agoBloat is probably the wrong word, but I meant bloat in terms of complexity, at least from my perspective in terms of how easy it is to learn.
- pornel 4y agoI've programmed in Rust since 0.7 and I can assure you that the Rust today is the leanest, easiest to learn version of the language. Since 1.0 Rust has added ability to use arrays larger than 32 elements. That's not bloat, that's a fix of an embarrassingly large TODO left in 1.0. Rust added a new module system, which most people find easier to use than the original one. The new one technically does more, but these are things that everyone expected it to do anyway (e.g. in Rust 1.0 use of `std` in code worked only in some files, sometimes, because reasons. Now it works in every file, even though technically it's a more complicated name lookup). Rust has added a new borrow checker. The implementation is waaay more complicated than the original scope-based one, but the result for the end user is that it mostly just works. In Rust 1.0 lots of borrowing didn't work for dumb reasons. You used to have to declare variables precisely in a reverse order of their destruction, or the code wouldn't compile. You often had to add extra {} around lines of code that mutated collections, because the simplistic borrow checker didn't understand when the mutation ended. Even async, which itself is a big new feature, simplified networking code a lot. I've written a network service in Rust before async, and it was a pain, and run-time overhead, to deal with ownership in callback closures that required manual reference counting and didn't allow references. Async in Rust still has its quirks and limitations, but Rust 1.0 had all of them, and then some more. Most importantly, Rust error messages have massively improved since 1.0. Things that used to be gotchas where people were getting completely stuck (such as needing .as_ref() on Option) are now pointed out by the compiler. The compiler is now much faster, and generates better code. Rust has matured, and almost everything it has added since 1.0 should have been in 1.0.
- sashank_1509 4y ago[flagged]
- MisterTea 4y agoTo me it seems LGBTQ people are drawn to interesting things that differ from the mainstream. A small, weird, underestimated project which becomes a mainstream success parallels their own identity struggle.
- B8MGHCBekDuRi 4y agopopular among coders != successful C/C++ are successful because even my mother knows about them.
- MisterTea 4y ago> popular among coders != successful Not that these project become/are successful but the fact that LGBTQ people enjoy helping to make it successful. e.g. "Everyone thought this software was weird, scary and looked down upon it but we helped prove that it is a wonderful thing once you get to know it"
- B8MGHCBekDuRi 4y ago> but the fact that LGBTQ people enjoy helping to make it successful. can we stop idolizing things that are so common, they're boring? I've worked with LGBTQ people in software engineering before the LGBTQ acronym was even invented and they were 10 to 20 years older than me already in the 90s... Why there are people pretending that the World did not exist and had different rules before Rust? Is Rust a new kind of religion? It looks like it is for some people.
- mempko 4y ago[flagged]
- 4y ago
- indigoabstract 4y ago> “In C or C++ you always have this fear that your code will just randomly explode,” says Mara Bos, cofounder of the drone firm Fusion Engineering and head of Rust’s library team. That sounds like a completely valid reason to abandon C++ over Rust. I mean, what self-respecting programmer that keeps up to date with the trends would use a such a dangerous language that makes code blow up in their face? That is so '80s. Well, I am joking, of course, but that comment is hard to take seriously.
- pjc50 4y agoI can't follow which bits of this comment are supposed to be serious or joking, but: > use a such a dangerous language that makes code blow up in their face? There have simply been too many CVEs relating to memory safety in C and C++ software. It's not the 80s any more and we can't afford that.
- pclmulqdq 4y agoThere are a lot of places where CVEs don't matter. The HFT firm I worked at groaned over Spectre and Meltdown mitigations, because now our CPUs will be slowed down by not using unsafe behavior. Similarly, I bet a lot of video game folks also didn't like them. If you aren't connecting to the network or running in any sort of privileged mode, the space of attacks that you need to care about is pretty limited. Ironically, the answer to a lot of unsafe input in Rust is to crash (if your error handling logic didn't catch it), which is something that you likely care about a lot. Most players care a lot less about corruption of the internal state of your video game than they do about crashes.
- tiledjinn 4y agoCorruption of internal state is generally what leads to crashes. But yes, having worked in service games for over a decade now, clients are treated as untrusted agents regardless. CVEs that result in control over local execution are mostly not interesting. At least for the purpose of maintaining the game; platform holders _do_ care, mostly on fears of piracy. Galoob didn't cause revenue issues with Game Genie in the 90's. And revenue is the thing what matters.
- FpUser 4y ago>"> “In C or C++ you always have this fear that your code will just randomly explode,” No I do not. I have a fear of sectarian fanatism where each sect is trying to force their way of doing things and declaring the rest being evil.
- mecsred 4y agoObligatory xkcd[1] [1] https://xkcd.com/1102/ https://xkcd.com/1102/
- darthrupert 4y agoI've been writing some typescript lately. I had gotten a bit bored about Rust but oh man. The weakness of TS makes me really appreciate the sort of invisible things Rust does right.
- oslac 4y agoIt is so fun to write applications with.
- hgs3 4y ago> It is so fun to write applications with. I can't tell if this is sarcasm or not.
- zitterbewegung 4y agoIn Github's analysis of fasting growing language they state that Hashicorp Configuration Language was the fastest from 2021 to 2022. In 2021 from Jetbrains it is in the top five of languages to adopt and or replace. I would like to see the data that MIT is using to figure out their thesis. https://octoverse.github.com/2022/top-programming-languages https://octoverse.github.com/2022/top-programming-languages https://www.jetbrains.com/lp/devecosystem-2021/ https://www.jetbrains.com/lp/devecosystem-2021/
- rdsubhas 4y agoThat's a bit pedantic. HCL is not a language you can ever use to write or distribute a program. It's for configuration files. This is almost like saying "YAML is the fastest growing language" few years ago. It doesn't contribute to a healthy discussion. MIT can very well use the exact same data, where it shows Rust at the top at 50.5% (excluding config languages like HCL).
- thunkshift1 4y agoI see a humungous amount of astro turfing for rust adoption on hn.. I wonder why its so damn important to love rust..
- oconnor663 4y agoIf someone's paying folks to shill Rust, then they owe me money!
- frellus 4y agoThe title of the article is actually, "How Rust went from a side project to the world’s most-loved programming language" .. which is so annoying. "Most-loved" cannot be measured, it's so subjective. Why couldn't they have just said, "fastest growing" or something else? Does everything from media have to be designed to grab eyes, even out of the MIT Technology Review for godssake?
- legerdemain 4y ago"Most-loved" has definitely been measured. It's a direct finding from StackOverflow's developer survey. https://stackoverflow.blog/2020/06/05/why-the-developers-who-use-rust-love-it-so-much/ https://stackoverflow.blog/2020/06/05/why-the-developers-who...
- 60secs 4y agoTony Hoare: billion dollar mistake adding NULL to algol in 1965 Graydon Hoare: cracks knuckles in 2006
- up2isomorphism 4y agoThere is a C ssl library and a rust ssl library, which one do you choose? There is also a http library I C and rust , which one do you choose? If C ones are battle tested, I will not choose rust for a simple reason, software is error prone in nature, and believe certain practices will fundamentally change that is just selling snake oil.