Functional programming, UX, tech
Twitter • GitHub • LinkedIn • RSS
My book, Functional Programming in Scala, uses Scala as a vehicle for teaching FP. Read what people are saying about it.
Unison: a friendly programming language from the future
unison.cloud: the worldwide elastic computer (coming soon)
Type systems and UX: an example
CSS is unnecessary
One of the most important contributions of FP is the discipline that effects which affect program meaning should be treated as values and explicitly sequenced. Following this discipline leads to an architecture which splits programs into two phases–in the first phase, first-class effects are built up and combined using pure functions, and in the second phase (the ‘end of the universe’), these effects are interpreted in order to actually do something.
Scala’s support for GADTs, really any existential types in pattern matching, has been poor for a while. I’ve talked about this before and submitted a few bug reports, but at this point I’m not holding my breath that we’ll be getting good support for these things in the near future. Instead, I’ve been focusing my attention on finding workarounds.
This blog currently runs off GitHub pages and Jekyll. It’s convenient being able to produce posts directly in markdown and preview them in the browser, which I hope will encourage me to post more frequently. But Jekyll suffers from the curse of magic implicit configuration, in which control flow is obscured from the user and one must tweak rather unguessable configuration settings to achieve different effects.
My daughter Arianna was born just over two weeks ago. Like any new father, I was excited to share some photos of her with friends and family… but I found I wasn’t totally happy with any of the sharing options available to me on sites like Facebook and Google Plus. Here’s the problem: I have a set of people who I’m comfortable sharing these photos with. Both Facebook and G+ allow me to create sets of users (which G+ for some reason calls circles), and for any content I produce, I may select which set of consumers I wish to grant access to this content, which might be ‘everyone’, a concrete set like {bob, dave, carol}
, or some other suitably defined set like ‘friends of my friends’. Neither FB nor G+ support the obvious feature of nesting these sets, a feature supported by email lists for the past 20 years, but let’s ignore that misstep for now. As the producer, I get fine-grained control over who I wish to share my content with.
I’ve written previously about the general problems with the application-centric view of software. Here I’m going to discuss a specific example. First, some background, from my earlier post: