Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)PH
Posts
595
Comments
1,799
Joined
12 mo. ago

  • The issue is, nix builds are only guaranteed to be reproducible if the dependencies don’t change.

    Dude, this is exactly why Nix is better. Docker builds are only guaranteed to be reproducible if the dependencies don't change. Which they will. The vast majority of real-world Dockerfiles do pip install, wget, all kinds of basically unlimited nonsense to pull down their dependencies from anywhere on the internet.

    Nix builds, on the other hand, are forbidden from the internet, specifically to force them to declare dependencies explicitly and have it within a managed system. You can trust that the Nix repositories aren't going to change (or store them yourself, along with all the source that generated them and will actually produce the same binaries, if you're paranoid). You can send the flake.nix and flake.lock files and it will actually work to reproduce a basically byte-identical container on the receiver's end, which means you don't have to send multi-gigabyte "images" in order to be able to depend on the recipient actually being able to make use of it. This is what I was saying that the whole thing of needing "images" is a non-issue if your workflow isn't allowing arbitrary fuckery on an industrial scale whenever you are trying to spin up a new container.

    I suspect that making a new container and populating it with something useful is so trivial on Nix, that you're missing the point of what is actually happening, whereas with Docker you can tell something big is happening because it's such a fandango when it happens. And so you assume Docker is "real" and Nix is "fake" or something.

    I like one a package to be independent

    Yes, me too, which is why an affinity for Docker is weird to me.

  • Yes because that is a wrong and clunky way to do it lol.

    If you really wanted to, you could use dockerTools.BuildImage to create an "imaged" version of the container you made, or you could send around the flake.nix and flake.lock files exactly as someone would send around Dockerfiles. That stuff is usually just not necessary though, because it's replaced with just a better approach (for the average-end-user case where you don't need large numbers of Docker containers that you can deploy quickly at scale) that accomplishes the same thing.

    I feel like I'm not going to convince you of this though. Have fun with Docker, I guess.

  • Hold up, nix added containerization? How did I miss that? I will have another look now!

    Nix is containerization. Here is firing up a temporary little container with a new python version and then throwing it away once I'm done with it (although you can also do this with more complicated setups, this is just showing doing it with one thing only):

     
        
    [hap@glimmer:/proc/69235/fd]$ python --version
    Python 3.12.8
    
    [hap@glimmer:/proc/69235/fd]$ nix-shell -p python39
    this path will be fetched (27.46 MiB download, 80.28 MiB unpacked):
      /nix/store/jrq27pp6plnpx0iyvr04f4apghwc57sz-python3-3.9.21
    copying path '/nix/store/jrq27pp6plnpx0iyvr04f4apghwc57sz-python3-3.9.21' from 'https://cache.nixos.org/'...
    
    [nix-shell:~]$ python --version
    Python 3.9.21
    
    [nix-shell:~]$ exit
    exit
    
    [hap@glimmer:/proc/69235/fd]$ python --version
    Python 3.12.8
    
      

    The whole "system" you get when moving from Nix to NixOS is basically just a composition of a whole bunch of individual packages like python39 was, in one big container that is "the system." But you can also fire up temporary containers trivially for particular things. I have a couple of tools with source in ~/src which, whenever I change the source, nix-os rebuild will automatically fire up a little container to rebuild them in (with their build dependencies which don't have to be around cluttering up my main system). If it works, it'll deploy the completed product into my main system image for me, but if it doesn't then nothing will have changed (and either way it throws away the container it used to attempt the build in).

    Each config change spawns a new container for the main system OS image ("generation"), but you can roll back to one of the earlier generations (which are, from a functional perspective, still around) if you want or if you broke something.

    And so on. It's very nice.

  • I mean if it makes you happy, I won't tell you to do anything different. I think a certain amount of it is just prejudice against Docker on my part. Just in my experience NixOS is the best of both worlds: You can have a single coherent system if everything in that system can play nice with each other, and if not, then things can be containerized completely that way still works too. And then on top it has a couple of other nice features like rolling back configs easily, or source builds that get slotted in in-place as if they were standard packages (which is generally where I abandon Docker installs of things, because making changes to the source seems like it's going to be a big hassle).

    I'm not trying to evangelize though, you should in all seriousness just do what you find to be effective.

  • Yeah, I can agree with that, I'm just saying at the moment of shutdown isn't the time to do that and often the programs that are holding up my shutdown are doing it for reasons of their own, not because they're trying to help me by saving my work. Just do autosave and let me shut my stuff down.

  • Huh.

    IDK man, my experience is that Nix solves the problem you originally talked about and a bunch of others, pretty effectively. Among other things if things "just... don't work" you can trivially roll back to an earlier working config, and see what changed between working and not-working, and so what would be a pretty grueling debugging process in some other environment becomes pretty easy to sort out.

    But whatever. If for some reason Docker makes you more happy and not less, you're welcome to it and best of luck.

  • What didn't you like about it? I am just curious; I finally stepped out of using Debian for everything which I have been doing for approximately 200 years, and tried NixOS, and to me it is incredibly nice the way it solves a lot of these issues.

  • My laptop will send a signal to all programs telling them to shut down, which includes cleaning up their stuff, and then it unmounts the drives, and then it shuts down. It just doesn't wait forever and make me fix the problem if some program is having trouble shutting down. That is the correct behavior.

    I do get that it's nice to be protected against having your work blown away. As a first step, the idea of checking with every program to make sure it's okay to turn off was a good progress, back in the past when it was first invented. The solution in the present day to that is autosave. The solution is definitely not to leave all the user's work unsaved for a potentially unlimited amount of time, and then refuse to shut down if there is any terminal that still has an ssh session open, any settings window still open, or any GIMP session with files exported but not saved as .xcf.

    Literally 2/3 of those obstacles happen pretty much every time I shut down my Mac, and I have to wander through the programs resolving programs' problems that have nothing to do with saving my work. It's annoying. I do understand that, with the other way, you have to go around checking that you have no work unsaved before shutting down. But, if you are mature enough to do that, then the "init 0" way is objectively better.

  • I just flip through all the workspaces, make sure there's nothing going on I care about, and then hit the button.

    Computers that teach you not to do that, but instead to just blindly pick "shut down" and then assume that the computer will protect you against having anything unsaved, but also refuse to shut down if there's some app this is not cooperating, have 0 upside compared to the other way.

    1. When I hit the power button, it turns off. It still does its shutdown and all, but it's not an extended negotiation where I find a bunch of programs that are refusing to "let me" do what I want the computer to do, and have to try to make each of them happy. It just turns off.
  • Going through brutal things will destroy your empathy. I am fine with this guy standing trial for his crime but I don't think it was really "his fault" at the end of the day after how he grew up.

    Some people have strong character and they can turn out fine no matter how you treat them. Some people, you can give every opportunity in the world to, and they're still going to turn towards the dark. For most people, it's down to circumstances.

    That's why it is important to create good circumstances. The schools, the police, the meeting places where people hang out, the shops and the structure of the economy. It all has to serve the good, it has to be alive with life. Because the people who are in it will be molded.

  • I have seen them at protests, and they do seem organized and they definitely can yell. What the fuck, I'll take it. I feel like it's probably mostly the central leadership that's somehow been corrupted into trying to throw elections to the Republicans and getting upset about us sending aid to Ukraine.

    I don't know if the person on the microphone I saw spend most of their speech yelling about Democrats (literally more than 50%) was from the PSL, but I don't know that they were. I'll give them the benefit of the doubt and say maybe not, fuck it, come along with us, you can do your thing and I can do mine, sounds good.

  • You and Five aren't 100% wrong, I do take the point that the infighting is a waste of energy. I was all set to apologize and acknowledge, and then I looked at the PSL's web site and it's all still talking about the election, they don't give a shit about progress now that it doesn't involve an election with a Democrat in it, they literally can't even be bothered to take down the video yelling about the election that happened a lifetime ago in a different type of country. Literally the day the election happened, they stopped caring, I guess.

    I mean like I say, I do get it. I just felt embittered. Now that I've got it out of my system for a second, yes, we can all rally together and fight this bullshit whether or not the PSL is aware of its role in this catastrophe or interested in self-preservation in future elections going forward.

  • Take a look at https://pslweb.org/. There's nothing about the protests on Saturday, it doesn't seem to have been updated since the election.

    Watch the video. "A system that presents two options, but for all intents and purposes, represents a single billionaire agenda." "I'm tired of hearing this is the biggest election in your lifetime. The reality is, over time, it doesn't matter."

    I turned it off when they got upset about us sending aid to Ukraine. It's a little wild and incongruous that they found time to fit that in there, in the same breath as aid to Israel.

    Now that millions of people are in the streets and there might be some momentum for lasting change (as well as a terrifying outcome if the resistance isn't strong enough.)... nothing. Now that they fucked up the election, the page hasn't been updated, they don't care anymore. They're not working on building anything non-electoral now that that's getting wildly popular. All their focus was (and still is, apparently), on the election.

    They aren't leftists. I feel fine attacking them. Honestly? If there are some confused leftists in their ranks, who unlike the leadership are interested in protests and are getting attacked as a result, then absolutely, let's defend them. That goes without saying. But the PSL doesn't have any sympathy from me. I'm not happy about the leadership being in any crosshairs because of the predictable disaster they helped to cause, no one deserves to get shot because they advocated for something good. But, that was part of the point about rallying against Trump, was that hopefully no one would have to get shot. If they realize it's a big deal now and start fighting, then they should update the web site to talk about that, instead of the election.

  • Party for Socialism and Liberation: "I plan to continue to express absolutely no urgency about the idea of keeping Republicans out of power. The most important party to criticize is and always has been the Democrats. It's super important not to vote for Democrats. That's the key thing. It's the only way to real forward progress."

    The KDP did the exact same thing in Germany in 1932. Most of them were executed in the years following the election.

  • And after that, citizens of the US. This all has nothing to do with deportation, it just happens that starting with the “other” is convenient because it lulls US people into thinking it won’t happen to them. The fact that ICE was already full-on into Gestapo tactics made things a little smoother, too.

  • Politics @beehaw.org

    A Lengthy Legal Battle in North Carolina Could Show How to Flip an Election

    Politics @beehaw.org

    Democrat is nearly boo’ed out of hour-long town hall as voters bash her for supporting SAVE voting rights act

    Politics @beehaw.org

    Gavin Newsom Has Lost The Plot

    Politics @beehaw.org

    Prosecutors seek 7 years in prison for disgraced former Rep. George Santos in federal fraud case

    Politics @beehaw.org

    Trump goes after websites that raise money for his enemies

    Enough Musk Spam @lemmy.world

    X sues to stop Minnesota election misinformation law

    Enough Musk Spam @lemmy.world

    Elon Musk’s Luck Runs Out

    Cybersecurity @sh.itjust.works

    Trojanized Alpine Quest app geolocates Russian soldiers

    Politics @beehaw.org

    Trust in Supreme Court Plummets to 41% As Americans Cling to Constitutional Values

    Politics @beehaw.org

    Chechen scholar: ‘Both in Chechnya and Ukraine, there’s a similar sense of Russian desperation’

    Politics @beehaw.org

    3 Adams Case Prosecutors Resign Rather Than Express Regret to Justice Dept.

    Politics @beehaw.org

    Lawsuit claims new Arkansas ballot laws violate voting rights, seeks court intervention

    Politics @beehaw.org

    Hitler’s Terrible Tariffs

    Politics @beehaw.org

    Supreme Court blocks deportation flights—for now

    Politics @beehaw.org

    Van Hollen takes center stage in fight with Trump over Abrego Garcia

    Politics @beehaw.org

    The 40-something single dad shaping liberal media from his laptop

    Politics @beehaw.org

    Immigrants prove they are alive, forcing Social Security to undo death label

    Politics @beehaw.org

    Judges warn Congress that more money is needed for security at a time of escalating threats

    Politics @beehaw.org

    Rubio’s firing of Peter Marocco ignites a MAGA world meltdown

    Space @beehaw.org

    Rover finds hints of an ancient Martian carbon cycle