/TODO.org

https://github.com/kenpratt/rusty_scheme · Org · 68 lines · 64 code · 4 blank · 0 comment · 11 complexity · 112f2333c363200057e6e38e31ea0a5c MD5 · raw file

  1. * Actual todo
  2. ** DONE See if I can get the tokenizer to return lifetime strs instead of Strings -> NOPE http://www.reddit.com/r/rust/comments/28waq4/how_do_i_create_and_return_a_str_dynamically/
  3. ** DONE Parse to AST!
  4. ** DONE Add functions
  5. ** DONE Add nil
  6. ** DONE Print result to string
  7. ** DONE Implement set!
  8. ** DONE Conditionals
  9. ** DONE Boolean logic/operations
  10. ** DONE Symbols
  11. ** DONE Add quote operator
  12. ** DONE Add quote syntax sugar
  13. ** DONE Add quasiquote/unquote operators
  14. ** DONE Add quasiquote/unquote syntax sugar
  15. ** DONE Lists as data
  16. ** DONE Apply
  17. ** DONE Eval
  18. ** DONE REPL
  19. ** DONE Add up/down arrows to REPL
  20. ** TODO Unify AST and Intepreter enums? -> hard, have to include procedures somehow :(
  21. ** DONE Print statement
  22. ** DONE Run files from file system
  23. ** DONE Let expressions
  24. ** DONE Shortcut syntax for defining functions (define (myfunc x) (+ x x))
  25. ** DONE Try to replace most for loops with iterators
  26. ** TODO See if I can internalize the RefCell contract and expose something simpler for Envirnoment (probably not)
  27. ** TODO Tab completion in REPL (based on defined functions and constants, and maybe even local vars?)
  28. ** DONE Add macros
  29. ** TODO Hygenic macros
  30. ** TODO call/cc (implement with workers? (probably not possible) or manual stack/instruction pointer?)
  31. ** TODO Bytecode VM (stack, or register based? -> stack is probably easier)
  32. ** TODO JIT
  33. * Unimplemented/maybe TODO
  34. ** TODO Floats
  35. ** TODO Ecaping doubles quotes and backslashes in strings
  36. ** TODO Restricting non-global defines? (seems like there's mixed implementations on this, but should at least be conistent)
  37. ** TODO Tail call optimization
  38. ** TODO Nested quasiquotes
  39. ** TODO unquote-splicing in quasiquote
  40. ** TODO quote-syntax
  41. * Interpreters: Existing languages
  42. ** Ruby 1.8: normal interpreter, no precompilation, no VM.
  43. ** Ruby 1.9: no precompilation, compiles to bytecode, runs on VM (YARV), VM is interpreted.
  44. ** JVM: precompiles to bytecode, runs on VM, VM is interpreted with a tracing JIT (or static JIT? depends in the VM?)
  45. ** V8: no precomplation, no VM, no interpreter, static JIT ("full compiler") compiles JS to machine code when it's run for the first time, tracing JIT ("optimizing compiler") watches for hot functions and re-compiles with assumptions & guards baked in, and backs out to static JIT if it breaks. Both JITs are stack machines.
  46. ** Firefox: no precompilation, compiles to bytecode, VM interpreter runs, then first tracing "baseline" JIT, then second optimizing tracing JIT ("Ion") kicks in. VM and JITs are all stack machines, VM interpreter stack and JITs native C stacks.
  47. ** Safari: no precompilation, VM interpreter, first tracing JIT, second optimizing JIT. Both are register machines, not stack machines. Or actually, maybe most platforms ship with interpreter turned off, so it's just a baseline JIT and an optimizing JIT, like V8 but operating on intermediate bytecode.
  48. ** Rust: precompiled to machine code (obviously, I guess).
  49. ** Python (CPython): no precompilation, compiles to bytecode on first run, VM & VM interpreter.
  50. ** PyPy: JIT'ed interpreter written in RPython.
  51. * Interpreters: My options
  52. ** Static compilation (generate machine code statically)
  53. ** Vanilla interpreter
  54. ** Static JIT (generate machine code on first run)
  55. ** Vanilla interpreter + tracing JIT (profile & generate machine code for hot loops/functions)
  56. ** Bytecode + VM interpreter
  57. ** Bytecode + VM w/ static JIT (generate machine code on first execution of each operation)
  58. ** Bytecode + VM w/ interpreter & tracing JIT (profile & generate machine code for hot loops)
  59. ** JVM bytecode compiler (or other VM to target)
  60. ** LLVM backend compiler
  61. ** Plan: do the non-machine code ones first (vanilla interpreter, bytecode + VM interpreter), then try static compilation, then static JITs, then tracing JITs? Or if it's too hard to do a full static compile, just do VM interpreter + tracing JIT, as that's probably the least amount of machine code.
  62. * Resources
  63. http://home.pipeline.com/~hbaker1/LinearLisp.html
  64. http://blog.reverberate.org/2012/12/hello-jit-world-joy-of-simple-jits.html?m=1