3 ms·
I have a side project to try to make an extreme minimal size compiler for a Forth inspired language and implementation. It's a compiler that generates a Forth l
by IAmLiterallyAB 2y ago
I have a side project to try to make an extreme minimal size compiler for a Forth inspired language and implementation. It's a compiler that generates a Forth like interpreter and byte code. The bytecode is huffman encoded. Nothing works yet but its an idea.
- 082349872349872 2y agoHave you seen ColorForth? Moore huffman encoded (or similar) his character set, so he could do dictionary lookup with just REPNZ SCAS.
- kragen 2y agoAre you planning to decompress the bytecode before execution? You might be interested in file `ingram-token-threading.md` in http://canonical.org/~kragen/sw/pavnotes2.git/ http://canonical.org/~kragen/sw/pavnotes2.git/, which describes a possible way to efficiently interpret Huffman-encoded bytecode on CPUs with wide registers.