Get the latest tech news
RNG and Cosine in Nix
How to implement random number generation and cosine for your NixOS configuration
NixOS is an immutable, atomic Linux distribution with a declarative and reproducible configuration and packaging system using the purely functional, lazily evaluated, dynamically typed Nix programming language. Sadly, Nix doesn’t have built-in RNG since it’s purely functional, but I found a project called rand-nix with this code: Kublai: Welp I kinda forgot what I wanted to use cosine for in my configuration.nix in the first place… If you’d like to read some slightly less cursed Nix stuff, here are some great articles.
Or read this on Hacker News