4 ms·
Yeah a lot of the early computers wouldn't have the grunt to parse into an AST. Instead they'd write bytecode, or interpret the code at runtime pretty efficie
by stevekemp 6y ago
Yeah a lot of the early computers wouldn't have the grunt to parse into an AST. Instead they'd write bytecode, or interpret the code at runtime pretty efficiently. Storing programs as bytes instead of ASCII wasn't uncommon either. (e.g. "PRINT" -> 0x02, etc).
I wrote a simple BASIC interpreter for golang, and did something a little more high-level, but not by much:
https://github.com/skx/gobasic https://github.com/skx/gobasic
- Jaruzel 6y agoCool! I'm reading your blog post right now: https://blog.steve.fi/so_i_wrote_a_basic_basic.html https://blog.steve.fi/so_i_wrote_a_basic_basic.html