Things I Like About Nim

Method Call Syntax In Nim, a.f(b) is really just syntactic sugar for f(a, b). Note: they look like methods but aren’t attached to the type/object at all. Which function to call will be figured out at compile time, just like normal function calls. You can use this to implement pseudo extension methods on standard types like strings: import nim_utils/files, os, strformat proc makeBackup(filename: string) = let backupPath = fmt"{filename}.bak" case filename. [Read More]

Ocaml Memory Model Notes

Non-Atomic Variables var1: [t1 -> v1; t2 -> v2] where var1 is the name of the variable, tx are timestamps, and vx are the values of the variable at those timestamps. Note that t(n+1) must be greater than t(n) Domains Domains are separate spheres of execution. Each thread would have their own Domain, for instance. Frontier Domains have a frontier, which establishes which variables it can see at which timestamp. [Read More]

Unification Algorithm Notes

Unification Algorithm type term = | Var of string | Term of string * term list You either have a type variable with a name, or a type constructor with a name and a list of arguments. Unification takes a list of term pairs which have to be made matching. Unification returns a list of substitutions, where a substitution is a pair of a string and a term, aka the variable name that should be substituted with the term. [Read More]

OCaml Effects

I’ve been interested in algebraic effects in programming languages for a while, but they’ve been theoretical-only for a while. That’s soon to change though! OCaml early on adopted algebraic effects and handlers as a way to implement concurrency, something that had been lacking in the language until now. But changing the langugage’s memory model, runtime, garbage collector, etc. proved to be a long task. OCaml 5.0 is on the horizon at last and includes an implementation of algebraic effects. [Read More]

Simple Covers of Complex Bon Iver Songs

Intro Bon Iver is easily one of my favorite artists. So much so that I love singing along with the songs. Sadly, my musical chops are not enough to fully recreate or even do these complex songs justice. However, I do what I can and a friend told me they liked the stripped down, simple versions that I do. So here’s a collection of all the ones I’ve done so far. [Read More]

Book Review: The Windup Girl

This book took me by surprise with how much I enjoyed it. The book starts out kind of slow, but once I got around half way through it, it really picked up. A large part of this is that it’s very similar to cyberpunk books, where it just throws you into the setting and very slowly reveals things. Characters will talk about events and things like they normally would. They don’t need to explain these concepts to each other, they’re already very familiar with them. [Read More]

The Trace

It started out harmless, just a passing fad. A silly little book that called what we did horrible and tried to convince everyone to turn against us. But we knew it wouldn’t work. We controlled the hordes. They thought as we wanted them to think, bought what we influenced them to buy. We wouldn’t have even bothered in fighting it, except for what the data told us. Those who read the book stopped using our platforms. [Read More]

Terminal Setup

A lot of people at work have been asking me how I set up my terminal, so I wrote this up to send to them. Hope you enjoy! Install ZSH The shell I use is zsh. To install it, follow these instructions Install oh-my-zsh oh-my-zsh is a plugin/theming library thingie for zsh. Follow these instructions to install Make sure to take a look at the plugins and enable any that might be useful for you. [Read More]

Let It Sleep

We knew we only had a short time to slay it once we had entered its lair. It would sense us there, start to wake itself up from its slumber to deal with us. The waking up was slow, but we had to get there before it finished, oh god we had to. Benjamin was the first to go. He led us forward, faster and faster until his life was cut short by a spear from the ceiling. [Read More]

Dinner

I pull my rental car into the space. I don’t even notice the smell of cigarettes the car is caked in anymore. Wearily, I get out and walk towards the shopping complex. Somewhere in there is a burger joint, and all I want right now is a burger. And some friends to have dinner with. No, I push that thought out of my mind. I’m an adult. I should be able to handle a meal on my own. [Read More]