Here's a breakdown of the key themes emerging from the Hacker News discussion, along with supporting quotes:
Critique of Railway's Justification for Abandoning Nix
A dominant theme is skepticism and critique of Railway's stated reasons for moving away from Nix. Many commenters find their arguments unconvincing, suggesting a lack of understanding or proper utilization of Nix's capabilities.
- Version Handling & Automation: Several question Railway's claim that managing versions with Nix is not maintainable and that it's necessary to limit versions. "What is not maintainable about this? That they need to make a list of available versions? So, can this not be automated?" (lloydatkinson)
- Nix Cache & Older Versions: Commenters point out that the official Nix cache does maintain older versions, contradicting Railway's rationale. "Nix cache (cache.nixos.org) does in fact maintain older versions" (e3bc54b2)
- Image Size Bloat: While acknowledging that Nix-built Docker images can be large, commenters argue that this is a solvable problem with proper configuration and that Railway's inability to address it reflects a misunderstanding of Nix. As cormacrelf states, regarding Railway's statement on image size, "This statement is kinda like 'I’m giving up on automobiles because I can’t make them go forward'."
- NIH Syndrome: Many participants suspect "NIH (Not Invented Here) syndrome" (e3bc54b2) and a reluctance to fully invest in learning Nix led to the suboptimal implementation and subsequent abandonment. "Classic NIH syndrome. There is going to be no surprise to see them meet the exact same problems they didn't solve with Nix to infest their new 'solution'." (kesor)
Nix's Learning Curve and Complexity
Several commenters acknowledge the significant learning curve associated with Nix, suggesting this might play a role in its underutilization or misapplication.
- High Barrier to Entry: "The problem is the Nix learning curve is so high that by the time you've grasped it enough to make a decision you feel you've invested too much time to back out now and pivot to something else so you try to shoehorn it to solve the original need." (mrbluecoat)
- Shifting Paradigm: Some argue that Nix requires a different way of thinking about operating systems and package management, which can be challenging to adopt. "I feel it like that as well, but in some ways Nix is a more normal programming paradigm than other OS’s. We’re just not used to thinking about an OS that way." (teekert)
Nix vs. Nixpkgs: Distinction and Flexibility
A crucial point raised is the distinction between Nix itself and Nixpkgs (the package collection). Nix provides a powerful, flexible foundation, while Nixpkgs represents a specific, opinionated way of using it. Commenters emphasize that Nix doesn't force a single version, but Nixpkgs tends to discourage mixing and matching arbitrary versions.
- Nix is Flexible, Nixpkgs Has Conventions: "Nixpkgs is contrary to bespoke version soup, but Nix itself can be fine with it." (aidenn0)
- Overlays and Customization: Using overlays, users can override and customize packages within Nix, although this requires effort. "I mean you can do it in Nix using overlays and overrides. But it won’t be cached for you and there’s a lot of extra fiddling required." (matthewbauer)
- Dependency Resolution Options: Nix allows incorporating dependency information from language-specific tools (like
npm
,cargo
, etc.) to handle version ranges if desired. "If you want to go down the 'solving dependency version ranges' route, then Nix won't stop you." (chriswarbo)
The "Bespoke Version Soup" Problem
A related theme concerns the challenges of managing highly specific, application-dependent sets of package versions (the "bespoke version soup"). Some argue that Nixpkgs' more holistic approach to package management is beneficial, while others prefer the flexibility of language-specific package managers.
- The Perils of Unconstrained Versions: "It's the idea that every application can near-arbitrarily choose a bespoke-but-exact mix of versions of every underlying package and assume they all work together." (ris)
- Nixpkgs as a Managed Distribution: Nixpkgs offers a "managed distribution" model where packages are expected to work together and remain relatively stable for a period. "Packages in nixpkgs follow the 'managed distribution' model, where almost all package combinations can be expected to work together, remain reasonably stable (on the stable branch) for 6 months receiving security backports, then you do all your major upgrades when you jump to the next stable branch when it is released." (ris)
Alternative Versioning Strategies and Package Management
The discussion touches on alternative approaches to versioning and package management, including:
- Semantic Versioning: Some suggest following clear semantic versioning conventions with well-defined compatibility guarantees. "You could not depend on a patch version directly in source. You could force a patch version other ways, but each package would depend on a specific major/minor and the patch version was decided at build time. It was expected that differences in the patch version were binary compatible." (jonhohle)
- Providing Multiple Interfaces: The idea of a single package providing multiple versions of its interface is raised as a potential way to reduce the proliferation of versions. "...you could design a programming language packaging system such that both versions are defined in the same package, sharing code when needs be." (James_K)
VC Funding or Technical Progress
One comment asks if "A nix wrapper or a deployment platform" would work better towards raising VC funds (jbverschoor) and another responds with "Traction." and the claim that VCs would not nitpick technical details so long as the product is making money (BoorishBears).