-- Leo's gemini proxy

-- Connecting to bbs.geminispace.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; charset=utf-8

To nForth and Beyond


I've been hacking on my little nForth, which is a simple 32-bit indirect Forth with a few deviations from norm. In the process I shrunk it down to 3.5KB, which opened up my appetite for tiny Forths.


Come to think of it, I haven't written more than 64KB of forth for any forth project this century. Not even close. And 64K of forth is a huge amount of code, even with 32-bit tokens.


So I've been thinking of spinning up another forth, with 16-bit execution tokens and 64KB (or 128KB with even alignment). I will keep the heads in a separate area, and jettison them for deployment as they are useful for development only.


I like keeping heads separately, leaving the code space contiguous, as it allows for a lot of tricks such as piggibacking code. My favorite example is 2x prefix, which runs the code that follows twice by manipulating the return stack. 2x can be placed just before a definition, and you can pile up more than one. That is classic non-ANS kind of a trick that Jeff Fox would enjoy ranting about.


Another great thing about separate headspaces is that you can create temporaries during the definition, and get rid of them at the end - the heads are not locked in-between the code.


Damn it, now I really psyched myself up for it. I just might have to do it.


=>https://tildegit.org/stack/nforth


Posted in: s/FORTH

๐Ÿš€ stack [mod]

2023-09-08 ยท 8 months ago ยท ๐Ÿ‘ skyjake, drh3xx, norayr


1 Comment


๐Ÿ™ norayr ยท 2023-11-13 at 00:35:

i found milliforth yesterday: https://github.com/fuzzballcat/milliForth (:

-- Response ended

-- Page fetched on Sun May 19 15:07:34 2024