One aspect that I like of the programming language I use daily is its robustness, it'd be hard for it to become unrecoverable.
The language itself relies on a runtime that can be emulated in about 150 lines in most languages(including its own language), and a 2300 bytes self-hosted assembler. There is a bootstrapping toolchain that allows me to recover an assembler from a hex dump on an operating system without cat, or ×d, or even with an implementation of the runtime without a file system.
I've added a few notes on how it all works:
https://wiki.xxiivv.com/site/drifblim#bootstrap
This entry was edited (6 days ago)
Brian Swetland
in reply to Devine Lu Linvega • • •I really, really need to get off my butt and get back to work on my project along these lines.
Not quite as compact, but maybe within an order of magnitude or so of complexity (the compiler is looking to end up around 2000-3000 lines of code, virtual machine around 300ish).
More of a C/Go/Rust family language and 32bit risc machine.
Istar Eldritch
in reply to Devine Lu Linvega • • •Devine Lu Linvega
in reply to Istar Eldritch • • •Sure, for system calls I'd recommend using System/extension, that's how I do my syscalls, it's quite useful.
https://wiki.xxiivv.com/site/varvara.html#system
If you mean to spawn children process, use the Console device, like how I call mpg123.
https://git.sr.ht/~rabbits/uxn-utils/tree/main/item/gui/m291/src/m291.tal#L37
varvara
XXIIVVIstar Eldritch
in reply to Devine Lu Linvega • • •Devine Lu Linvega
in reply to Istar Eldritch • • •~rabbits/flick (master): src/flick.tal - sourcehut git
git.sr.htIstar Eldritch
in reply to Devine Lu Linvega • • •Devine Lu Linvega
in reply to Istar Eldritch • • •Istar Eldritch
in reply to Devine Lu Linvega • • •Right! I was thinking on a more generic syscall operation, the vm would just forward the call directly to the kernel and this would allow things like opening sockets and other fun stuff like creating os threads or subproceses.
The downside of this approach would be that the uxntal code using this approach would be dependent of the specific underlying os, which is no good.
Maybe it is better to do this in a more thoughtful way to make an interface that can actually be ported across multiple devices.
Devine Lu Linvega
in reply to Istar Eldritch • • •Jack Leightcap
in reply to Devine Lu Linvega • • •reminding me of the Bell Labs anecdote (can't remember who it was), who hand-wrote a self-hosted language implementation, and by "feeding the paper to itself", poking the resultant bytes into memory, bootstraped the language from nothing but his own mind.
in this case, considering your scope, hex glyphs etched into granite might be more appropriate than paper.
Devine Lu Linvega
in reply to Jack Leightcap • • •Jack Leightcap
in reply to Devine Lu Linvega • • •Devine Lu Linvega
in reply to Jack Leightcap • • •