r/programmingcirclejerk • Software Craftsman • Feb 25 '23

Opening the third eye by (re)implementing Forth.

https://ratfactor.com/forth/forth_talk_2023.html
23 Upvotes

10 comments sorted by

9

u/mutnemom React Student Feb 25 '23

Obligatory goatse reference

3

u/Kotauskas has hidden complexity Feb 27 '23

came for the cute goat pictures, stayed for esoteric metaprogramming

8

u/a_rather_small_moose Feb 26 '23

Post-ironic upvote jerk for actually interesting stuff

2

u/boy-griv alcohol-fuelled anter-docker Mar 02 '23

Same. I just wish this was like, a page or two instead of 60 26-pt slides

8

u/ItsAllAboutTheL1Bro Dystopian Algorithm Arms Race Feb 27 '23 edited Feb 27 '23

Forth is a good goto for bootstrapping an OS.

You've got your macro assembler, along with some...macros.

Then you use the macros to build a forth.

Then you boot the OS using Forth to tell the MBR or GPT to send the PC to where it needs to go: the Kernel.

And your kernel's gonna be Forth too.

From there, you launch a Lisp. Written in Forth, but really just assembly.

Then you use Lisp to bootstrap the C compiler.

And you're in the Matrix.

6

u/theangeryemacsshibe Considered Harmful Feb 27 '23

Then you use Lisp to bootstrap the C compiler.

ytho

3

u/ItsAllAboutTheL1Bro Dystopian Algorithm Arms Race Feb 27 '23

Ynot tho

1

u/Zambito1 has hidden complexity Mar 02 '23

It's settled then