SUBLEQ and DawnOS (2017)
esoteric.codes
esoteric.codes
Had a chuckle here. I have to agree we’ve become complacent with our hardware making up for our software.
> i originally planned x86, but i realized how bad it is - after all, current x86 is the result of approx 30+ years of work of 1 million hardware developer, all added his own poop into it to have a cpu. some idiot waked up at morning, and decided to add a MOV with his very own shitty prefixes and various different encodings. another idiot waked up at morning, and decided to add a floating point instruction which adds integers to floating point, and stores the results in a floating point register. another idiot waken up, and decided to add an opcode for adding 4 numbers simultanously. 1500 idiot waken up, added his own opcode, various memory addressing modes, and todays x86 has been born, with one billion transistors minimum just to have an operating system boot.
This man is hilarious
The m68000 had no memory protection and could technically run an operating system, but it came with the implied request that no program overwrite the operating system's working RAM.
(And then you'll need syscalls to actually jump to the proper ring and access that memory, and such stuff, which might go against the political agenda of DawnOS.)
It worked quite well as long as your applications were well-behaved though.
https://en.wikipedia.org/wiki/Exec_(Amiga)#cite_note-Torvald...
When doing it with well-behaved applications, on the other hand, AmigaOS was multi-tasking on a whole other level compared to contemporary operating systems using actual cooperative multitasking.
It was a neat little OS. Fast as hell and with several little features that I still find myself missing from modern OS'es. Too bad Commodore screwed up.
So if you actually wanted to make and optimize one enough to be a "real" computer, you'd effectively end up with a conventional RISC architecture, where the only difference would be this weird way to encode instructions sprinkled on top of it.
Once you're there, it's just Turing machines all the way up: build a compiler, build an interpreter, run nodejs, whatever. Processors are so fast these days you could probably live with the inefficiency, assuming sufficiently smart compilers are available for the architecture.
It's just... not that different. Computers are weird like that.
If you mean multi-core, I guess you could do memory-mapped registers to control additional cores from the first one? In its simplest form, you write an address (reset vector) into a predetermined memory location, and that core starts executing from that address. IIRC real multi-core CPUs work something like that.
If you mean multitasking on a single core, you should definitely be able to implement the cooperative kind. Preemptive multitasking requires timer interrupts.
SUBLEQ was designed to be a simple processor that could be implemented and programmed in a course. It was not designed to be practical or efficient, only demonstrative.
From a processor design prospective, the problem with SUBLEQ as an instruction set is that its instruction is both an arithmetic operation and a branch. And some things have to be implemented using self-modifying code. These are impediments to branch prediction, instruction pipelining and reordering, and speculation.
To make the fastest processor possible for SUBLEQ, one would have to basically have to recompile the code into a better instruction set. And that would be hard as it would require recovering the basic block structure which is hidden by the self-modifying code.
I wonder if there's a connection between the Subleq op and relu op. If so, perhaps you could parallelize the chip and have it instantly optimized for neural networks. Seems like you could go a long way.
https://portal.mozz.us/gemini/biomimetic.me/subleq.gmi
On that page I have a little subleq program written using HSQ (High-Level Subleq, a C-like language that compiles subleq) that uses ANSI graphics for a simple D&D dice roller.
One thing I think that should be a little different than what is on Rosetta Code for example is to make sure that the STDIN input does not require an ENTER key or something like that. Because that allows for more interactive programs rather than line-based.
Here is my little C subleq interpreter that does it that way: https://github.com/runvnc/sq/blob/master/sq.c .. and it also flushes STDOUT quickly if I recall. Mine is based on this one: https://github.com/davidar/subleq/blob/master/src/sq.c
Maybe using ANSI escape codes is cheating. But if you don't mind cheating, just having the STDOUT allows you to also do vector graphics, if your terminal happens to support that. Such as an xterm which can do vector graphics (draw lines) using Tektronix 4010/4014 escape codes.
> We begin by subtracting 7 from 7 (the locations of A and B), and will store the result (0) in location B.
Here the example gets confused as it shows the 0 result stored not in location B (address 4) but in the middle of the executing instruction (address 1). This mistake is then repeated for the next instruction.
He may be a competent programmer but he certainly has mental health issues, AFAIK.
Googling DawnOS will find you quite a few websites discussing it, also thorough debunkings of the supposed virtues of his "SUBLEQ" architecture.
I... am inclined to violate HN rules, let's just say I closed the tab at that point.
How remarkable that it fell away from vogue; a fixture of the early web, and a victim of the dot-bomb.
> there are also lack of technical knowledge at linux side, for example, most linux distributions cant even detect the cpu type, and force a kernel using PAE or SSE kernel on a 6x86 cpu, which of course will crash at boot.
Uh yes it can? cat /proc/cpuinfo? What he is saying (incorrectly) is that Linux is compiled for i686 -- which it often is, so that you don't get illegal instructions when you run programs. No one is preventing you from recompiling with optimizations and -march=native.
Theres so many levels of crazy in just the first paragraph.
I used BitBitJump for a hobby project once, although that's technically not Turing-complete (it has a fixed pointer size, like C). I also like Flump, which is unbounded.
I'd strongly recommend skipping this one.
Both are amazing achievements.
For someone to look at where we are today, and say it sucks and -tries- to do something about should be massively encouraged.
Perhaps neither will go anywhere but attempts can fuel other ventures and spawn ideas.
(and yes, I still think TempleOS can give people ideas even though the man behind the amazing effort is dead)
I also think that inclusiveness and code of conduct needs to be revised to include non neurotypical people of all sorts.
Unfortunately, they often end up the target of hate, ostracism and ridicule.
I can say as a non-neurotypical that there is very little room in today's world for us.