Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
i develop things

Monolith - The slightly worse UNIX-like with online documentation

Recommended Posts

First post here, hi. 

For the past few months, I’ve been working on an operating system for OpenComputers. It’s a monolithic, UNIX-like operating system. 

Note that Monolith will not currently work in OCEmu due to the lack of support for`computer.getDeviceInfo`. 

First, the advantages over OpenOS:

- Monolith supports dynamically adding and removing screens, GPUs, and keyboards - it’ll automatically spawn a shell on an available combo and will try to match by tier.

- Monolith’s userspace is properly sandboxed - there’s no way to completely crash the kernel from userland.

- Monolith includes a fairly complete set of documentation, in the form of manual pages, for many system and user-level APIs. They are also available for online viewing here.

- Monolith’s terminal is entirely VT100 - the `term` API is a wrapper around this and included only for compatibility.

- The scheduler will automatically collect garbage if memory gets low, and includes a facility that avoids dropping signals. Your system may freeze for half a second or so, but all input will be registered and you’re less likely to OOM. 

- Monolith ships with the Minitel, and soon GERTi, network stacks out-of-the-box. 

- Monolith’s package manager, while admittedly somewhat basic, is faster than OPPM.

- The provided `readline` implementation is ridiculously featured and the best I’ve written - and it’s even its own API. `io.stdin:read` is by default simply a wrapper around `readline`. 

- The recommended and default editor, `vled`, has support for optional syntax highlighting through a command-line flag. So far, only Lua is supported. 

Now, the disadvantages.

- Shell redirects are not implemented. 

- Monolith requires a minimum of 256 kilobytes of RAM, or a single tier 1.5 stick, due to the userspace sandboxing. 

- Monolith does not *quiiiiiiite* have full OpenOS compatibility, though most programs should theoretically run out of the box - see `wget`, `pastebin`, `components`, and `lshw`, which are pretty much direct copies of the OpenOS implementations. The `event`, `internet`, and `buffer` libraries are also taken from OpenOS. 

- `vled` is slower (due to use of VT100) and slightly less featured than OpenOS’s `edit`. It’s also a little more obtuse thanks to the fact that it draws heavily from `vim`.

- There are a few small and rather strange bugs in my `readline` implementation. They shouldn’t affect normal use too much, though, as they aren’t terribly noticeable except on tier 1 screens.

The source code is available here if you want to try it out!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.