-
Reservoir Sampling
22 September 2024I have a little library called sampling floating around for general-purpose sampling from arbitrary foldable collections. It’s a bit of a funny project: I originally hacked it together quick...
- statistics
- haskell
-
More Recursive Stochastic Processes
01 September 2024Some years ago I wrote about using recursion schemes to encode stochastic processes in an embedded probabilistic pro...
- statistics
- recursion
- haskell
-
Kelvin Versioning
25 February 2020Long ago, in the distant past, Curtis introduced the idea of kelvin versioning in an informal blog post about Urbit. ...
- protocols
- urbit
-
Email for l33t h4x0rz
11 February 2020(UPDATE 2024/09/08: while hosting your own mailserver is not covered in this post, I recommend you check out Simple NixOS Mailserver for a borderline trivial way to do...
- admin
-
Basic Hoonery
04 February 2019In my last post I first introduced hnock, a little interpreter for Nock, and then demonstrated it on a hand-rolled dec...
- urbit
-
A Nock Interpreter
31 January 2019I wrote a little Nock interpreter called hnock some months ago and just yesterday updated it to support the latest version of Nock, 4K. N...
- haskell
- urbit
-
Crushing ISAAC
07 October 2018(UPDATE 2020/06/30: the good people at tweag.io have since published a Nix shell environment that appears to make te...
- statistics
- cryptography
- language-engineering
-
Transforming to CPS
04 August 2018I recently picked up Appel’s classic Compiling with Continuations and have been refreshing my continuation-fu more generally.
- haskell
- language-engineering
-
Embedded DSLs for Bayesian Modelling and Inference: a Retrospective
02 July 2018Why does my blog often feature its typical motley mix of probability, functional programming, and computer science anyway?
- statistics
- mathematics
- language-engineering
- haskell
-
Fubini and Applicatives
27 June 2018Take an iterated integral, e.g. \(\int_X \int_Y f(x, y) dy dx\). Fubini’s Theorem describes the conditions under which the order of integration can be swapped o...
- haskell
- mathematics
- language-engineering
-
Byzantine Generals and Nakamoto Consensus
22 January 2018You can recognize truth by its beauty and simplicity.
– Richard Feynman (attributed)
- consensus
-
Recursive Stochastic Processes
01 March 2017Last week Dan Peebles asked me on Twitter if I knew of any writing on the use of recursion schemes for expressing stochastic processes or other probability distributions. And I don’t! So I’ll write some of what I do know myself.
- statistics
- recursion
- haskell
-
The Applicative Structure of the Giry Monad
26 February 2017In my last two posts about the Giry monad I derived the thing from its categorical and measure-theoretic foundations. I kind of thought that those posts wouldn’t be of m...
- mathematics
- statistics
- haskell
-
Implementing the Giry Monad
13 February 2017In my last post I went over the categorical and measure-theoretic foundations of the Giry monad, the ‘canonical’ probability monad that operates on the level of probability measures.
- mathematics
- statistics
- haskell
-
Foundations of the Giry Monad
10 February 2017The Giry monad is the canonical probability monad that operates on the level of measures, which are the abstract constructs that canonically represent probability distributions. It’s sort of the baseline by which all other probability monads can be...
- mathematics
- statistics
- haskell
-
Rotating Squares
04 January 2017Here’s a short one.
- haskell
- recursion
-
Promorphisms, Pre and Post
26 November 2016To the.. uh, ‘layperson’, pre- and postpromorphisms are probably well into the WTF category of recursion schemes. This is a mistake - they’re simple and useful, and I’m going to try and convince you of this in short order.
- haskell
- recursion
-
Comonadic Markov Chain Monte Carlo
26 October 2016Some time ago I came across a way to in-principle perform inference on certain probabilistic programs using comonadic structures and operations.
- probabilistic-programming
- language-engineering
- haskell
-
A Simple Embedded Probabilistic Programming Language
17 October 2016What does a dead-simple probabilistic programming language look like? The simplest thing I can imagine involves three components:
- probabilistic-programming
- language-engineering
- haskell
-
Randomness in Haskell
01 October 2016Randomness is a constant nuisance point for Haskell beginners who may be coming from a language like Python or R. While in Python you can just get away with something like:
- haskell
-
On Measurability
18 July 2016.. this one is pretty dry, I’ll admit. David Williams said it best:
- mathematics
-
Making a Market
20 April 2016Suppose you’re in the derivatives business. You are interested in making a market on some events; say, whether or not your friend Jay will win tomorrow night’s poker game, or that the winning pot will be at least USD 100. Let’s examine some rules ...
- probability
- statistics
-
flat-mcmc Update and v1.0.0 Release
07 April 2016I’ve updated my old flat-mcmc library for ensemble sampling in Haskell and have pushed out a v1.0.0 release.
- haskell
- statistics
-
Encoding Statistical Independence, Statically
16 February 2016Applicative functors are useful for encoding context-free effects. This typically gets put to work around things like parsing...
- haskell
- statistics
- language-engineering
-
Time Traveling Recursion Schemes
09 February 2016In Practical Recursion Schemes I talked about recursion schemes, describing them as elegant and useful patterns for expressing general computation. In that article I introduced a number of things ...
- haskell
- recursion
-
Monadic Recursion Schemes
20 January 2016I have another few posts that I’d like to write before cluing up the whole recursion schemes kick I’ve been on. The first is a simple note about monadic versions of the schemes introduced thus far.
- haskell
- recursion
-
Sorting Slower with Style
19 January 2016I previously wrote about implementing merge sort using recursion schemes. By using a hylomorphism we could express the algorithm concisely and true to its high-level descr...
- haskell
- recursion
-
Yo Dawg We Heard You Like Derivatives
08 January 2016I noticed this article by Tom Ellis today that provides an excellent ‘demystified’ introduction to automatic differentiation. His exposition is ...
- haskell
- language-engineering
- recursion
-
A Tour of Some Useful Recursive Types
09 December 2015I’m presently at NIPS and so felt like writing about some appropriate machine learning topic, but along the way I wound up talking about parameterized recursive types, and here we are. Enjoy!
- haskell
- recursion
-
Sorting with Style
02 December 2015Merge sort is a famous comparison-based sorting algorithm that starts by first recursively dividing a collection of orderable elements into smaller subcollections, and then finishes by recursive...
- haskell
- recursion
-
Markov Chains à la Carte
14 October 2015I’ve released a number of libraries for doing Markov Chain Monte Carlo (MCMC) in Haskell.
- haskell
- statistics
-
Practical Recursion Schemes
06 September 2015Recursion schemes are elegant and useful patterns for expressing general computation. In particular, they allow you to ‘factor recursion out’ of whatever semantics you may be trying to express when interpreting programs, keeping your interpreters co...
- haskell
- recursion
-
Automasymbolic Differentiation
06 July 2014Automatic differentiation is one of those things that’s famous for not being as famous as it should be (uh..). It’s useful, it’s convenient, and yet fewer know about it than one would think.
- language-engineering
- haskell
-
Sharing in Haskell EDSLs
30 May 2014Lately I’ve been trying to do some magic by way of nonstandard interpretations of abstract syntax. One of the things that I’ve managed to grok along the way has been the problem of sharing in deeply-embedded languages.
- language-engineering
- haskell
-
Basic EC2 Management with Ansible
21 December 2013(UPDATE 2016/08/15: Here be monsters. This code is ancient, the style is not really idiomatic Ansible, and it’s likely that nothing works anymore.)
- infrastructure