-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement a Scheme REPL based on the Ribbit VM #39
Conversation
Handle presence or absence of ROM, RAM(s), etc. separately, and fail lazily. This allows alternate implementations pick and choose which components to use.
BUILTIN_SYMBOLS can be overridden. If min_statics is None, any use of an undeclared symbol is a ParseError. Range-checking for constant values. A ParseError type for slightly more clarity about where the errors are coming from.
According to System 7.5.3 in emulation.
Run rsc and decode the symbol table into ROM and (at runtime) RAM. Not really dealing with instructions yet, but the path is becoming clear.
The first call to getchar captures an entire line of input, then pushes the characters one at a time. This makes the REPL behave in a sensible way, and can handle backspace. It also means that most text entry is always happening when the interpreter is in a type loop handling getchar, so it’s much more responsive.
And fix an error
A few bugs have been sorted out, and the getchar/putchar opcodes are now more responsive and support simple line editing. That's sufficient to make this "usable". In the REPL, a couple of simple expressions will consume the available memory, so we'll need a garbage collector to make this any more real. |
Calling this good enough to merge. Planning to add pointer tagging and garbage collection on another branch. |
This involved a lot of side projects, including: