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

help-circle

  • https://lwn.net/Articles/335415/

    The evince PDF reader ran into this issue back in 2005. It is now rare to find a distributor shipping a version of evince which implements copy restrictions. Xpdf implements copy restrictions unconditionally, but Debian patched that code out in 2002, and that patch has spread to other distributors as well. In general, as one would expect, free PDF readers tend not to implement this behavior. Okular is about the only exception that your editor can find; it’s interesting to note that the version of Okular shipped with Fedora Rawhide also implements copy restrictions by default. Perhaps this behavior is result of the relative newness of this application; as it accumulates more users, the pressure for more user-friendly behavior is likely to grow.


  • Another downside of flatpak is that I don’t trust upstream devs to have my best interests at heart, but I trust Debian developers far more. I’ve seen upstream do some annoying or stupid shit and the Debian maintainers not budging.

    I think it was poppler or evince that decided they were going to enforce the no-copy-and-paste bit you can set on pdfs. Debian patched it out. I’ve seen Mozilla decide they were going to enforce their trademarks. They carved out special exceptions for various distros but that still would have meant you would have to rename Firefox if you were to fork Debian. Debian had none of it. There were many dodgy copyright and licensing problems upstream devs gave no shit about. Debian not including these often eventually put pressure on them to fix this shit or for some replacement to get developed.






  • Oh yeah that’s where I was getting at, but I didn’t have time to write that out earlier. I agree that OP probably pulled out the usb stick before buffers were flushed. I imagine that direct I/O would mitigate this problem a lot because presumably whatever buffers still exist (there would some hardware buffers and I think Linux kernel I/O buffers) will be minimal compared to the potentially large amount of dirty pages one might accumulate using normal cached writes. So I imagine those buffers would be empty very shortly (less than one second maybe?) after dd finishes, whereas I’ve seen regular dd finish tens of seconds before my usb stick stopped blinking it’s LED. Still if you wait for that long the result will be the same.






  • It’s about as unhinged as someone assembling their own bicycle really. Most people (well, in a reasonably bikeable place, i.e. not in the US) just use their bikes for commuting or whatever, and don’t want to assemble a bike (I sure don’t). Some people like tinkering with their bikes though. That’s totally fine.

    If you’re not prepared to get your hands dirty, don’t buy bike parts you have to assemble yourself. And don’t install Arch. You are correct in the assessment that Arch isn’t for you (or me).

    There are bicycle repair shops, but there are no Arch repair shops. You have to be able to fix it yourself. OP is correct: Don’t recommend Arch to people who can’t do that. Recommend something that doesn’t push bleeding edge untested updates on its users, because it will break and the user will have to fix it themself.

    tl;dr: Arch existing is fine, in the same way any tinker hobby is fine. What is not fine is telling people to use it that just want to get work done or won’t know how to fix it.


  • MEM% for each NetworkManager process is 0.4 % of 3.28 G ≈ 13.1 M. Additionally, almost certainly most of this will be shared between these processes, as well as other processes, so you cannot just add them together.

    The virtual size (315M) is the virtual memory. Quite clearly only 13.1 M of this are actually in use. The rest will only start getting backed by real physical memory if it is being written to.

    The way this works is that the process will get interrupted if it writes to a non-physical memory location (by the memory management unit (MMU); this is known as a page fault), and executions jumps to the kernel which will allocate physical memory and alter the virtual memory table, and then proceed with the execution of the write operation.

    Many programs or library functions like to get way larger virtual memory buffers than they will actually use in practice, because that way the kernel does all this in the background if more memory is needed, and the program doesn’t need to do anything. I.e. it simplifies the code.


  • gnuhaut@lemmy.mltoLinux@lemmy.mlResigning as Asahi Linux project lead
    link
    fedilink
    arrow-up
    16
    arrow-down
    1
    ·
    edit-2
    27 days ago

    I’m not just talking about the US police. I’ve never been to the US, and I assure you the police is shit here too. Ts’o is American, and that “thin blue line” saying seems especially American or Anglo. I’ve never heard that over here. So I’m not sure how that’s even relevant to the discussion.


  • I fail to see how anyone could interpret what can only refer to holding the line as not a heroic act and a military metaphor. And that’s how it’s used, and that’s what it means, and that’s where it comes from.

    And Ts’o clearly knows this as well, since it he appropriately uses it as a metaphor for keeping chaos at bay and out of the kernel.


  • gnuhaut@lemmy.mltoLinux@lemmy.mlResigning as Asahi Linux project lead
    link
    fedilink
    arrow-up
    32
    arrow-down
    6
    ·
    edit-2
    27 days ago

    I usually see “thin blue line” (and the flag) used by reactionaries, racists, and white nationalists. Especially since BLM. Don’t know what sort of politics Ts’o has, other than he’s probably not an anarchist (ACAB!), but I guess (benefit of the doubt and all) he could be some ignorant lib with a head full of copaganda, so getting out the code of conduct for racist dogwhistles might be a bit premature.

    It comes from The Thin Red Line, which is about some Scottish regiment standing up to a Russian cavalry charge. Even if you don’t know that, it seems quite obviously a military metaphor, and that indicates a militaristic view of what policing should be like, veneration of the police as heroes, and total ignorance about what the police actually are and do.



  • 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.