planckforth
planck
planckforth | planck | |
---|---|---|
12 | 1 | |
271 | 7 | |
- | - | |
0.0 | 2.6 | |
over 1 year ago | 4 months ago | |
Forth | Forth | |
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
planck
-
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.
What are some alternatives?
miniforth - A bootsector FORTH
factor - Factor programming language
Transformer-in-Transformer - An Implementation of Transformer in Transformer in TensorFlow for image classification, attention inside local patches
cycle-cloud - Repository to allow collaboration between Cycle Labs Cloud community in support of the community.
principia - The Principia Rewrite