News for hackers. Stuff that matters.
Re:Linux Kernel Use-After-Free Remote Code Execution Vulnera... by smsm42 on Tuesday October 04, 2016 @09:43PM (#12641055)
I have extremely hard time believing there can be a viable OS kernel project on Haskell. I mean, yeah, you probably can write OS kernel in Haskell, if you are determined enough. But I don't believe you can make it into a viable project. Rust - maybe, if you can get enough mindshare. Which is also a big if so far...
Re:Linux Kernel Use-After-Free Remote Code Execution Vulnera... by cvwright on Wednesday October 05, 2016 @12:53AM (#12641621)
> I mean, yeah, you probably can write OS kernel in Haskell, if you are determined enough.

Some of my colleagues did, a few years ago.

http://jfla.inria.fr/2007/actes/Presentation/tolmach.pdf

Re:Linux Kernel Use-After-Free Remote Code Execution Vulnera... by johncolanduoni on Tuesday October 04, 2016 @11:36PM (#12641383)
If you plan on writing your OS in Haskell in the usual sense (i.e. your OS executes pure Haskell functions and interprets some sort of IO monad) you're going to end up implementing a full microkernel in another language just to get started. Not to mention it'll be a microkernel with a GC.

The only way I could see a kernel being truly written in Haskell is in a DSL something like atom[1]. Atom is an EDSL represents code that not only doesn't need a garbage collector, but also has a verified constant bound on memory usage. However if that's what you're looking for, you might as well go with an EDSL in a dependently typed language like Idris to make verification easier and extensible.

[1]: https://hackage.haskell.org/package/atom

Re:Linux Kernel Use-After-Free Remote Code Execution Vulnera... by bluejekyll on Tuesday October 04, 2016 @10:25PM (#12641184)
I think Rust has the mindshare, what it needs is people actually doing it.

Redox is a ground up OS, but I wonder if we shouldn't instead be taking more of an Oxidization approach where we rewrite more and more pieces of an existing OS in Rust piecemeal. This would add some overhead (programmatically not instructionwise) of a lot of context switches though between the C and the Rust code, which is to say it would be a little ugly for a while.

It might be cleaner to go after a microkernel to do this though, like L4 or rumprun.

Re:Linux Kernel Use-After-Free Remote Code Execution Vulnera... by smsm42 on Wednesday October 05, 2016 @01:55AM (#12641814)
> I think Rust has the mindshare, what it needs is people actually doing it.

That's kind of the opposite of having the mindshare, IMO :) Having the mindshare means people would be reaching for it when they need things done, not have to be dragged in, and there's a wide pool of people knowing it.

I'm pretty sure you can write OS kernel in almost any language that can be compiled into runnable code, and probably if you are really determined also in those that are compiled into bytecode. As I said, it's not the main issue.

Unless you are a titan of programming that can do an OS project all by yourself, or have more money than Google, you'll need random people to come to the project, pick up pieces and work on them. The question is, does Rust have pool of people wide enough so that probability of people wanting to work on your project is higher than your needs?

C definitely has a huge pool. So do C++, Java, JS, Python and many other languages. Rust? I'm not sure it does so far. Maybe I'm wrong.

Re:Linux Kernel Use-After-Free Remote Code Execution Vulnera... by bluejekyll on Wednesday October 05, 2016 @04:14AM (#12642247)
Remember, Rust is just a year old. There are already a few OS projects going in it. All the languages you mentioned are >10 years old.

I think for its age, the success it already enjoys is impressive.

Re:Linux Kernel Use-After-Free Remote Code Execution Vulnera... by smsm42 on Thursday October 06, 2016 @02:56PM (#12655058)
It's not a criticism of the qualities of Rust. It's just an assessment of the current state of affairs. Maybe Rust will gain the mindshare in 3 years. We'll see. I personally think having something better than C but as ubiquitous and supported as C would be awesome. Is it Rust? We'll see in 5 years.
Re:Linux Kernel Use-After-Free Remote Code Execution Vulnera... by IgorPartola on Wednesday October 05, 2016 @01:22PM (#12645818)
I would then say that it has momentum, not mindshare.
Re:Linux Kernel Use-After-Free Remote Code Execution Vulnera... by rbanffy on Wednesday October 05, 2016 @01:09AM (#12641672)
MkLinux was a popular environment on a portal I worked for in the late 90s. We brought dozens of Macs back into active duty as secondary workstations for the operations team.
Re:Linux Kernel Use-After-Free Remote Code Execution Vulnera... by AstralStorm on Wednesday October 05, 2016 @03:27AM (#12642104)
In fact, SEL4 has parts in Haskell. The important things are all in Isabelle though and everything is compiled to C and machine code.