7 ms·
Author here. Yes, but you have to use the extended 509 byte "friendly branch" version, in order to get error messages on undefined behavior. For example, if I m
by jart 5y ago
Author here. Yes, but you have to use the extended 509 byte "friendly branch" version, in order to get error messages on undefined behavior. For example, if I mistype a variable name as "FUDGE" then it'll longjmp() out of the evaluator and print "?FUDGE": https://justine.lol/sectorlisp2/debugging.png https://justine.lol/sectorlisp2/debugging.png
If we were to do that in the main branch, it'd get caught in an infinite loop. You can always define a higher-level LISP evaluator on top of it which has undefined variable reporting. So that doesn't make it a toy. Doing nothing on undefined behavior may be hostile and dangerous, but it's legal as far as optimizations are concerned. If what you said were true, then Clang and GCC would be toys, since they'll often exploit undefined behaviors to gain an edge in benchmarks, by generating code so that the world might end if an integer overflows.
So one way you could think of it is the 436 byte version is your release branch and the 509 byte version is your dev branch. Both of which fit inside the 512 byte boot sector!