Live data from Hacker News

Integrating “safe” languages into OpenBSD?

marc.info

281–290 of 344 posts

Re: Integrating “safe” languages into OpenBSD?

#281
post #236

Earlier quoted context omitted.

But that ties into what I'm saying - trying to 'oxidise' a system written in C that already works.

OpenBSD developers themselves did that, rewriting a lot of things that already worked. But they wanted to improve them security wise. So your argument doesn't fit with what they did already. Language is tangential here. Their main focus was security. So it's pretty reasonable to ask, why things can't be rewritten in Rust to improve security further. Note, that the answer doesn't say that it can't benefit security, wh…

For those who want the OpenBSD devs to abandon their many, many years of experience with C and instead adopt Rust, I think it's a fair question to ask the Rust folks why they haven't just started from scratch and built their own unix-like operating system. This seems to be a more reasonable approach that trying to force an existing operating system to adopt their language.

Oh wait, that's right, none of them has even gotten around to writing a replacement for ls, grep, .....

Re: Integrating “safe” languages into OpenBSD?

#282

Earlier quoted context omitted.

If compilation exhausts the IA32 address space, then I'd say it's not adequately performant as a whole, regardless of how "efficient" the resulting binaries might be.

Hard disagree. Compilation is like encoding a video— it's a price you pay once, and if you know the resulting binary will be run millions of times, it's totally worthwhile spending a lot of compute and memory upfront to get that binary as fast as possible.

Right, but the problem is that - in the OpenBSD world - it's a price that's paid much more than once. Sure, that binary might be run millions of times, or it might be run only tens or hundreds or thousands of times before an update comes around. And that's just for one platform; OpenBSD supports lots of platforms, both 32-bit and 64-bit, and all of them are expected to be fully usable for (among other things) developing OpenBSD (which includes, you know, actually compiling OpenBSD).

To rephrase that a bit: OpenBSD is designed to be a system where any user on any platform can contribute to OpenBSD using the tools included in OpenBSD's default install. Deviations from that will almost certainly receive a cold reception at best.

Re: Integrating “safe” languages into OpenBSD?

#283
post #236

Earlier quoted context omitted.

OpenBSD developers themselves did that, rewriting a lot of things that already worked. But they wanted to improve them security wise. So your argument doesn't fit with what they did already. Language is tangential here. Their main focus was security. So it's pretty reasonable to ask, why things can't be rewritten in Rust to improve security further. Note, that the answer doesn't say that it can't benefit security, wh…

For those who want the OpenBSD devs to abandon their many, many years of experience with C and instead adopt Rust, I think it's a fair question to ask the Rust folks why they haven't just started from scratch and built their own unix-like operating system. This seems to be a more reasonable approach that trying to force an existing operating system to adopt their language. Oh wait, that's right, none of them has even…

> I think it's a fair question to ask the Rust folks why they haven't just started from scratch and built their own unix-like operating system.

Some did: https://www.redox-os.org

> Oh wait, that's right, none of them has even gotten around to writing a replacement for ls, grep,

They did that for some utils: https://github.com/redox-os/coreutils

> This seems to be a more reasonable approach that trying to force an existing operating system to adopt their language.

I don't think anyone is forcing to adopt anything here. The question was about integrating languages like Rust in OpenBSD.

Re: Integrating “safe” languages into OpenBSD?

#284

Earlier quoted context omitted.

> I'm actually gobsmacked this is the case. So gobsmacked you apparently couldn't even begin to attempt answering the question but felt you just had to go on a rant as irrelevant as you believe it's righteous, uh? > There used to be a saying, only half-joking, that a language that can't host/compile/bootstrap itself is nothing more than a toy. As others have more eloquently pointed out, it shouldn't have to be explai…

> Rust has been self-hosted for almost as long as it's existed. The boostrapping OCaml compiler was left behind back in 2011. Not on x86 which is what this whole conversation is talking about. So if OpenBSD used rust in base they would have to drop support for x86.

We haven't even gotten to alpha, hppa, loongson, luna88k, macppc, octeon, sgi, or that backwards beauty of big-endianness, sparc64. But hey, it compiles on amd64! That should be good enough, right?

Re: Integrating “safe” languages into OpenBSD?

#285
post #236

Earlier quoted context omitted.

OpenBSD developers themselves did that, rewriting a lot of things that already worked. But they wanted to improve them security wise. So your argument doesn't fit with what they did already. Language is tangential here. Their main focus was security. So it's pretty reasonable to ask, why things can't be rewritten in Rust to improve security further. Note, that the answer doesn't say that it can't benefit security, wh…

For those who want the OpenBSD devs to abandon their many, many years of experience with C and instead adopt Rust, I think it's a fair question to ask the Rust folks why they haven't just started from scratch and built their own unix-like operating system. This seems to be a more reasonable approach that trying to force an existing operating system to adopt their language. Oh wait, that's right, none of them has even…

> For those who want the OpenBSD devs to abandon their many, many years of experience with C and instead adopt Rust

Who exactly? Can you actually point to anyone making this desire known in earnest?

Re: Integrating “safe” languages into OpenBSD?

#286

Earlier quoted context omitted.

I mean this in the most non-confrontational way: have you actually used/looked at Rust? The reason I ask is just about every item you laid out I've had the opposite experience. Talking with C/C++ is trivial with bindgen and clang. Embedding in C++ is likewise straightforward. I mean Firefox is one of the larger C++ codebases out there. The package manager is great and makes dropping in things much less painful. On th…

The real problem is when it's not just binding: it's actually using metaprogramming, which is a huge part of why I use C++. There's no equivalent to blaze or eigen for linear algebra in Rust, and much of that heavy lifting is handled by templates. (There are some libraries with rudimental expression template-like behavior, but nothing as sophisticated.)

That's probably where you and I differ, I don't see metaprogramming as a plus. More often then not it tends to lead to some long compile times(which is why boost never sees the light of day in any codebase I work in).

I'll also counter that having worked in a fairly math heavy 3D graphics space I've never needed them, although our requirements may be different.

Re: Integrating “safe” languages into OpenBSD?

#287
post #270

Earlier quoted context omitted.

IME a lot of people use "people need to be less thin skinned" as a weak rationalization for dickish behavior that would get them fired from their job and/or ostracized from their real-life social circle. But since it's online and no one knows who you really are, it's somehow "acceptable". No, it isn't, and communities that encourage or allow that type of behavior are incredibly toxic.

I'd say wounded, passive aggressive responses like this are far more damaging to a community than bluntness or the occasional swear word. They're much more insidious and subtle. No one will ever really ban you for talking like that, but it changes the whole tone of a place much more than the occasional heated discussion.

Your parent's response wasn't passive aggressive at all, it was a direct statement of their view of the problem with people who think the problem is other people being "thin skinned".

Re: Integrating “safe” languages into OpenBSD?

#288
post #183

Theo is completely ignorant here. I also saw him spout similar inaccuracies in this video: https://youtu.be/fYgG0ds2_UQ?t=2112 Uutils and Redox are setting out to provide POSIX compatible coreutils, and Redox builds from scratch in less than 30 minutes.

You might want to add a disclaimer or at least a note in your profile that you're the same jackpot51 which is the creator of Redox.

Sorry, I did not mean to be secretive.

Re: Integrating “safe” languages into OpenBSD?

#289
post #231

Earlier quoted context omitted.

As for the point about how nobody is working on replacements, that's wrong. There's (partial) replacements for most coreutils written in rust, and a whole kernel has been under active development for years now. I acknowledge the strong pull to go and re-implement existing standards like POSIX in a new language like Rust. But, having had to again deal with all the corner cases of signal handling and threads for a Linu…

Were there any successful attempts to design a brand new and complete OS API in the last decade?

Not really, but POSIX itself is almost 30 years old (and primarily standardized interfaces that were considerably older), and a lot of interesting stuff happened ca. 1995-2005. See e.g. BeOS or Inferno.

Re: Integrating “safe” languages into OpenBSD?

#290

I remember I stopped frequenting /r/programming when it became this weird Haskell echo chamber. It was a bubble where a small but vocal faction inside the community seemed to over react to any criticism. They methodically and tirelessly responded to every comment with an endless litany of "facts" showing how Haskell could do anything from os kernels to game programming. They touted every industry mention of Haskell u…

> It reminds me of the Sea Lion comic[1]

You nearly made me spray coffee all over my precious Microsoft Natural Ergonomic Keyboard. (Which - no joke - would have been the third I would have destroyed this way.)

Thank you for starting my day with a healthy dose of laughter! (I know that comic is trying to make a serious point, but the surreal example it chose is just so hilarious!)

Post reply on HN