Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

100% Positive

Analyzed from 67 words in the discussion.

Trending Topics

#nix#rightb#sequence#button#cool#funny#derivations#defines#attribute#path

Discussion (1 Comments)Read Original on HackerNews

mtlynchabout 18 hours ago
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.