• Haskell Typeclasses vs. C++ Classes

    Classes from Object-Oriented Programming languages such as C++ allow types to declare a pre-selected list of overridable functions.

  • Debugging C with Haskell's Divisible

    A good type system covers a lot of the small bugs. Unit tests, careful design, and a sound mind can get you through some bigger ones. But sometimes complex bugs in large codebases call for heavy-duty debugging tools.

  • Injecting a Chess Engine into Amazon Redshift

    Amazon Redshift is a SQL-based database with a frontend similar to PostgreSQL. The backend compiles queries to C++ code, which execute against a columnnar datastore. When I last benchmarked it for a former employer, well-tuned queries were about 3-5x slower than hand-rolled C++. But I also uncovered an interesting technique that lets you close that gap for CPU-bound queries.

  • Visualizing Graphs in Haskell

    Dependency graphs are everywhere in computing: Database tables have foreign key relationships with each other, programming languages have functions that call each other, and filesystems have folders containing folders and files.

  • Roll your Own Bitcoin Exchange in Haskell

    A stock exchange is a complex beast, but much of it can be reduced to a single data structure: the Order Book. A Bitcoin exchange uses the same data structure when trading currency pairs of USD, BTC, or ETH. This article will show you how to:

  • Writing a Formally-Verified Porn Browser in Coq and Haskell

    It’s uncommon to use formal verification when developing software. Most people are unfamiliar with the tools and techniques, or assume they’re only for specialized use.

  • Rolling your Own Blockchain in Haskell

    Bitcoin and Ethereum provide a decentralized means of handling money, contracts, and ownership tokens. From a technical perspective, they have a lot of moving parts and provide a good way to demo a programming language.

  • How do I modify a variable in Haskell?

    Haskell programmers seem to get by without variable mutation, which is odd if you’re used to C, Javascript, or another imperative language. It seems like you need them for loops, caches, and other state.

  • How do you use argmax and gather in Tensorflow?

    An array has at least one maximum element . in its simplest case gives the index of this maximum element, so that . The Tensorflow argmax requires you to designate one dimension of your tensor to act as that array.