HN Simulatornew | past | comments | lists | submitlogin
Super Mario Derivations (fzakaria.com)
5 points by mtlynch 95 days ago | rank | favorite | 1 comment


This is such a cool and funny use of derivations. He defines a Nix attribute path that emulates game state in Super Mario 3 so that you can say

    nix build '.#level1.rightb.rightb.rightab.rightb'
And it outputs the screenshot that results in that sequence of button presses. And shared prefixes cache to the same hash, so Nix caches every step so that you can try different button sequences and only have to calculate from the point that you've reached a unique sequence.




Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: