paritybit.ca

Various notes on operating systems for whenever I get around to trying to make my own.

Jonathan Blow on how an operating system should work

https://www.youtube.com/watch?v=k0uE_chSnV8

Jonathan Blow on Drivers

https://www.youtube.com/watch?v=xXSIs4aTqhI

Potential Default Font

http://paulbourke.net/dataformats/hershey/

Programmable OS

An OS built upon the principle of infinite mutability where there is no difference between a shell and a text editor or the programs running on it and the kernel. Similar to early computers which ran BASIC, a user is immediately dropped into a REPL (maybe Scheme-based?) with which they can immediately start programming the computer to do anything they want of it. Programs can simply be functions, GUIs can be immediately modifiable through a console window, and so on.

Using interpreted languages for the majority of system tasks is ideal, as they are typically easier and faster to write, experiment with, and debug compared to compiled languages. Also, performance is not typically a concern for general OS tasks, though the ability to compile programs should obviously be included for those situations in which performance is a critical aspect.

Scheme or other LISP-like languages seem to be ideal for this purpose given their property of treating code as data and allowing you to mold the language to fit your specific purposes. It’s not uncommon for programs written in such languages to have effectively built their own programming language through the use of composing the basic tools LISP-likes give you.

Yes, this kind of sounds like emacs taken to the next level…

The trouble with symbolic links

Cheap Complexity

https://www.schneier.com/blog/archives/2022/08/security-and-cheap-complexity.html

Starting from a Linux Distro

Using Linux From Scratch to get an idea of how things can be done, what needs to be done

https://www.linuxfromscratch.org/

pkgsrc as packaging system?

https://www.pkgsrc.org/#index5h1

Try to incorporate as many BSD-likes as possible, even though we still have to work with the Linux kernel. e.g. bsdutils instead of coreutils?

Issue with modern OS desktops

Innovation was done for the sake of innovation and for the new shiny.

The desktop metaphor was done by Windows 95 and we haven’t really changed anything since then.

Don’t change things for the sake of change, to make users struggle to find where things are now when all they want to do is get their work done.

https://www.theregister.com/2022/09/05/opinioncolumnmodernosdesktop/

OSDev Wiki

https://wiki.osdev.org/

Memory Management on Old OSes

http://basalgangster.macgui.com/RetroMacComputing/TheLongView/Entries/2011/1/22_MoreMasters%3B.html

Another video series on making an OS

https://www.youtube.com/watch?v=MwPjvJ9ulSc&list=PLm3B56ql_akNcvH8vvJRYOc7TbYhRs19M

Continuation Passing Style

In continuation passing style, a stack is not needed because functions never return, the code is simply compiled into sequences of instructions with GOTOs. This might be an interesting thing to try for an operating system, entirely eliminating issues related to stack overflow, stack smashing, etc. Although it would come at the cost of very ugly code if written with a traditional language, so perhaps a new language could be designed just for this OS?

https://ericnormand.me/podcast/what-is-a-continuation

If I ever make an OS, I will need to have support for stylus input and writing freely over everything.

I wish computers were a lot closer to the pen and paper experience. Where you can take some text or a passage from a book or anything like that and just start scribbling and writing and highlighting, regardless of any specific drawing support in any app.

I would also so very much love to have a text editor that supported creating pages on an infinite plane.

Basically like a neverending desk, where you can make pages of any size and format, organize them how you’d like, draw on them, rearrange them, etc.

But then also combine this with the power of computers where nothing is concrete. You can drag and drop text from one page to another, split pages up to reorder things, have infinite undo, modify images on the fly, etc.

PROGRAMMING FROM THE GROUND UP AN INTRODUCTION TO PROGRAMMING USING LINUX ASSEMBLY LANGUAGE

Notes on Programming in the OS

When programming, you should always be able to jump to source code of any libraries you use, as if it was part of your project. If you call printf from stdio.h, for example, you should be able to just jump to its definition/implementation.

Notes on a Shell

Is there another way to handle shell-based input that doesn’t require ugly escaping of special characters?

It would be nice to be able to write something akin to cp -r Downloads/Dir With Spaces Documents/ instead of needing to escape the spaces (cp -r Downloads/Dir\ With\ Spaces Documents/) or quote the whole string in question (cp -r "Downloads/Dir With Spaces" Documents/).

It’s not so much that there are scenarios that quoting would be impossible, it’s more that I’d rather just not have to worry about the need to do it in the first place.

The end goal would be to make the system as “user-friendly” as possible in so much as the user interacting with the shell doesn’t have to think about such simple shell-specific details as this, and can just type what they mean without worrying.

Notes on File Managers

im very surprised that no file manager has a method to open a file for /viewing/ (eg double click) or for /editing/ (eg alt+double click), and have two context menu options for these two common actions instead i spend too much time going open with…. and then not knowing what its going to default to next time, and end up opening an image i wanted to view in gimp, or a html i wanted to edit in firefox

– @noa@merveilles.town

Notes on File Systems

Other Helpful Resources