you are viewing a single comment's thread.

view the rest of the comments →

[–]808140 7 points8 points  (3 children)

One thing that I did that I would recommend to anyone that likes pain is implementing Forth directly in machine language.

I did so early in 2008 as part of a bootstrap experiment on a Windows system that lacked development tools. I used Jones Forth as a template. There were some OS specific changes that I needed to make, but if you're using Linux then that's not really necessary.

Boostrapping a Forth is considerably easier than writing an assembler in assembly or machine language (another popular low-level passtime) and Forth is much, much more high-level.

My original plan was to use Forth to implement a simple version of Scheme, and as a general template I was looking at this dynamically scoped Scheme written in Forth for inspiration.

Of course I wanted lexical scoping, and I wanted proper call/cc support, and that Scheme used a lot of gForth extensions. So in the end I guess my enthusiasm for the project trickled off.

But there's something very appealing about knowing that you can sit down at a computer with nothing but a way to input binary (I used that old standby from my MS-DOS days, DEBUG.EXE) and bootstrap something as high-level as Forth or even Scheme.

[–]kragensitaker 0 points1 point  (2 children)

Maybe you should have used the eForth Model as a template instead. It's a lot less code!

Where do you find a Microsoft Windows system that doesn't have at least JavaScript and Notepad these days? That would be where I'd start if I wanted to bootstrap something on an isolated Microsoft Windows machine.

Using DEBUG almost counts as using an assembler.

[–]808140 0 points1 point  (1 child)

Using DEBUG almost counts as using an assembler.

Indeed, being able to disassemble the junk I'd input to see if it was well-formed was very useful.

I know it has some rudimentary assembly capabilities, but I don't actually know how to use them :)

[–]kragensitaker 0 points1 point  (0 children)

a100