Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mushrom/nscheme
High-performance scheme interpreter
https://github.com/mushrom/nscheme
Last synced: 3 months ago
JSON representation
High-performance scheme interpreter
- Host: GitHub
- URL: https://github.com/mushrom/nscheme
- Owner: mushrom
- Created: 2016-07-19T05:51:35.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-06-19T00:55:11.000Z (over 1 year ago)
- Last Synced: 2024-04-24T15:35:10.058Z (7 months ago)
- Language: C
- Size: 127 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- AwesomeInterpreter - nscheme
README
nscheme readme
==============A fast, stack-based, JIT-compiling, concurrency-friendly scheme interpreter.
Currently a work in progress, it doesn't do much yet.To build, type `make`, and that's it for now. A ./configure script and testing
framework will be coming soon.## TODO
- [ ] parser
- [x] basic lexer+parser
- [x] global symbol table
- [ ] add locking once multithreading is implemented
- [x] handle basic types (ints, characters, null, ...)
- [ ] handle unicode
- [ ] generic utf* handling or just utf8?
- [x] handle quoted forms
- [x] handle dotted form pairs, (a . b)
- [ ] handle vectors
- [ ] handle strings
- [ ] handle bytevectors
- [ ] properly handle parser errors
- [ ] I/O
- [/] `write` primitives
- [x] `display`
- [ ] `write`
- [x] `read` primitive
- [ ] implement port handles
- [ ] implement a generic port structure to handle I/O for many different
sources eg. sockets, files, memory buffers
- [ ] handle port argument for I/O primitives display, write, read, ...
- [ ] Implement open/close procedures for different sources
- [ ] virtual machine
- [x] basic stack-based structure for vm
- [ ] tree walker interpreter
- [x] some basic forms (lambda, if, define, top-level begin)
- [ ] expression-like begin
- [ ] tail recursion (note: may not be needed if all lambdas are JIT'd on first call)
- [ ] ! syntax expansion
- [ ] JIT compiler
- [x] Tail recursion
- [ ] Scope analysis pass
- [ ] handle local (define ...) forms
- [x] single local variable definitions
- [ ] function definition form
- [ ] handle expression-like begin forms that generate new scope
- [ ] ! handle nested lambdas
- [ ] ! syntax expansion
- [ ] optimizations
- [ ] common subexpression elimination
- [ ] dead code elimination
- [ ] optimizing code which is guaranteed to have no side effects
- [ ] inline small functions
- will be especially useful for syntax extensions
which generate lambdas, eg. named lets)
- [ ] garbage collection
- [ ] ! implement basic pointer bumping allocation
- [ ] ! implement mark-and-compact collector
- [ ] figure out a way to make it work with multiple threads (arenas?)
- [ ] exception handling
- [ ] implement exception stack in vm struct
- [ ] add `with-exception-handler` and `error` primitives
- [ ] module system
- [ ] figure out what to put here
- [ ] implement r7rs libraries and associated procedures
- [ ] FFI
- [ ] maybe look at how python does it, or lua or chicken or something
- [ ] command line interface
- [x] add help output
- [x] add file argument
- [ ] allow specifying options like environment, modules, output location as arguments
- [ ] testing
- [ ] I/O tests
- [ ] for basic std{in,out}
- [ ] for network sockets
- [ ] for memory buffers
- [ ] stress testing for compiler
- [ ] unit tests for scheme procedures