Skip to content

Instantly share code, notes, and snippets.

View danielkroeni's full-sized avatar

Daniel Kröni danielkroeni

View GitHub Profile
@sciolizer
sciolizer / Futamura.lhs
Created June 8, 2025 00:03
Typing the futamura projections in haskell
> module Futamura where
Partial evaluation transforms the source code of a general program into a more specialized program.
For example, given the following general program:
function repeatedlyPrint(count, message):
for i from 1 to count:
print(message)
@VictorTaelin
VictorTaelin / sat.md
Last active October 16, 2025 10:51
Simple SAT Solver via superpositions

Solving SAT via interaction net superpositions

I've recently been amazed, if not mind-blown, by how a very simple, "one-line" SAT solver on Interaction Nets can outperform brute-force by orders of magnitude by exploiting "superposed booleans" and optimal evaluation of λ-expressions. In this brief note, I'll provide some background for you to understand how this works, and then I'll present a simple code you can run in your own computer to observe and replicate this effect. Note this is a new observation, so I know little about how this algorithm behaves asymptotically, but I find it quite