Programmer in NYC

  • 9 Posts
  • 68 Comments
Joined 2 years ago
cake
Cake day: May 7th, 2023

help-circle
  • I sometimes write a flake with those 4 lines of Nix code, and it comes out just messy enough that tbh I’m happier adding an input to handle that. But I recently learned that the nixpkgs flake exports the lib.* helpers through nixpkgs.lib (as opposed to nixpkgs.legacyPackages.${system}.lib) so you can call helpers before specifying a system. And nixpkgs.lib.genAttrs is kinda close enough to flake-utils.lib.eachSystem that it might make a better solution.

    Like where with flake-utils you would write,

    flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-darwin" ] (system:
    let
      pkgs = nixpkgs.legacyPackages.${system};
    in
    {
      devShells.default = pkgs.mkShell {
        nativeBuildInputs = with pkgs; [
          hello
        ];
      };
    })
    

    Instead you can use genAttrs,

    let
      forAllSystems = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-darwin" ];
      pkgs = forAllSystems (system:
        nixpkgs.legacyPackages.${system}
      );
    in
    {
      devShells = forAllSystems (system: {
        default = pkgs.${system}.mkShell {
          nativeBuildInputs = with pkgs.${system}; [
            hello
          ];
        };
      });
    }
    

    It’s more verbose, but it makes the structure of outputs more transparent.


  • hallettj@beehaw.orgtoLinux@lemmy.ml*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    10
    ·
    11 months ago

    The link lists 78 CVEs of varying severity levels opened over a period of 11 years. Many of them are patched. (I don’t know how to easily check how many are patched. The NIST listings provide issue tracker links and severity levels, and the handful of CVEs I looked at had fixes released.) I’m not convinced this is evidence that systemd is unacceptably insecure.

    I get that it’s frustrating that systemd has such a broad scope, and that it’s not portable. But these are trade-offs. In exchange we get power that we wouldn’t get otherwise. For example tying device management and scheduled tasks into systemd lets us use the same declarative dependency management in those domains as in the init system. The system is able to bring up services only when needed, boot faster, use fewer resources. The non-portability allows use of, for example, Linux cgroups to cleanly shut down forked processes. Even if we were using an alternative like Upstart I’m gonna guess we would end up relying on cgroups.

    Red Hat’s role is certainly something to keep an eye on. But systemd is open source, and it can be forked if necessary.




  • I think Picard was willing to sacrifice himself to save the kids. He’s an officer who signed up for a risky job - they are not, and also they’re kids. I think he thought that going with them would slow things down enough to add unacceptable risk for the kids. And they did end up spending a bunch of time cobbling together an apparatus to move Picard during which the lift could have fallen.

    When the kids refused to go maybe that changed Picard’s calculation: the advantage of going without him diminishes if they use up time arguing. Or maybe it’s TV writing.

    But maybe Picard wasn’t certain that the lift would fall. Or maybe if he’d stayed he would have managed to pull out a Picard move to save himself at the last second - you know, the kind that’s easier to do when there aren’t kids watching. Or maybe, as far as he knew someone might rescue him in time. But yeah, he probably would have died, and the kids’ mutiny was the only out that let him save himself while also trying to be noble.



  • Debian unstable is not really unstable, but it’s also not as stable as Ubuntu. I’m told that when bugs appear they are fixed fast.

    I ran Debian testing for years. That is a rolling release where package updates are a few weeks behind unstable. The delay gives unstable users time to hit bugs before they get into testing.

    When I wanted certain packages to be really up-to-date I would pin those select packages to unstable or to experimental. But I never tried running full unstable myself so I didn’t get the experience to know whether that would be less trouble overall.


  • I also have mixed feelings about Discovery, but for different reasons. I love the characters and character writing. I disagree that the rest of the crew doesn’t get any development - but a lot of that does come in later seasons. My complaints are about the plots. I think season 1 was the most problematic in that respect with progressive improvements over the next two seasons. (I haven’t seen season 4 yet.)

    • Overly ambitious arcs, and over-the-top stakes make the story feel unbelievable
    • Discovery being the only crew able to address several civilization-threatening crises makes the universe feel small
    • Leaning on action and artificial tension (like, the ship will explode in 3 minutes) is a cheap way to seek engagement that deprives us of time seeing the characters drive the story
    overly-ambitious arcs in season 1

    It wasn’t enough to try to take on the entire Klingon war at the same time as introducing a whole new cast. They also had to add an entirely separate, even more threatening crisis?

    Making Michael responsible for both starting and ending the war makes you feel like the universe begins and ends on one ship.

    We don’t need constant threats of annihilation in the story to be engaged! The most compelling Trek writing has had much lower stakes. When we have had high stakes, like in The Best of Both Worlds and The Dominion War, the writers managed to make us feel like we were seeing a pivotal part of a much larger conflict. They took the time to build up to the big tension, and took the time to play out satisfying resolutions. And they didn’t make it the entire show.

    But things got gradually better,

    over-the-top stakes in season 2

    In season 2 they managed to limit themselves to a single major crisis. And they stepped it down from end-of-every-universe to end-of-all-life-in-one-galaxy. But still unbelievably over-the-top. Still too much artificial tension. Still too Discovery- & Michael-centric.

    I love Michael, and I enjoy watching her be great at everything. But she can be part of a larger society of amazing people, and still be amazing herself.

    somewhat lower stakes in season 3

    And then they stepped it down again to maybe-end-of-what’s-left-of-the-Federation.

    In season 3 things slowed down enough, and they spent enough time letting more of the cast develop and drive the story that I felt like I could enjoy the story without gritting my teeth.

    season 3 world-building

    But I do have similar feelings: the world-building of what is essentially a whole new galaxy in season 3 feels underdeveloped. I was initially frustrated by what felt like an attempt to distance Discover from Star Trek. Trek is supposed to be about a future utopia - we have enough other works that wallow in dystopia. But it seems like maybe it’s only supposed to be dystopian for one season? The ambitious writing is certainly still there.

    I don’t disagree with you about mirror-Georgiou’s participation being unbelievable. The thing where everybody loves Michael to the degree where it becomes their primary motivation is too Mary Sue-like. Again I think that’s at its worst in season 1. OTOH having Michelle Yeoh on the show is a lot of fun so I’m inclined to forgive the stretch in that character arc.


  • hallettj@beehaw.orgtoRisa@startrek.websiteSpread the love
    link
    fedilink
    English
    arrow-up
    10
    ·
    1 year ago

    I thought the changeling that shared Odo’s look chose it to make Odo feel like he belonged. And her disdain for solids might have made her not want to look too much like them.

    The only other changelings I remember from DS9 were,

    other changelings

    The other changeling sent into the galaxy alone like Odo who had more detailed hair and features, and the espionage agent Sisko talked to in Paradise Lost who did a convincing imitation of O’Brien.



  • hallettj@beehaw.orgtoLinux@lemmy.mlArch or NixOS?
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    1 year ago

    I want to make a small correction - this is not true:

    iirc I had to reboot every time for it to be applied while with Arch you can just install something and run it immediately.

    nixos-rebuild behaves like most package managers: it makes new packages available immediately, and restarts relevant systemd services. Like other distros you have to reboot to run a new kernel.

    And cleaning up Steam games is as issue with most distros too. But I kinda see your point.

    Btw Nix (both NixOS and the Nix package manager running in other distros) has this feature where you can run packages without “installing” them if you just want to run them once:

    $ nix shell nixpkgs#package-name
    

    That puts you in a shell with one or more packages temporarily installed. The packages are downloaded to /nix/store/ as usual, but will get garbage-collected sometime after you close the shell.


  • hallettj@beehaw.orgtoLinux@lemmy.mlAAAA
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    1
    ·
    1 year ago

    As a Nix fanboy I would write a Nix expression that downloads the AppImage, and also writes the desktop file with the appropriate path written into it via string interpolation. That can be done either through a NixOS configuration, or in any Linux distro using Home Manager.






  • I think NixOS is awesome, but it certainly doesn’t offer “access to (basically) all Linux-capable software, no matter from what repo.” - at least not natively.

    I don’t quite agree with this. In NixOS you can write custom expressions that fetch software from any source, and stitch them into your configuration as first-class packages. So you do get access to all Linux-capable software natively, but not necessarily easily. (There is a learning curve to packaging stuff yourself.)

    I use this process to bring nightly releases of neovim and nushell into my reproducible config. Ok, I do use flakes that other people published for building those projects, which is a bit like installing from a community PPA. But when I wanted to install Niri, a very new window manager I wrote the package and NixOS module expressions all by myself!



  • One of my favorites is from Sisko, but I guess this one is more of a soliloquy than a dialogue,

    The trouble is Earth! On Earth, there is no poverty, no crime, no war. You look out the window of Starfleet Headquarters and you see paradise. Well it’s easy to be a saint in paradise, but the Maquis do not live in paradise! Out there, in the Demilitarized Zone, all the problems haven’t been solved yet! Out there, there are no saints! Just people! Angry, scared, determined people, who are going to do whatever it takes to survive, whether it meets with Federation approval or not!