this post was submitted on 06 Dec 2024
555 points (98.4% liked)

linuxmemes

21570 readers
708 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.
  •  

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't fork-bomb your computer.

    founded 2 years ago
    MODERATORS
     
    top 50 comments
    sorted by: hot top controversial new old
    [–] [email protected] 62 points 1 week ago (2 children)

    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.

    [–] [email protected] 38 points 1 week ago (2 children)

    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] 26 points 1 week ago (1 children)

    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] 5 points 1 week ago (1 children)

    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 3 points 1 week 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 2 points 1 week ago (1 children)

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

    [–] [email protected] 3 points 1 week 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 2 points 1 week ago

    It's abstraction all the way down?!

    [–] [email protected] 38 points 1 week ago* (last edited 1 week ago) (1 children)

    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] 4 points 1 week ago (4 children)

    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.

    load more comments (4 replies)
    [–] Doomsider 25 points 1 week ago (6 children)
    [–] [email protected] 10 points 1 week ago
    [–] n3cr0 7 points 1 week ago (1 children)

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

    [–] [email protected] 7 points 1 week ago (1 children)
    [–] [email protected] 4 points 1 week ago

    ":wq :q! :0 i esc..."

    "Stop it Patrick, you're scaring him"

    [–] dejected_warp_core 5 points 1 week ago (1 children)
    echo "text file content goes here" >> myfile.txt
    
    load more comments (1 replies)
    [–] [email protected] 4 points 1 week ago
    [–] [email protected] 3 points 1 week ago (2 children)

    How do I jump down to a particular line?

    I prefer vim

    [–] [email protected] 3 points 1 week 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.

    [–] [email protected] 1 points 1 week ago (1 children)

    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.

    [–] [email protected] 2 points 1 week 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

    [–] [email protected] 25 points 1 week ago (1 children)

    > all text file

    > open inside

    > image.jpg

    [–] [email protected] 11 points 1 week ago

    Don't blob open inside

    [–] mlg 20 points 1 week ago (1 children)

    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] 11 points 1 week 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.

    [–] m4m4m4m4 18 points 1 week ago (2 children)

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

    [–] [email protected] 6 points 1 week ago

    Plan9 is the ultimate UNIX!

    [–] thedeadwalking4242 1 points 1 week ago

    If they wouldn’t have went with rio they may have got some traction

    [–] [email protected] 12 points 1 week ago* (last edited 1 week ago) (1 children)

    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!!! ?

    [–] [email protected] 5 points 1 week ago (2 children)

    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] 1 points 1 week ago* (last edited 1 week 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/

    load more comments (1 replies)
    [–] IlIllIIIllIlIlIIlI 11 points 1 week ago (3 children)

    Not all textfiles anymore: The journal for instance.

    [–] [email protected] 2 points 1 week ago

    Thankfully editing logs isn't really a valid use case

    [–] ordellrb 2 points 1 week ago (1 children)
    [–] IlIllIIIllIlIlIIlI 2 points 1 week ago

    Yes, journalctl is the command for journal reading.

    [–] cybersandwich 1 points 1 week ago (3 children)
    load more comments (3 replies)
    [–] [email protected] 11 points 1 week ago
    [–] [email protected] 11 points 1 week ago (2 children)
    [–] [email protected] 6 points 1 week ago

    ctrl-o, enter, ctrl-x

    [–] [email protected] 9 points 1 week ago

    Chat can we pull up the ASM? Chat?

    [–] [email protected] 3 points 1 week ago

    Journalctl speaks ASCII?

    [–] [email protected] 3 points 1 week ago

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

    [–] [email protected] 3 points 1 week ago

    I'm Spartacus!

    [–] [email protected] 2 points 1 week ago

    Lennart Poettering: "Not so fast"

    load more comments
    view more: next ›