Journal 2019.5 - spec

spec

Again this week, I spent most of my focus time on spec 2. Here’s a picture I spent a lot of time making:

Spec 2

Trying to capture a lot of the intent and design in this one picture. Working in the context of a single architectural diagram is pretty common in the core team and this is my mental model for the moment.

I spent a lot of time this week in particular thinking about ways people currently make parameterized or custom specs. There are a few different patterns we see. One is the notion of lightweight “expanders” that capture a common spec pattern with some parameters, but don’t hide the fact of expansion. These are easy to use, but the expansion leaks into things like forms which show the expansion. In some ways this is analogous to specs being like macros that expand, but don’t hide that expansion. We also have a full custom spec op path (basically identical to how current spec ops are implemented, but a much higher implementation requirement as you must implement the Spec protocol). And then there may be some middle path for the case where your custom spec is defined by other spec ops, and you want to capture the form, but otherwise the custom spec acts as a predicate.

I implemented some helper macros around the first couple of ideas, which involved writing a bunch of macro-writing macros, which made my head hurt. We’re still kicking around exactly what to do on these options but I think we’ll probably decide and move on from that next week to some of the “schema” work that Rich referred to in his Maybe Not keynote. He’s been working on the design aspects of that off and on since then.

I don’t think I made any commits on spec 2 this week, even though I did a lot of work and even wrote a lot of gnarly code. A good example of a week where from the outside there wasn’t much progress.

Odds and ends

  • I wrote a draft post for the State of Clojure results this week and I expect we’ll publish that next week after it goes through some editing, so look for that.
  • ClojureScript 1.10.516 released this week! I pushed some buttons to help deploy the web site a few times. :)
  • Did some admin work on the Confluence wiki
  • Did a bunch of minor clojure-site merges and updates
  • Implemented TDEPS-114 which was a quick fix. I sincerely hoped to move some more tdeps work forward on Friday but didn’t get there.
  • Based on a question from CLJS, found an overly tight destructuring spec constraint. Filed a ticket and patch to fix.
  • Bit of discussion about porting clj to Windows - if you want to help, please stop by #clj-on-windows on the Clojurians Slack. Lots of people have to offered to help, but not many have actually even tried what’s there yet (but thanks to those that have!).
  • Lots of community support on Slack, mailing list, and Reddit.

Other stuff I enjoyed this week…

This week’s musical selection is Royal Orleans by Led Zeppelin. I encountered it this week and was shamefully unfamiliar with it before. Rich chided me for not being more familiar with the Presence album. I acknowledge my shortcomings in this area and am working to correct.

Written on February 2, 2019