planckforth
miniforth
planckforth | miniforth | |
---|---|---|
12 | 3 | |
271 | 116 | |
- | - | |
0.0 | 5.8 | |
over 1 year ago | 3 months ago | |
Forth | Forth | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
planckforth
-
Forth as an intermediate language
This reminds me a bit of how planck is implemented with planckforth. I can't tell you if there are pitfalls or not, but I can understand how it could be an interesting approach.
- PlanckForth - Bootstrapping a Forth interpreter from hand-written tiny ELF binary. Just for fun.
-
Hacker News top posts: Dec 6, 2021
Show HN: PlanckForth – Bootstrapping an interpreter from handwritten 1kb binary\ (14 comments)
-
Show HN: PlanckForth: Bootstrapping an Interpreter from Handwritten 1KB Binary
bootstrap.fs is a thing of beauty
https://github.com/nineties/planckforth/blob/main/bootstrap....
It starts off looking like line noise (the very simple interpreter defined in hex) and gradually turns into the forth we know and love.
Fantastic!
-
Bootstrapping a Forth Interpreter from Handwritten 1KB Binary
interpreter is designed to be very simple. Every built-in word is single-letter and the interpreter just repeats that reads a character, looks it up from the dictionary and executes it. Also there is no error checking.
This is the actual code for the first interpreter, which is a 136-byte implementation of the interpreter followed by a built-in dictionary of 888 bytes.
https://github.com/nineties/planckforth/blob/main/planck.xxd
The first interpreter and language is so esoteric that, for example, the Hello World looks like this.
$ ./planck
- PlanckForth: Bootstrapping an Interpreter from Handwritten 1KB Binary
-
Fitting a FORTH in 512 bytes
Seems painful. I like this approach:
https://github.com/nineties/planckforth
You start with a very tiny address or bytecode interpreter, much smaller than 512 bytes. Then you load several levels of bootstrap interpreters into it until you have a fairly featureful Forth. So that occupies ram but not program space on the target computer. You would load the non-initial stuff from a remote computer that didn't have tiny memory constraints.
- Bootstrapping an Interpreter from Handwritten 1KB Binary
miniforth
- Show HN: PlanckForth: Bootstrapping an Interpreter from Handwritten 1KB Binary
-
PlanckForth: Bootstrapping an Interpreter from Handwritten 1KB Binary
The initial 1-character syntax is an interesting approach. Though, in my experience, you can afford the full Forth syntax even with half the byte budget.
-
Branches: No assembly required
Good question. That code doesn't need any changes from what happened in the assembly post. You can see it here.
What are some alternatives?
Transformer-in-Transformer - An Implementation of Transformer in Transformer in TensorFlow for image classification, attention inside local patches
gforth - Gforth mirror on GitHub (original is on Savannah)
cycle-cloud - Repository to allow collaboration between Cycle Labs Cloud community in support of the community.
Mako - A simple virtual game console
planck - This project aims to develop a Compiler Infrastructure which have advanced memory safety and concurrency features.
swapforth - Swapforth is a cross-platform ANS Forth
factor - Factor programming language
mes-m2 - Making Mes.c M2-Planet friendly
principia - The Principia Rewrite