Live data from Hacker News

Re: Integrating "safe" languages into OpenBSD? (2017)

marc.info

51–60 of 400 posts

Re: Re: Integrating "safe" languages into OpenBSD? (2017)

#51
post #8

> I wasn't implying. I was stating a fact. There has been no attempt to move the smallest parts of the ecosystem, to provide replacements for base POSIX utilities. This is in fact incorrect--there is a project aiming to build all of the coreutils in Rust ( https://github.com/uutils/coreutils ). More to the point: while I do concur in the conclusion that Rust shouldn't be a part of the OpenBSD base system, the gatekee…

Do any major Linux distros think uutils is good enough to ship as the default? Are they at all involved?

They'd be infinitely easier to persuade to try something like this than a BSD. For OpenBSD it's probably always going to be a non-starter because of all the hardware they'd have to leave behind.

Re: Re: Integrating "safe" languages into OpenBSD? (2017)

#52
post #46

If you can write C as well as the OpenBSD people, be my guest, keep writing C. It might take you like 20 years to get somewhere interesting.

Like OpenSSH? PF? Clang? All of the modern compilers and languages made in C? Maybe you can create something more widespread in Rust and not being a single part of a browser.

Clang is written in C++.

The large majority of modern compilers and languages are either bootstraped or written in a mix of the language itself and C++.

Re: Re: Integrating "safe" languages into OpenBSD? (2017)

#53
post #8

> I wasn't implying. I was stating a fact. There has been no attempt to move the smallest parts of the ecosystem, to provide replacements for base POSIX utilities. This is in fact incorrect--there is a project aiming to build all of the coreutils in Rust ( https://github.com/uutils/coreutils ). More to the point: while I do concur in the conclusion that Rust shouldn't be a part of the OpenBSD base system, the gatekee…

Is it 'really toxic', or just uninformed? Note that the email conversation was from a few years ago.

I'd say toxic. When you point out that "nobody has done this" in this way, there is a strong implication that it's not possible, not reasonable, or not wort the effort.

Rust explicitly aims to be a systems language. It explicitly challenges C and C++ on their own turf. Implying that it's not suitable for serious systems work is insulting.

> Note that the email conversation was from a few years ago.

Remember that the project he said didn't exist was 4 years older than his email. And if I understand other comments correctly, that project was well known among Rust practitioners.

He made strong claims outside his area of expertise. An easy mistake to make, but one that has consequences when you're this famous. Such mistakes are totally fine in private, but in public… they're a little toxic.

Re: Re: Integrating "safe" languages into OpenBSD? (2017)

#54

Earlier quoted context omitted.

The post was written in 2017. How far along was the project in 2017. Also, I am a bit confused about the gatekeeping implied here (it's not a serious language because it's not used to build an operating system) is really toxic. ? Which line in the e-mail stated that?

The gatekeeping is strongly implied by this statement: > As a general trend the only things being written in these new languages are new web-facing applications, quite often proprietory or customized to narrow roles. Not Unix parts. Which I read in the tone of "go play with your toy language somewhere else, and let the real programmers program with real languages. Additionally, there's the allusions to the fact that…

That tone seems more you than Theo. OpenBSD isn't known as a first mover operating system for new technologies. If the utilities are rewritten and not compatible then it really isn't a rewrite, its a new program with the same name as a previous program. Frankly, if they don't implement that standard, they aren't serious replacement efforts. They could be useful and maybe the options omitted aren't important to the person implementing it, but they are not suitable to replace the current utilities.

Re: Re: Integrating "safe" languages into OpenBSD? (2017)

#55
post #4

Rust is good at preventing memory leaks. It doesn't matter (as much) for a command line utility that runs for one second then exits. Of course, there are now utilities written in Rust. https://github.com/samuela/rustybox

(Rust does not guarantee the prevention of memory leaks, to be clear)

Re: Re: Integrating "safe" languages into OpenBSD? (2017)

#56

Earlier quoted context omitted.

How many utilities were rewritten and shipped at the time of the post?

79 by my count, but I'd be happy to have someone correct me. https://github.com/uutils/coreutils/tree/ef4d09ee3c067c280ba... It looks to me like the only changes in that table since November 2017 are that `join` and `df` were moved from 'todo' to 'semi-done'.

Are they done, or did they move onto to something else?

Re: Re: Integrating "safe" languages into OpenBSD? (2017)

#57

Earlier quoted context omitted.

Yeah and there are multiple drop in replacements for grep— he was implying those alternatives didn’t exist because rust wasn’t capable of handling them or people weren’t interesting in writing them, but I think that’s been proven wrong many times over at this point. https://github.com/redox-os/extrautils/blob/master/src/bin/g...

Was this true in 2017, when the statement was written?

Both redox's grep and ripgrep (which trivially demonstrates that a grep can be implemented in rust even if it's not a POSIX grep implementation) were created / started in early 2016, so yes.

Not to mention Theo's statement is so much weaker than actually successful implementations the existence of these two completely blows through the goal:

> There has been no attempt to move the smallest parts of the ecosystem, to provide replacements for base POSIX utilities.

Re: Re: Integrating "safe" languages into OpenBSD? (2017)

#58
Let's try to summarize what he tries to say but kinda doesn't do very well:

_Rust and OpenBSD are not a good fit._

OpenBSD keeps to certain aspects about how to do thinks which just don't work well with rust. This doesn't mean they are better or worse. They are just different.

For example outside of rustc-dev hardly anyone compiles rust them self. As such not many work on making rust compile itself on exotic systems (and yes in 2020 i386 is a exotic system, even through it was the standard in the past). I mean improving cross compilation is for now much more important (as far as I can tell).

But OpenBSD requires the ability to self compile and support hardware for a very long time so rust (for now) doesn't fit.

Another example is that many rewrites of classical small tools provide little value to anyone _if_ they are 100% compatible. As such they tend _to not be compatible_ in favor of better interfaces/output etc. (E.g. ripgrep!!)

Lastly OpenBSD is stuck in a world where thinks move very slow. But this is also why many people use it. One the other hand rust is from a world where thinks move much faster, sure with small steps and backward compatibility but a small step every 6 weeks is still a lot over a fiew years. So they just don't fit well together.

I also believe that in the future they might fit well together at some point. But not for now and probably not in the next 3 or so years.

Re: Re: Integrating "safe" languages into OpenBSD? (2017)

#59
post #8

> I wasn't implying. I was stating a fact. There has been no attempt to move the smallest parts of the ecosystem, to provide replacements for base POSIX utilities. This is in fact incorrect--there is a project aiming to build all of the coreutils in Rust ( https://github.com/uutils/coreutils ). More to the point: while I do concur in the conclusion that Rust shouldn't be a part of the OpenBSD base system, the gatekee…

There is no gatekeeping. To actually achieve POSIX-compliance is not an easy task and requires lots of testing. If you don't do it then your replacement will break everyone's scripts. A distro maintainer will also want to retain compatibility with their supported GNU/BSD extensions so that's more work to add on.

I would still agree with his statement at least as far as BSD is concerned. Outside of Redox I haven't seen any serious projects to implement POSIX compatibility. The Rust coreutils project is a good start but from their readme it looks like they are more aiming to achieve GNU compatibility on Microsoft Windows while being MIT licensed — I don't think anyone is seriously using it to build a BSD (or even a GNU) distro. If I'm wrong about that I'd love to hear it though. Rust is a good choice to write these things in but let's be realistic about the time frame required to rewrite everything.

Plus I just downloaded those Rust coreutils and tried to build it and now I'm waiting for 400 (!!!) Rust dependencies to download and compile. Is this really appropriate for a core system component to have this many dependencies? Or is there something I'm missing here? I admit I am not familiar with best practices in Rust. As the project stabilizes I assume they will want to start eliminating the dependencies or vendoring them upstream? At what point do we decide to put these into a separate library like libbsd or gnulib?

Re: Re: Integrating "safe" languages into OpenBSD? (2017)

#60
post #8

> I wasn't implying. I was stating a fact. There has been no attempt to move the smallest parts of the ecosystem, to provide replacements for base POSIX utilities. This is in fact incorrect--there is a project aiming to build all of the coreutils in Rust ( https://github.com/uutils/coreutils ). More to the point: while I do concur in the conclusion that Rust shouldn't be a part of the OpenBSD base system, the gatekee…

You make valid point, but you can't fault Theo for predicting a different future in 2017.

Yes, and 2017 should be in the title of the post.
Post reply on HN