Stream: ideas

Topic: OS platform


view this post on Zulip Martin Stewart (Nov 26 2021 at 12:52):

I've been thinking about the possibility of making an Operating System platform (hypothetically anyway, I haven't made any platforms, let alone something this ambitious).

I think it would be really cool because unlike traditional OS's which need to carefully manage permissions and memory access in order to prevent badly written or malicious programs from breaking things, an OS Roc platform could just treat programs as functions. Programs could share memory without conflict and managed side effects means you have permissions via the type system.

Some other advantages:

  1. The entire OS and all programs that come installed with it can be type checked together
  2. Since programs are functions, process -> OS or process -> process communication could be done without needing to encode and then decode binary data.
  3. The OS could provide sensitive data in the form of a opaque type to a program and the program would only be able to use it in certain ways depending on what helper functions are defined (this assumes that abilities don't have any relflection capabilities). For example, a git program wants to sign commits but you don't want it to know what your private key is.
  4. Performance losses caused by things like stack protection, needing to switch context before executing priviledged instructions, Spectre mitigation, etc wouldn't be needed anymore (admittedly I'm not that certain on these so someone correct me if I'm wrong)

Okay, I don't have a point to all this but maybe it's an interesting idea to some other people too :smiley:

view this post on Zulip Richard Feldman (Nov 26 2021 at 13:10):

I think that idea is super exciting!

I've been thinking if someone already has a web server platform that works on common OSes, they could improve it without even changing the application-facing Roc API (so, completely backwards compatible!) by by changing the underlying host binary to be an entire operating system image

view this post on Zulip Richard Feldman (Nov 26 2021 at 13:11):

there would be some linking details to figure out, but it should definitely be possible!

view this post on Zulip Martin Stewart (Nov 26 2021 at 14:59):

Cool, if I understand correctly, the platform is almost like Docker but hopefully with less hassle!

view this post on Zulip Zeljko Nesic (Nov 26 2021 at 15:05):

There is no Platformfile or such dough. :)

I like to think about platforms as firmware, its a layer that separates your Roc programs from the sharpness of the metal, so you cann't cut your self :)

view this post on Zulip Notification Bot (Nov 26 2021 at 16:39):

This topic was moved here from #beginners > OS platform by Richard Feldman

view this post on Zulip Richard Feldman (Nov 26 2021 at 16:41):

back when I was debating between the name "platform" and "framework" for the thing applications get built on in Roc, I settled on "platform" (despite the fact that often people use the term "platform" to mean "operating system" - e.g. usually when people say "cross-platfrom" they mean "cross-operating-system") in part because of this use case - the platform actually can be an operating system!


Last updated: Jun 16 2026 at 16:19 UTC