magnars

Greetings! I am Magnar Sveen and this is my technical blog on topics such as Clojure, Datomic, functional programming, frontend development, architecture, and more.

You might know me from the video series Emacs Rocks! or Parens of the Dead, or maybe one of my open source projects. In either case, welcome to my blog!

A Deconstructed Database

Rich Hickey once said that design fundamentally involves taking things apart so that they can be put back together again. This is certainly true for Datomic, a database split right down the middle.

An Explosion of Data

Datomic is truly a delightful database to work with. I’m starting the year with a new series of tidbits from this functional, functional database. First out is the data model at its core – and explosions!

Pillow Fights and Responsive Images

Is it a pillow fight, or are there darker undertones in this seemingly cheerful picture? I don't have an answer for that, but here you'll get a neat trick for creating truly responsive images.

Static sites: server-even-less

You’re going to have a hard time finding something simpler and snappier than serving static HTML and CSS to people. Heard of “serverless”? Nope, this is server nada! I’m writing about a grossly underrated technique for creating websites.

Interplay Between Generic UI Components

If you have a textbox and a button, who is responsible for taking the value from the textbox and sending it to the event bus when the button is pressed?

Sewing S-Expressions with Thread-First and -Last

When you’re new to Clojure, the macros -> and ->> can be pretty confusing, making the code look quite mystical. Fortunately, it won’t be long now before you fall in love and start using them everywhere.

A Simple Frontend Architecture That Works

There are many grand frameworks to choose from for your frontend architecture, but do you need all the moving parts? In this blog post, I will talk about a simple architecture that has served me well.

A Little Clojure Trick to Brighten Your Day

The most prominent and central ideas in Clojure might be pure functions and immutable data, but today I write about a little thing – just a neat little feature – that puts a smile on my face.

The Die is Cast with CSS

Dice games are far more enjoyable if you can see the dice roll, so I rolled up my sleeves and wrote some CSS in preparation for Parens of the Dead. Here’s what I learned about rolling dice with CSS.

An Old Trick in a New Context

It’s easy – maybe too easy? – to bring old tricks into a new daily routine. The first Clojure code I wrote doesn’t particularly resemble what I write today. In this blog post, I briefly write about one of the things I’ve gradually unlearned.