Fantastic talk on #reitit, a project underway by folks at Metosin. I’m fascinated by their desire to move as much type checking to compile-time. A really neat talk, @clojurians.net. Purely FYI and for your amusement.
Their approach with #reitit
This looks interesting, will check it out – thank you!
@clojurians.net Another experience report: I did a 3 day sprint to create this graph; it involved using two git libraries, opening up a CSV file, and parsing output from git log
.
I was very proud to have created the graph, and planned on posting the source.
But then a couple of weeks later, I needed to make some changes to it, and tried to reproduce the graph. My primary reaction was “WTF?” and “I can’t show anyone this!”
I could barely piece together what I had done! (Part of my excuse: I had switched mid-way between #_
forms and (comment)
forms, and abandoned using a (ns xxx.demo)
to store my breadcrumbs.
But unusually for me, I chose not to use ghostwheel. And that’s a mistake I won’t make again. I spent 2 hours last night going through, namespace by namespace, retroactively documenting the inputs and outputs, and can finally reproduce the graph.
My learning: ghostwheel type annotations is a wonderful way to document as I go, and would have facilitated regaining an understanding of what I wrote a couple of weeks ago.
When I’m finished cleaning it up, I’ll post the results. :)
Thanks for all your work on this!!! Let me know if you want any more data, any questions, etc.. 🙂
This is valuable, thanks Gene! One thing worth noting here that seems fairly common to miss, is that one doesn't have to go all the way to full generative testing of everything immediately. Any Ghostwheel/spec integration can be done in stages where the first one is simply adding the gspec vectors and enabling runtime spec-checking during dev time with the instrumentation metadata. This doesn't require the upfront investment of writing generators and is already a big win in terms of having verified type/spec documentation and easily catching incorrect calls early.