Skip to content

Instantly share code, notes, and snippets.

View Mr-Andersen's full-sized avatar

Andrey Vlasov Mr-Andersen

View GitHub Profile
@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

@hyphenrf
hyphenrf / zippers.hs
Last active December 12, 2022 17:22
derivatives of ADTs are their zippers
-- list derivation
-- data [a] = [] | a : [a]
{-
l = 1 + a ⋅ l
l - a ⋅ l = 1
l (1 - a) = 1
l = (1 - a)⁻¹
∂l = -1 ⋅ -(1 - a)⁻²
@YBogomolov
YBogomolov / 0_README.md
Created June 7, 2020 13:34
Idris 2 DevContainer

How to use Idris 2 in devcontainer

Step 1: build executable and libraries

Use the Dockerfile below to build the Idris 2 executable and standard library:

docker build --tag=idris2 .