Live data from Hacker News

Integrating “safe” languages into OpenBSD?

marc.info

51–60 of 344 posts

Re: Integrating “safe” languages into OpenBSD?

#51

The bootstrap problem is real and getting worse: go needs go, haskell needs haskell, rust needs rust; it's nasty. There are already "better" and "safer" languages that could easily replace the entire unix userland. Heck, awk can do half of it, but all of that C code is already written...

> go needs go, haskell needs haskell, rust needs rust

And C needs C, or for more recent compilers, C++ needs C++. You just don't notice it because these two languages are already part of the base system.

Re: Integrating “safe” languages into OpenBSD?

#53

Earlier quoted context omitted.

Considering the complete lack of viable competition in the space, that day is a long way off.

Why is Redox not viable competition?

Come on, I really like Rust but these types of comments are why people like Theo de Raadt don't take the evangelists seriously. You can't take a project like OpenBSD that has existed for more than 20 years, is being used right now to power all kinds of applications around the world on all kinds of architectures and say that Redox, an experimental x86-64 OS, is viable competition. What with the seven applications written for it listed on Wikipedia, including "A simple web browser with basic image support" and "A simple editor that is similar to notepad". I don't know what the driver situation is like but I don't expect to see a lot of support for anything beyond the most basic devices.

In general I think the "why don't you rewrite your project in $languageoftheday" remarks should be dismissed and ignored. Theo is entirely right when he says that if people think it's a good idea then they should spend less time bothering the devs about it and more time actually coding it.

You think Curl or Emacs should be written in Rust? Then do it. Don't bother the devs about it. If it's really better then people will make the switch.

Re: Integrating “safe” languages into OpenBSD?

#54
post #3

Earlier quoted context omitted.

That is sort of addressed by Theo: >Such ecosystems come with incredible costs. For instance, rust cannot even compile itself on i386 at present time because it exhausts the address space.

He has a point though... As we get more CPU/ram we as programmers don't even bother to check how many resources we are using. Personally, I don't know whether its a good thing or a bad thing. Also in terms of systems languages I believe only rust has some potential to truly replace C. Although, a large part of C usage still takes place in the embedded world where rust has yet to be ported to many embedded processors.…

I run full Windows 10 on a tablet (dual core, 2GB RAM), and it's pretty amazing to me how many websites that have no reason to run slow completely fail on it.

I can only imagine it works fine on dev machines with much faster quad+ cores and 64GB of RAM or whatever.

Just as an aside, it's done a lot to have the tablet be my primary "fiddle-at-home" machine: keeps me really conscious of resource limits, including ones I normally don't think of like screen size. (Most websites render terribly in landscape on a 10" tablet.)

Re: Integrating “safe” languages into OpenBSD?

#55
post #5
post #3

Earlier quoted context omitted.

That is sort of addressed by Theo: >Such ecosystems come with incredible costs. For instance, rust cannot even compile itself on i386 at present time because it exhausts the address space.

People are still using i386? I'd assume even if they are, it's such a tiny minority that it shouldn't be an excuse to hold everyone else back.

OpenBSD is a perfectly servicable operating system on an old Atom board I have (nice router!), and on i386 only Core Duo iMacs/Macbooks long abandoned by Apple. These will be perfectly good machines to use for a long time, and it's really great you can get up to date support on these systems from this great project. Obsolete means different things to different people.

I'm a big fan of what Rust promises, but the solution is not that OpenBSD changes its policies or that OpenBSD drops i386. Rust should become self hosting on i386.

Re: Integrating “safe” languages into OpenBSD?

#56

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.

Unless I'm mistaken, POSIX compatibility is only a goal of uutils, not Redox OS.

Re: Integrating “safe” languages into OpenBSD?

#57
post #10

Earlier quoted context omitted.

This seems like a bit of a trite point unless many rust developers are actually working inside i386. Though the compiler itself might not work very well in i386. Not many people are whining about our C compiler toolchains not fitting into our microcontrollers.

Linux and BSD ran for a long time on 32bit systems. 4GB of memory is an ocean in my mind. Those systems should be able to compile their own programs and tools. On a related note, we will eventually be running development tools on microcontrollers. Not that little 16bit parts will run the tools, but that 16bit parts are going away. In price sensitive areas this will not happen, but for things with a larger budget why…

They don't mean "x86" (the 32bit instruction set), but i386 aka Intel 80386, a processor introduced in 1985: https://en.wikipedia.org/wiki/Intel_80386

Re: Integrating “safe” languages into OpenBSD?

#58

Earlier quoted context omitted.

> This seems like a bit of a trite point unless many rust developers are actually working inside i386. Though the compiler itself might not work very well in i386. Trite point? OpenBSD supports 1386[1] if they pull a rust compiler into base and start rewriting things in rust, then they can't support 1386. Dropping a supported platform is not a "trite point". [1]: https://www.openbsd.org/plat.html

At this point i386 is legacy for most of the world. OpenBSD is an ultra-conservative, orthodox project, therefore they will probably support i386 for years into the future - I mean, they supported VAX until 2016. That is a choice they are entitled to make, the trade-off being it would appear to make most modern technologies a poor fit for adoption in OpenBSD - that's the price they have to pay. It is a problem of the…

If OBSD feels it can make use of older arches then so be it, many users will find less intensive jobs for the respective hardware and it saves it from going to waste/recycling.

Re: Integrating “safe” languages into OpenBSD?

#59

Earlier quoted context omitted.

Rust fell into the same trap that killed many, many gamedev companies: Performance matters. Even more than features.

The performance of the compiled code is great, and the performance of the compiler is something they have identified as a major issue to fix, and are working to solve it.

So did the now-dead game companies.

Performance is like money: it's easy to squander and hard to acquire.

Re: Integrating “safe” languages into OpenBSD?

#60
post #41
post #18

Earlier quoted context omitted.

It uses remote dependencies. First compilation in a single-run environment will be very slow, there won't be second compilation. Go compiler is fast when you add the `-i` flag, without it it takes a couple of seconds to compile a few hundred lines, a few more minutes when you have to `go get` packages. Now, github goes down, your build is broken for that time.

Not sure what the "it" is in your first sentence, but allow me to address the rest of your points. "First compilation ... will be very slow": the go compiler is in fact quite fast, orders of magnitude faster than C++ or rust compilers. The fact that there's a noticeable pause when you want to compile thousands of files does not mean that its slow. "There won't be a second compilation": not for each top level tool, bu…

>Not sure what the "it" is in your first sentence, but allow me to address the rest of your points.

The project in linked repository.

Post reply on HN