• 3 Posts
  • 34 Comments
Joined 2 years ago
cake
Cake day: July 6th, 2023

help-circle

  • I gave this a quick look at 2X speed with a lot fast seeking, and my brain still hurts.

    First of all, and concerning Rust, please familiarize yourself with the mem module and its functions at least. You didn’t even get near a situation where using unsafe{} was actually required.

    Second of all, and concerning the task at hand itself, for someone who knew to make the distinction between bytes and chars, you should have known about grapheme clusters too. There are a lot of multi-char (not just multi-byte) graphemes out there. You can make a “Fun With Flags” 😉 segment to show that off (no attribution required). Just don’t do anything silly, and make sure to just utilize the unicode-segmentation crate.


  • sudo is NOT a part of coreutils. Anyone with basic *nix knowledge would have known this.

    sudo-rs, as expected, is also NOT a part of uutils. And the projects happen to be very different in many aspects. uutils started from scratch as a hobby side-project, and it was developed from the start in idiomatic Rust. It can’t directly take anything from the GNU implementation anyway, as explained in their README. sudo-rs however is a funded effort to translate some C projects into Rust with as little unsafe{} as possible. Some of the code was directly translated from the original implementation. And if you look at the code in general, you will see that it’s rather low-level and looks more like C than Rust in many parts. Some of this is arguably necessary given the nature of sudo functionality, but not all of it.

    Both projects do share the fact that they probably didn’t push for distros, Ubuntu or anyone else, to switch to either of them by default already, and both were probably surprised it happened this soon.

    And yes, this exposure, negative as it may seem for now, is an unavoidable “teething” period, and it’s going to be of great benefit to both projects on the long run. Hopefully, Ubuntu users living on the edge wouldn’t face too much trouble meanwhile.

    (I don’t use Ubuntu, but have been using sudo-rs by default for months.)



  • The point is compression.

    % swapon
    NAME           TYPE      SIZE USED  PRIO
    /dev/nvme0n1p2 partition   8G   0B     5
    /dev/sda2      partition  32G   0B    -2
    /dev/zram1     partition 3.5G 1.8G 32767
    /dev/zram2     partition 3.5G 1.8G 32767
    /dev/zram3     partition 3.5G 1.8G 32767
    /dev/zram4     partition 3.5G 1.8G 32767
    /dev/zram5     partition 3.5G 1.8G 32767
    /dev/zram6     partition 3.5G 1.8G 32767
    /dev/zram7     partition 3.5G 1.8G 32767
    /dev/zram8     partition 3.5G 1.8G 32767
    
    % zramctl
    NAME       ALGORITHM DISKSIZE   DATA  COMPR  TOTAL STREAMS MOUNTPOINT
    /dev/zram8 zstd          3.5G 293.4M 189.2M 192.5M         [SWAP]
    /dev/zram7 zstd          3.5G 282.1M 187.5M   192M         [SWAP]
    /dev/zram6 zstd          3.5G 284.6M 189.4M 192.9M         [SWAP]
    /dev/zram5 zstd          3.5G 297.8M 197.3M 200.1M         [SWAP]
    /dev/zram4 zstd          3.5G 304.9M 202.9M 206.7M         [SWAP]
    /dev/zram3 zstd          3.5G 300.7M 201.9M 204.6M         [SWAP]
    /dev/zram2 zstd          3.5G 311.3M 207.2M 210.6M         [SWAP]
    /dev/zram1 zstd          3.5G 307.9M 210.5M 213.3M         [SWAP]
    /dev/zram0 zstd          <not used for swap>
    

    • Use zram devices equal to the number of threads in your system.
    • Use zstd compression.
    • Mount zram devices as swap with high priority.
    • Mount disk swap partition(s) with low priority.
    • Increase swapiness:
         sysctl vm.swappiness=<larger number than default>
      
    • Use zramctlto see detailed info about your zram disks.
    • Check with iotop to see if something unexpected is using a lot of IO traffic.




  • Early Mandriva with KDE 3.4 or 3.5 I think, but I can barely remember anything with clarity. It couldn’t have been bad though, since I haven’t used Windows on my own devices since 😉.

    From my foggy memory, I think it was good for my then nocoder self, easy to use, stable, relatively lite, and had good looks.

    I missed the Mandrake and pre-Fedora Red Hat era, but not by much.









  • Didn’t click on your links. But LEA does this move against any network that may offer anonymization. Don’t use Tor hidden services. Don’t go near I2P. Stay away from Freenet…etc. This even includes any platform that is seen as not fully under control, like Telegram at some point.

    In its essence, this move is no different from “Don’t go near Lemmy because it’s a Putin-supporting communist platform filled with evil state agents”.

    Does any network that may offer anonymization (even if misleadingly) attract undesirable people, possibly including flat out criminals? Yes.

    Should everyone stay away from all of them because of that? That’s up to each individual to decide, preferably after seeing for themselves.

    But parroting “think of the children” talking points against individual networks points to either intellectual deficiency, high susceptibility to consent-manufacturing propaganda, or some less innocent explanations.


  • Apologies if I was presumptions and/or my tone was too aggressive.

    Quibbling at No Moderation = Bad usually refers to central moderation where “someone” decides for others what they can and can’t see without them having any say in the matter.

    Bad moderation is an experienced problem at a much larger scale. It in fact was one of the reasons why this very place even exists. And it was one of the reasons why “transparent moderation” was one of the celebrated features of Lemmy with its public Modlog, although “some” quickly started to dislike that and try to work around it, because power corrupts, and the modern power seeker knows how to moral grandstand while power grabbing.

    All trust systems give the user the power, by either letting him/her be the sole moderator, or by letting him/her choose moderators (other users) and how much each one of them is trusted and how much weight their judgment carries, or by letting him/her configure more elaborate systems like WoT the way he/she likes.



  • Not only is IPFS not built on solid foundations, offered nothing new to the table, and is generally bad at data retention, but the “opt-in seeding” model was always a step backwards and not a good match for apps like plebbit.

    The anonymous distributes filesystem model (a la Freenet/Hyphanet) where each file segment is anonymously and randomly “inserted” into the distributed filesystem is the way to go. This fixes the “seeder power” problem, as undesirable but popular content can stay highly available automatically, and unpopular but desirable content can be re-inserted/healed periodically by healers (seeders). Only both unpopular and undesirable content may fizzle out of the network, but that can only happen in the context of messaging apps/platforms if 0 people tried pull and 0 people tried to reinsert the content in question over a long period of time.