4 ms·
I still don't understand the language syntax after using it for several years, I just make it work through trial an error. The documentation is pretty unhelpful
by bamboozled 6y ago
I still don't understand the language syntax after using it for several years, I just make it work through trial an error. The documentation is pretty unhelpful too. It's ultra ambiguous.
Recently my laptop died, and I just needed another one going in a hurry and I tried Xubuntu because it's the only distribution which had Wifi drivers that worked for a 12 year old Mac I had lying around without any trickery.
It's funny because Nix worked fine, but my Ubuntu installation just stays out of my way and lets me work too. I started to make me question whether all the added Nix complexity really added much value. Would investing in learning Nix really pay off over spending my time learning a new programming language with real world application?
I also think there is something to be said for the fact that, unless you team mates are using Nix,good luck using any of the standard tooling or scripts others will use. One of my favorites are shell scripts that start with `#!/bin/bash` never working and always having to patch them to use `#!/usr/bin/env bash` I understand the latter is the correct way to do things in 2021, but we all know it's not going to happen :)
- kaba0 6y agoActually, I found the language to be pretty similar to Haskell, if you do know that. You don’t have explicit functions, you use let in, and everything is an exception. It is even lazy evaluating.
- bamboozled 6y agoThe lack of lazy evaluating is an issue as the Nixpkg grows. I don't believe anyone has a solution to this yet.
- siraben 6y agoCould you elaborate what you mean by this? Nix has lazy evaluation so as Nixpkgs grows it doesn't perceptibly change how long package installations, building, etc. take.
- tnzm 6y agoWhen I run `nixos-rebuild switch --verbose`, it does seem to go through the entirety of nixpkgs. Especially noticeable on a RPi with its slow I/O.
- arianvanp 6y agoIt's not true that it pulls in everything. It's just that a nixos installation pulls in a lot of transitive code =). It actually pulls all of this in lazily and lazily evaluates it; but it's just a lot of code and nix evaluator isn't that fast.
- kaba0 6y agoThat’s just evaluation. The next bigger change in nix itself will likely be the ability to better cache evaluations, significantly speeding up this.
- kaba0 6y agoI’m not sure what you mean by lack of lazy evaluation. It is lazy as far as I know. Also, check out flakes, which somewhat steers away from the central repo design.
- __jem 6y agoI switched to NixOS after tripping over my laptop's power chord during an update, which broke Linux in such horrifying ways that I didn't dare attempt recovery. I agree that I'm not sure the extra complexity is worth it for day to day use, but just the ability to avoid catastrophic failure and near instant setup on new machines is worth it I think.
- salamander014 6y agoMany times repairing those kinds of situations in Linux is as simple as: - boot linux livecd - mount your broken filesystem - bind mount the important bits from the live kernel (/proc) - chroot Like this: cd / mount -t ext2 /dev/sda1 /mnt #Here's your broken install mount -t proc proc /mnt/proc mount -t sysfs sys /mnt/sys mount -o bind /dev /mnt/dev chroot /mnt /bin/bash #boom you are in. Now do whatever you can to repair the system. depends on what broke. usually apt stuff for me(pulled power during a package upgrade)?
- stjohnswarts 6y agoI just use ZFS filesystem w/ snapshot before update
- e3bc54b2 6y ago>Now do whatever you can to repair the system. depends on what broke. What needs to be done to fix the system may not be obvious and the fix may not be simple. Furthermore, the trial and error for fixing may leave a trail of new issues. And that is why I use NixOS. I have to wrestle with it to get something working, but once I'm done I can guarantee it will keep working until the heat death of universe. Compared to that, Ubuntu and others let me get off the land fast but I never know when I'll crash or if I'll able to fly back from it.
- oblio 6y agoOr you could, you know, use any kind of backup/restore software, spend like 5 minutes to learn how to use it, and use those many hours invested in learning Nix to watch football and drink beer :-)