This forum is closed to new posts due to low activity and a deluge of spam. It is kept online as a static historical record. If you want to read about or discuss esoteric programming languages, the Esolang wiki is the place to go. An archive of the forum is available.

ESO v4 (4)

1 Name: Deschutron : 2010-02-18 15:22 ID:iv/zVvIk

Previously, on Esoteric Operating System:
http://esoteric.voxelperfect.net/forum/kareha.pl/1203094023/l50
http://esoteric.voxelperfect.net/wiki/Talk:Main_Page#Esoteric_OS

Hey guys,

I am interested in the idea to use a Linux kernel as the base for an esoteric language operating system.

Is anyone else interested?

I think the steps are:

  1. make a blank disk image - the base image
  2. download and compile a linux kernel
  3. install the linux kernel into the base image
  4. boot the base image to test that it works
    4.1. e.g. boot it in a virtual machine
  5. write a program--a wrapper--that adapts Linux system calls into IO to a couple of files, which themselves can be streams
    5.1. develop a protocol for the wrapper to communicate through the stream files
    5.2. see Appendix A in this post for architectural details of the wrapper
  6. decide the esoteric programming language to use
    6.1. It must have access to stdin and stdout, or file access
  7. write a compiler or interpreter for the esoteric language, so that a program in that language (an eso-program) can run under Linux
  8. write the root eso-program--the eso-program to run when the kernel finishes booting
    8.1. make it simple until the system is known to work
  9. write the system's "init" program
    9.1. make it a native Linux program (e.g. compiled C)
    9.2. make it start the wrapper and the root eso-program, and connect them properly--that's all it should do
  10. put the wrapper, the init program, and the root eso-program onto the base image
  11. boot the base image and test it
  12. fix bugs
  13. develop the eso-program(s) and make it a usable OS

I have done:
1, 2, 3, and some of 5, including all of 5.1.

Regarding 1, 2, and 3, I then failed to perform step 4. Using Qemu, my Linux kernel wouldn't recognise the disk image - so 1 might need to be redone, or an extra step might be needed such as editing the Master Boot Record or something.

Regarding 5, I have a program called KWrap that fulfills the role of the wrapper described here. It is unfinished, but with it, you can get the kernel to print "Hello world!" for you. At the moment, you cannot use it to read from stdin via the kernel. You may consider this program to be lies and propaganda at this stage, because I haven't put it online. It should be coming soon. Alternatively, I can email it to anyone who asks for a copy.

Personally, I have already decided a value for step 6 that I'd like to proceed with. It is Redirectable Forking Executive Modular SNUSP - an extended form of SNUSP that can read and write files in a filesystem, run other SNUSP programs and fork into multiple processes.

Deschutron

=Appendix A: an architecture for using the wrapper=

-------------------------
| Root Eso-Program Unit |
-------------------------
| |
| stdout | stdin
| |
-------- ---------
| toK | | fromK |
-------- ---------
| |
-------------- ---------
| kwrap |-------| Linux |
-------------- ---------
| |
| stdout | stdin
| |
---------- ------------
| screen | | keyboard |
---------- ------------

where
Root Eso-Program Unit is the root eso-program,

                  either precompiled or being run in an interpreter.

toK and fromK are character files (Linux term)

                  i.e. those stream files I mentioned

kwrap is the wrapper

You can set this up by making init be equivalent to this bash code:

kwrap toK fromK
rootEsoProgUnit < fromK > toK

2 Name: Phantom Hoover : 2010-03-12 17:52 ID:cizRBeEq

I would help if there was anything I could do. Will the standard C library be usable, or is that not included?

3 Name: Deschutron : 2010-03-16 04:25 ID:RylPM8Q0

Yes, the standard C library will be usable.

4 Name: Phantom Hoover : 2010-03-16 20:00 ID:cizRBeEq

Oh yeah, static linking. Didn't know about that.

Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: