Posts

  • 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.