by WoodenChair · 3y ago · 0 comments
Here's why real languages are better than stripped down languages: Anyone with programming knowledge can implement a Brainfuck interpreter in a few hours and run any Brainfuck program. Anyone with a tiny bit of CS knowledge can implement a Tiny BASIC interpreter in just a day and then you can run any real Tiny BASIC program from the late 70s. It's cool to run real programs people actually used. With this stripped down C, there are no pre-made real programs...
0:https://en.wikipedia.org/wiki/Brainfuck 1:https://en.wikipedia.org/wiki/Tiny_BASIC
Also related to small language implementations I find notable PicoC [3] which is a C interpreter written in around 3k LOC of C. Past discussion about it here 13 years ago [4].
[0]: https://www.lua.org/about.html
[1]: https://www.lua.org/spe.html
[2]: https://en.wikipedia.org/wiki/Lua_(programming_language)
1. You use the example of a tiny basic of a 'real language' and I don't see how tiny basic is a 'real language', but tiny C is a stripped down language.
2. You can build on this to make a full c implementation. A minimal c implementation that can potentially bootstrap a full c environment is more useful than a brainfuck interpreter.
2. Good point, but it’s several orders of magnitude more work to go from this to C, so it depends if you’re doing a one off project or have much bigger ambitions. I think you get more bang for the buck out of Tiny BASIC if it’s a one-off project is my point.