Lukasz Stafiniak
Zurich
I am a developer and researcher working at the intersection of functional programming, machine learning systems, and formal methods.
I received my PhD in 2015 for work on GADTs for Reconstruction of Invariants and Postconditions, developing type-inference techniques based on constraint abduction and generalization. From 2015 to 2021 I was at Google, working on knowledge representation, semantic parsing, and deep reinforcement learning.
Since April 2024 I have been sponsored by Ahrefs to develop OCANNL (OCaml Compiles Algorithms for Neural Networks Learning), an OCaml-native deep learning framework.
Primary Projects
OCANNL — OCaml-based deep learning system with backends for CPU, CUDA, and Metal. Designed around shape inference and compositional model building.
ppx_minidebug — OCaml PPX preprocessor for logging type-annotated let-bound values and function results, optionally as collapsible HTML or Markdown trees.
curious-ocaml — Educational book about OCaml covering logic, algebra, computation, functions, constraints, monads, and effects.
InvarGenT — Invariant generation as type inference using GADTs and existential types.
Tools & Libraries
ocaml-cudajit — OCaml bindings for CUDA driver API and NVRTC runtime compilation.
ocaml-metal — OCaml bindings to Apple Metal for general compute applications.
ocaml-gccjit — OCaml bindings for libgccjit.
navi-parens — VS Code extension: navigate structured code with keybindings (programming languages and LaTeX).
agent-duo — Shell scripts for coordinating AI agent peers in collaborative research.
pai-lite — Lightweight Personal AI Infrastructure inspired by Daniel Miessler’s project.
Just for Fun
Pascal-course — A comprehensive Pascal programming course based on the Free Pascal implementation.
pic-breeder-imaginary — A Pic Breeder clone in OCaml.
percolation — Visualizing percolation (various strategies).