← Back to Kevin's newslettersPublished: 2023 November 20

Moving to Amsterdam

London didn’t quite work out for us, and with a bit of encouragement from our landlord (who wanted a £400/month rent increase), we’ve decided to move to Amsterdam. We’ll be there starting in December — if you’re ever in the neighborhood, drop me a line!

Also: If you fancy yourself an interior designer, we’d love ideas about how to decorate and (more importantly for computing) place a sit/stand desk and its giant-TV-as-monitor in a open kitchen/living plan without totally destroying the vibe.

A bureaucratic victory

I had a transatlantic flight canceled on me the night before departure, which under UK regulations entitles me to £520 of compensation (in addition to a refund). It took a few emails, online forms, and months of waiting, but eventually I got it.

I’ve documented the process and exact emails I sent, which may be helpful for anyone learning to project “experienced bureaucrat” energy (a vibe that, shockingly, is always treated better by bureaucrats).

Exploring programming languages

I had a blast at the last Strange Loop conference in September. It felt like a reunion of sorts, as the conference and community were quite influential in my early career — I spoke back in 2012 on building web interfaces as functions of plain data. (An idea which was “in the air”, which became extremely popular after React.js was released a year later.)

I’ve continued to build web apps in pretty much the same way since then: ClojureScript with an “Elm Architecture”, leaning heavily on Rum for rendering via React.js, DataScript for modeling application state, and a pile of duct-taped live-reloading SASS for styling.

In 2018 I picked up Rust to make my electron app fast and again during the pandemic to make embeddeded firmware for keyboards.

I enjoy different aspects of the two languages.

Clojure has:

Rust has:

What I can’t help but notice is that the qualities I enjoy about both languages aren’t obviously in tension with each other; could a language have it all?

My hypothetical combined language would probably give up some dynamic aspects of Clojure:

and also lose some of the more systems-oriented, memory/pointer orientations of Rust. (The biggest design unknown for me is how to handle static types and fiddly memory details — making them accessible when you have an opinion about them, but letting them fade to the background when you don’t.)

I’m curious to explore what such a language might look like, together with a few other aspects:

With the advent of WebAssembly, many people are now exploring compiling existing languages or designing new ones to use in the browser. I’ve done a whirlwind tour over the past few weeks, and these are the languages / features that I’ve found interesting (in no particular order).

F#

I’ve heard good things about this for years and it strikes me as pragmatic language for people who want to get useful work done. Wlaschin’s Domain Modeling Made Functional is a great book on domain modeling for any language with algebraic data types, not just F#.

Hylo

Hylo (formerly “Val”) is explores “mutable value semantics”, meaning the language has no concept of “references” (though the implementation will be smart and avoid needless copies). It’s implemented in Swift and seems to be an active research project.

The language itself doesn’t particularly inspire me, but I’m interested in it for implementation performance ideas.

Noulith

Noulith looks incredibly fun and the author is wonderfully self-aware; the first section of the README is “Elevator pitches (and anti-pitches)” and the GitHub repository’s “about” is:

slaps roof of [programming language] this bad boy can fit so much [syntax sugar] into it

The author’s Designing a Programming Language to Speedrun Advent of Code is not just a great overview of Noulith, but of the considerations entailed in designing a programming language.

Features that I found particularly interesting:

Gleam / Elixir / Erlang

BEAM is the Erlang virtual machine, which was developed in the 90’s for high-availability telecom applications. It’s idiomatic to structure applications in terms of lightweight processes that pass around immutable data. The scheduler prevents infinite loops and crashes from starving other processes, and the VM supports livereloading and extensive introspection/debugging capabilities. See The Soul of Erlang and Elixir • Sasa Juric • GOTO 2019.

Elixir targets BEAM with Ruby-ish syntax and dynamic, lispy semantics. Phoenix LiveView is an interactive web UI that connects browsers via websockets to the backend Elixir webserver.

Some folks are working on an Elixir type system with set-theoretic types and semantic subtyping.

If I had to build a SaaS web app, I’d be torn between the decades-baked workflows of Rails/Django and this newer but-probably-technically-more-robust stuff built on the BEAM.

Gleam is a typed language on BEAM which can also compile to JS; implemented in Rust.

I gave this one a spin but couldn’t find many frontend web application examples. Big fan of the syntax decisions.

Lobster

Lobster is a Python-looking statically typed language with “flow-sensitive type inference and specialization” and compile-time reference counting (lifetime analysis)

Koka

Koka, “A Functional Language with Effect Types and Handlers”.

Fennel

Fennel is lisp syntax on the Lua runtime.

Nelua

Nelua is a “Minimal, simple, efficient, statically typed, compiled, metaprogrammable, safe, and extensible systems programming language with a Lua flavor.”

Roadmap (?)

I always find it easier to design trade offs in the context of a specific project or goal. I developed the Pinfigurator language while building a desktop wire bender (haven’t gotten around to writing that one up yet). My relational spreadsheet was built to solve my (toy) problem of allocating my investments.

In this case, I’d start by building the interfaces for prototyping hardware that we talked about last time — I have a sense of what I want to be able to build, but can’t exactly express it nicely in any of my current languages. I’d probably duct tape something together with Instaparse and Clojure/Script and then (once I liked the design) switch to implementing in Rust for performance and distribution.

Another approach could be to use this as an excuse to pick up a completely new language (F#, probably) to round out my visceral feel of relevant “prior art”, before then deciding whether what I really want is, in fact, different enough from existing options to warrant the effort to explore the design space.

What do you think? Do you have any favorite programming languages or features that I should take a closer look at? Let me know!

Other programming language resources

Misc. stuff