PurelyFunctional.tv Newsletter 283: Spec, Error messages!, Games
Issue 283 - July 16, 2018 · Archives · Subscribe
Hi Clojurists,
It used to be, maybe five years ago, that I could keep up with everything in the Clojure community. There were few enough conference talks, blog posts, and libraries that I could feel informed about everything going on. We passed that point a long time ago and it's feeling more and more difficult to keep up. Every time I talk to someone, there's something I've missed.
In Apropos 12, we talked about the lack of blogs, podcasts, and events around Clojure. So this is a request: please blog, podcast, and host events. There's plenty of room for more! I love reading The REPL, Daniel Compton's email newsletter. It covers different stuff from this newsletter, and I enjoy the different perspective. There's so much room, we're not competing. We link to eachother's stuff.
Thank you to everyone who does blog about stuff! I enjoy:
- defn podcast
- The REPL
- Planet Clojure
- A bunch of blogs
What are your favorite places to learn about Clojure? Like always, just hit reply :)
Rock on!
PS Want to get this in your email? Subscribe!
Clojure Career Workshop ALPHA
There are a handful of tickets left for the Clojure Career Workshop. I want to help you get a job in Clojure. This workshop will support you to improve your resume and find jobs. I'll also connect you to people I know who can help you on your quest.
This is an ALPHA version, meaning 2 things: you get more attention and it's cheaper. I haven't worked out all of the kinks, so to make sure you get what you're looking for, I'm going to have to give everyone special attention. And because it may be rougly hewn, I'm making it cheaper. But there will only be ten total people in the workshop.
Click the link above to buy tickets and for more information.
Ghostwheel GitHub
One of the cool things about Spec is that it's a bunch of composable pieces. They're also optional. Ghostwheel takes advantage of that, providing a powerful library of tools, built on spec. There's a lot to explore and the documentation looks great.
You should think about some states Podcast
Kevin Lynaugh was on the Future of Coding podcast, talking about everything from state machines to TLA+.
Hyperfiddle
This looks like a cool web framework built on Datomic.
Formally Specifying UIs
Starting from Kevin Lynaugh's Sketch.systems, Hillel Wayne shows how we can formally specify the links between UI screens so that we can verify interesting properties.
improvements to exception messages and printing Clojure JIRA
Stuart Halloway and Alex Miller are working on improving error messages in Clojure. There's a much more detailed analysis on the wiki.
Stuart Halloway has been actively discussing error messages on Twitter for the past few weeks. It seems like that discussion is bearing fruit. This is not a reversal on Stuart's part. In fact, this is a doubling-down on the same principles that make Clojure great but were incompletely applied to error messages.
The changes in the Jira ticket are all about separating (read:
decomplecting) the error message (from getMessage()
) from its
printing. The error messages now are terser so that they can compose
better and so that they are reusable. The printer is in charge of
displaying relevant information to the user, including the class of the
exception.
The default printer, as the Jira ticket now stands, does not print the
entire data component of ex-info
exceptions. The data component could
be a huge nested data structure, and so dominate the printed output. Now
the default printer just prints the keys at the top level, which usually
fit on one line. They merely give you a first idea about what you will
find in the data component when you explore it interactively. All in
all, the default error printing seems to be improving, while increasing
the freedom and power of the end programmer to customize them.
Though I think error messages can be improved, I know that making good error messages is really hard. If you just focus on error messages, other parts of the system can suffer. I'm glad Stuart has dived into this and found a path forward. And I hope he continues to explain the design choices that make Clojure special.
We talk about this Jira ticket on the latest episode of Apropos.
Nil Punning (or null pointers considered not so bad)
Clojure makes extensive use of nil punning, which means nil
can have
different meanings in different contexts. I don't like nil
in general
(it's the Billion Dollar
Mistake).
But the mistake was made in Java and JavaScript, and Clojure needs to
live with it. Nil punning is a way for Clojure to make the best of a bad
situation.
Making a tale tick
Bryce Covert explains why he chose Clojure to build Tick Tales, his point-and-click adventure game.
Clojure core.async Video course
core.async is a powerful library that makes many kinds of concurrent programming easy. This course teaches the basic concepts of the language and how to apply them to solve problems. core.async changed the game for me, especially in ClojureScript. While core.async has a lot of features, they're all based on the fundamental concepts of channels and go blocks. This course will help you master them.