kragen/stoneknifeforth
View on GitHub ↗ ★ 443 Forth
a tiny self-hosted Forth implementation
26 mentions on Hacker News by 11 people: 4 stories, 22 comments · first 2009-07-10 · latest 2025-10-07
20082026
-
Having written a Forth-like native-code compiler ( https://github.com/kragen/stoneknifeforth ) and also a game in Gforth, I can't claim to be a Forth expert, but I agree. A lot of the weaknesses of the language (such as no compile-time…
comment by kragen · 2025-10-07 · in Compiling a Forth -
…ballpark. I agree that Forth is about an order of magnitude easier. You probably shouldn't consider https://github.com/kragen/stoneknifeforth to actually be a Forth (it's not interactive and doesn't have immediate words) but it did compile…
comment by kragen · 2025-09-22 · in Easy Forth (2015) -
…Jonesforth: https://github.com/nornagon/jonesforth/blob/master/jonesfort... Stoneknife: https://github.com/kragen/stoneknifeforth/blob/master/tinybo... Retro/Ilo: http://ilo.retroforth.org/ilo.txt Sectorforth:…
comment by alexisread · 2024-03-02 · in Konilo: A personal computing system in Forth -
…I wonder what we can fit in there. More seriously, a metacircular example to draw from would be: https://github.com/kragen/stoneknifeforth
comment by tomberek · 2023-11-08 · in milliForth -
…(from a subset of scheme to at&t-syntax i386 assembly, 1553 lines of code) - https://github.com/kragen/stoneknifeforth (from a forth-like language to an i386 linux elf executable, 132 lines of code) - https://github.com/kragen/peg-boot
comment by kragen · 2023-11-07 · in Writing a Compiler is Surprisingly Easy (part 1) -
maybe i don't qualify as a forth programmer then well, that's unfair, because https://github.com/kragen/stoneknifeforth definitely doesn't qualify as a forth, it doesn't have immediate words
comment by kragen · 2022-11-30 · in A Forth Apologia (1988) -
i wasn't able to get a runnable forth to less than a couple of pages written in itself https://github.com/kragen/stoneknifeforth but schönfinkel's ski-combinators are maybe the simplest practical basis s f g x → f x (g x) k a b → a i = s k…
comment by kragen · 2022-11-09 · in Lisp as the Maxwell’s Equations of Software (2012) -
…the hardware) and I agree that it can be very painful. I did some of them in 02008, for example: https://github.com/kragen/stoneknifeforth The thing is, though, you can also not do all those things. You can use variables, and they don't…
comment by kragen · 2022-10-20 · in Stop Writing Dead Programs [video] -
…bytes, containing about 1400 instructions." My thoughts: That would just about fit on a VIC-20... https://github.com/kragen/stoneknifeforth/blob/master/tinybo...
comment by peter_d_sherman · 2022-07-17 · in StoneKnifeForth -
…of JavaScript to run the code on. It compiles the language it's written in. In 132 lines of code in https://github.com/kragen/stoneknifeforth/blob/master/tinybo... I wrote an example compiler which compiles a crippled Forth dialect into…
comment by kragen · 2022-07-17 · in Show HN: A compiler and VM for a simple language, in 150 lines of code -
…spend a weekend on it. It's also worth noting that the 1.5 metacircular interpreter is incomplete: https://github.com/kragen/stoneknifeforth#why--to-know-what-...
comment by metagame · 2021-10-10 · in Lisp in a Weekend -
…https://news.ycombinator.com/item?id=2933619 , https://gitlab.com/kragen/bubbleos/blob/master/yeso , https://github.com/kragen/stoneknifeforth , and https://news.ycombinator.com/item?id=695981 in the past, and within the last three months…
comment by kragen · 2021-05-16 · in TSMC looks to double down on U.S. chip factories as talks in Europe falter -
…ELF has always allowed you to specify the initial load address. When I first wrote StoneKnifeForth https://github.com/kragen/stoneknifeforth its load address was 0x1000, but at some point Linux stopped allowing load addresses lower than…
comment by kragen · 2021-04-02 · in An HTTP server in a single .c file -
There is also https://github.com/kragen/stoneknifeforth
comment by ampdepolymerase · 2021-02-18 · in RetroForth 2021.1 -
…computing and encoding a jump offset. A very simple code generator like the one in StoneKnifeForth https://github.com/kragen/stoneknifeforth is simpler than the parser needs to be for many popular languages. However, at least with my…
comment by kragen · 2020-06-08 · in Let's make a Teeny Tiny compiler -
https://github.com/kragen/stoneknifeforth is 114 non-comment lines of code, compiles to 4063 bytes. (he mentions it's about half the size of the otccelf tinyc)
comment by ahazred8ta · 2019-06-25 · in Stage0 – A set of minimal C compiler bootstrap binaries -
…them, except sometimes I'd call on a dumb defmacro expander as a preprocessor. Kragen also wrote https://github.com/kragen/stoneknifeforth which I haven't read as much of. FWIW I also wrote this about a sort of self-hosting Python in…
comment by abecedarius · 2017-08-14 · in Coding Machines -
…why. Relatedly, I wrote a tiny quasi-Forth in itself that generates ELF executables directly at https://github.com/kragen/stoneknifeforth . Its executables also stopped running around Linux 2.6.27, and I still haven't bothered to figure…
comment by kragen · 2013-02-11 · in Manually creating an ELF executable -
…Based on Brian's work, I wrote a self-compiling compiler for a tiny dialect of Forth: https://github.com/kragen/stoneknifeforth which is about two pages of code if you remove the comments. I also wrote a PEG compiler-compiler in JavaScript…
comment by kragen · 2011-08-23 · in An unusual hardware architecture: APA (Associative Processing Array) -
…experiments along these lines are in StoneKnifeForth, a self-hosted compiler for a variant of Forth: http://github.com/kragen/stoneknifeforth/ and tokthr, where I'm hoping I can get to a usable interactive interpreter in under 2K:…
comment by kragen · 2011-04-09 · in Bootstrapping a simple compiler from nothing -
…and a bootstrapping compiler for a very simple Forth-like language: http://github.com/kragen/stoneknifeforth (although I need to fix it so it will run on current kernels; apparently I cut some corner in the ELF spec...)
comment by kragen · 2010-09-26 · in Let’s Build a Compiler (1995) -
…construction: http://canonical.org/~kragen/sw/urscheme/ http://github.com/kragen/peg-bootstrap http://github.com/kragen/stoneknifeforth Machine learning: http://angstro.com/ (this isn't solely my project; I'm only doing a minority of the…
comment by kragen · 2009-07-10 · in "Is that a real program or is that something somebody wrote?"