Blog
Talks, notes and things I've been thinking about
-
From Heroku to Render
At Dockspot
Why we moved a Rails app from Heroku to Render, and what it took: images, deploys, rollbacks and backups.
Read on → -
activerecord-pg-format-db-structure: tidying up Rails' structure.sql
RubyGem
Tidies up Rails' structure.sql after every migration, using a real SQL parser instead of regexps.
Read on → -
From Sidekiq to Solid Queue
At Dockspot
Why we moved our Rails background jobs from Sidekiq to Solid Queue, and how we did it one worker at a time.
Read on → -
Materialized CTEs in Rails
Rails pull request
Adding .as_cte, so ActiveRecord's .with can build MATERIALIZED and NOT MATERIALIZED CTEs.
Read on → -
SSH port-forwarding using a socket file
Treyd tech blog
Forward a remote Postgres through a bastion to a local socket file, so psql never fights over port 5432.
Read on → -
Build your own Kustomize transformers using KRM functions
Treyd tech blog
Writing KRM functions in Go to extend kustomize build, so a platform team can ship transformers developers consume from a Git URL.
Read on → -
Renaming master to main everywhere
A small Bash script that renames master to main across an account's GitHub repositories in one go.
Read on → -
stan-rs: NATS Streaming for Rust
Rust crate
A Rust client for NATS Streaming, built on top of the official NATS client.
Read on → -
Advent of Code in SQL
Seventeen days of Advent of Code 2020, each solved with a single query in pure PostgreSQL.
Read on → -
Goodbye, awesome-o
Our Slack bot, 2014–2020
Our Slack bot at PugglePay, then Zimpler, is offline. A look back at what it did over six years.
Read on → -
Fun with callcc
Fun code snippet
Autovivifying nested hashes in Ruby by monkey-patching Hash and nil with callcc, so a deep assignment travels back in time.
Read on → -
Advent of Code 2018
day 1 in eight languages
My Advent of Code 2018 solutions for days 1 to 18, spread across Haskell, Clojure, Crystal, Ruby, Go and more.
Read on → -
Unit Tests as a Type Provider
Fun code snippet
Running assertions at compile time in Idris with a type provider, so a failing test stops the build.
Read on → -
Idris Proofs And Nats
fun with code inference
How Idris makes natural number subtraction safe at compile time, rebuilt from scratch: numbers, proofs that one is smaller than another, and letting Idris find those proofs for you.
Read on → -
Introducing Change (from Ruby to Clojure)
How our small team moved from Ruby to Clojure, and what I learned about introducing change to people who don't want it.
Read on → -
Functional Programming... The Sequel
ReactJS Göteborg 2017
The follow-up to my intro to functional programming talk at ReactJS Göteborg.
Read on → -
Docker on Mac OSX in 2016
Zimpler dev blog
Is Docker on Mac ready for development? Mostly yes, and it looks like it'll soon be great.
Read on → -
Intro to Functional Programming
ReactJS Göteborg 2016
An introduction to functional programming, given at ReactJS Göteborg.
Read on → -
A Tale of ClojureScript in Production
Euroclojure 2016
My Euroclojure 2016 talk about running ClojureScript in production.
Read on → -
Got.clj is now Got.λ
Our Clojure meetup in Gothenburg has a new name and a wider scope: Got.λ, the Göteborg Functional Programming Group.
Read on → -
ClojureScript: From Zero to Production (Part 2) - Integration Testing
PugglePay dev blog
Autorunning browser integration specs for a single page ClojureScript app, with Leiningen, clj-webdriver and speclj.
Read on → -
Snake in ClojureScript
Got.clj meetup
The classic snake game in a single ClojureScript file, with Reagent for rendering and a pure function for each game step.
Read on → -
ClojureScript: from zero to production (Part 1)
PugglePay dev blog
What we learned shipping our first user-facing ClojureScript app, starting from scratch.
Read on → -
Where is my stack? (Part 2): GPG is awesome
PugglePay dev blog
Sharing secrets with GPG instead of a shared password, and the small Ruby library we wrote for it.
Read on → -
Immutable Record
RubyGem
Immutable Ruby values inspired by Clojure's records, printed in a form you can paste back into IRB.
Read on → -
Introduction to Functional Programming
Got.clj meetup
A first tour of functional programming concepts, from values and pure functions to polymorphism, in Python, Clojure and Haskell.
Read on → -
FizzBuzz with Qualified Constants
Fun code snippet
FizzBuzz without arithmetic: nested Ruby modules and constant lookup do the modulo for you.
Read on → -
Typing Applicative in core.typed
Fun code snippet
An attempt at annotating an Applicative protocol in Clojure's core.typed, using dotted type variables for a variadic fapply.
Read on → -
moar: monads for Clojure
Clojure library
A small monad library for Clojure, built on protocols: maybe, state, continuations, transformers and more.
Read on → -
Method not missing
RubyGem
A Ruby gem that implements your missing methods for you, by googling them.
Read on → -
Quick Roman
Got.clj meetup
What happens when you design the Roman numerals kata purely from property-based tests? Tally marks and string rewriting.
Read on → -
Where is my stack? (Part 1): Goodbye Torquebox
PugglePay dev blog
After five months in production we said goodbye to TorqueBox, and went the Unix way: Nginx, Passenger, Resque and Monit.
Read on → -
Pair Programming in the Cloud
PugglePay dev blog
How we keep pair programming when one of us is abroad, after trying screen sharing: AWS, SSH, tmux and Emacs.
Read on → -
Torquebox or: How I Learned to Stop Worrying and Love the JVM
PugglePay dev blog
Why we moved our Rails apps to TorqueBox on JRuby: messaging, daemons and scheduling without the sysadmin pain.
Read on → -
Sudoku with core.logic
Got.clj meetup
A Sudoku solver with no search algorithm, only constraints.
Read on → -
junebot
Got.clj meetup
A small multiplayer online game we mob-programmed in Clojure at the Got.clj meetup.
Read on → -
Sudoku as SAT
Chalmers
A small C++ program that turns a Sudoku grid into a propositional formula and hands it to the Satzoo SAT solver.
Read on → -
AIRduino Guitar
Physical Computing at Chalmers
A wearable Arduino air guitar: a glove sets the note, a stick with an accelerometer strums it.
Read on →