this post was submitted on 04 Aug 2024
296 points (89.2% liked)

Programmer Humor

19503 readers
1042 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 

Am I out of touch?

No, it's the forward-thinking generation of software engineers that want elegant, reliable, declarative systems that are wrong.

top 50 comments
sorted by: hot top controversial new old
[–] bjoern_tantau@swg-empire.de 42 points 3 months ago (1 children)

Luckily with free software there's always a choice.

[–] 0x0@programming.dev 5 points 3 months ago

Found the only sane comment.

[–] ByteOnBikes@slrpnk.net 36 points 3 months ago (3 children)

Sorry I'm too stupid to understand this joke. Someone explain?

[–] EfreetSK@lemmy.world 54 points 3 months ago* (last edited 3 months ago) (4 children)

There's a new trend with immutable distros and they have some pros and cons. OP's stance apparently is that they're the future

https://itsfoss.com/immutable-distro/

[–] ByteOnBikes@slrpnk.net 24 points 3 months ago (1 children)

Oh that's super helpful and incredible.

I'm not familiar with that side of Linux as I'm primarily a user. But that's how our devops pipelines work to ship apps/websites. We're shopping the entire working package with every update, and rolling back with issues. It's a fantastic system since as a developer, I can isolate problems.

I never thought about that on a OS level. And I support it!

[–] demesisx@infosec.pub 18 points 3 months ago* (last edited 3 months ago)

This person gets it.

🤘

[–] demesisx@infosec.pub 13 points 3 months ago
[–] dogsnest@lemmy.world 8 points 3 months ago (1 children)

Does it matter if you prefer emacs or vi, tho'?

load more comments (1 replies)
[–] chunkystyles@sopuli.xyz 3 points 3 months ago (1 children)

Immutable distros definitely feel like the future.

load more comments (1 replies)
[–] MajorHavoc@programming.dev 34 points 3 months ago* (last edited 3 months ago) (2 children)

We've known since the 1950s that our configurations should be declarative, to make them resilient to necessary changes to our software stack.

Instead of coding exactly what change needs made, we ought to write a config that declares the intended outcome, and then do extra work to write code that correctly interprets that config. This way when all the commands we used stop working (and they do!), we still know the original intent of the configuration.

But making config management declarative is a lot of work. So fuck that noise. I'll do it in bash, instead, again.

[–] demesisx@infosec.pub 23 points 3 months ago* (last edited 3 months ago) (2 children)

Nix actually IS Bash under the hood. It uses Perl and Bash to create an atomic installation. I tend to do a LOT less maintenance than I’d need to do if I rolled everything from scratch in Bash.

[–] areyouevenreal@lemm.ee 8 points 3 months ago

That explains why Nix despite being parallelized takes a long time to install packages and rebuild the configuration.

[–] marcos@lemmy.world 6 points 3 months ago (1 children)

Oh, the meme really is about Nix then? I assumed it was about C.

I guess IT has a lot of holding into old ways going on.

[–] demesisx@infosec.pub 20 points 3 months ago* (last edited 3 months ago) (1 children)

Yes for sure. Actually Nix is pretty long in the tooth and there are better implementations of Eelco’s brilliant idea. It’s just that they have a lot less effort, ubiquity, and hype behind them. GUIX is a good example of that. They literally can build an OS from scratch. I find Nix to be rock solid, so I stick with it. But, it’s an idea (all dependencies being content addressed in an immutable folder structure) to allow complexity that isn’t even achievable on FHS style systems.

For example: THE main feature is that you could have a different version of say Python (for the sake of this example) installed for each dependency in your system and they would just work alongside each other due to their unique, hash based folder locations. Each folder is named based on the sha256 hash of the dependency graph, which has powerful implications. Because of this hash, they’re effectively hermetically sealed from each other and cannot step on each other. This is the very definition of Nix and taken far enough to define a whole OS is SUPER powerful concept.

Shit, I’m rambling. Maybe I’ll pause to let you guide my rant. ;)

[–] areyouevenreal@lemm.ee 4 points 3 months ago (1 children)

What is a better implementation than NixOS? Guix is held back by the fact that it's GNU only by default, and that it also compiles everything on your machine by default. You have to go out of your way to add a binary cache and speed up the install. That's after you go out of your way to enable non-free packages so that your hardware can actually work with the right firmware. If someone made a version with those enabled by default things would be way quicker to setup and use

[–] msage@programming.dev 3 points 3 months ago (1 children)
[–] areyouevenreal@lemm.ee 4 points 3 months ago (1 children)

Gentoo isn't immutable or declarative afaik

[–] msage@programming.dev 4 points 3 months ago

No, but it already supports multiple versions of software.

Though I would argue that many systems have dependency cache that should be replicable, specially when you build everything locally, you can pinpoint specific commits, not just versions that may be removed from repos.

But my comment was meant as a reference to building everything locally, as in I know what that's like.

[–] ByteOnBikes@slrpnk.net 6 points 3 months ago

Is there a article about this I can find more info about this?

It's a brand new topic for me and I just read this one from a previous comment. And trying to learn more.

[–] xilliah@beehaw.org 14 points 3 months ago

Changes to a declarative operating system, such as NixOS, are atomic. This allows for easy experimentation and rolling back to older configurations.

For example say you install gimp for editing photos. Normally you'd just install it using command line or a clickidity gui program. But say you don't like it. Maybe it causes an issue. Then you have to uninstall it again. You are applying yet another action to the same system. That system is mutable, or modifiable, and that introduces some extra complexity.

With NixOS you can simply roll back to the previous state you had before installing it. It also doesn't have to support stuff like uninstalling. The downside is that it likely uses a bit more resources when changing configurations.

This also applies to stuff like user management, services, e.g. a webserver.

Any experts correct me if I am wrong, I haven't tried any of these systems yet.

[–] Solemarc@lemmy.world 31 points 3 months ago (4 children)

I'm not against immutable distro's on principle. I imagine they still have some kinks to iron out, but I haven't looked in on them for a while.

My opinion on these things is; if it's a superior system, then it'll become the new standard, that's always what happens, and the naysayers are largely irrelevant. Just like computers, smart phones, the internet, etc.

[–] demesisx@infosec.pub 20 points 3 months ago (1 children)

Yeah. I think they'll catch on in much the same way that lock files have become the standard in many languages. IMO, it just makes more sense to declare all dependencies atomically. I also think/hope it will supplant our overreliance on Docker containers to achieve these kinds of guarantees (where it actually makes sense or presents undeniable benefits).

[–] Solemarc@lemmy.world 6 points 3 months ago* (last edited 3 months ago) (1 children)

In the case of docker I'm already at the point where I no longer think it's necessary. At my current job our stack is JS, PHP and Python. 3 interpreted languages, we then build on Ubuntu and deploy on Ubuntu. I don't think our project really needs docker, even though it does use it. We also have wasm/wasi prepping to eat Docker's lunch.

[–] demesisx@infosec.pub 22 points 3 months ago* (last edited 3 months ago)

I’d look into building all of that in a flake just so you can encapsulate (and have a central version control of) all of your dependencies in case something does change.

I’m a bit of a Nix dork but I tend to try and declare my entire dev stack in a flake so it can follow me to every machine. It offers some of the “it works on every machine” guarantees that Docker offers while also forcing the compilation of the stack to happen natively (or at least pulls in some content addressed cache that offers security by being the exact hash for the whole dependency graph). I like that

Here’s how I used the Nix way to declare an interactive Python scraper the other day. With this method, I can lock dependencies between machines as a matter of course without having to use Docker:

{
  description = “Weed Scraper”;

  inputs = {
    nixpkgs.url = “github:NixOS/nixpkgs?ref=nixpkgs-unstable”;
    utils.url = “github:numtide/flake-utils”;
  };

  outputs = { self, nixpkgs, utils }: utils.lib.eachSystem [“x86_64-linux”] (system: let
    pkgs = import nixpkgs { system = system; };
  in rec {
    packages = {
      pythonEnv =
        pkgs.python3.withPackages (ps: with ps; [ webdriver-manager openpyxl pandas requests beautifulsoup4 websocket-client selenium keyboard ]);
    };

    devShell = pkgs.mkShell {
      buildInputs = [
        pkgs.chromium
        pkgs.undetected-chromedriver
        packages.pythonEnv
      ];

      shellHook = ‘’
        export PATH=${pkgs.chromium}/bin:${pkgs.undetected-chromedriver}/bin:$PATH
      ‘’;
    };
  });
} 
[–] 0x0@programming.dev 13 points 3 months ago (1 children)

if it’s a superior system, then it’ll become the new standard,

That's not how it usually works, unfortunately...

[–] jwt@programming.dev 5 points 3 months ago

Yeah, everyone knows the new standard will be whatever gets the backing of the porn industry.

[–] nintendiator@feddit.cl 6 points 3 months ago

if it’s a superior system, then it’ll become the new standard

Not even remotely close to how it works. Remember: we had pulseaudio as the "new standard" for a decent while.

[–] Corbin@programming.dev 2 points 3 months ago

It's been two decades. What kinks do you think NixOS has yet to iron out?

[–] secret300@lemmy.sdf.org 16 points 3 months ago (1 children)

Honestly how I feel right now, well kinda. I was using fedora silverblue but apps kept crashing and shit just wasn't working out how I wanted. I was excited to try VanillaOS until I did... It was annoying. I was hoping for a system that made it so I can seamlessly use dnf, pacman, and apt in the terminal and it would figure out all the containers for me but not at all. VanillaOS was too much of a hassle to keep track of everything and was just eh. I got fed up enough so I just installed NixOS today and so far I'm loving it. It's not as hard as I thought it would be but also I'm not doing anything to advanced yet. I plan on messing around with home-manager later. So far NixOS seems like it's exactly what I was looking for but all this time I avoided it

[–] SaharaMaleikuhm@feddit.org 20 points 3 months ago (3 children)

I bet NixOS will be kinda cool once they get a proper wiki in like 10 years or so

[–] Corbin@programming.dev 5 points 3 months ago (1 children)

They have two. If the complaint is that neither wiki is as rich as the Gentoo or Arch wiki, consider that perhaps NixOS users don't need as much supplementary advice for configuring their systems.

[–] Tangent5280@lemmy.world 4 points 3 months ago (1 children)

Every tutorial should be crafted for some hypothetical user stupider than their current stupidest user.

[–] Corbin@programming.dev 2 points 3 months ago

By induction, that will only make your user base stupider.

[–] Wooki@lemmy.world 3 points 3 months ago

Wiki and official social platform to share configurations and flakes ect! But my god the documentation.....

[–] secret300@lemmy.sdf.org 3 points 3 months ago

yeah I'm feeling that now...

[–] Defaced@lemmy.world 11 points 3 months ago* (last edited 3 months ago)

I tried bazzite, unfortunately I had some odd quirks that I can only attribute to an immutable OS. Things like window and UI scaling wasn't consistent. My mouse cursor would blow up to twice the size when hovering over one window then shrink back down on another. I can only guess this is because the base filesystem is only readable and it can't write any values for scaling on certain themes/window decorations. While not a huge deal, it comes off as sloppy and inconsistent. It's not a great user experience and first impressions are everything. It's easy to make a first impression, it's damn near impossible to make a second one, and my first impression of an immutable OS has been soured. I installed mint 22 and it's been a completely different experience, from window decorations, to time shift backups, system updates, Bluetooth, cinnamon theming, it just works out of the box with little to no setup.

[–] LaggyKar@programming.dev 8 points 3 months ago (1 children)

This seems rather strawman-y

[–] demesisx@infosec.pub 11 points 3 months ago (1 children)

I posted this meme in three places. Did you not read any of the threads where old, cranky FHS luddites came out of the woodwork to angrily dismiss the concept of immutable distros?

[–] LaggyKar@programming.dev 3 points 3 months ago* (last edited 3 months ago) (1 children)

None of which are in this picture. The person in the picture talks only favorably of immutable systems yet is apparently against them, thus making for an easy target by arguing against themselves, so a straw man.

I'm actually positive to immutable systems, I just thought the argument wasn't great. I realize that's about what Skinner does in the meme, but it feels weak.

On second thought, I think the reason it was so jarring is because normally points against Skinner are in top picture, and the bottom picture has him abandon that line of thoughts in favor of something simplistic, thus changing his mind from one side to the other. Whereas here, the points against Skinner are at the end point of the meme, and thus he argues in both directions simultaneously.

[–] demesisx@infosec.pub 11 points 3 months ago* (last edited 3 months ago)

Interesting perspective. Thanks for elaborating. You twisted my original concept in knots and won me over to your read of it.

[–] Unreliable@lemmy.ml 7 points 3 months ago

Bazzite has been amazing for me!

[–] sudo@programming.dev 6 points 3 months ago

Who actually hates on declarative/immutable distros as a concept? Its always the actual usability of the specific implementations thats the problem. Stale packages, poor documentation.

[–] e8d79@discuss.tchncs.de 4 points 3 months ago

I am using a immutable Fedora since January and it has been great so far.

[–] onlinepersona@programming.dev 2 points 3 months ago (3 children)

Which declarative systems exist besides nix? Don't say ansible. It's barely declarative.

Anti Commercial-AI license

[–] demesisx@infosec.pub 18 points 3 months ago* (last edited 3 months ago) (1 children)

GUIX for one.

GUIX is to NixOS what Gentoo or Manjaro are to Arch.

I’ll probably try it someday when I get bored enough of systemd.

[–] zagaberoo@beehaw.org 4 points 3 months ago (1 children)

Gentoo or Manjaro are to Arch? What do you mean? Those two are very different from each other especially in their relationships to Arch.

[–] demesisx@infosec.pub 8 points 3 months ago

Duly noted. I DO NOT use Arch, btw. ;)

What I meant to try and say is that GUIX is like NixOS for Chad programmers.

[–] nickwitha_k@lemmy.sdf.org 5 points 3 months ago

GUIX is a good example.

Don't say ansible. It's barely declarative.

True, but it uses a common language in its Playbooks, which is a significant advantage. I'd like nix if I didn't need to use nix the language. It's great concept and the portability is awesome.

[–] ikidd@lemmy.world 2 points 3 months ago

BlendOS is a declarative Arch.

[–] Anticorp@lemmy.world 1 points 3 months ago* (last edited 3 months ago)

Then call me out of touch because I think that immutable distros are a step backwards, and systems with bumper rails are for newbs who are afraid of the changeability that experienced users want and need. If I wanted a system to make all of my choices for me, then I'd just use iOS on an iPad.

load more comments
view more: next ›