What does HackerNews think of HaLVM?

The Haskell Lightweight Virtual Machine (HaLVM): GHC running on Xen

Language: Haskell

#3 in Haskell
Haskell: https://en.wikipedia.org/wiki/House_(operating_system)

Haskell: https://github.com/GaloisInc/HaLVM

OCaml: https://mirage.io/

ML: http://dspace.mit.edu/handle/1721.1/47545

Lisp: In the 1970s and 1980s there were Lisp Machines with the OS written in Lisp. Too many sources to link here, they are often discussed on HN. They were marketed in the 1980s by Symbolics, LMI, and Xerox.

Also in the 1970s and 1980s there were computers running Smalltalk standalone - in effect, an OS in Smalltalk. They provided introspection.

Funny how you mentioned unikernel. There's a Haskell unikernel whose development began more than a decade ago: https://github.com/GaloisInc/HaLVM
I'm interested that they didn't list the "old" reason people thought unikernels could be more secure. That is that they could be small enough to be completely written in higher languages. With something like https://github.com/GaloisInc/HaLVM you could bring to bear formal methods in more straight forward ways.

This of course left the host still needing to be secured using traditional approaches but that surface area was smaller.

I'd buy that you can't list that in an article about why all unikernels are already secure, but that seemed to be the heart of the pitch to me when I first started hearing it.

> you'd expect to see high-quality operating system kernels

The Haskell community is smaller than others but there are numerous highquality projects, including kernel/OS level projects that you don't mention:

HaLVM, Haskell Unikernels - https://github.com/GaloisInc/HaLVM

The specification model of the sel4 microkernel - https://github.com/seL4/l4v/tree/master/spec/haskell

There are many smaller examples of OS projects in Haskell, but for better examples of production systems you only have to look to areas requiring high assurance such as finance, where a number of large companies use Haskell and other functional languages. (BoA, Barclays, Credit Suisse, Standard Chartered, etc.)

It's true that there a lot of Haskell blogs focused on research level Category theory, but the concepts there don't need to be used or understood for high quality, production ready code. I'm actually not a Haskell guy, and very much of the mindset that you should use the right tool for the job, but being dismissive of languages with unique features such as being lazy by default is shortsighted.

On the most basic level, you should be able to write a simple operating system from scratch. I heard http://pages.cs.wisc.edu/~remzi/OSTEP/ is good for an introduction to OS writing.

Some papers I read in no particular order:

Synthesis OS (http://valerieaurora.org/synthesis/SynthesisOS/) might be interesting for you. They do lots of runtime code synthesis.

Exokernels (follow links from https://en.wikipedia.org/wiki/Exokernel#Bibliography). And more recently Mirage (https://mirage.io/) and HaLVm (https://github.com/GaloisInc/HaLVM)

(I assume you already know how to program. Otherwise, brush up on that as step 0. C is still the canonical choice for OS work. But if you are feeling adventurous there's more choice.)

Congrats! This is quite interesting and I look forward to seeing the site. Have you come across CyberChaff [1]? It seems like you may have similar goals. CyberChaff makes use of HaLVM [2] so this approach (using unikernels) seems like it might suit you too.

I've put together a website to help gather the unikernel projects [3], so if you choose to consider this approach for your next round of work, please do share your experiences there!

[1] https://galois.com/project/cyberchaff/ [2] https://github.com/GaloisInc/HaLVM [3] http://unikernel.org

I was looking into some of this myself already; really helpful article and amazing results. Another interesting approach is to compile Haskell with HaLVM[1] in to a unikernel that can run on a Xen hypervisor. But this is a non-posix environment on which Haskell's "network" package does not compile. No "network" means that it is currently impossible[2] for WAI (Haskell's standard interface between web servers and applications), but also db libraries, to run in such an environment.

With going unikernel with Haskell still being a little steep (but definitely on my wish list), then the next-best would be a mini VM/container image. And 5MB sure is mini!

Once again, thanks FPComplete!

1: https://github.com/GaloisInc/HaLVM

2: https://github.com/GaloisInc/HaLVM/issues/43

HaLVM is similar sort of project which uses the Haskell VM.

https://github.com/GaloisInc/HaLVM

They're of course not a desktop option at all, but there's also some very interesting work happening with unikernels, which are really only recently a viable option now that Xen can present a unified hardware layer, instead of the endless treadmill of specific drivers. I've been getting into OpenMirage [1] quite a bit recently, largely due to the energy of the team [2], but also looked a bit at HalVM [3]. I definitely recommend [2] for anyone interested in plausible ideas of what the one of the next generations of VM/apps might look like.

[1] http://www.openmirage.org/ [2] https://www.youtube.com/watch?v=UjonFD-2ATo or http://www.se-radio.net/2014/05/episode-204-anil-madhavapedd... (audio only) [3] https://github.com/GaloisInc/HaLVM

for Haskell, there's HaLVM: https://github.com/GaloisInc/HaLVM

for Erlang, there's ErlangOnXen: http://try.erlangonxen.org/zerg

There are others, if you care to search for them.

- HaLVM : https://github.com/GaloisInc/HaLVM

- House: http://programatica.cs.pdx.edu/House/

- SeL4 : http://ssrg.nicta.com.au/projects/seL4/

Emphasis is on the security and verifiability typed, pure-by-default Haskell provides, over OS design.

Also https://github.com/GaloisInc/HaLVM (Haskell). Though I think it doesn't handle parallelism.
The demo about the vm+server startup time is interesting, but I am glad to know about the way they use Nginx to proxy the request twice to do the provisioning of the vm+server.

Edit: I wonder if the numbers would be similar if the example was done with HaLVM (https://github.com/GaloisInc/HaLVM).

halvm.org seems to be down (http://isitup.org/halvm.org). However, there is a summary here[1] and the source is on GitHub[2].

[1]: http://corp.galois.com/halvm/ [2]: https://github.com/GaloisInc/HaLVM