News for hackers. Stuff that matters.
Re:Diem – Facebook open source Cryptocurrency written in Rust by dingosity on Thursday October 27, 2022 @01:16PM (#33360814)
So much hard pass: cryptocurrencies (hard pass), facebook (hard pass) and rust (great language, tool ecosystem and community, but needs to stabilize before it's used for critical infrastructure.)
Re:Diem – Facebook open source Cryptocurrency written in Rust by tossl568 on Thursday October 27, 2022 @02:19PM (#33361715)
How do you see anything clearly from so far up on your high horse?
Re:Diem – Facebook open source Cryptocurrency written in Rust by Cantinflas on Thursday October 27, 2022 @03:54PM (#33363115)
Horses? Hard pass
Re:Diem – Facebook open source Cryptocurrency written in Rust by dingosity on Thursday October 27, 2022 @10:27PM (#33366832)
I ride a llama. Not nearly as high as a high horse, but higher than most donkeys.
Re:Diem – Facebook open source Cryptocurrency written in Rust by dingosity on Thursday October 27, 2022 @10:29PM (#33366853)
I did sort of violate the HN social norms a bit... for which I apologize.
Re:Diem – Facebook open source Cryptocurrency written in Rust by mingyeow on Thursday October 27, 2022 @11:32PM (#33367315)
This wins comment of the year for me
Re:Diem – Facebook open source Cryptocurrency written in Rust by benatkin on Thursday October 27, 2022 @02:33PM (#33361923)
Couldn't be more wrong about rust. People are using WASM with Figma everyday and Rust is the most production ready for both WASM and non-WASM targets. Sure, Rust is the future, but it's also the present.
Re:Diem – Facebook open source Cryptocurrency written in Rust by throitallaway on Thursday October 27, 2022 @04:16PM (#33363425)
Rust support is also landing in the Linux kernel very soon (version 6.1.)
Re:Diem – Facebook open source Cryptocurrency written in Rust by dingosity on Thursday October 27, 2022 @10:38PM (#33366922)
Which really frightens me.

There are already versions of OpenEmbedded leenucks that can't be built (whole system distributions, not the kernel.) To repair that you have to do A LOT of work rebuilding recipies, guessing which patches were included in various source bases.

And now we're going to have to maintain version closures for multiple editions of rust (unless there's a fiat indicating leenucks use is fixed at a particular edition.)

I like Rust. But the last time I used it extensively was around 0.8 and I just don't have the energy to keep learning new editions every couple years. And after surviving the Python 2.3 -> 2.5 -> 2.7 transitions, changing your syntax every couple years just sort of makes me want to curl up in a little ball and cry myself to sleep.

Seriously. I would rather keep coding in C. I hate C. Okay, maybe I just have a mild dislike for C. But I have non-trivial C programs I wrote in 1982 that still compile and run. I have one or two Rust programs from 5 years ago that don't compile and a whole bunch of Rust code from 10 years ago that flat-out doesn't compile.

I dunno. Backwards compatibility is a thing for me.

Re:Diem – Facebook open source Cryptocurrency written in Rust by howinteresting on Thursday October 27, 2022 @11:04PM (#33367136)
Linux use is fixed to a specific version of Rust, not just an edition.

Rust today is very different from Rust 0.8. And the changes in the last few years have generally been small and in targeted areas that need work. It's nothing like Python in the old days.

Backwards compatibility is a thing for Rust as well. Almost all old code in existence works without modification in newer Rust. (The breaking changes are mostly soundness bugs, and possibly some type inference.)

Re:Diem – Facebook open source Cryptocurrency written in Rust by hu3 on Friday October 28, 2022 @01:14AM (#33367932)
But of course Linux kernel is fixed to a specific version of Rust. It needs unstable features [0]. Changing the version may break. Which reinforces dingosity's point about the language:

> (Rust) needs to stabilize before it's used for critical infrastructure.

[0] source: comments on https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin... like this one:

+ A particular version of the Rust toolchain is required. Newer versions may or may not work because the kernel depends on some unstable Rust features, for the moment.

Re:Diem – Facebook open source Cryptocurrency written in Rust by benatkin on Friday October 28, 2022 @01:36AM (#33368059)
They decided it was good enough. It will be locked in for some time. Mainline Rust development will be separate but related to Linux Kernel Rust development. It will be like using TinyGo instead of Golang because you're doing WebAssembly or embedded.
Re:Diem – Facebook open source Cryptocurrency written in Rust by howinteresting on Friday October 28, 2022 @02:42AM (#33368373)
Stabilization in Rust provides much greater guarantees than stabilization in, say, Python. Once stable, the feature will never change.
Re:Diem – Facebook open source Cryptocurrency written in Rust by adwn on Thursday October 27, 2022 @03:50PM (#33363070)
> rust (great language, tool ecosystem and community, but needs to stabilize before it's used for critical infrastructure.)

There's hardly another mainstream language out there that's more stable than Rust: the standard library as well as the language itself follow a strict backward compatibility policy – breaking changes are only allowed to fix safety-relevant bugs.

Re:Diem – Facebook open source Cryptocurrency written in Rust by worik on Thursday October 27, 2022 @04:27PM (#33363555)
Rust is very cool. It is a language I have been waiting for since 1999

But it is not ready for critical infrastructure for two reasons:

1) It is not defined. the definition of rust is "the compiler accepts it"

2) There is one implementation

I use rust for a lot of things, things that I really want to be solid and reliable.

But I would not want to use it for systems where lives were at risk.

That is not a domain I work in, so I am hazy on what is available but I know the avionics people have systems and processes. Have they adopted Rust yet?

Rust will be excellent in this space. But it needs definition and alternative implementations first. Probably will not be long.

Re:Diem – Facebook open source Cryptocurrency written in Rust by steveklabnik on Thursday October 27, 2022 @06:14PM (#33364747)
While I’m not sure about avionics, there’s some aerospace and automotive uses in non-critical places. A version of the rust compiler is undergoing certification so that it can be, but that work is not yet complete.

Also, there are multiple implementations, though they are in various stages of completion.

Re:Diem – Facebook open source Cryptocurrency written in Rust by potatochup on Thursday October 27, 2022 @11:57PM (#33367514)
I work in a safety critical critical software and we're starting to use Rust. Most other things at work are C or Ada, with a sprinkling of C++. Having a formal spec is nice I guess? But 90% of our chips are obscure special purpose CPUs anyway, so we're always trusting the vendors closed source version of gcc, and we find plenty of bugs. One of the upsides (from my perspective) of rust is that obscure platforms are less well supported, so we'll likely end up with an ARM core. This limits chip choices, but it means we end up using the same backend that apple does for their watch/phone/etc, which gives us a lot of confidence.
Re:Diem – Facebook open source Cryptocurrency written in Rust by nequo on Friday October 28, 2022 @01:26AM (#33368004)
> the vendors closed source version of gcc

Sorry for the daft question. Just to clarify, do you mean that the vendor modifies gcc and doesn’t release the source, or that the vendor has its home-grown C compiler that is functionally equivalent to gcc?

Re:Diem – Facebook open source Cryptocurrency written in Rust by stusmall on Thursday October 27, 2022 @04:17PM (#33363447)
> needs to stabilize before it's used for critical infrastructure

What do you view as unstable? What features have you seen disappear? What do you know of that existed in the past post-1.0 that doesn't exist today or has materially changed?

I've been writing rust since about 1.4 back in 2015. I think once in ~2017 I ran into an issue where a bump in the compiler cause an existing crate to not build. That's it. It was bug that was quickly fixed. As style changes and new crates and features are build, old ones are still very stable/reliable and can be intermingled inside the same program. I have trouble thinking of a more stable ecosystem I've worked in.

Re:Diem – Facebook open source Cryptocurrency written in Rust by Matthias247 on Thursday October 27, 2022 @08:15PM (#33365852)
Rust is already used in a ton of critical infrastructure. Major CDN services (CloudFront, Cloudflare, Fastly) use it for critical HTTP and DNS infrastructure, and other major cloud services that everyone here uses daily are using Rust.

Sure - not every open source library out there is mature and perfect. But that doesn't mean the language isn't ready to be used.