dan4thewin/FreeForth2
View on GitHub ↗ ★ 60 Forth
FreeForth2 offers a novel, lightweight Forth for x86 Linux that deftly blends assembly and Forth.
9 mentions on Hacker News by 1 person: 0 stories, 9 comments · first 2023-12-31 · latest 2025-09-22
20082026
-
…bending with the compiler STATE. There are 2/3 alternatives to using compiler state aka IMMEDIATE. https://github.com/dan4thewin/FreeForth2 This uses a two-pass search, for macros` and after that immediate words. The most interesting one…
comment by alexisread · 2025-09-22 · in Easy Forth (2015) -
In my spare time I'm looking at JIT from a different perspective. https://github.com/dan4thewin/FreeForth2/tree/master This is a Forth with a few tricks, namely using flow control instead of a compilation switch flag. This, always…
comment by alexisread · 2025-09-19 · in JIT-ing a stack machine (with SLJIT) -
You can replace it, there are two (nearly 3) forths that replace it: https://github.com/dan4thewin/FreeForth2/blob/master/ff.asm which uses a double loop to lookup first macro words, and then immediate words…
comment by alexisread · 2025-06-10 · in Implementing DOES> in Forth, the entire reason I started this mess -
…), Sectorlisp ( https://justine.lol/sectorlisp2/ ) Freeforth ( https://github.com/dan4thewin/FreeForth2 contains an inlining cross-compiler for MSP430) The problem with forths is that they don't seem as scalable as say li
comment by alexisread · 2025-05-06 · in The curse of knowing how, or; fixing everything -
I'd take a leaf out of Freeforth's compiler ( https://github.com/dan4thewin/FreeForth2 ): It implements a repl via single-pass (as with all forths) compilation of an anonymous block. Scoping in forth is dynamic ie. what's on the stack, and…
comment by alexisread · 2024-06-11 · in Forsp: A Forth+Lisp Hybrid Lambda Calculus Language -
…VM code. So for Mako: https://github.com/JohnEarnest/Mako/blob/master/src/MakoVM.j... Freeforth: https://github.com/dan4thewin/FreeForth2/blob/master/ff.asm Jonesforth: https://github.com/nornagon/jonesforth/blob/master/jonesfort...…
comment by alexisread · 2024-03-02 · in Konilo: A personal computing system in Forth -
…used to bring up new hardware as its easy to write drivers for (See Open Firmware). If you look at https://github.com/dan4thewin/FreeForth2/blob/master/ff.asm You can see that the x86 registers are used to avoid SWAP instructions via…
comment by alexisread · 2024-01-14 · in Terse: A language with hi-level look-and-feel, low-level control (1995) [pdf] -
…and for higher level coding, could use more of the techniques from Wat. You might want to look at https://github.com/dan4thewin/FreeForth2/blob/master/ff.asm It compiles anonymous functions (words) at the shell. It may be possible to use…
comment by alexisread · 2023-12-31 · in Pascal in Forth (1983) -
…(Anonymous function eval at the shell, threaded subroutines with no swap, MSP433 cross compiler) https://github.com/dan4thewin/FreeForth2/blob/master/ff.asm Sectorforth (Minimal - 7 operators, everything else is in the prelude including…
comment by alexisread · 2023-12-31 · in Pascal in Forth (1983)