I was browsing the repository and noticed something deeply troubling: this code is written in C++ (located in .ino files, but still).
I don't want to alarm anyone, but the organization is literally called F0RTHSP4CE, its website is f0rth.space, and yet here we are, using a language that requires a compiler, header files, namespaces, and the audacity to have classes.
Proposed Solution
Rewrite the entire firmware in Forth.
Benefits of the rewrite
- Brand consistency - This is F0RTHSP4CE. Its POS system should speak Forth. Its VFD should display Forth. Its coffee machine should probably run gForth.
- Fewer lines of code - A 150-line C++ file can likely be replaced by 12 Forth words and a comment that just says
( this works, don't ask )
- Security - Nobody will ever exploit code they cannot understand. Not even the members of F0RTHSP4CE.
- Performance - The stack is right there. Everyone in F0RTHSP4CE is already thinking in stacks. This is just making it official.
- Spiritual alignment - Every push and pop brings us closer to the true nature of computation, and also to enlightenment.
Acceptance Criteria
Risks
There is a non-zero chance that the rewrite will result in a system that only the original author can operate, using a mental model that cannot be documented. This is considered acceptable and arguably an improvement over the current situation.
I was browsing the repository and noticed something deeply troubling: this code is written in C++ (located in
.inofiles, but still).I don't want to alarm anyone, but the organization is literally called F0RTHSP4CE, its website is f0rth.space, and yet here we are, using a language that requires a compiler, header files, namespaces, and the audacity to have classes.
Proposed Solution
Rewrite the entire firmware in Forth.
Benefits of the rewrite
( this works, don't ask )Acceptance Criteria
.inofiles replaced with.fsor.fthfiles: HELLO ." greetings from the stack" CR ;README.mdupdated to note that the codebase is now "memory-safe" (the stack is right there, it's fine)Risks
There is a non-zero chance that the rewrite will result in a system that only the original author can operate, using a mental model that cannot be documented. This is considered acceptable and arguably an improvement over the current situation.