Maybe worth mentioning rust and performance more prominently as the motivations.
Is Nix eating the world? We have seen lots of unbelievable projects using it on HN recently. It feels like anyone serious about complex systems and building software are embracing it.
I use it extensively also via nixpkgs, though somehow I have yet to make the leap to full NixOS.
One consideration for anyone who hasn’t jumped in, is that I have nixpkgs on Linux, MacOS, and Win11 hosts. I’ve found that incredibly useful.
I didn’t find these via HN search, I found them in my bookmarking account. I have a slightly strange way of bookmarking - I send emails to a dedicated email account, so these I found there looking for Nix in a search.
Well, we have the ambition to make it a sort of Godbolt for Nix, but none of us are frontenders and it's not quite as visually impressive and easy to follow as the actual Godbolt. It does work, though!
We've also been thinking about ways to make nixpkgs available there. Adding `lib` at least in some fashion would be quite useful, I think.
Does not care about flakes and does not care about adding types, the most important omission in Nix. A minor performance bump seems unlikely to make me want to boil the ocean.
For somebody who hasn't used Nix yet, but heard good things about it, why use Tvix instead of Nix? The page didn't seem to mention the reason(s) behind the project.
I would recommend against using Tvix at this time, but if you are wondering why they wrote it, they wrote an article: https://tvl.fyi/blog/rewriting-nix
The goals they list are:
> Creating an alternative implementation of Nix that is fully compatible with nixpkgs.
No explanation needed.
> More efficient Nix language evaluation, leading to greatly increased performance.
The Nix language is evaluated whenever doing the Nix equivalent of installing a package, or rebuilding your configuration. Note that most of the time it's "fast enough" but the authors of Tvix are doing more with the Nix language (which leads into)
> No more strict separation of evaluation and build phases: Generating Nix data structures from build artefacts ("IFD") should be supported first-class and not incur significant performance cost.
and
> Well-defined interaction protocols for how the three different components (evaluator, builder, store) interact.
As it currently works, the Nix language is evaluated to something called a derivation, which is a specific format for defining how to build something (including a list of dependencies). The derivation is then used to actually build the artifact. This is about when you want the metaphorical snake to eat its tail and have the results of a derivation be more nix language to evaluate.
> A builder implementation using OCI instead of custom sandboxing code.
Hermetic builds require some sandboxing; Using OCI containers seems like an obvious choice, but didn't exist when Nix was first created.
It looks like they’ve factored out the main features of Nix into modules to allow for more flexibility regarding the implementation details of each underlying service.
Does tvix support targeting windows? And I do not mean WSL. iirc, the nix attempted a windows port but there were some hardcoded assumptions made about unix in the implementation that made it intractable, for example the location of the store. Do these issues also hold for tvix?
Looks like the dev team mosly speaks Russian? (Russian is native for me, but I've lived most of my life stateside.)
In Russian, "tvix" is pronounced, roughly, "tweaks" (but with a German - hard "v" - W sound), which to a Russian probably sounds super clever, given what Tvix is (Nix, tweaked).
In English though, how is it pronounced? I'd like to propose "t-f-icks", because it at least sounds like a candy we think the Lebowski nihilists might well have been ordering at a diner.
Привет) Almost everyone on the team speaks a language where this pronunciation is obvious (most prominently Russian and German, but it also works in e.g. Swedish).
I've noticed when talking to English native speakers that Brits seem to get it right away and say something close to "твикс", whereas Americans almost always say "tee-vix" ("тивикс") and need serious convincing work to switch over to how we say it.
I would pronounce it tee-vix, because of the stock ticker symbol TVIX[0] which was a leveraged volatility ETN and very popular in its day. a little too popular - credit suisse delisted it a couple
months after the initial market crash brought on by the pandemic caused it to skyrocket
Tvix developer here; correctness is still not guaranteed, there's nothing to use here except if you already understand well Nix concepts to pick parts and build stuff on the top of it and accept the inherent instability :).
builtins.fetchTarball is not there, among others, and from watching Matrix I think there are still some things in nixpkgs that eval slightly differently in tvix.
It feels like things are heating up, and "soon" is on the horizon.
By the way, is there some way to specify dependencies in C? Like requirements.txt in Python, where you put libraries names and versions and the user has to run a single command to install them (and without requiring root privileges)? Is this nix/tvix/guix an equivalent of pip?
Interesting, but the word "containers" is scaring me. I wanted just a simple tool to download and install several libraries and not a full Docker/Kubernetes level system...
But it looks like a good choice for running tests in CI.
> is there some way to specify dependencies in C? Like requirements.txt in Python, where you put libraries names and versions and the user has to run a single command to install them (and without requiring root privileges)?
I'd describe this as "(language-specific) package management".
"Requiring root privileges" is more/less equivalent to "packages get installed in a system-wide location".
There are some C or C++ specific package managers.. but, essentially what's missing is the ecosystem/culture for providing a packages for those. -- e.g. With the Rust, packages use Cargo.
> Is this nix/tvix/guix an equivalent of pip?
Nix and guix are system package managers.
Since they're powerful tools, one popular use case is for providing dependencies for C projects.
Nix practically requires root for its installation. (i.e. installing it without root may be possible, but I'd think it's impractical). Although once installed, it can provide packages without needing root.
It's possible, just beware that other-distro versions of Nix are pretty aggressive at patching themselves into your shell profiles, which is often undesirable.
Is Nix eating the world? We have seen lots of unbelievable projects using it on HN recently. It feels like anyone serious about complex systems and building software are embracing it.
I use it extensively also via nixpkgs, though somehow I have yet to make the leap to full NixOS.
One consideration for anyone who hasn’t jumped in, is that I have nixpkgs on Linux, MacOS, and Win11 hosts. I’ve found that incredibly useful.
Opt-in state:
https://github.com/nix-community/impermanence
https://grahamc.com/blog/erase-your-darlings
Ease of setting up a real-time audio on Linux:
https://github.com/musnix/musnix
Generating virtual machines/installators from a configuration:
https://github.com/astro/microvm.nix
https://github.com/nix-community/nixos-generators
It's interesting to scroll through nix-darwin options, I wasn't even aware of some useful macOS options before:
https://daiderd.com/nix-darwin/manual/index.html
A neat collection of music information retrieval packages in one place (and the ease of creating your own package registry):
https://github.com/carlthome/mirpkgs
https://news.ycombinator.com/item?id=40010991
https://news.ycombinator.com/item?id=39720007
https://news.ycombinator.com/item?id=39692801
https://news.ycombinator.com/item?id=39658684
https://news.ycombinator.com/item?id=39004785
I didn’t find these via HN search, I found them in my bookmarking account. I have a slightly strange way of bookmarking - I send emails to a dedicated email account, so these I found there looking for Nix in a search.
Also plenty of projects here: https://github.com/nix-community/awesome-nix
https://news.ycombinator.com/item?id=37407758
https://bolt.tvix.dev/
really useful.
We've also been thinking about ways to make nixpkgs available there. Adding `lib` at least in some fashion would be quite useful, I think.
The goals they list are:
> Creating an alternative implementation of Nix that is fully compatible with nixpkgs.
No explanation needed.
> More efficient Nix language evaluation, leading to greatly increased performance.
The Nix language is evaluated whenever doing the Nix equivalent of installing a package, or rebuilding your configuration. Note that most of the time it's "fast enough" but the authors of Tvix are doing more with the Nix language (which leads into)
> No more strict separation of evaluation and build phases: Generating Nix data structures from build artefacts ("IFD") should be supported first-class and not incur significant performance cost.
and
> Well-defined interaction protocols for how the three different components (evaluator, builder, store) interact.
As it currently works, the Nix language is evaluated to something called a derivation, which is a specific format for defining how to build something (including a list of dependencies). The derivation is then used to actually build the artifact. This is about when you want the metaphorical snake to eat its tail and have the results of a derivation be more nix language to evaluate.
> A builder implementation using OCI instead of custom sandboxing code.
Hermetic builds require some sandboxing; Using OCI containers seems like an obvious choice, but didn't exist when Nix was first created.
> Hermetic builds require some sandboxing; Using OCI containers seems like an obvious choice, but didn't exist when Nix was first created.
Presumably this would make this implementation Linux-only, since OCI isn't natively supported outside of Linux?
A complete non-starter, never in a thousand years am I gonna use something that requires a Docker installation for building derivations.
huh?
working on a project that I'd love to run by you in the men's health space.
came across a comment you made on a previous post, so figured I'd reach out.
amitthakrarcoaching@gmail.com
The location of the store is not really the main blocker in those sorts of situations, IMHO.
A project funded by the EU to bring Nix to Windows.
(edit: typo and clarity)
In Russian, "tvix" is pronounced, roughly, "tweaks" (but with a German - hard "v" - W sound), which to a Russian probably sounds super clever, given what Tvix is (Nix, tweaked).
In English though, how is it pronounced? I'd like to propose "t-f-icks", because it at least sounds like a candy we think the Lebowski nihilists might well have been ordering at a diner.
I've noticed when talking to English native speakers that Brits seem to get it right away and say something close to "твикс", whereas Americans almost always say "tee-vix" ("тивикс") and need serious convincing work to switch over to how we say it.
Expect more like: T-Vix
https://memory-alpha.fandom.com/wiki/Tuvix
naming is hard :)
0. https://www.thestreet.com/etffocus/market-intelligence/rip-t...
(kindof like tuh-veeex run together)
...as the candy bar etymology in their logo implies.
It feels like things are heating up, and "soon" is on the horizon.
But it looks like a good choice for running tests in CI.
I'd describe this as "(language-specific) package management".
"Requiring root privileges" is more/less equivalent to "packages get installed in a system-wide location".
There are some C or C++ specific package managers.. but, essentially what's missing is the ecosystem/culture for providing a packages for those. -- e.g. With the Rust, packages use Cargo.
> Is this nix/tvix/guix an equivalent of pip?
Nix and guix are system package managers.
Since they're powerful tools, one popular use case is for providing dependencies for C projects.
Nix practically requires root for its installation. (i.e. installing it without root may be possible, but I'd think it's impractical). Although once installed, it can provide packages without needing root.
https://nixos.wiki/wiki/Development_environment_with_nix-she...