# Kevin J. Lang's Lost OCaml Code, Rebuilt by AI to Verify Apache DataSketches

Original title: Reverse-Engineering Kevin J. Lang's Lost OCaml Code in Apache DataSketches

> Hacker News story 50517657 · language: en · submitted 2026-11-16
> Web version: https://zeli.app/story/50517657
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 46 · by [tison](<https://news.ycombinator.com/user?id=tison>) · 💬 3
[original](<https://www.tisonkun.io/posts/ai-repair-program/>) · [HN discussion](<https://news.ycombinator.com/item?id=50517657>)

## Summary

After porting CpcSketch to Rust, the author hit hardcoded lookup tables with no surviving generator code — the OCaml scripts died with Kevin J. Lang in 2019. Using the checked-in tables and 20-digit header comments as a numerical oracle, three AI models reconstructed the Huffman codewords, column permutations, and polynomial coefficients, with each model attacking the others' claims until only verifiable derivations remained.

## Key quote

> Kevin did most of his math simulations and modeling in OCaml. And his code was on his computer, which no longer exists. And his personal code died with him.

---

## Cite

- Page: https://zeli.app/story/50517657
- Date: 2026-11-16
- Source: tisonkun.io (https://www.tisonkun.io/posts/ai-repair-program/)
- Hacker News: https://news.ycombinator.com/item?id=50517657

## Other languages

- zh: https://zeli.app/zh/story/50517657 · markdown: https://zeli.app/zh/story/50517657.md
- ja: https://zeli.app/ja/story/50517657 · markdown: https://zeli.app/ja/story/50517657.md
- ko: https://zeli.app/ko/story/50517657 · markdown: https://zeli.app/ko/story/50517657.md
- de: https://zeli.app/de/story/50517657 · markdown: https://zeli.app/de/story/50517657.md
- es: https://zeli.app/es/story/50517657 · markdown: https://zeli.app/es/story/50517657.md
- ru: https://zeli.app/ru/story/50517657 · markdown: https://zeli.app/ru/story/50517657.md
