4 ms·
Not yet. I'm tempted to add custom functions first for which the AST evaluator should be sufficient. And anyway, even though not as retro, named functions are b
by jmmv 4y ago
Not yet. I'm tempted to add custom functions first for which the AST evaluator should be sufficient. And anyway, even though not as retro, named functions are better than a mess of numbered GOSUBS... Which means that if I even get to GOTO/GOSUB, I may try to do it in a hacky way.
Although, to be honest, in the spirit of making this a true "retro-computer", the idea of compiling the code into a custom bytecode is incredibly tempting. It'd be super fun to build, and also... that'd enable a DISASM command of some kind to dump arbitrary memory, as well as PEEK/POKE! Tons of work though.
- eatonphil 4y ago> Tons of work though. You know your project better than I do but unless there's something I don't understand going on, it really shouldn't be that hard. You can also keep both backends around and just build a basic VM evaluator and start compiling simple expressions at a time to the VM version. I don't want to give you suggestions if you already know all that but also happy to chat if you are looking for a good plan. :D
- jmmv 4y agoOk ok, it's probably not thaaaat hard technically, but it's a fair amount of work :) I haven't looked into it at all yet. Once I start doing so, I will probably reach out to you. Need a few days off before taking this on though as publishing a new release is always exhausting.
- int_19h 4y agoIt would be interesting to make it an indirect threaded code interpreter targeting wasm. Should end up faster than typical bytecode.
- jmmv 4y agoThat’s a very interesting idea! But note that EndBASIC runs on the desktop just fine compiled to native code; no WASM involved. And it will not become an Electron app :P