Live data from Hacker News

Rust 1.53

blog.rust-lang.org

91–98 of 98 posts

Re: Rust 1.53

#91
post #39

Earlier quoted context omitted.

Can't you just use poop emoji in comments and search for them like TODOs?

But then others won't feel dirty when they use the method. The goal is to make people feel bad when they add more usages of it and make it harder to remove. This is the case when it's easier and faster than the proper way. When there is crunch time it's hard to push your lead to reject the PR so it's soft pressure and it's apparent at the call site whereas a TODO in the method definition is not.

Reminds me of Haskell's tendency to prepend "unsafe" (or, in one case where that was insufficiently dire, "accursedUnutterable"), although the use case is a little different.

Re: Rust 1.53

#92
post #90

Earlier quoted context omitted.

In the English speaking world, I have a hard time justifying untypeable identifiers. Maybe, and this is a fat maybe, Greek symbols could make the odd write-once math or scientific code easier to read. It would be bonkers to use any non-ascii codepoints in a public API.

I tried doing this once, but it's not worth the pain of having to switch keyboards or copy-paste symbols

https://en.m.wikipedia.org/wiki/Compose_key

Re: Rust 1.53

#93
post #29

Earlier quoted context omitted.

> I feel some of the concepts are very esoteric for a normal enterprise Java/C#/JS/Python developer This notion is common among those who are first considering Rust, but also quite overblown in practice. The only thing that reasonably qualifies as "esoteric" in Rust is borrow checking and lifetimes, and these can be mitigated by using very simple idioms/patterns like cloning objects via .clone() or using copy-on-writ…

Disagree - a low level language can’t really mask itself as high level, the abstraction will always leak. Don’t get me wrong, Rust is a really great language and it is a very welcome addition to the for a long time seemingly stagnant low level world, but you won’t be able to refactor logic-related parts “without a thought” on memory layout, even ownership, etc —- something trivially done in high level languages. C++…

I actually find Rust easier to refactor Rust code than my other $DAYJOB languages, thanks to its strict type system, its informative function signatures, and its syntax. These are ingredients that make Rust programming "fearless".

Re: Rust 1.53

#94

Earlier quoted context omitted.

If you consider GitHub to be a reasonable metric of industry practice in general, then judging by these charts [ https://madnight.github.io/githut/#/pull_requests/2021/1 ], I would say that going mainstream in a couple years is not very likely at all. Tiobe [ https://www.tiobe.com/tiobe-index/ ] paints a similar picture. The number of Rust-specific jobs advertisements also don't seem to suggest a coming wave that emp…

Loom is a great example of the Java designers still not getting it. Taking on a lot of JVM complexity in order to reuse the same broken API.

Not breaking APIs is pretty considerate of your users.

Re: Rust 1.53

#95
post #39

Earlier quoted context omitted.

Can't you just use poop emoji in comments and search for them like TODOs?

But then others won't feel dirty when they use the method. The goal is to make people feel bad when they add more usages of it and make it harder to remove. This is the case when it's easier and faster than the proper way. When there is crunch time it's hard to push your lead to reject the PR so it's soft pressure and it's apparent at the call site whereas a TODO in the method definition is not.

But that's method shaming! /s

I guess you have a point. It's clearly a "let's meet in the back alley" API.

Re: Rust 1.53

#96
post #74
post #73

Earlier quoted context omitted.

Sigh, don't take your use case of GCs and apply it as a rule to others. I work in telecoms on the layer just above the FPGAs/DSP: even a 1ms 'pause' would be totally unacceptable here..

I think you are way overthinking my comment. I just added a note that for regular, user-space applications there really is no longer a reason to use low-level languages even if latency is important. Of course embedded will always exist, as well as specialized programs requiring utmost control over the machine.

I don't see any such note and it's 8 days later. May be you should check your comment again? Also, while games aren't exactly regular applications performance-wise, I think they fall more under that than embedded or utmost control and while a 1ms delay won't be the end of the world, it'll likely hurt.

Re: Rust 1.53

#97

Earlier quoted context omitted.

Loom is a great example of the Java designers still not getting it. Taking on a lot of JVM complexity in order to reuse the same broken API.

Not breaking APIs is pretty considerate of your users.

Agreed. But it can also mean not actually achieving at all what you set out to do. I don't know if that is the case for Loom specifically, but that seems to be what was implied by the parent comment.

Re: Rust 1.53

#98

Should one learn Rust, lets say after 3-4 years, i.e by mid 2020s, once it becomes more mainstream? The syntax of Rust is a mix of OCaml/C++ and I feel some of the concepts are very esoteric for a normal enterprise Java/C#/JS/Python developer, so it takes a lot of cognitive overload to master it. So is it worth learning now or later?

If you consider GitHub to be a reasonable metric of industry practice in general, then judging by these charts [ https://madnight.github.io/githut/#/pull_requests/2021/1 ], I would say that going mainstream in a couple years is not very likely at all. Tiobe [ https://www.tiobe.com/tiobe-index/ ] paints a similar picture. The number of Rust-specific jobs advertisements also don't seem to suggest a coming wave that emp…

I could never figure out Githut2.0. Githut1.0 had a much nicer interface and although Rust looked bad on first impression, just moving it left a set period of time (or vice versa moving Go right a set period) showed that Rust actually grew at a very similar rate as Go... until Rust started accelerating by around 2018. I suspect something similar may be the case on Githut2.0 but just too hard to tell. Linear graphs comparing exponential growths can be very deceiving.

In my experience TIOBE is very noisy and bad at predicting long-term trends for languages outside the top-ten or so. And it seems even worse recently due to Covid. Heck Julia recently jumped into the top-20 for a single motnh earlier this year before falling back to the mid 30's. And that isn't even all that uncommon for TIOBE. I think I see a trend of Rust slowly climbing, but it is hard to tell through the noise.

PYPL says Rust has respectable growth and that its growth is remarkably consistent (i.e. it is growing at a near constant expeonential rate until 2018, then slowing down a bit in 2018 and then continuing at a very constant and this time faster exponential growth rate.

Redmonk calls Rust the tortoise language (from the hare and the tortoise story). It's growth is never impressive, but its steadiness in growing is very impressive.

You actually do mention some success stories. Also, Amazon is using Rust for a lot more than Firecracker. A lot of their critical infra is in Rust. Also, rustls is pretty big, IMO. Finally an actually secure implementation of SSH. ;-) (And fast to boot.) The Ferrocene project project is fully open source, paid for in full by donations despite the considerable expense because some of the (very big) high integrity industry really want to use Rust The Linux kernel is seriously considering including Rust and Linus said something like Rust in the kernel is inevitable. The Linux kernel team (and Linus specifically) are notorious for their previously adamant hostility towards any language other than C in the kernel. They are starting carefully with just drivers but that's already way more than for example C++ ever managed. On the CNCF, we have TiKV and Linkerd2 in Rust. These aren't small or unimportant projects although, no, they don't quite match k8s.

Over all. Rust is trying to replace C/C++. That is a very tall order. No previous language have ever come close to where Rust currently is already in that task. But it is not going to happen over night. It is a huuuuuuge task that will take a lot of time and a lot of resources and a lot of mindshifts.

Regarding improvements in the other languages. Sure, but C++20_0000_000 will not come close to some of the advantages Rust already had by 1.0 unless they are willing to break backward compatibility to the point where you can just as well rewrite in Rust. All those languages are fundamentally broken or limited in ways that cannot be fixed or worked around. Rust also have historical baggage already. But it starts from a much better starting point with a lot of lessons learned.

How have unsafety been addressed in C/C++? C++20 is exactly as unsafe as C. It has much better what I call "safeness", but that's like saying by going from 1 to 10 I made progress towards infinity. It reduces some classes of errors, if you know what you are doing and apply considerable discipline. It doesn't eliminate any errors. C++20 is sill based on the C abstract machine, which is to say a DEC11. It is still very hard to do some optimizations that are easy or even trivial in Rust and some that would've been trivial if LLVM didn't miscompile perfectly correct code. C++20 still doesn't have a borrow checker and will never have one remotely as capable as Rust's. C++/Java/C#/Python/... are still OOP with inheritance which is fundamentally at odds with really capable composition which is fundamentally superior in expressive power and fits a lot of domains a lot better. Yes. Those languages can close the gap. They can never catch up. Can they get close enough to reduce the value proposition of the newer languages to the point where the newer languages (or some others even newer than these) won't take and hold a considerable fraction of their market share? I doubt that. But taking the market share of the incumbents will take very long. The network effect is brutal. But sometimes a disruptive technology is too good to stop it from -- eventually -- overcoming that effect. Of course, again exponential growth means what starts slow can quite suddenly explode. Also, when sufficient barriers are overcome or a language gets the rigth killer app it can again explode. May be for Rust that'll be high integrity or the Linux kernel. Consider that Redleaf is already vastly superior (better security, better performance, more features, more portable) and vastly cheaper to develop and verify than sel4 for one impressive achievement. Of course, until we can actually compile Redleaf on a certified rust compiler (probably by next year), Redleaf will remain an academic curiosity. But once we can? I'm no high integrity developer, but it seems the sky's the limit.

Yikes! That was a lot of words! Sorry, but I'm too tired to edit.

Post reply on HN