1. 20
  1.  

  2. 8

    There’s yak shaving and then there’s emulating your own theoretical architecture, porting a compiler to it, making your own OS and userspace libraries so you can finally be able to write that note taking application.

    1. 4

      So after thinking, some thoughts on the theoretical Subleq ISA:

      • There’s no registers, and likely no cache - you’re pegged to the speed of memory access.

      • You likely won’t be able to get clocks up much higher than an x86, if at all; and your IPC is going to be very low because you can’t do a lot per cycle. I doubt you could pull off many optimization tricks either.

      • I don’t see how you could implement interrupts - you’re going to be polling.

      • It’ll be hard to manage anything like a stack… or transitioning from user to kernel mode.

      You could probably implement a small CPU that’s more effective, less radical, yet still comprehendible. Keep any design, CISC/RISC/whatever simple enough and it wouldn’t be hard to implement.

      Perhaps all this complexity exists for a good reason?

      1. 2

        Perhaps all this complexity exists for a good reason?

        Well, maybe not all :)

      2. 4

        This is neat in a “do more with less” kind of way. I’m fascinated by how clever these things are.

        His example illustrated is wrong in a couple of ways, though. He does A - B when it should be B - A. He also writes the result to location B (01) when it should go to the addresses pointed to by B (04). The wiki he references is a better resource for anyone about to write a competing OS. ;)

        http://esolangs.org/wiki/Subleq

        1. 3

          I find this somewhat reminiscent of Urbit in it’s “let’s just start over from scratch” approach. These kind of projects are fascinating Yak shaves to watch even if they will never find mainstream application.