Skip to content

Instantly share code, notes, and snippets.

View StefanKarpinski's full-sized avatar

Stefan Karpinski StefanKarpinski

View GitHub Profile
@StefanKarpinski
StefanKarpinski / README.md
Created September 8, 2026 04:27
Resolver.jl PR #107 evaluation corpus — 57 hard real-registry queries, reports before and after the product cover (changed.md: the 12 that changed, before then after)

Resolver.jl PR #107 evaluation corpus

Reports for the 57 hard-case queries (whole-environment upgrades against the General registry, generated 2026-09-08; 15 of them resolve on that registry and print SATISFIABLE), before and after PR #107. Before = main at 5a85858; after = the PR branch.

57 cases; 12 changed, 45 byte-identical.

case before (lines) after (lines) changed
Agents 54 54
AlphaZero 164 164
@StefanKarpinski
StefanKarpinski / CORPUS.md
Created September 6, 2026 02:49
Resolver.jl — unsatisfiability report corpus (63 real registry diagnoses across six pathologies): chains, three-sided meets, coarsened lockstep families, blocked fixes, triples, and complete-coverage residues

An unsatisfiability-report corpus

63 real registry diagnoses from the sk/explanation-final design, grouped by the structural shape each exercises. Registry state of 2026-09-06.

Single conflicts, read as a chain (22)

A proof reads as one chain: a root fact, implications each arguing from what the line above left, ending at the fact that contradicts it.

ACSets ≥0.2.29 + Variography ≥0.22.6

@StefanKarpinski
StefanKarpinski / harness.jl
Created August 18, 2026 15:48
Resolver.jl: harness measuring independent-conflict composition (second-order conflicts)
# How often does fixing every independent conflict actually finish the job?
#
# For each multi-conflict failing query:
# * per-conflict repair menus (MCSes over that cluster + the emptied packages)
# * ONE-EACH: pick one repair per conflict, apply them together, resolve.
# SAT => that combination is a complete fix; UNSAT => second-order conflicts.
# Sampled over several choices, since the answer may depend on which.
# * ALL: apply every repair from every menu at once -- the most relaxed thing
# the menus can reach. UNSAT => no choice can work (monotonicity).
# * AGREE: do the per-conflict witnesses assign the same version to every
@StefanKarpinski
StefanKarpinski / REPRODUCER.md
Created August 17, 2026 16:16
picosat 965: deterministic Linux reproducer for the LLP64 pointer-rebase bug (long vs ptrdiff_t in enlarge)

Reproducing the picosat LLP64 pointer-rebase bug on Linux

enlarge() in picosat.c rebases every stored Lit*/Rnk* by the byte distance the arrays moved during realloc, holding that distance in a long. On LLP64 (Windows x64) long is 32 bits while pointers are 64, so a move of more than 2GB truncates and every rebased pointer is left wild.

The bug does not normally reproduce on Linux for two independent reasons, and you have to remove both to see it:

@StefanKarpinski
StefanKarpinski / uninstallable-versions-general.tsv
Created July 29, 2026 16:32
Uninstallable versions in the Julia General registry (complete SAT census, 2026-07-29)
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 1 column, instead of 3 in line 7.
# Uninstallable versions in the General registry
# Complete SAT census, 2026-07-29 (registry state: 14,014 packages / 157,194 versions)
# Method: non-exclusive whole-registry SAT instance; a version is listed iff it
# appears in NO valid solution (its dependency cone is unsatisfiable).
# 587 versions across 161 packages; 362 detectable by arc-consistency, 225 SAT-only.
# Columns: package <TAB> version_rank (1 = newest) <TAB> version
#
Amaru 1 0.6.5
Amaru 2 0.6.4
Amaru 3 0.6.3
module.exports = {
defaultBrowser: "Safari",
options: { hideIcon: true },
rewrite: [
{// rewrite meet.google.com URLs with `authuser=1` query string
match: ({ url }) => url.host == "meet.google.com",
url: ({ url }) => {
var parts = url.search == "" ? [] :
url.search.split(/[&;]/).filter(
part => !part.startsWith("authuser=")
using LinearAlgebra, Statistics
function randmatstat(t)
n = 5
v = zeros(t)
w = zeros(t)
a = zeros(n, n)
b = zeros(n, n)
c = zeros(n, n)
d = zeros(n, n)
@StefanKarpinski
StefanKarpinski / definitions.jl
Last active July 19, 2019 15:10
method vs lambda
f(x::Int) = "$x is an integer"
f(x::String) = "$x is a string"
g = x::Int -> "$x is an integer"
g = x::String -> "$x is a string"
diff --git a/A/ACME/Compat.toml b/A/ACME/Compat.toml
index 1a2352fc5..5fc55bd4e 100644
--- a/A/ACME/Compat.toml
+++ b/A/ACME/Compat.toml
@@ -38,14 +38,14 @@ Compat = "0.38-1.0"
julia = "0.5-0.7"
["0.6.1-0.6.2"]
-julia = "0.5-1.1"
-
## Some graph functions ##
using Iterators
using Combinatorics
using Base.LinAlg: checksquare
#=
X = sparse([1,1,2,2,3,4,4], [2,5,5,3,4,5,6], 1, 6, 6)
X += X'
G = dropzeros!(1 - X)