Here you can find all my previous posts:

Building a (not so) simple RPN Calculator

reading time: 55 minutes
Context swapping is an older part of the POSIX api. It's deprecated now, and not supported on a lot of platforms, but it does work with GCC on Linux. The idea is that it lets us treat function execution contexts as ordinary data. It's intended for building cooperative multitasking systems or implementing conccurrency and threading libraries. We're going to misuse it for flow control.

At a high level, we're going to treat each item in the RPN stack as a sort of thunk represented by a context. We can pass continuations by passing around pointers to contexts from one thunk to another. Arguments are placed directly into the saved registers that will be loaded when we start executing a context. We'll dynamically modify the control flow by passing around continuations as we encounter parts of our RPN expression. When we get to the last operator in the expression we'll print out the result of the final computation and then exit.

Dictionaries are Pure Functions (Part 1)

reading time: 26 minutes
Functions, pure functions in particular, are one of the most common examples of something that can be a surprising barrier to learning about functional programming. Given the name, it's no surprise that functions are an important part of functional programming. Even though someone coming to functional programming from an object oriented or procedural background will already be familiar with functions, functional programmers tend to think about functions just a little bit differently, and that difference sometimes turns into a barrier.

In this post we'll try to help you avoid this problem by helping you learn how to think about pure functions the way a functional programmer does. We'll start working in python, and gradually build up an intuition for how to think about typed pure functions incrementally. Toward the end of the article we'll also look at a couple of examples in Haskell to illustrate how what we learned from the python examples can be extended to help us understand fairly advanced techniques in pure functional code.

Haskell is Still From the Future

reading time: 2 minutes
Summary TBD

An Introduction to Type Level Programming

reading time: 109 minutes
Used judiciously, type level programming can let you write programs that are safer, more expressive, more flexible, and easier to maintain over the long term. Unfortunately, learning when and how to make effective use of type-level programming constructs can be difficult. In this post you'll learn how to apply many basic type-level programming concepts as you incrementally build a type-level theming system.

When you're finished with this article, you should come away with an idea of how to effectively use type classes, type families, GADTs, and haskell's Kind system to write better applications.

This article is based off of the ideas presented in my 2021-09-10 talk at the haskell.love conference titled: Make It Purple! An Introduction to type-level programming.

The Fixed Point

reading time: 29 minutes
Haskell offers ample opportunities for ah ha! moments, where figuring out just how some function or feature works can unlock a whole new way of thinking about how you write programs. One great example of an ah-ha moment comes from when you can first start to understand fixed points, why you might want to use them, and how exactly they work in haskell. In this post, you'll work through the fixed point function in haskell, building several examples along the way. At the end of the post you'll come away with a deeper understanding of recursion and how haskell's lazy evaluation changes the way you can think about writing programs.

The Nixification of rebeccaskinner.net

reading time: 32 minutes
Nix is great for keeping your applications reproducible once you get them set up, but getting a project building with nix can be overwhelming for new nix users, especially when you run into a dreaded broken upstream dependency. In this article you'll learn how to create a hakyll blog that builds with nix, and in the process learn how to deal with broken upstream dependencies, and create nix overlays with custom patches.

Syntax Highlighting in Hakyll

reading time: 9 minutes
Hakyll popular among haskell developers for building websites and personal blogs, but building a code-heavy hakyll site can be tricky if you're not skilled at design (like me) since the default hakyll configuration doesn't come with support for syntax highlighting of code blocks. In this article you'll learn an easy way to get syntax highlighting for code in your hakyll blogs using pandoc.

Building A Todo List with Python and Flask

reading time: 31 minutes
The TODO List is the quintessential project for learning how to build web applications. It introduces you to important concepts like: How to build and deploy an application, how to handle CRUD operations, and how to deal with errors. TODO list applications are also prime examples of applications that you can build and add to to improve your skills in other areas over time. In this article you'll learn how to build a basic TODO application in Python using the Flask web framework.

Building Python Applications with Nix

reading time: 8 minutes
Package management in python is a problem with several competing solutions. Do you use virtual environments? pip? poetry? Each approach comes with their own benefits, but one universal drawback to these solutions is the python-specific nature of the tools. When your project comprises mutliple languages, or you want to integrate non-python tools into your workflow, you may wonder how to approach package management that can make use of native as well as python-specific tooling while giving you the guarantees of knowing you're going to get a reproducible set of pinned packages. Nix provides one way to manage python dependencies along side native dependencies. In this article you'll learn how to package python applications so they are reliable, reproducible, and ship with their own development environment using the nix tools and the nixpkgs ecosystem.