Today's Qi meeting notes

Hi @countvajhula ! I really enjoy seeing where Qi is going at the moment. Obviously, whenever you put "typed" and "Qi" close together, you get me very interested :smiley: Now my schedule is very tense at the moment (as usual for all of us I guess), but I'll drop in whenever I have time!

1 Like

Last week's notes:

Diamonds Aren't an Interface Macro's Best Friend

The discussion around "compiler extension" and "language composition" might be especially of interest. It develops some discussions with @michaelballantyne , @dominik.pantucek and @SamPhillips into an approach organized around the idea of "the bottom level is hopeless." Not sure if this would be a feasible approach (or if it is already a well known one), but we have been discussing these to figure out how we could allow the Qi compiler to be extended with custom optimizations for any datatype while still keeping the core compiler lean. The two main approaches we've come up with so far are "compiler macros" and "tower of languages," (there's more context in the notes) and this current idea is related to the latter.

Other highlights:

  • Racket Roguelike Library is getting really fancy :fire:
  • The Qi compiler work (more than a year in the making) is now in the code review stage!

Enjoy! (Thoughts welcome)

2 Likes

Last week's notes:

Tying Up Loose Ends

We're getting close and things are looking to be on track for Friday's planned release. If you'd like to join for the "release party," such as it is, we're glad to have you :slightly_smiling_face: . Bring your favorite drink! And for some entertainment, we just might be able to convince my cat Ferdinand to do tricks for us. Hope to see you there!

1 Like

I would have expected this example to yield (+ 9 v 5) (or 23):

(~> (3)
    (switch [odd? (~> sqr (-< (as v)
                              add1) sub1)])
    (+ v 5)) ;=> 14

Since the result of the switch would be the emitted 9 ((sub1 (add1 (sqr 3)))).

1 Like

Last week's notes:

"Setting a New Benchmark"

Highlights:

  • features of the new benchmarking suite by @dominik.pantucek
  • some interesting discussions where we tried to explain some observed anomalies
  • Qi's stance on backwards compatibility, including a cameo appearance by Resyntax @notjack
  • A gratuitous analogy involving the Cosmic Microwave Background

An interesting one today:

Side Effects Include Confusion

We discussed (and I've made a first attempt to formalize) what Qi's guarantees on order of effects might be. We're still working it out and it's not as straightforward as we thought.

Catching up on these, here are the notes from Feb 2, the Brussels edition of the weekly Qi meeting:

Schrodinger's Probe

Highlights:

  • "effect locality" and Qi's guarantees on order of effects, and the promises we'll make about the effect form
  • some quantum effects caused by use of the probe debugger which changes the semantics of the program in trying to observe it! (pointed out by @hendrikboom3 )
  • is "language composition" an approach worth investing in?

Enjoy,

1 Like

A short summary of the meeting on March 1. The main highlight is, the Qi compiler is now user-extensible! That is, third party libraries (for now, "internal" developer libraries rather than just any user) can provide custom optimizations for their own datatypes.

An Extensible Compiler

Special thanks to @SamPhillips for starting us down this path in earnest, and to @dominik.pantucek for this "modular" implementation that achieves the goal in a simple way!

1 Like

Last week's notes:

It's Syntax All the Way Up

We tried to work out how to identify the "right" source syntax to blame, for the purposes of generating good error messages in the compiler. We didn't find any great answers.

Btw, FYI @hendrikboom3 , we've started to write docs on the precise handling of effects in Qi (including wrt the probe debugger), continuing from the discussion from a few weeks ago. Any feedback welcome :slightly_smiling_face:

Friday's notes:

Looking Inside the Black Box

Highlights:

  • Many recent improvements to the user docs, developer docs, and per-commit benchmarking infrastructure.
  • Sometimes a hacky approach is a good approach (see ":sparkles: de-expander :sparkles:").
  • Trying to use the low-level blame object API to provide good error messages for optimized code.
  • Qi's compiler is already extensible -- kind of like macros but for optimizations -- thanks to a simple architecture implemented by @dominik.pantucek . Iterating on this to explore more formal language composition schemes could allow us to easily explore alternative backends (like futures instead of ordinary functions, and much more) for the language.
  • Could many languages sharing common syntax but with different semantics be considered the same language?

Last week's notes:

Breaking Out of the Sandbox

Tomorrow's meeting will be 2 hours after the usual time. We will be discussing challenges in producing good error messages and what's possible / best practices (e.g. use of syntax/loc rather than syntax) for languages hosted on Racket. We will likely also be implementing and testing a proposed solution. If the topic interests you, please stop by :slight_smile:

1 Like

Last week's notes:

Who Needs Proofs?

Quite a lot in there and some interesting stuff. Highlights:

  • Automated code generation to test the optimizing compiler against a reference compiler (the ability to extend the Qi compiler by a simple require makes this possible)
  • Racket vs python: error reporting
  • Why use contracts in reporting errors?
  • Why aim for 100% test coverage?
  • Why 100% coverage isn't enough
  • A way to get around "Schrodinger's probe," maybe
  • Qi's possible connections to topology??

Enjoy :laughing:

2 Likes

Notes from April 12:

Cat's Out of the Bag

Highlights:

  • We accidentally released some code for racket/list deforestation
  • An inside look at Syntax Spec
  • Some insights into Git, and how it relates to package and dependency management in Racket
  • "Continuous deployment" and other release models to follow
  • Experimenting with compact syntax for closures and application
1 Like

Racing to catch up on these notes, but to avoid a backlog I'm going to post last week's:

Our Take on Take

This is about how we (i.e. mostly @dominik.pantucek :laughing: ) are designing Qi's implementation of take as a fusable stream component in the compiler (for the stream fusion / deforestation optimization used in functional languages like Haskell and Clojure).

Heads up: This week, @benknoble designed a very cool syntax for embedding flows, called "curlique syntax." I am stoked about the possibilities, and with any luck, he will give a demo today in the meeting starting in about 40 minutes (he is just finding out about this himself, so I'm not sure he'll be available, but he just might! :stuck_out_tongue_closed_eyes: ) on Gather. We will also continue discussing deforestation.

2 Likes