Hacker GitHub

← All repos

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

Mentions per year 26 mentions · busiest year 2022 (6)
20082026
  1. 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
  2. …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)
  3. …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
  4. …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
  5. …(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
  6. 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)
  7. 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…
  8. …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]
  9. …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
  10. ▲ 7
    StoneKnifeForth
    story by peter_d_sherman · 2022-07-17 · 6 comments
  11. …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…
  12. …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
  13. …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…
  14. …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
  15. ▲ 102
    StoneKnifeForth (With a Metacircular Compiler)
    story by guerrilla · 2021-02-18 · 52 comments
  16. There is also https://github.com/kragen/stoneknifeforth
    comment by ampdepolymerase · 2021-02-18 · in RetroForth 2021.1
  17. ▲ 2
    Tiny self-hosted Forth implementation
    story by vincent_s · 2020-06-08 · 0 comments
  18. …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
  19. 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)
  20. …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
  21. ▲ 2
    Kragen/stoneknifeforth: a tiny self-hosted Forth implementation
    story by Immortalin · 2016-08-16 · 1 comment
  22. …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
  23. …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…
  24. …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:…
  25. …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)
  26. …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…