Qi 3.0 Released

It's my pleasure to announce that Qi 3.0 is now available. Upgrade now via:

raco pkg update qi

This ended up being a big release with contributions from many people. I will do my best to summarize the improvements. There's a lot here, and I hope some of it will be interesting even for non-Qi users.

Qi Design Challenge #1 Results

The inaugural Qi Design Challenge was posed in June. The premise is simple -- a coding problem that is simple but not trivial, and write it in your favorite language. There were many entries in many different languages, and I found them insightful and even inspiring (they led to many improvements that are part of this release!). Take a look at the entries at the Qi Wiki.

It's worth noting that keeping the problem relatively simple allows it to be a useful window into paradigms in other languages. Ideas for future problems are welcome!

Performance Groundwork

In the original RacketCon talk about Qi, I brazenly suggested that Qi's performance is on par with Racket and could even exceed it in some cases :sunglasses: . It turns out I was wrong :upside_down_face: . Thanks to an audit by Michael Ballantyne, the benchmarks are now more representative of actual performance, where Racket is indeed much faster on microbenchmarks.

The good news is, there's a lot of scope for improvement! Some of these improvements have already been begun, including:

  • the addition of Continuous Performance Benchmarking, which tracks performance changes in the language across commits. These benchmarks have some known issues (in particular, they are not normalized for VM performance -- pointed out by Sam Phillips), but they serve as a useful start. Take a look at the charts here: Qi Benchmarks, and keep this page open as we will refer to it below.

  • The latency on calling (require qi) was formerly about half a second. It is now down to ~150 ms, a factor of 3 improvement! This was achieved by Ben Knoble, with a clutch assist from Bogdan Popa's dependency analyzer tool. This data point is tracked in the charts -- scroll all the way to the bottom. Many of the trends in the charts are currently invalid (for reasons..), but this is one of a few that aren't.

  • Some users mentioned long build times for Qi. This should now be greatly improved thanks to the elimination of a lot of "incidental" documentation dependencies by using #:indirect links (Thanks to Jack Firth and Sorawee Porncharoenwase for the suggestion!). This data point isn't tracked, in case you were wondering.

Other Features

  • Qi now hosts backup docs in case the main ones are unavailable (using a CI recipe from Sam Phillips)
  • A simpler application syntax in Qi that leverages fancy-app to support some new possibilities. This buzzer-beating entrant into this release was done by Noah Ma :basketball:. Check this out: (map (☯ (_ 10 2)) (list + - * /)) ;=> '(12 8 20 5)
  • Part the sea of values with partition, a new form introduced by Ben Knoble. (Incidentally, this is another tracked data point in the charts that happens to show a legitimate trend -- scroll to near the bottom to find "partition").
  • A new doc, Principles of Qi, starts to describe some of the ideas underlying Qi. Highlights: Qi is "Arrows", and Sunyata logic.

Bugs Fixed

  • Formerly, there were cases where fancy-app would inappropriately get control of parsing user input. That has been fixed (Thanks, Ross Angle (aka Nia)!)
  • Some edge cases in the divert clause of switch were fixed
  • Better error messages in some common cases of threading

If you'd like to participate in Qi development, follow updates at the source repo. At the moment, work is getting started on a Qi compiler -- the first stage of this will be to distill a small core language (Core Qi) for which we could define optimization rules after expansion of the higher-level language (Standard Qi). Contributions of any kind are welcome -- don't let us have all the fun :slight_smile:

Finally, Stephen reminded me that new releases are a good time to join the Summer #lang Party where all the cool languages are hanging out, so, see you there!