It’s Gentoo, but for cowards.
- 1 Post
- 60 Comments
I think this image is over 10 years old by now. It was created before “vibe coding” was a thing.
I suppose to rescue it you can grab a portable Python release and use that to emerge a proper one, another option would be booting into a live environment. And to cause this,
--unmergeand--rage-cleanare your friends. No idea how you’d do that “accidentally”, though.
It’s been greatly improved over the last two years. If you are actually interested in setting it all up, I highly recommend checking out the LVRA Wiki. There are Discord and Matix links there if you need any help.
TwilightKiddy@programming.devto
linuxmemes@lemmy.world•Running the joke to the groundEnglish
5·4 months agoIf you want a modal editor, you can also give Helix a try. Many people find it easier to use if you are coming in with no prior modal editor experience.
TwilightKiddy@programming.devto
linuxmemes@lemmy.world•mine is Atlantis Word Processor, what's yoursEnglish
41·4 months agoWhat formats are we talking about, exactly?
Install Gentoo.
.for_each(|((_, _, t), (_, _, b))| { ... }This is actually fairly similar to what C# has.
This is a closure syntax:
| arguments | { calls }In C#, the closest is lambda expressions, declared like this:
( arguments ) => { calls }Parentheses are tuple deconstructors. In C# you have exactly the same thing. Imagine you have a method that returns a two element tuple. If you do this:
var (one, two) = MethodThatReturnsATuple();You’ll get your tuple broken down automatically and variables
oneandtwodeclared for you.First of all, I’m using
.zip()to pair the rows of the picture by two, that returns a tuple, so, I have to deconstruct that. That’s what the outer parentheses are for. The pixel enumeration stuff I’m using returns a tuple(u32, u32, &Rgba<u8>)first two values are x and y of the pixel, the third one is a reference to a structure with color data. I deconstruct those and just discard the position of the pixel, you do that with an underscore, same as C#.I’m not that far into learning myself, but I’m not a textbook learner at all. Poking around opensource projects and wrestling with the compiler prooved to educate me a lot more.
As an extra optimization, if top and bottom colors of a pixel match, you can just output space and only set background color. Implemented correctly, this can save a lot of memory. Didn’t want to make the code more complex in fear of people being scared of running it.
I gladly present you this jank.
You might need these to compile:
cargo add image cargo add clap --features deriveAnd the jank itself:
Some Rust code
use std::path::PathBuf; use clap::Parser; use image::{ imageops::{self, FilterType}, ImageReader }; #[derive(Parser)] struct Cli { path: PathBuf, #[arg(short = 'H', long, default_value_t = 30)] height: u32, #[arg(short, long, default_value_t = 0.4)] ratio: f32, #[arg(short, long, default_value_t, value_enum)] filter: Filter, } #[derive(clap::ValueEnum, Clone, Default)] enum Filter { Nearest, Triangle, Gaussian, CatmullRom, #[default] Lanczos3, } fn main() -> Result<(), Box<dyn std::error::Error>> { let args = Cli::parse(); let filter = match args.filter { Filter::Nearest => { FilterType::Nearest }, Filter::Triangle => { FilterType::Triangle }, Filter::CatmullRom => { FilterType::CatmullRom }, Filter::Gaussian => { FilterType::Gaussian }, Filter::Lanczos3 => { FilterType::Lanczos3 }, }; let img = ImageReader::open(args.path)?.decode()?; let original_ratio = img.width() as f32 / img.height() as f32; let width = ( args.height as f32 / args.ratio ) * original_ratio; let out = imageops::resize(&img, width as u32, args.height * 2, filter); let mut iter = out.enumerate_rows(); while let Some((_, top)) = iter.next() { let (_, bottom) = iter.next().unwrap(); top.zip(bottom) .for_each(|((_, _, t), (_, _, b))| { print!("\x1B[38;2;{};{};{};48;2;{};{};{}m\u{2584}", b[0], b[1], b[2], t[0], t[1], t[2]) }); println!("\x1B[0m"); } Ok(()) }
TwilightKiddy@programming.devto
linuxmemes@lemmy.world•What's your favourite OS that does not use systemd?English
5·6 months agoI use Gentoo. I install systemd willingly. We are not the same.
How did we arrive at networking? I feel like we are on two completely different pages.
I was talking about your regular end user machines, what we usually call “desktop computers”. They are connected to the internet, but I don’t have any way to remotely login into those. And I have a single person per computer. There is no need to disable root passwords on these, seeing that Larry executed a command as root won’t provide any insight, I know that Larry is the only person who uses the machine. And it can complicate things in a sense that if Larry fatfingers his password three times and gets locked out, I’ll have to get into his filesystem somehow and remove tallies manually instead of just logging in as root and doing
faillock --reset.
So, we are clearly talking about different environments here. Of course I would not have a password for root in an enterprize setting where you have a lot of different people managing one machine. But for your regular desktop computer with one user, it just complicates things needlessly without providing any benefits.
Maybe I’m a bit ignorant, but would it make much of a difference? Whether I authenticate with my own account to get root permissions or directly with root, I still have a string of characters which I use to get root priveleges on my machine. For a single (physical) user machine, that allows me to use a separate password for root. Should be better than using the same one twice, right?
Have you heard of
su?
I call this part “shut up, tin can, I know what I’m doing”.
Sometimes you just don’t care about these 42 files
findcouldn’t access. If I don’t have permissions to read them, I’m not interested!
TwilightKiddy@programming.devto
linuxmemes@lemmy.world•Your favorite font for terminal and GTK/QT apps?English
7·7 months agoInconsolata LGC with nerd-fonts. I edit all my text and code in Helix, a TUI editor, and having proper support for Cyrillic and Greek is important for me. Also, I like how it looks.
TwilightKiddy@programming.devto
linuxmemes@lemmy.world•Which distribution should I recommend to beginners to scare them?English
4·7 months agoThat depends on what your goals are. And with Gentoo you can have a lot more elaborate goals than with other distros. Mine, for example, was to get rid of initramfs. I spent a week compiling and recompiling the kernel with different configurations before I was able to see a TTY for the first time.
Of course you can grab your distribution kernel and get default and perfectly safe use flags for everything, but, I would still be an Arch user if that was my jam.
TwilightKiddy@programming.devto
linuxmemes@lemmy.world•Which distribution should I recommend to beginners to scare them?English
101·7 months agoI switched from Arch to Gentoo, for me it’s just the next step of taking advantage of every last bit of my hardware. But unless you are seriously invested, I would never recommend Gentoo to someone. If you just want something that’s up to date, go with Fedora. If you have some spare time, go with Arch. If you have no hobbies at all, go with Gentoo.

I know, love, I’m just joking around.