• @[email protected]
    link
    fedilink
    English
    37
    edit-2
    6 days ago

    Yes, all Linux system files are readable text files. The only exceptions are bitmap graphics assets and the contents of /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin etc., which is where any corrupted files go, hence the name. You can check the files, they are indeed unreadable garbage. Reminder to clean your PC’s bin directories to save disk space!

    /s

    • @[email protected]
      link
      fedilink
      46 days ago

      I was pretty amazed at this when I learned about it.

      It feels like digging into Windows was finding a bunch of compiled code.

      Where there’s been some times where I understood what was happening in Linux because I was able to follow how the library was set up.

  • tisktisk
    link
    fedilink
    English
    617 days ago

    I’ve been linuxing for almost 15 years, and the first 10 or so I strongly believed it was all files and directories…then I went down the gentoo path and quickly discovered that computers view them as essentially the same thing.

    • TimeSquirrel
      link
      fedilink
      387 days ago

      I discovered this when I started doing embedded baremetal programming with no OS and using SD cards. It hit me like an anvil from the sky when I realized dirs are just files pointing to other files. With no OS services you have to open the dir file directly in the program and scan it for file entries to get a list of them and pointers to their actual locations in the media. Navigating down and back up a subdirectory tree has to be done entirely in programming by keeping track of where you’ve been. There’s nothing in the filesystem itself that will do that for you. It just tells you where you can physically locate data.

      • @[email protected]
        link
        fedilink
        266 days ago

        I’ve done only a little bare metal work back when I was a student and I felt like a goddamn wizard.

        Like… yes. Of course everything looks the same, just an ocean of ones and zeroes that is just coherent enough to make a processor do something, such as fetch the right ones and zeroes from somewhere else. Of course folders aren’t dedicated physical sectors of a storage device. Of course like half of anything we ask a computer to do is manipulating storage, and taking this storage and feeding it into the actual memory of whatever is going to process it.

        When you zoom back out and realize that the majority of data processing happening right now is people streaming short form video on an unfathomably massive scale, that’s when it just falls apart for me and can’t exist outside the abstractions that make the concept digestible.

        Like I can kind of understand Lemmy, as software. I can see where all this data sits and gets queried and how it works. I can vaguely conceive of a few possible federation protocols. That vast ocean of unindexed “content” over on Instagram or TikTok or YouTube? That the algorithms can serve you up no problem but that you can’t even always search for manually? That’s terrifying, on the scale of these platforms. It’s like a leviathan sci-fi body horror meat machine but of data. Yeah yeah I vaguely understand CDNs but I’m talking about the whole thing: the algorithms, the video files, streaming all this data, the impossibly complex social phenomena built around the data… the fact that this monumental achievement is only used to sell ads, landfill fodder, and to fuck with people’s brains and worldviews, it’s legitimately horrifying. I especially think about this when I’m in a public place surrounded by people watching videos on their phones and swiping through them at dizzying speed.

        Is this how computer people end up chopping wood in the forest?

        • @[email protected]
          link
          fedilink
          56 days ago

          This writeup is such an interesting perspective of social media.

          It’s the medium for the human hive mind. It’s civilization’s consciousness. It’s beyond any individual’s control or comprehension, and it exists for advertising…

          • @captainlezbian
            link
            36 days ago

            It exists for advertising like we exist for grains. Yeah that’s what’s powering it, but it wasn’t made with that in mind, it was made iteratively.

      • @Anti_Iridium
        link
        26 days ago

        Got an recommendations on where to start for that? That sounds pretty cool

        • TimeSquirrel
          link
          fedilink
          36 days ago

          Most people these days get their hands on an Arduino or ESP32 to get started. Arduino is an entire ecosystem of C++ libraries and a framework that people have cobbled together to make programming microcontrollers easier on people not familiar with low level concepts. The IDE most people are using now is VS Code with the PlatformIO extension, since the Arduino IDE is kinda…bad.

          I myself started in hardcore mode with a PIC microcontroller back in the late 2000s when it wasn’t as easy to get into it. Back then, if you needed a procedure or abstraction layer to talk to a sensor, you had to write it yourself and figure out SPI communication protocols and such. Nowadays, someone has probably already made it for you.

    • @Ptsf
      link
      26 days ago

      It’s abstraction all the way down?!

  • @mlg
    link
    English
    186 days ago

    Unix devs: “Let’s make everything a file in our OS so that it’s easy to use and develop”

    Windows devs (clearly on crack): “Let’s store random critical shit in a crappy database registry thing and retain literally all the drawbacks of DOS on our new NT system”

    • @[email protected]
      link
      fedilink
      106 days ago

      The Windows Devs probably shot for the Ballmer Peak and missed by so far, it’s not even funny. But seriously, look at the history of Microsoft. Even back in the early days, MS-DOS was basically plagiarized from CP/M but Microsoft maneuvered themselves to a market controling position through aggressive marketing and business strategies. Overall they leeched off the emerging PC market and probably hindered innovation more than driving it.

  • sag
    link
    fedilink
    256 days ago

    > all text file

    > open inside

    > image.jpg

    • N3Cr0
      link
      76 days ago

      Excuse me sir, :wq doesn’t work here.

      • @[email protected]
        link
        fedilink
        English
        36 days ago

        If someone sits down to properly learn all of vim, They become this uber powerful wizard of editing on any Linux distro that exists.

        The problem is, I’ve only ever met a few people who are capable of using all of vim, I’ve been using it for 15 years and I still feel like I’m not quite worthy.

      • palordrolap
        link
        fedilink
        16 days ago

        Ctrl-/

        … and if you don’t like that horrible subversion of what a vi-user might expect to be the search feature*, there’s also Meta-G, which is slightly more similar to vi’s usage.

        You can also nano +L[,C] filename on the command line replacing L and C with respective line and column number, which I believe is a feature borrowed from vi.

        *The search feature is Ctrl-W for “where is”. Firefox users use this in the wrong window at their peril (it closes the current window). Find and replace is on Ctrl-\, which is even more of a subversion.

        I can use vi, but still prefer nano.

        • Ghoelian
          link
          fedilink
          26 days ago

          Firefox users use this in the wrong window at their peril (it closes the current window)

          Not just firefox. Also chrome, and a lot of other programs that implement tabs like file managers and things like that. It’s one of those almost universal shortcuts, like Ctrl+F or Ctrl+L

  • Possibly linux
    link
    fedilink
    English
    12
    edit-2
    6 days ago

    From: [email protected] (Patrick J. LoPresti)

    Subject: The True Path (long)

    Date: 11 Jul 91 03:17:31 GMT

    Newsgroups: alt.religion.emacs,alt.slack

    When I log into my Xenix system with my 110 baud teletype, both vi and Emacs are just too damn slow. They print useless messages like, ‘C-h for help’ and ‘“foo” File is read only’. So I use the editor that doesn’t waste my VALUABLE time.

    Ed, man!

    man ed ED(1) UNIX Programmer’s Manual ED(1)

    NAME ed - text editor

    SYNOPSIS ed [ - ] [ -x ] [ name ]

    DESCRIPTION Ed is the standard text editor.

    Computer Scientists love ed, not just because it comes first alphabetically, but because it’s the standard. Everyone else loves ed because it’s ED! “Ed is the standard text editor.” And ed doesn’t waste space on my Timex Sinclair. Just look:

    -rwxr-xr-x 1 root 24 Oct 29 1929 /bin/ed

    -rwxr-xr-t 4 root 1310720 Jan 1 1970 /usr/ucb/vi

    -rwxr-xr-x 1 root 5.89824e37 Oct 22 1990 /usr/bin/emacs

    Of course, on the system I administrate, vi is symlinked to ed. Emacs has been replaced by a shell script which 1) Generates a syslog message at level LOG_EMERG; 2) reduces the user’s disk quota by 100K; and 3) RUNS ED!!! “Ed is the standard text editor.” Let’s look at a typical novice’s session with the mighty ed:

    golem> ed

    ?

    help

    ?

    ?

    ?

    quit

    ?

    exit

    ?

    bye

    ?

    hello?

    ?

    eat flaming death

    ?

    ^C

    ?

    ^C

    ?

    ^D

    ?

    Note the consistent user interface and error reportage. Ed is generous enough to flag errors, yet prudent enough not to overwhelm the novice with verbosity. “Ed is the standard text editor.” Ed, the greatest WYGIWYG editor of all. ED IS THE TRUE PATH TO NIRVANA! ED HAS BEEN THE CHOICE OF EDUCATED AND IGNORANT ALIKE FOR CENTURIES! ED WILL NOT CORRUPT YOUR PRECIOUS BODILY FLUIDS!! ED IS THE STANDARD TEXT EDITOR! ED MAKES THE SUN SHINE AND THE BIRDS SING AND THE GRASS GREEN!! When I use an editor, I don’t want eight extra KILOBYTES of worthless help screens and cursor positioning code! I just want an EDitor!! Not a “viitor”. Not a “emacsitor”. Those aren’t even WORDS!!! ED! ED! ED IS THE STANDARD!!! TEXT EDITOR. When IBM, in its ever-present omnipotence, needed to base their “edlin” on a UNIX standard, did they mimic vi? No. Emacs? Surely you jest. They chose the most karmic editor of all. The standard. Ed is for those who can remember what they are working on. If you are an idiot, you should use Emacs. If you are an Emacs, you should not be vi. If you use ED, you are on THE PATH TO REDEMPTION. THE SO-CALLED “VISUAL” EDITORS HAVE BEEN PLACED HERE BY ED TO TEMPT THE FAITHLESS. DO NOT GIVE IN!!! THE MIGHTY ED HAS SPOKEN!!! ?

    • tisktisk
      link
      fedilink
      English
      56 days ago

      Is this real or a meme? Just curious…are there people still using ed? Is there a neoEd or would you just be reinventing vi at that point?

      • @[email protected]
        link
        fedilink
        1
        edit-2
        6 days ago

        Vi and later editors added a lot of commands, but if you want to keep the spirit of ed(1) and bring it into a visual context, I’d say sam(1) is the true successor. It’s what Ken Thompson used after ed, and Brian Kernighan. There are some people who at least are interested in ed today, this book is good for example: https://www.tiltedwindmillpress.com/product/ed/

  • @m4m4m4m4
    link
    186 days ago

    I was told Plan9 is who treats absolutely everything as files, even remote mountpoints

  • urda
    link
    fedilink
    English
    97 days ago

    Chat can we pull up the ASM? Chat?

  • GHiLA
    link
    fedilink
    36 days ago

    They didn’t hide Star Wars in ASCII? Lame. Year of the piss desktop, more like it kek