• 33 Posts
  • 667 Comments
Joined 2 years ago
cake
Cake day: June 5th, 2023

help-circle


  • This Fehr guy has all the same talking points I’ve seen German politicians use as well. And that’s essentially across all relevant political parties.

    For example, Interior minister Faeser called the Palästina-Kongress, which they shut down last year, and which was organized by secular left-wing groups and a Jewish group, “Islamist”. And the press loves to just repeat this stuff. And it’s great propaganda. The average German is afraid of Islamists, hates Muslims in general, and will applaud when the authorities suppress anyone labeled as such, and never look into if it’s actually true.

    Foreign minister Baerbock claimed she personally saw, on video, evidence of rape on Oct 7, even though actual investigations by the UN and others have found no footage like that. She was being heckled at the time by pro-Palestine activists and just made that up, so it looks to an misinformed audience like they’re booing rape victims. And people believe this because the press never pushes back on these false claims.

    Just straight up inventing blatant lies to cover for the genocide they’re committing. How tf can these people sleep at night?


  • Yeah sorry then. It would be good to not use ls in your example though, someone who doesn’t know about that might read this discussion and think that’s reasonable.

    As for your original question, doing the foreach as a personal alias is fine. I wouldn’t use it in any script, since if anyone else reads that, they probably already know about xargs. So using your foreach would be more confusing to any potential reader I think.


  • Don’t use ls if you want to get filenames, it does a bunch of stuff to them. Use a shell glob or find.

    Also, because filenames can have newlines, if you want to loop over them, it’s best to use one these:

    for x in *; do do_stuff "$x"; done # can be any shell glob, not just *
    find . -exec do_stuff {} \;
    find . -print0 | xargs -0 do_stuff # not POSIX but widely supported
    find . -print0 | xargs -0 -n1 do_stuff # same, but for single arg command
    

    When reading newline-delimited stuff with while read, you want to use:

    cat filenames.txt | while IFS= read -r x; do_stuff "$x"; done
    

    The IFS= prevents trimming of whitespace, and -r prevents interpretation of backslashes.


  • SDL3 has a new “GPU” API, which is some kind abstraction over Vulkan/DirectX12/Metal. I imagine it hides a bunch of boilerplate as well. With this, I think, one could do a 3D render engine without having to directly use the Vulkan API (or OpenGL, …). However, the shaders need to be in whatever format the backend expects it seems.






  • Edit: You are right. I looked it up:

    There seems to be an actual technical difference, in the kernel, between an initrd and an initramfs. An initrd is apparently mounted like a normal file system, it’s just in RAM instead of a backed by a block device. An initramfs is a tmpfs into which a (usually cpio) archive is extracted into. The initramfs apparently would be preferable generally, because the kernel understands that it’s a ramdisk, whereas with an initrd it would go through the block device layer, which would mean it would use more ram: If you read a file from an initrd, the kernel would copy the file to ram (unnecessarily, since it’s already in ram) like it would for a filesystem on disk, but for a tmpfs/initramfs, it understands it doesn’t need to do that.

    From a user’s perspective there is no significant functional difference I don’t think, and I don’t think this relevant to OP’s question, that probably has more to do with the userspace tools.


  • Since it doesn’t happen on Windows, it’s probably a driver issue. You can try a newer (or older) kernel, and you can try to report this to your distro or upstream (probably the Linux kernel mailing list, in this case). Both have a low probability of helping you. You could try and debug this, but that likely requires some advanced skills.


  • So, firstly, about the nomenclature: initrd (initial ram disk) and initramfs (initial ram file system) are usually used interchangeably as far as I know. For example, even though my Debian uses initramfs-tools, the generated images are called /boot/initrd.img-*. (Edit: There is a technical difference but an initramfs may be referred to as an initrd (like in this case) due to how similar they are.)

    For example, when installing a kernel, apt shows this output on my Debian machine:

    linux-image-6.12.6-amd64 (6.12.6-1) wird eingerichtet ...
    /etc/kernel/postinst.d/initramfs-tools:
    update-initramfs: Generating /boot/initrd.img-6.12.6-amd64
    

    What you’re talking about is probably the software used to generate this initial ramdisk, which on Debian is done using initramfs-tools (which contains the mkinitramfs command), while on other distros dracut (command: mkinitrd) might be used.

    I will say it strikes me as weird that Devuan doesn’t use initramfs-tools since it’s a Debian derivative. Maybe you are mistaken about this? Possibly no initrd/initramfs is used at all on this specific Pi version of Devuan? IDK.

    Edit: See my other comment. I’m wrong. There is an actual technical difference between initrd and initramfs, but I don’t think that’s actually relevant in this situation. Or rather, both are functionally the same, so it doesn’t really matter from the perspective of the user or distro that there’s a difference. I will keep the rest of the comment as is, since I do reckon OP’s problem is unrelated to this difference, and that probably something else is tripping up OP.



  • whole lot of annoyance over so-called anti-establishmentarianists who rather talk Linux for months on end with no actual plan of moving even though they talk as if they have one, that fucking ticks me off, and I feel as if it’s everywhere because people wanna fit in

    Yeah you’re keeping it real, fucking posers amiright? You’re sooo mad at all these phonies just trying to fit in.

    I seriously hope you’re just a teenager because that means you’re going to grow out of this phase, otherwise this is just sad.





  • ls inherits stdout/stderr from bash, and then writes directly to that, which in this scenario is the pty (pseudo teletype) device created by xterm. Bash isn’t involved in forwarding that. The ls output goes via the pty device driver in the kernel straight to xterm, bash doesn’t see it.

    In order for what you’re suggesting to work, bash would have to open up it’s own pty, which it doesn’t. But something like tmux does. Hence why I wrote you’d need to make a shell/tmux hybrid. The bash/tmux hybrid could then intercept the ls output and forward it to the xterm pty, like you are imagining. But tmux (or screen) are complex pieces of software, basically full terminal emulators. Adding an overlay (or whatever) feature to xterm for bash to use would surely be less complicated. Though I guess with how many terminal emulators there are, you’d need to convince at least the most popular ones to implement that (good luck). So both ideas, while theoretically possible, seem like non-starters. Too much thankless work and plenty of pushback I imagine.