News for hackers. Stuff that matters.
Re:The biggest threat to Rust's sustainability by robertlagrant on Friday March 19, 2021 @05:53AM (#26511580)
> Features that haven't been fully baked would be pushed in to the current release because people wouldn't want to wait another 6 months to see their work come to fruition.

This psychological tinkering isn't helpful. People can push unfinished stuff in any situation. E.g. you can close it off 5 months in and then stabilise for a month.

I don't think the OP is having trouble learning. They're having trouble with the almost-monthly changes.

Re:The biggest threat to Rust's sustainability by roca on Friday March 19, 2021 @07:43AM (#26512170)
I was at Mozilla when we switched from 3-to-6-monthly releases to 6-weekly releases. It really was an enormous positive improvement.

> you can close it off 5 months in and then stabilise for a month.

This doesn't help. If a release happens every six months then regardless of what you do during the release cycle, you are faced with situations where someone has a work item just about ready to ship in release X, but not quite, and you face enormous pressure to ship it in release X rather than in release X+1 six months later. On the flip side if you do force it to slip to release X+1 then that's several months of users not having the benefit even though it's ready.

If you're releasing every six weeks, there isn't any such pressure. Less work is shipped prematurely, less work is shipped later than necessary, and developers are less stressed.

Re:The biggest threat to Rust's sustainability by dragonelite on Friday March 19, 2021 @08:42AM (#26512595)
At the company I worked at right now we went from releasing every sprint at a specific release window. To lets release whenever we want because we have some blue-green support.

And it has been a game changer if you ask me, Jira tickets don't pile up in the test lane, testers don't have to do one big regression tests at the end of the sprint just to sure. Sometimes even making them work overtime just to be sure. The code area that introduced new bugs is way smaller and the bugs have become easier to trace down.

Re:The biggest threat to Rust's sustainability by nindalf on Friday March 19, 2021 @06:00AM (#26511628)
> People can push unfinished stuff in any situation.

But they don't in Rust. My example of Min Const Generics is an example of this. Async-Await (developed by GP on this thread) was also delayed to give it more time to bake.

I urge you to look at the releases page (https://github.com/rust-lang/rust/blob/master/RELEASES.md). Look at how few user facing changes are made with every release. This is a good thing! As long as you're ok with skipping these and the performance improvements, you can stay on an older release for basically forever. Most Rust libraries are conservative about their minimum supported Rust version (MSRV) so there isn't usually a push to upgrade at all.

If the OP wants a compiler and toolchain that only changes every six months, that's already available. He can stick with the same compiler for six months or even longer with 0 downsides.

Re:The biggest threat to Rust's sustainability by robertlagrant on Friday March 19, 2021 @04:26PM (#26517852)
> If the OP wants a compiler and toolchain that only changes every six months, that's already available. He can stick with the same compiler for six months or even longer with 0 downsides.

Sure, but there's also things like how long will the current version be supported if there are security issues, or similar. People also want a version that will be supported with bug/security fixes for 6 or 12 months vs "Oh it's broken? Upgrade to head."

Re:The biggest threat to Rust's sustainability by tubularhells on Friday March 19, 2021 @06:26AM (#26511780)
6 months in an enterprise setting means that we will never touch Rust.
Re:The biggest threat to Rust's sustainability by signal11 on Friday March 19, 2021 @08:12AM (#26512357)
That somehow rapid-release is antithetical to the enterprise is a very archaic view of enterprise computing. Enterprises use cloud HR software, Office suites (MS365 and Google Workspace), Salesforce, etc all the time and those update on a fairly frequent basis. Also, given the need to patch promptly, most forward-looking enterprises have much more responsive systems in place -- including investments in good CI/CD systems to deliver even internal software faster. So they're quite comfortable with the "new normal" of the software industry.

The most used enterprise OS, Windows, is rapid release too -- every 6 months, coincidentally! But there's a LTSB branch you can use. Java releases every 6 months too, and that hasn't halted enterprise adoption. Similarly with C#, not every team jumps to the latest language level just because it was released. Teams should pick language updates at a speed that suits them -- but hopefully not so slowly that moving to newer releases becomes difficult.

Similarly with Go. Why should it be any different with Rust? To the extent that enterprises are using the latter two in massive numbers. The key thing is, as others have noted, is stability and a lack of breaking changes.

Re:The biggest threat to Rust's sustainability by nobleach on Friday March 19, 2021 @09:22AM (#26512980)
>with C#, not every team jumps to the latest language level just because it was released.

Exactly when it comes to Java, even though there is now a 6 month release cadence, take a survey of which version most are using. Certainly every time I bring this up, someone pops up and says, "I'm using 11" or "10". But the vast majority of "enterprises" are at max, Java 8. And they'll remain on 8 until something forces them off of it. Enterprises by nature move at a glacial pace. So their reason for adopting Java is not because it's "moving fast".

Re:The biggest threat to Rust's sustainability by treis on Friday March 19, 2021 @12:33PM (#26515345)
I've come to dislike versioning stuff more and more. It's an invitation for people to get stuck on a version. And as time goes on it becomes harder to upgrade to the latest version so the trap continues to tighten. Enterprisey stuff should choose things that prioritize backwards compatibility and well tested changes. Settling on a LTS version seems attractive but it's a trap and should be avoided.
Re:The biggest threat to Rust's sustainability by signal11 on Friday March 19, 2021 @11:32AM (#26514491)
> So their reason for adopting Java is not because it's "moving fast".

I was replying to the parent poster, who said that moving fast is a roadblock to enterprise adoption. Whether enterprises adopt Java because it's moving fast is another question altogether. Certainly no one is deserting Java because of the decision to boost its release cadence.

> Enterprises by nature move at a glacial pace

I think it depends on the enterprise.[1]

Cyber-Security has changed the game for many enterprises very fundamentally. Well-run enterprises now patch more promptly than many consumers -- at least, certainly the consumers who don't auto-update. Well, unless they want a Maersk-like incident[2], or be infected by ransomware. Maersk's incident cost it $200M if you believe Forbes.

About slow JVM upgrades, a lot of that is a cost/benefit calculation or poor technical leadership. CIOs and COOs (or audit, for that matter) have no interest in which Java version you use. The only questions are: Is it secure? Does it make commercial sense?

For actively developed software, staying on a recent-ish Java isn't a problem (many good enterprises have adopted Devops in some shape and form -- just add a task to your CI server to test on the latest JRE) once your engineering team has crossed the Java 8-to-11 hump. If you do that, you get to not pay Oracle $$$ per desktop/server every year (or you could use Corretto etc, but most enterprises will choose to pay Oracle). Or you could simply upgrade for the productivity & JVM improvements.

Legacy products not in active development are another matter, but even there -- the cost of not getting security updates is too high nowadays, so you have to spend money to secure it -- and legacy software has other costs too[3]. So unless you're a developer working on a legacy app, or an app who's design is so poor that it's locked into Java 8, there's no reason you couldn't be on Java 11 soon and get on the rapid cadence train yourself thereafter. It's really about how nimble your team is.

Of course, you could be unfortunate enough to work in an enterprise that doesn't take cyber-security seriously, in which case YOLO.

[1] https://news.ycombinator.com/item?id=25873325

[2] https://www.forbes.com/sites/leemathews/2017/08/16/notpetya-...

[3] https://arstechnica.com/tech-policy/2021/02/citibank-just-go...

Re:The biggest threat to Rust's sustainability by api on Friday March 19, 2021 @10:10AM (#26513508)
Cloud hosted SaaS may release a lot faster but it also means you are not on the hook for supporting it.
Re:The biggest threat to Rust's sustainability by paavohtl on Friday March 19, 2021 @06:28AM (#26511788)
There are generally speaking no breaking changes. Upgrading the toolchain practically never requires any changes to code.
Re:The biggest threat to Rust's sustainability by DyslexicAtheist on Friday March 19, 2021 @07:03AM (#26511948)
> Upgrading the toolchain practically never requires any changes to code.

if you work on safety/security critical systems upgrading the toolchain is considered like changing the tires on a moving vehicle. We have introduced and many weeks later discovered critical (and hard to trace) bugs simply by changing -O2 to -O3 in gcc that ended in sporadic crashes when cross-compiling for 1 specific platform. (which is a change much less severe than upgrading gcc itself) And I'd be surprised if upgrading the toolchain wouldn't potentially introduce similar hard to trace issues in rust.

My point is that just because the first 2 months after upgrade look like there were no required changes in code doesn't mean there are none. I see rust being used in very large companies for internal projects, test harnesses, and other glue/plumbing. And the places I know are really reluctant to go all the way in and substitute their ~30 years of experience with C/C++ with something that remains a constantly moving target. To be fair there are other reasons such as culture, and distribution of skills across the team that drive these decisions but my main point still holds (i think).

Re:The biggest threat to Rust's sustainability by roca on Friday March 19, 2021 @07:34AM (#26512123)
> changing -O2 to -O3 in gcc that ended in sporadic crashes when cross-compiling for 1 specific platform.

Sure, this happens regularly in C and C++ because large programs inevitably depend on undefined behaviour, and changing compiler versions, optimization levels and target platforms is allowed to change that behaviour.

For the last five years I've been writing 99% safe Rust code, which is designed to have no undefined behavior, and I think it's not a coincidence that I can't remember ever having a compiler update break code at runtime. Once in a long while a compiler update will fail to compile some existing code, but that's not a safety issue.

The idea that C and C++ compilers are somehow more stable across releases is a mirage. https://lwn.net/Articles/845691/ https://lwn.net/Articles/845775/

Re:The biggest threat to Rust's sustainability by bluGill on Friday March 19, 2021 @10:16AM (#26513583)
No, this happens because bugs in compilers happen. Nothing to do with undefined behavior. (Which is a separate problem)
Re:The biggest threat to Rust's sustainability by steveklabnik on Friday March 19, 2021 @10:24AM (#26513684)
It can be both.
Re:The biggest threat to Rust's sustainability by bsder on Friday March 19, 2021 @07:21AM (#26512041)
1) Sorry, but if you're talking safety critical, then you're talking Sealed Rust/Ferrocene which is talked about here: https://ferrous-systems.com/blog/sealed-rust-the-plan/

I mean, even with C, there is a very circumscribed subset that you use for "safety critical" applications.

2) People are banging on about Rust not being stable but the Rust Embedded guys DO lag for stability--so you can have stability if you choose. And Rust is by far the best language I have seen about being able to stay on old compiler versions and still use newer libraries.

3) I find crappy libraries to be the biggest threat to Rust's sustainability. There was a big "Gold Rush" mentality and a whole lot of unqualified people built a whole lot of crap libraries with no good way for someone to come along later and to flag "That's a crap library, please remove it from crates.io permanently".

Re:The biggest threat to Rust's sustainability by nicoburns on Friday March 19, 2021 @07:18AM (#26512023)
If you don't upgrade the compiler at all, then why does it matter how fast it updates? You're not going to be using the new version anyway.
Re:The biggest threat to Rust's sustainability by pjmlp on Friday March 19, 2021 @09:44AM (#26513226)
Depends on the libraries I guess, when that CVE fix is only available on a version that requires a compiler upgrade.
Re:The biggest threat to Rust's sustainability by bluGill on Friday March 19, 2021 @10:38AM (#26513834)
Eventually they will stop making the CPU we use and then the new CPU only works with a new compiler.
Re:The biggest threat to Rust's sustainability by dfhjgkljhf44 on Friday March 19, 2021 @08:01AM (#26512286)
>-O2 to -O3 in gcc

This sounds more like undefined behavior in your codebase than a compiler error. I don't know Rust but I'm pretty sure the whole selling point is that you won't run into problems like this.

Re:The biggest threat to Rust's sustainability by tsimionescu on Friday March 19, 2021 @08:46AM (#26512622)
There are active open bugs today in GCC and clang for x86 where optimizations can break standards-correct code [0] (writing to a union through a pointer to a currently inactive member, which std::variant does internally). For more obscure platforms and older releases, there are bound to be numerous bugs. In particular, volatile handling is notoriously shoddy on many platforms.

As an aside, the clang bug would also affect Rust if they used that type of optimization (assuming strict aliasing rules).

[0] https://lists.isocpp.org/std-discussion/2020/10/0882.php

Re:The biggest threat to Rust's sustainability by ordu on Friday March 19, 2021 @09:32AM (#26513088)
> As an aside, the clang bug would also affect Rust if they used that type of optimization (assuming strict aliasing rules).

No, this bug cannot affect rust, because rust wouldn't allow to pass into a function three mutable references pointing to the same object. It wouldn't even allow two, nor one mutable and one immutable. Either it pass one mutable reference, or any number of immutable.

Re:The biggest threat to Rust's sustainability by steveklabnik on Friday March 19, 2021 @09:34AM (#26513113)
This one (probably) wouldn’t, but there have been codegen bugs in Rust, some that have blocked people from upgrading before they can be fixed.

It doesn’t happen often, but it does happen.

Re:The biggest threat to Rust's sustainability by tsimionescu on Friday March 19, 2021 @01:48PM (#26516262)
Not sure if that bug explicitly, but the fact that clang in noalias mode assumes that two pointers to different variants of the same union are not aliased (if it can't see from the immediate context that they are pointers to the same union variable) can very much affect Rust - if you call one function with a &mut to one field, than another function with a &mut to another field, and the optimizer inlines both functions in a broader context and loses the union information, you may well see reordering issues even in pure safe Rust.

Anyway, Rust has found plenty of noalias bugs in clang, which is why it still doesn't compile with noalias optimizations turned on.

Re:The biggest threat to Rust's sustainability by dralley on Friday March 19, 2021 @02:38PM (#26516895)
>And I'd be surprised if upgrading the toolchain wouldn't potentially introduce similar hard to trace issues in rust.

It absolutely happens, but less often than you would think.

Rust has a tool named "crater" which compiles and executing tests for every package uploaded to crates.io (and some which are just on github).

It's not perfect but supposedly it catches quite a lot of bugs.

Re:The biggest threat to Rust's sustainability by afarrell on Friday March 19, 2021 @06:38AM (#26511828)
> > Features that haven't been fully baked would be pushed in to the current release because people wouldn't want to wait another 6 months to see their work come to fruition.

> This psychological tinkering isn't helpful.

The former comment is thoughtfulness about the ways that a system of work influences contributors mindset and thereby project quality. Even if the specific conclusion was incorrect, the earnest attempt is necessary to project health. If you disagree, you probably want to short-sell Toyota stock.

Re:The biggest threat to Rust's sustainability by robertlagrant on Sunday March 21, 2021 @08:49AM (#26530012)
What on earth is projecting health?
Re:The biggest threat to Rust's sustainability by fernandogmo on Sunday March 21, 2021 @02:56PM (#26532897)
I read it the same way at first but maybe they mean "necessary to the health of the project".
Re:The biggest threat to Rust's sustainability by afarrell on Monday March 22, 2021 @04:47AM (#26538251)
Yes. By “project health”, I mean is “the health of the project”.
Re:The biggest threat to Rust's sustainability by ChrisSD on Friday March 19, 2021 @05:56AM (#26511600)
Here are the release notes for the last release: https://blog.rust-lang.org/2021/02/11/Rust-1.50.0.html

I'm curious, what in there would make someone have to deal with the changes?

Re:The biggest threat to Rust's sustainability by jhugo on Friday March 19, 2021 @06:23AM (#26511761)
Maintaining ~30 Rust applications and a few libraries at work, a handful of open-source projects, and a few embedded Rust personal projects, I didn't need to change anything at all after updating (which is the norm for most Rust releases).
Re:The biggest threat to Rust's sustainability by estebank on Friday March 19, 2021 @12:27PM (#26515267)
In practice, the biggest things have been rustc and clippy lints starting detecting something that was either stylistically dubious or actually problematic previously existing in our codebase.
Re:The biggest threat to Rust's sustainability by a_humean on Friday March 19, 2021 @06:29AM (#26511790)
I cannot imagine anyone would have to change anything.