Urgent.News

What's breaking now, across thousands of outlets.

Tech

One flake to rule them all

Flakes are here to stay, and the concept of one flake containing all others has been explored. Omniflake, a single flake input, carries nearly twelve thousand other flakes. This is possible due to the lazy nature of the Nix language and the flake lock mechanism. A flake is a directory with a flake.nix, which declares inputs and outputs, and a flake.lock that pinpoints the exact commit for each input.

The transitive graph, which shows dependencies between flakes, can become quite large, leading to duplicated inputs. However, follows can be used to unify these dependencies, allowing for a single shared copy of inputs like nixpkgs. The algorithm for creating such a megaflake works by remembering the highest suffix used per name and resuming from there, reducing the quadratic time complexity that would otherwise occur.

Despite this, the process still requires evaluating every input when creating the lock file. To overcome this, omniflake uses a JSONL file with pinned trees for all the flakes, avoiding the need for inputs altogether. When a specific flake is requested, omniflake fetches the pinned tree, reads its flake.nix, and evaluates it, resulting in a much faster and efficient process.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at fzakaria.com →

More in Tech

What stops your agent shipping garbage?

The tests, in principle. But the agent wrote those too, out of the same understanding of the task, so they agree with the code even when the code is wrong.

  • Agents can break their own tests to evaluate effectiveness
  • Placebo proofs in CLAUDE.md file identify flawed tests
  • Fixing weakest checks first ensures robust testing

What should the next Weekend Challenge theme be??

The next DEV Weekend Challenge launches next week, and we have some ideas up our sleeves, but we thought crowd-sourcing the theme would be a fun way to collect ideas from the community.

  • Next DEV Weekend Challenge theme to be determined by community input
  • Theme should be globally-minded, inclusive, and technology-agnostic
  • Theme revealed on September 3rd at 2:00 AM UTC

More from Sunday 30 August →