Skip to content
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

Big interpreter rewrite #5406

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

StachuDotNet
Copy link
Member

@StachuDotNet StachuDotNet commented Jul 20, 2024

Rewriting RuntimeTypes, the Interpreter, and PT2RT to:

Here are all of the wins (WIP):

  • much better, structured RTEs
    • OldStringErrorTODO is gone
  • better handling of RTEs, generally
    • especially dev experience (understanding what went wrong)
  • async, concurrent function calls
  • no easy-to-reach stack-overflows
  • more tests
  • super-fast builtins (without copying Dvals all over the place)
  • non-recursive runtime type-checking is now complete and I can close Refactor typechecking to use value types #5071 Use package Bool.and and Bool.or #5030
  • everything's faster
  • hopefully fast enough for 95% of programming tasks
  • partial-application works, for "applys" to both fns and lambdas
  • I might add some other tiny language features? lol
  • interpreter is easier to understand
  • there might end up actually being a net negative in terms of LOC at the end of this?
  • we're a tiny bit closer to getting tracing working in this new world
  • I have some ideas on further worthwhile optimizations (will hand off to Ocean)

I might get stuck on SqlCompiler and circle back to that in another PR - not sure yet.

It'll probably be another 2 weeks until this gets merged.

This closes #5222, closes #5130, closes #5071

@StachuDotNet StachuDotNet force-pushed the big-interpreter-rewrite branch 2 times, most recently from b55c3d4 to c26f301 Compare July 31, 2024 18:19
@StachuDotNet StachuDotNet force-pushed the big-interpreter-rewrite branch 2 times, most recently from 4abbe16 to 29faccd Compare August 13, 2024 13:57
@StachuDotNet
Copy link
Member Author

StachuDotNet commented Aug 14, 2024

thoughts on implemented match that I wanted to record in case my current plan doesn't end up working out: https://gist.github.com/StachuDotNet/5a8923721b255ad2a91c1c6dcc3e9b8e

Edit: it worked out (really well!) but might as well keep this around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: List.map Causes Stack Overflow Error on Large Lists
1 participant