• 0 Posts
  • 23 Comments
Joined 1 year ago
cake
Cake day: August 23rd, 2023

help-circle


  • sudo@programming.devtoLinux@lemmy.mlEncrypt whole system?
    link
    fedilink
    arrow-up
    2
    arrow-down
    1
    ·
    24 days ago

    I think PopOS can safely assume that its being installed on a laptop with only one drive. If there’s multiple drives involved then the setup gets far more complicated as you then must go to something like an LUKS on LVM setup. Basically, for a desktop there’s no safe defaults for FDE.


  • sudo@programming.devtoLinux@lemmy.mlEncrypt whole system?
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    25 days ago

    I’m pretty sure all the major distros have FDE as an option in the installer its just never on by default. Fedora does the same but with BTRFS on LUKS. I’m sure Debian does. Someone else says OpenSuse does. Maybe some derivative distros don’t but I suspect the ones with an graphical installer do.












  • Very standard use case for a fold or reduce function with an immutable Map as the accumulator

    val ints = List(1, 2, 2, 3, 3, 3)
    val sum = ints.foldLeft(0)(_ + _) // 14
    val counts = ints.foldLeft(Map.empty[Int, Int])((c, x) => {
      c.updated(x , c.getOrElse(x, 0) + 1)
    })
    

    foldLeft is a classic higher order function. Every functional programming language will have this plus multiple variants of it in their standard library. Newer non-functional programing languages will have it too. Writing implementations of foldLeft and foldRight is standard for learning recursive functions.

    The lambda is applied to the initial value (0 or Map.empty[Int, Int]) and the first item in the list. The return type of the lambda must be the same type as the initial value. It then repeats the processes on the second value in the list, but using the previous result, and so on until theres no more items.

    In the example above, c will change like you’d expect a mutable solution would but its a new Map each time. This might sound inefficient but its not really. Because each Map is immutable it can be optimized to share memory of the past Maps it was constructed from. Thats something you absolutely cannot do if your structures are mutable.






  • Its unusual to install retroarch via pacman and launch it with steam. Usually its either:

    • install via pacman dont use steam at all.
    • install via steam and launch via steam.

    I suspect steam is running the retroarch with different environment variables (ie LD_PRELOAD) than your system. I dont know what those would be or what to set them to if I did.

    You can try experimenting with using steam-native and steam-runtime to check if there is a difference. You can also try to install retroarch via steam, find its executable in ~/.local/share and adjust your script accordingly.