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

help-circle
  • You should have a live USB of the distro you want to use and ensure you have backups of all the data you care about. Then the easiest/quickest/least error prone way is to just wipe the whole drive and reinstall the distro from the live USB. They typically have an option to wipe and install things from an empty drive. Then just restore your data from your backups.

    You could also, after creating backups, from a live USB environment delete the windows partitions and resize the linux ones - being careful not to delete the EFI partition as that is where the boot loader lives. You can optionally delete the windows boot loader from the EFI partition as well. If done right you should still be able to boot into your linux system afterwards though when missing with partitions like this, especially when you don’t know what you are doing, it can be easy to break the boot systems. These can be fixed from a live environment and there are many guides out there on how to do that.

    You can always just reinstall the system again if you mess things up and cannot figure out how to fix them - so always prep for that case by backing up everything you care about first.






  • Yeah, and sudo is not some special case either as there are plenty of CVEs for sudo specifically due to buffer overflow or other memory issues over the years. There are likely more hiding and waiting to be found.

    Only issue here is sudo is a lot more mature then sudo-rs and memory issues are not the only exploitable bug that can happen. It does look like sudo-rs has gone through at least one security audit though that only found a moderate and couple of low sev issues. Would be good to have more people audit it though.





  • nous@programming.devtoLinux@lemmy.mlCleaning up packages?
    link
    fedilink
    English
    arrow-up
    4
    ·
    14 days ago

    Clean orphaned dependencies: sudo pacman -Rs $(pacman -Qtdq)

    In addition to this, or rather before, you can run pacman -D --asdeps package_name to mark a package as a dep. If it is no longer required by something else it will be removed with the above. This can be useful for things that are deps that you installed manually at some point for some reason.

    And remember that you can recover from anything, even removing base packages or bootloader ones with a live cd and chroot or using pacman with a different root with the --root /mnt flag to pacman.

    Otherwise if your system still boots it is just a matter of following the install instructions for whatever is not working like you did the first time.






  • In a way that seems to be what the paper is showing evidence for. Basically they looked at what happens if you disable the optimizations the LLVM compiler does when it knows something is undefined (and thus should not appear in a well written program). And they claim to have found minimal performance regressions of which can largely be mitigated in other ways.

    And that has been the biggest argument for having UB in C/C++ - to let the compilers optimize things in ways that you cannot do if everything was well defined. This might have been true in the past when we had a lot more variation in CPU designs but this paper seems to conclude that is no longer the case. Thus raises the question as to why do we need so much UB in C/C++ any more if performance is not a bit issue for modern programs using modern CPUs.




  • Helix IMO has one huge benifit over Kakoune - inbuilt LSP and treesitter support and sane defaults. It takes the best bits of kakoune and neovim and improves on them both. This gives me an editor with enough IDE like support that I can use it for just about anything. All with only a few lines of config and zero plugins.

    This means I don’t need to spend ages trying to configure my editor to work with various languages or working around its archaic defaults. I can just install it, optionally tweak some minor settings (like the theme and turning off auto bracers), install the LSP servers for the languages I need and I can get to coding.

    And after years of fiddling with neovim/vim to get it to it behave in a reasonable, but not perfect, manor helix is a breath of free air. I did try kakoune for a very short time after getting pissed off with neovims configuration and plugins, but gave up on it quickly when I had to dive into getting more plugins configured for even basic things like LSP support (though this was years ago, back when helix was not in a daily usable state either).

    Yeah, it would be nice to have plugins in helix (and they will come one day), but IMO the saner defaults and unbuilt support for most of what I used plugins for before is far nicer than getting support for the few bits that might be missing.

    Kakoune promotes the idea that you should visually see the text you’re operating on before running the command.

    This is what helix does as well, and it shares kakounes keybindings and input system. So it is more similar to kakoune in that regard than vim with different keybindings. Really it is more of a kakoune clone, with inbuilt support for LSP and treesitter like neovim.

    For example, instead of it having a built-in sort command, you use the unix sort command to sort your lines.

    You can do this in vim and helix as well. Both can run external commands, pipe your open file to external commands or just your current selection to them. I use the unix sort in helix to sort lines all the time.