I take my shitposts very seriously.

  • 6 Posts
  • 650 Comments
Joined 3 years ago
cake
Cake day: June 24th, 2023

help-circle

  • rtxn@lemmy.worldMtolinuxmemes@lemmy.worldUnholy abomination
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    4 hours ago

    Some people, for reasons I can only speculate on, don’t like speaking in first person singular. In most cases that I’ve seen, they use “we”. I don’t necessarily agree with the practice from a linguistic perspective, the English language is already a garbage fire as it is without introducing more ambivalent speech… but then I also want to go back to using “thou” for second person singular, so I’m probably not qualified to speak on the matter.




  • Even if Galaxy is running under Wine:

    • It’s a package manager. It handles downloading files and updates, installation and patching, and verification.
    • It integrates various GOG services, like cloud storage for save files.
    • It can set environment variables and pass arguments to launched games.

    Besides, a Linux-native port doesn’t need to package anything. It can simply mark Wine/Proton and various compatibility solutions as dependencies. Lutris, for example, is still a great utility even if it doesn’t use the packaged Wine versions: all it really needs to do is execute some program in the correct runtime environment with the correct arguments.




  • “Everything is a file” means that many of the system’s components are represented as abstractions in the filesystem. It’s simply an API that allows reading from and writing to it by integrating into the hierarchical file structure.

    If you take a look inside /sys, you will find a fuckton of files, but they don’t represent data stored on a mass storage medium. Instead, the directory contains a mounted sysfs filesystem that contains file-like representations of various parts and properties of the system. For example, you can read them like a file by running cat /sys/block/sda/queue/rotational to check if the sda block device is a spinning disk (1) or solid-state storage (0). Or you can write to them like a file by running echo 1 > /sys/block/sda/devices/delete to command sda’s driver to detach the device. Similarly, /proc contains a mounted procfs filesystem that presents information about running processes as file-like entries; /dev contains a mounted devfs that points to various devices; and /tmp and /run contain tmpfs mounts for temporary storage in volatile memory (RAM or swap).

    Windows uses various other APIs (like the Component Object Model and others) to accomplish the same that are not necessarily tied into the filesystem.


  • It follows the same convention as most programming languages that expose the argument list. Python’s sys.argv has the program name at index 0 and the first argument at index 1. C’s char **argv does the same: index 0 is the program name, index 1 is the first argument. So it stands to reason that Zsh’s $0 should be the program name and $1 should be the first argument…

    …which, by the way, is exactly what Bash does as well.



  • rtxn@lemmy.worldMtolinuxmemes@lemmy.worldit's just the worst
    link
    fedilink
    arrow-up
    22
    ·
    edit-2
    6 days ago

    That isn’t incorrect, but it’s not as important as people make it out to be. Linux isn’t certified as POSIX-conformant either.

    People are way too stuck on POSIX regarding Fish specifically, but in shell scripting, POSIX compliance boils down to “can it run a pure sh script”. Bash is compliant. Zsh is partially compliant and needs to set an option to emulate sh. Fish uses a different syntax and is not compliant; if that is a problem, don’t execute sh scripts in Fish.

    POSIX compliance for shell scripts was important in the 80s and 90s when the #! directive wasn’t as commonly implemented and every script might be executed by the user’s $SHELL instead. That is no longer the case as virtually every Unix-like system’s program loader supports #!.




  • rtxn@lemmy.world
    shield
    Mtolinuxmemes@lemmy.worldOG pic of bobby drop tables
    link
    fedilink
    arrow-up
    28
    ·
    edit-2
    9 days ago

    I locked the other thread because this is not a community for politics, nor for airing out your issues with certain people. Those topics are specifically not allowed, and you would know that if you had read the rules. I’ve previously allowed such discussions to go on, in the vain hope that everybody would behave like cultured humans, but eventually they all devolved into exchanges of insults and accusations.

    This does not mean that I’m supporting or protecting those individuals. I’m just trying my pathetic best to keep the community clean. If you have an opinion that you must absolutely share with the world, find a community that allows it.





  • let you build faster like Python

    I have to write so much boilerplate code to make sure my objects are of the correct type and have the required attributes! Every time I write an extension for Blender that uses context access, I have to make sure that the context is correct, that the context has the proper accessor attributes (which may not be present in some contexts), that the active datablock is not None, that the active datablock’s data type (with respect to Blender, not Python) is correct, that the active datablock’s data is not None… either all that or let the exception fall through the stack and catch it at the last moment with a bare except and a generic error message.

    I used to think that static typing was an obstacle. Now I’m burning in the isinstance/hasattr/getattr/setattr hell.