Live data from Hacker News

Integrating “safe” languages into OpenBSD?

marc.info

231–240 of 344 posts

Re: Integrating “safe” languages into OpenBSD?

#231
post #15

The points made against switching to newer languages are valid. It will cost time, it will cost effort, it will take many years of work to convince stubborn maintainers to switch. But it will not stop _everyone_ from adopting better languages, and their efforts will eventually surpass the older, less secure systems. When there's feature parity, each and every new exploit will be called out: "this wouldn't have happen…

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?

Re: Integrating “safe” languages into OpenBSD?

#232
post #147

Earlier quoted context omitted.

People have told me for the longest time that Java is a shitty language I shouldn't be using. Most of those people said C++ would be a far better idea without even bothering to show any reason why C++ would be more suited besides "Java is slow, huahuaha, it is shitty, huahahaha". So, I have to admit I take a bit of a pleasure of seeing those people getting challenged on their presumption that C++ is the greatest lang…

> People have told me for the longest time that Java is a shitty language I shouldn't be using. Java is a great language in theory, the problem with Java is that people have evolved to use layers upon layers upon even more layers of abstractions, the tooling is horrenduos (try configuring maven vs npm) and especially all complex Java applications end up being as slow as molasses (e.g. SAP GUI, Lotus Notes, Eclipse, j…

This is typical of enterprise computing, where Java reigns, exactly because it makes easier to do the "layers upon layers upon even more layers of abstractions" that were being done in C, C++ and Smalltalk before Java came into existance.

Also there are lots of similar architectures in the .NET world with WCF, Web Forms, EF, SharePoint, ...

Anyone that thinks JEE is bad, should spend some weeks trying to do the same with CORBA, DCOM or SOM, in either C or C++.

Same thing will happen to Go, JavaScript, Scala, or whatever language gets adopted into the enterprise cathedral.

Re: Integrating “safe” languages into OpenBSD?

#233
post #221

Earlier quoted context omitted.

On the other hand part of the complaint in the main article is the lack of basic core utils at a standard that OpenBSD would consider. Or things that could be a base world dependency for them.

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

Or to put it another way, find something new and valuable as your Trojan horse?

Re: Integrating “safe” languages into OpenBSD?

#234
post #228
post #219

Earlier quoted context omitted.

I have very little experience with Maven, but I find it hard to understand and restricting. Maybe I should take the time to learn the fundamentals properly and maybe I would be enlightened, but it seems to work very different to other build tools. Example "Lifecycles" [0]. The documentation says "Maven is based around the central concept of a build lifecycle. What this means is that the process for building and distr…

Spot on. As a Java developer, i've bounced around between Maven, Gradle, and ad-hoc shell scripts (and Ant back in the day!), and just cannot understand how so many people still think Maven is any good. It's not the XML - that's a superficial annoyance. It's the elaborate but extremely rigid model of what a project is and what a build is, that makes even the smallest deviation from a completely vanilla project excruc…

Because that rigidity excels when you have a Fortune 500 project, distributed across 4 development sites across the globe, with 100 developers of multiple consulting companies developing several modules.

Re: Integrating “safe” languages into OpenBSD?

#235

Earlier quoted context omitted.

I think this misunderstands the OpenBSD philosophy. The more likely it is "everyone else" disagrees, the more likely it is Theo is choosing the right course for the project. The system being secure is a secondary benefit to it being comprehendible and coherent to an individual. It's not enough for the output of a magic box to be a better widget, even if the widget is better in every measurable way. The box itself mus…

As regards understandability and minimising "magic boxes", this means it's pretty much just core OpenBSD (kernel & base system). The moment you add the usual desktop environments or a huge monolith like Firefox, you've lost these benefits. Same with drivers. More drivers you have, more the system becomes byzantine. Keeping things minimal and well designed yet useful must be a continuing challenge for OpenBSD!

1) I Think Firefox is already pledged. Firefox 57 is in current, built with Rust.

2) Nothing wrong with kernel and base. It provides the kernel, clang, X.org, documentation and BSD-games, among the rest of Unix tools.

3 The drivers are in base and NOT in a module form, as the GNU/Linux crap with incompatible vendor releases and binary blobs tied to a version.

Re: Integrating “safe” languages into OpenBSD?

#236
post #221

Earlier quoted context omitted.

On the other hand part of the complaint in the main article is the lack of basic core utils at a standard that OpenBSD would consider. Or things that could be a base world dependency for them.

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, which would be a principal argument for OpenBSD. It brings side reasons as to why it's not easy to do (like integrated tools, developers' availability and so on).

Re: Integrating “safe” languages into OpenBSD?

#237
post #88

Earlier quoted context omitted.

C has a large advantage: you can write a compiler in machine language (not assembly, raw machine language) in a week. Not a good compiler: it will produce horrid, unoptimized code. You just need enough to build a good C compiler. From there you can build a c++ compiler, which in turn can build the C++ compiler you want. Every time you add a new language feature you increase them time to write your bootstrapping compi…

> large advantage How is this a large advantage? When was the last time someone actually did this?

In my experience, a new toy c compiler pops up roughly once a year.

https://github.com/Wilfred/babyc http://www.sigbus.info/how-i-wrote-a-self-hosting-c-compiler... http://zserge.com/blog/cucu-part1.html https://c9x.me/qcc/ https://github.com/alexfru/SmallerC

Re: Integrating “safe” languages into OpenBSD?

#238
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?

UWP, slow and steady, will eventually get there.

ChromeOS, the OS APIs are the web platform.

iOS, almost everything that matters is done via Cocoa

Android, Java reigns. There is very little UNIX exposed to userspace, less so since Google started clamping down NDK since version 7.

Re: Integrating “safe” languages into OpenBSD?

#239
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.

Yep:

  $ uname -a
  OpenBSD hostname 5.9 GENERIC.MP#6 i386

Re: Integrating “safe” languages into OpenBSD?

#240
post #88
post #51

Earlier quoted context omitted.

> 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.

C has a large advantage: you can write a compiler in machine language (not assembly, raw machine language) in a week. Not a good compiler: it will produce horrid, unoptimized code. You just need enough to build a good C compiler. From there you can build a c++ compiler, which in turn can build the C++ compiler you want. Every time you add a new language feature you increase them time to write your bootstrapping compi…

That so called advantage is how Niklaus Wirth did all his compilers, and many other language designers, it is not unique to C.
Post reply on HN