# Nix as a Mario Emulator: Infinite Attribute Trees and 20,000-Button Runs

Original title: Super Mario Derivations

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

▲ 133 · by [domenkozar](<https://news.ycombinator.com/user?id=domenkozar>) · 💬 18
[original](<https://fzakaria.com/2026/08/05/super-mario-derivations>) · [HN discussion](<https://news.ycombinator.com/item?id=49215682>)

## Summary

The Nix language's laziness lets attribute sets contain themselves, enabling infinite recursion. This blog post explores that by turning attribute paths into button sequences for Super Mario Bros. 3, where each press is a derivation. The result: a store that acts as a savestate history, with branching costing almost nothing. The author pushes limits, reaching 20,000 presses before hitting OS argument limits, and shows how the store becomes a reproducible state-machine.

## Key quote

> The dependency graph _is_ the input sequence, so we can ask Nix what buttons produced a frame.

## HN discussion (18 comments)

### [JHonaker](<https://news.ycombinator.com/item?id=49306136>)

> What a delightfully insane abuse of Nix. I enjoyed reading that immensely.

### [MiroslavPokorny](<https://news.ycombinator.com/item?id=49228169>)

> Im confused whats the point of this ?

---

## Cite

- Page: https://zeli.app/story/49215682
- Date: 2026-08-07
- Source: fzakaria.com (https://fzakaria.com/2026/08/05/super-mario-derivations)
- Hacker News: https://news.ycombinator.com/item?id=49215682

## Other languages

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