Reddit all over again.
I’m here to stay.
Reddit all over again.
Especially if you have to use unsafe libraries from C, or use any unsafe block at all to do low level programming or for performance.
Yes. And this has huge implications, as as root user in Vim you can load and edit other files. While sudoedit
is limited to your personal environment, as while the editing process no root privileges are in use. (I think…)
Not even a joke, I was sleepy (before going to bed) when making this post. :D So not sure why I said this. I like how the replies have good faith and trying to find a reason.^^ lovely community
Good point. I was always wondering how secure this is, as it works with copies of the files in my environment. Because I’m in my personal environment, doing sudoedit /etc/fstab
does not let me edit other files from root while in that file. That means if any of the plugins from Vim tries to, they can’t edit arbitrary files, right? (If you don’t trust the plugin, then don’t use, but that’s another topic.) Little side note, just learned that sudoedit ~/.bashrc
does not allow me to edit files in my home too.
I didn’t do anything special to make that work. The variable export EDITOR='nvim'
is set in my “.bash_profile” file in “Home” directly. The point of sudoedit is to use your personal environment, so it should pick it up. If there is any configuration needed to make this work, then I"m not aware of it.
I use LazyVim too BTW. You mean it would not use in sudo environment or in your current environment?
Pain is the best teacher.
Defaults are not always the best setting for a specific user or system. Defaults are often fail safe settings that should work on most systems out of the box. That does not mean other settings aren’t better on your system. Often you can tweak settings to get better results, that are best on YOUR machine and setup.
But only, if you know what you are doing, or if you want to learn about it.
I also have a 32gb RAM (30.5 GiB) and a swappiness value of 10. My entire swap is full and my RAM is only filled up to about 3.8 GiB. However my swap is just 512mb small (its not a typo, it’s half a GB). You should not worry too much, even if the swap is in use, because those parts are probably like “parked” ram area that is not in use for a while now and waiting “to be waken up”. And the performance penalty is not that big, if the swap is on a fast NVME SSD. In old days on old slow spinning hard drives, the penalty for using swap was huge (plus the Kernel and rest of operating system was not fine tuned as today).
Some related commands to check:
grep -H swappiness /etc/sysctl.d/*.conf
swapon --show
free
cat /proc/meminfo
Here is an interesting article: https://chrisdown.name/2018/01/02/in-defence-of-swap.html
Learning by doing, but make backups.
OH right, now it works for me too. Must be a temporary thing. Thanks for the reply, everything fine now.
Edit: All fine now. It was only a temporary thing.
I get a bad Gateway error. Does this link work for anyone? Or did Valve take the document down / private?
Then you were “lucky” (given you neglected this part for more than 5 years). Depending on what packages and configuration you have, you MUST do manual intervention to have a working and optimal system. While you were lucky, I wouldn’t recommend anyone to ignore the posts on https://archlinux.org/news/ , there are only couple of short posts per year, so not really a time waste.
Before my switch, i used Ubuntu exclusively for 13 years in row. I always heard of problems (and not at least because of the PPA repositories) when upgrading from one major version to the next, be it a LTS or not. I never did that and always installed fresh because of these stories. Mostly 4 years in between, or sometimes 2.
Its entirely possible that most problems happened because of packages from PPA that the user did not change for the new upgrade. Because PPA repositories were often designed for a specific version of Ubuntu. So its not entirely the fault of the apt
package manager in that case.
Read the manual intervention notes from Arch that could be important. And do the update. That’s normal and nothing to worrry about, if you know what you are doing.
I don’t think this is true. The package manager is there for a reason to prevent that. If you have more updates to install at a time, then the chances are the same as if you would have installed the problematic update one at a time. Just read the manual intervention information from Arch and see if there is something to do, then it won’t bork. If people don’t know what they are doing and do not read the additional information (that is required to do so on Arch), well yes, then you could end up borking your machine. But not because so many updates are installed at a time. The package manager and operating system and their maintainer designed it in a way that you can install ton of updates at a time without borking. This is fine.
Sure, and that’s exactly what you want if you are on a rolling release, isn’t it? If you neglect the rolling release for a month, what did you expect would happen? Also if you have more apps and packages, the more updates will come out. Rolling releases are for people who maintain the system and care about the updates.
So you neglected the operating systems maintained regularly, despite it being a rolling release? I assume you didn’t read the manual intervention instructions that are posted regularly too. I don’t understand people using a rolling release and then not caring about the maintenance. Off course it won’t end very well.
Yeah. Lot of people also use Ai generated code… so…
I have tested if clippy would warn me with a simple example (generates 6.7gb memory usage, be careful not to crash your computer if you add another 0…), while I watch with a system monitor (in KDE):
use std::thread; use std::time; fn main() { let mut vec = Vec::new(); // Create an empty Vector. for number in 0..900000000 { let bign: i64 = number * number; vec.push(bign); } thread::sleep(time::Duration::from_secs(10)); }
I used the pedantic option of clippy and the only thing it complained was about the notation of the number…:
$ cargo clippy -- -W clippy::pedantic warning: long literal lacking separators --> src/main.rs:7:22 | 7 | for number in 0..900000000 { | ^^^^^^^^^ help: consider: `900_000_000` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal = note: `-W clippy::unreadable-literal` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::unreadable_literal)]` warning: `notright` (bin "notright") generated 1 warning Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.00s