Simon Shine

Simon Shine @sshine

About: I like purely functional programming and declarative domain-specific languages, especially query languages and infrastructure specification languages.

Location:
Copenhagen, Denmark
Joined:
Aug 19, 2019

Simon Shine
articles - 19 total

Minimal Sufficient Groups

This is a programming interview question I got some years ago and my solution. The job was writing...

Learn More 0 0Feb 2

Why you should be careful with the Default trait/typeclass

You heard it. Default considered harmful! tl;dr: Default has no defining or testable...

Learn More 4 1Oct 25 '22

A review of JSON Schema libraries for Haskell

JSON Schema is a JSON format that describes JSON formats. It is mostly used to validate that a JSON...

Learn More 7 0Apr 10 '22

Has-style traits in Rust

I recently experimented with Rust trait instances on bounded generic types. This is the fancy way of...

Learn More 6 0Mar 31 '22

Writing code on doors

Did you ever see pseudo-code in job ads that looked like if ($you.like_to_work($here) === True) { ...

Learn More 6 0Mar 29 '22

Implement Rust trait for all types that have another trait

Rust traits are powerful. A particularly neat thing you can do is implement a trait for several types...

Learn More 10 0Feb 15 '22

A Terraform DNS moment

tl;dr: I stuck the IPv4 and IPv6 address of my VPS into an SPF record field text. I manage my DNS...

Learn More 1 0Jan 29 '22

Fiat currencies are not one thing

When we discuss the potential future usefulness of cryptocurrency, we compare against existing...

Learn More 1 0Dec 10 '21

jq hack #2: curl'ing the right binary on GitHub

Something I see quite often is a combination of grep and cut to extract URLs from JSON objects, for...

Learn More 3 0Dec 4 '21

Hvorfor må jeg ikke eje en svensker?

Written January 1, 2003 The following essay is an adaptation of a letter titled Why Can’t I Own a...

Learn More 0 0Nov 28 '21

Why rewriting version control history matters

Life is understood backwards, but must be lived forwards. --- Søren Kierkegaard A summary...

Learn More 2 4Nov 25 '21

Efficient probability testing

I want share two open-source contributions that were lost on their original audience, yet has taught...

Learn More 3 0Sep 21 '21

Baking metaphors in the imperative/declarative programming debate

tl;dr: Cake recipes contain both declarative and imperative parts. Declarative syntax is better for...

Learn More 3 0Sep 17 '21

Extracting the KUBE_CONFIG for a DigitalOcean Kubernetes cluster from a Terraform .tfstate

When provisioning a Kubernetes cluster from DigitalOcean with Terraform, the .tfstate contains a...

Learn More 4 0Jul 10 '21

Getting recursively drunk with monoids

Disclaimer: I am not a mixologist. This is not professional cocktail advice! Sam Horvath-Hunt...

Learn More 11 3Oct 4 '20

What if, when you grep, it goes into pager mode when results don't fit one screen?

There is a general theme in GNU shell commands that if a program is able to deliver ANSI-colored outp...

Learn More 1 0Sep 28 '20

jq hack #1: colored less

Sometimes you want to look at a lot of JSON output in the terminal. Sometimes this JSON output is...

Learn More 6 2Sep 28 '20

"Parse, don't validate" using ViewPatterns

In 2019, Alexis King wrote the Parse, don't validate article that catches some of the essences of typ...

Learn More 3 2Sep 14 '20

Aggressive refactoring

Here is a small example of aggressive refactoring in Haskell. I am in the codebase of a compiler for...

Learn More 5 0Sep 12 '20