I take my shitposts very seriously.

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

help-circle

  • “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
    5 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
    arrow-down
    10
    ·
    8 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.






  • None of the issues you’ve described are Cargo’s fault. The long compilation time is simply rustc’s compile-time checks (ensuring type and memory safety is much more involved than lexing in GCC), and the number of dependencies to compile is a result of the crate ecosystem. Cargo is just the front-end that automates fetching dependencies and compilation with rustc. Blaming it for slow compilation is like hitting your monitor when the computer is acting up.


  • It’s called a hyperbole.

    (edit) But, honestly, it’s still kind of accurate. Many of the most significant software suites that define the Linux ecosystem in more recent decades were written in the 80s or earlier. X (the display protocol) was released in 1984, and X11 in 1987. GNU Emacs was released in 1985. Vi, in 1976. UNIX System V, from which sysvinit and compatible init systems were adopted, was released in 1983. It’s not a stretch to say that certain people want to regress to the 1980s state, even if the kernel wasn’t around.


  • rtxn@lemmy.worldMtolinuxmemes@lemmy.world*Permanently Deleted*
    link
    fedilink
    arrow-up
    91
    arrow-down
    2
    ·
    edit-2
    26 days ago

    Off the top of my head, in no particular order:

    • Systemd and its components are responsible for too many essential system functions. Init, services, mounts, timers, logging, network config, hostname, DNS resolution, locale, devices, home directories, boot, NTP sync, and I’m sure there are others, can be handled by systemd or one of its components.
    • Systemd violates the UNIX philosophy of “do one thing and do it well”. Systemd is a complex solution to a complex problem: this thread has several comments by a former Arch Linux maintainer that explains why they’ve switched to systemd, and why the earlier method of using single initscripts was unsustainable.
    • It is owned and maintained by Red Hat, known for its many controversies.
    • Some people just don’t like modern things and think that the Linux ecosystem peaked in the 1980s.

    Most (though not all) of the popular complaints are completely unreasonable. Those people usually see themselves as moral and righteous and expect the world at large to follow their personal creed. I especially consider the UNIX philosophy to be outdated, and strict adherence to it to be an obstacle for modern apps and systems.

    I have some issues with systemd, and I don’t like that one for-profit company has such a massive influence over the entire Linux ecosystem, but I have to acknowledge that it works, it works well enough to counter my personal issues, and that the people whose opinion matters the most (specifically Debian and Arch maintainers) chose it for a good reason.