Qi 6 - drym-org/qi GitHub Wiki

Release

Planned for Spring '26.

Todos

* Qi todos [0/24]
** Release
- [ ] Deforestation [Dominik et. al.]
  - [ ] Define the `define-producer`, `define-transformer`, and `define-consumer` interface for extending deforestation (also encapsulating both naive and stream semantics in the definition), and re-implement existing operations using it.
    - N.B. consumers complexity/time required currently unknown
  - [ ] Implement the remaining producers and transformers in `racket/list` for `qi/list`.
  - [ ] Decide on whether there will be any deforested operations provided in `(require qi)` (without `(require qi/list)`)
  - [ ] Review which `racket/list` forms are actually needed in `qi/list`
  - [ ] Come up with a good way to validate the syntactic arguments to `range` using contracts.
    - Don't like it, but let's do it!
  - [ ] Why is `range-map-car` slower against Racket following the Qi 5 release?
  - [ ] Decide on appropriate reference implementations to use for comparison in the new benchmarks report and add them.
    - we formerly compared Qi and Racket
    - now we compare deforested vs non-deforested
    - comparing standard functional operations (range, map, filter, foldl) in Racket vs Qi
- [ ] Write up Qi's theory of effects notes + docs PR, including accounting for binding rules. [Sid]
  - bindings optional for this release
- [ ] Write up the operational semantics of Qi in the docs [Eutro]
- [ ] Develop a backwards-incompatibility migration tool using Resyntax, to be used in the next Qi release. [Sid/Jacqueline]
- [ ] Incorporate "bingdi" compact currying syntax [Noah/Sid]
** Post-release
- [ ] Incorporate Chai into Qi. [but message Sam]
  - [ ] Write a proof-of-concept for implementing code generation from abstractions of "flow" and "connective tissue" that are set by a context parameter. [Sam]
- [ ] Publish `qi/class` in some form. [but message Jair]
- [ ] Remaining formalization of Qi's semantics using Redex.
  - [ ] Add bindings and effects to the Redex semantics (including: ensure that test cases validate that scoping rules are purely lexical and not dynamic) [sorta blocked on theory of effects notes + PR]
  - [ ] Incorporate effects and bindings into Qi's pen-and-paper semantic model. [Sid]
- [ ] Implement a compile-time table of known arities and add an entry to it as part of `define-flow`.
- [ ] Ready the [inlining PR](https://github.com/drym-org/qi/pull/200) to be merged and tag for code review. [blocked on issues noted in the PR]
  - cross-module inlining
  - mutually recursive functions
  - concerned re: semantics of substitutions [might break things and we aren't sure]
  - can't add a new scope to an expression that has host expressions in it [due to some interaction with syntax spec] [this is mostly on us, but we do need Michael]
  - [ ] Write phase 1 unit tests for inlining.
- [ ] Deforestation
  - [ ] Attach a `deforested` syntax property in the deforestation pass, and use it in compiler rules tests (instead of string matching). [nice to have -- big and doesn't affect release]
  - [ ] Improve `qi/list` and deforestation testing by writing a macro to simultaneously test the expansion and the semantics. [nice to have --- we do test these independently, but not together]
    - Currently have 3 separate places for tests --- hard to keep straight
    - Need a way to quickly add to the test suite once a new stream component is ready
  - [ ] Investigate whether the deforested operations could be expressed using a small number of core forms like `#%producer`, `#%transformer`, `#%consumer`, and `#%stream`.
- [ ] Start organizing `qi-lib` into `qi` and `qi/base` collections
  - this will be informed by further reduction of the core language; for now, there's not much value in doing this
- [ ] Implement DAG-like binding rules for branching forms [[Syntax Spec parallel binding-spec PR](https://github.com/michaelballantyne/syntax-spec/pull/85/)][Eutro and Michael]
  - blocked on needing to work out exactly how to implement it
  - the implementation in the PR is just a proof-of-concept and not usable as is
** Done