started · updated
Nix Expression Language Shown to Be Turing‑Complete and Self‑Interpreting
Technical discussion shows that the Nix expression language can perform arbitrary computation. By leveraging its ability to read, write, and import files in the Nix store, users demonstrated self‑interpretation through an eval function, enabling the language to run expressions such as evaluating "1" within the Nix REPL. The analysis also notes that Nix can simulate games like tic‑tac‑toe, indicating it is at least "tic‑tac‑toe‑complete" and effectively Turing‑complete.
A separate guide explains monads by way of a simple Python inventory class. The example walks through creating, adding to, and removing from a list with capacity limits, illustrating how exceptions propagate and how monadic‑like chaining can be expressed in code. The guide highlights pitfalls such as catching exceptions for out‑of‑space errors and demonstrates output like "Inventory out of space: Try removing some items first."