• 0 Posts
  • 28 Comments
Joined 8 months ago
cake
Cake day: June 10th, 2024

help-circle



  • If you look closesly there’s a lot of nonsensical details, like the quite high water tower in the top right, window layout on the side of the building facing us, different lengths and angles of fire escape stairs, a weird semi-reflective “thing” (scaffolding?) on the left of the image (and if it is indeed reflective, the reflection doesn’t match the original), extremely weird-looking humans on the hoist and artifacts on the hoist railing. None of these are a dead giveaway, but the general vibe is off.




  • Statistically speaking most LGBTQ+ ARE mentally ill. This is not hate speech and you’re a brainwashed idiot if you think it is.

    It’s disingenuous to equate statements like “Most LGBT people suffer from anxiety and depression” and “Being gay is a mental illness”. It’s the second kind that is the problem, and I don’t think anyone is worrying about the first.

    You are so far up your own ass you somehow blamed the censorship of an operating system within a social media website on the entire far right. <…> How about you blame the oligarchs and big tech CEOs for reprogramming your mind to think and dislike what they want you to think and dislike.

    “They” in the second paragraph seems to refer to the people in power, I don’t see where they are blaming “the entire far right”.





  • Honestly, while fun, those videos don’t provide too much value per GB - and I say that as someone who’s watched almost all of them. Their main actual benefit besides entertainment is (IMHO) getting people interested in the relevant field so they study more thoroughly. They often explain simple yet dazzling concepts which get you hooked but don’t provide much value on their own, and don’t directly enable you to solve real-life problems. Even more involved videos like those by 3blue1brown are still edutainment at their core, as acknowledged by the author. In an apocalypse (which, let’s face it, is the most likely reason the internet would indefinitely go down in a developed country) you would be much better off with engineering (mechanical, electrical, etc) literature and textbooks, maybe a couple science textbooks for good measure (I have a drawer full of the Feynman lectures in case something like this happens).


  • In this case what I would recommend is to provide a command (perhaps inside that nix develop) that would set up all the images/services/data, and a second one to tear it down, and allow devs to run those commands themselves. This allows for more flexibility, e.g. multiple nix develop shells of the same project, but only one does the stateful stuff, coming back to the same shell later in the day without waiting for the setup. Most importantly it would allow for easy clean-up if the shell is shutdown unexpectedly and doesn’t have time to clean up itself, e.g. SIGKILL or power loss. It can be as simple as using writeShellScriptBin to string together commands (instead of doing it in the shellHook as you presumably are doing right now), or as complex and flexible as https://github.com/svanderburg/nix-processmgmt .

    Then, if you really want to automate it, you can simply add your-setup-command and trap "your-cleanup-command" EXIT to your shellHook.



  • Have you ever tried to use one of those superapps? It’s still a clunky experience overburdened with dozens of useless UI elements eating up screen estate of what I actually care about, and then whenever I wanted to do something for which there’s no sub-app in the super-app it would be difficult due to lack of integrations with “the outside”. That’s even before we question the idea of putting all the eggs functionality in one basket centralized app with one developer entity, allowing them to ultimately control all aspects of one’s online life.

    And more philosophically, I’m surprised that as a functional dev you prefer one big tightly coupled combine to a collection of small but useful on their own utilities lightly coupled to produce more than the sum of their parts.




  • What I find annoying is when some talking head says all code should be a certain way,

    It’s quite useful to have “all code be a certain way” within a language ecosystem. E.g. Haskell requiring all pure functions be actually pure is amazing because you know that any function from any library doesn’t perform some stupid side effect when you call it, and just processes its inputs into an output. Of course, functional programming tools can be useful even outside purely functional languages, but having those important properties be ecosystem-wide makes you feel much more comfortable, and produces much better, safer and more reliable code in the end.



  • balsoft@lemmy.mltoNix / NixOS@programming.devNotes on Nix
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    9 days ago

    This is a pretty good list of tutorials for Nix (as the package manager thingy) (not NixOS): https://nix.dev/tutorials/#tutorials

    Here’s a tutorial for the Nix language: https://nix.dev/tutorials/nix-language

    As for the configuration.nix file, TBH, once you understand the Nix language you can just go around and look at what other people have written to get the inspiration. There’s a list of NixOS configs here: https://wiki.nixos.org/wiki/Configuration_Collection. Some of them are quite complex (as is mine), but you can start with something simple, maybe like this: https://bitbucket.org/bzz/nixos/src/master/configuration.nix . It will give you an idea of how to set config options and how the imports system works. To then see which config options are out there, look at https://search.nixos.org/options , you can search for anything you like (e.g. services, programs, networking, random system configuration stuff). You should never ever edit anything in /etc other than configuration.nix manually, always look for config options to do it.

    There’s technically documentation about it here: https://nixos.org/manual/nixos/stable/#sec-configuration-file , which can be helpful, but it’s also kinda long for what it tries to explain.

    Once you get the basics, you can look into flakes to replace stateful channels, making your configuration more modular to reuse it across multiple machines (now it’d be time to look at those more complicated configs), using home-manager to also manage your $HOME (so that you don’t have to touch ~/.config manually either), and maybe even impermanence to make your system reset to whatever is in your NixOS config on every reboot, erasing any accidental edits to configs, to make sure that your configuration reflects what exactly you want from your machines.