Projects

Open-source work — Rust and Julia

Focused tools. Each does one thing; most do it without dependencies. Compose them, or steal the idea — the license permits both.

Numerically-stable evaluation

The unglamorous arithmetic that keeps everything downstream finite.

lnexp

crates.io: v0.2.1 · MIT OR Apache-2.0 · crates.io · source

Compositions of log, log1p, exp, and expm1, carefully evaluated so as to avoid underflow/overflow.

logsumexp

crates.io: v0.1.0 · MIT OR Apache-2.0 · crates.io · source

Online (1-pass) LogSumExp for iterators.

horner-eval

crates.io: v0.1.0 · MIT OR Apache-2.0 · crates.io · source

Evaluate polynomials using Horner's method. Unroll polynomials of fixed size at compile time (and use MulAdd); useful if writing numerical libraries.

LogExpFunctionsExt.jl

Julia · MIT · merged upstreamLogExpFunctions.jl

Merged into the LogExpFunctions.jl package by way of PR #82; no longer a standalone package, which is the happiest fate a small extension can have.

Sampling & Monte Carlo

Drawing from distributions, exactly and quickly.

MarsagliaDiscreteSamplers.jl

Julia: v0.1.0 · MIT · source

Very fast samplers for discrete probability distributions.

CategoricalMonteCarlo.jl

Julia: v0.1.0 · MIT · source

Ever wanted to sample from very high-dimensional joint distributions comprised entirely of discrete, independent marginals? This package does just that; it also offers various options for in-place transformation.

MonteCarloSummary.jl

Julia: v0.1.0 · MIT · source

The name says it all.

cmdstan-rs

GitHub: v0.1.0 · BSD-3-Clause · source

The README sort of says it all: do you need to integrate Stan in your system being developed in Rust? If yes, then you want this crate!

Eventually I'll get around to getting the PR merged… life has taken a few unexpected branches since January 2024.

Linear algebra & optimization

Whitening.jl

Julia: v0.1.2 · MIT · source

Whitening transformations: forward and inverse. Lightweight, with no dependencies other than LinearAlgebra stdlib.

OptimizationTestFunctions.jl

Julia: v0.1.0 · MIT · source

A wide variety of functions, \(f : \mathbb{R}^{n} \mapsto \mathbb{R}\), which are most frequently used to test mathematical optimization algorithms. Also handy for testing automatic differentiation implementations.

Approximation

gcm-lcm

crates.io: v0.1.0 · MIT OR Apache-2.0 · crates.io · source · pre-print

Greatest convex minorant, least concave majorant. Useful for variety of purposes; my interest was related to stochastic processes, but has general applicability as a convex (or concave) function approximator.

Performance & codegen

VectorizedReduction.jl

Julia: v0.1.13 · MIT · source

Codegen for fast folds.

Data-wrangling & toys

RecursiveTiles.jl

Julia: v0.1.1 · MIT · source

Ever receive the following? A table comprised of flattened trees, with:

  • parent-child relationships spanning more than one column
  • arbitrary order of columns, with no correspondence to parent-child relationship
  • multiple flattened trees vertically concatenated into the same table, but with unspecified begin/end

If so, welcome to my life a few years ago. This package will enable you to roll that mess back into trees with a few lines of code.

dungeoncrawl

Rust · source

You have probably played a video game at some point. Have you ever created one? The latter is more interesting, I promise!