-
Notifications
You must be signed in to change notification settings - Fork 26
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
Move to an incremental/query driven architecture #103
Comments
@evincarofautumn is experimenting with a build system style of query-driven architecture:
https://gitter.im/pikelet-lang/Lobby?at=5b58fe9632d98c2ed2b58eac |
|
More twitter chats:
|
Looking at Salsa - it's still early days for it, but it looks like it will be close to what we'll need! Here's an example. |
Speaking to Niko, it seems that Salsa doesn't handle 'sub-term' incrementalism. This could be an issue given we are going with a 1ML-style of language, where modules are just part of the term language. |
Just added a link to @ollef's description of incremental compilation In Sixten. |
Lucent by @Techno-coder is moving to a query-driven approach: https://github.com/Techno-coder/lucent/blob/next-prototype/src/query/context.rs It's a hand-rolled version of the rustc approach, rather than using something like Salsa. |
Interesting comment from @matklad: https://lobste.rs/s/afqbdk/individual_element_thinking_vs_grouped#c_gns5uo
Links to Sorbet's
And here is a blog post that talks about some of the design decisions: Why the Sorbet typechecker is fast. Doing something like this might be nicer than using Salsa if we want the Pikelet compiler to be embeddable in other programs. |
Before we go too far down the path of building a traditional compiler (#9), it probably makes sense to start thinking about how we might incrementalise things. This will be super important for supporting a good editor experience (#97). If we put this off for too long we might end up having to rebuild a bunch - this is what Rust is facing, for example.
Without knowing much about it, perhaps something like the Incremental Lambda Calculus would be handy for this. We could try to find the derivative of each pass of our compiler, based on the result of a previous run. This could also be a helpful framework for formalising our incremental compiler as well (#39)!
CRDT-style data structures could also be of potential use, and perhaps projects like timely-dataflow and differential-dataflow.
Unresolved Questions
What is the difference between 'incremental' vs. 'query-driven'?
Resources
Tracking
The text was updated successfully, but these errors were encountered: