5
47
Ogeon

@programming.dev

Ogeon 48 points 3 years ago

It's useful for keeping track of your mental gymnastics.

path: 0 5204756 5211151, hotness: undefined, score: 48, children: 1
Ogeon 43 points 2 years ago

💁‍♂️🦋

path: 0 15249941 15259677 15264165, hotness: undefined, score: 43, children: 0
Ogeon 32 points 3 years ago

Ah, taking inspiration from late 1940's literature, I see. Smart!

path: 0 9224273, hotness: undefined, score: 32, children: 0
Ogeon 22 points 3 years ago

Static types aside, the file system has a lot of failure cases, which every language is affected by, and Rust makes them very visible. This can indeed feel like a lot, but it's an intentional feature and makes more sense in larger projects. I guess the feeling may get amplified by the author's style of long form posts with a lot of details.

Error handling in practice contains a lot of "let the caller deal with it", using the ? operator to pass errors up the call stack. The more verbose options are for when you need to actually handle it.

path: 0 3767088 3767631, hotness: undefined, score: 22, children: 2
Ogeon 20 points 3 years ago

Got myself a proper hiking backpack. An Osprey Exos 58L. Shifting much of the weight to the hips makes a massive difference and my back was very happy!

path: 0 4253158, hotness: undefined, score: 20, children: 2
Ogeon 18 points 2 years ago

I was a teacher's assistant in beginner's programming at university for a bit. I expected them to learn C, which I knew enough of, but I got assigned to a group that learned Python instead. I had never used Python at the time. I ended up having to speed learn it while trying to teach it, to not be completely useless.

path: 0 11291855, hotness: undefined, score: 18, children: 4
Ogeon 17 points 2 years ago

Option<T> has a From<T> implementation that lets you write Option::from($file_path).map(|path| path.to_string()) to accept both cases in the same expression.

https://doc.rust-lang.org/...

path: 0 10660742, hotness: undefined, score: 17, children: 4
Ogeon 16 points 2 years ago

A "mantra" more programmers should have is to fix the cause of the issue, and not just the symptoms. You have to understand what the problem is to be able to fix it.

path: 0 9507673, hotness: undefined, score: 16, children: 0
Ogeon 14 points 3 years ago

My shower has its own favorite temperature and will slowly readjust itself to it.

path: 0 4272690, hotness: undefined, score: 14, children: 0
Ogeon 13 points 2 years ago

Reject C, return to assembly. Structured programming is the true oppression our generation never talks about.

path: 0 12606156, hotness: undefined, score: 13, children: 0
Ogeon 13 points 2 years ago

A relatively cheap PC with Factorio and you are set. You won't spend much on food either, so win-win.

path: 0 13153920 13154454 13155493, hotness: undefined, score: 13, children: 0
Ogeon 12 points 3 years ago

I'm of course only one single anecdotal sample, but the release cadence has probably been the least of my problems. My experience is that it's fine to not update for quite some time. I have a crate with 1.60 (released about one and a half years ago) as MSRV, which means I run unit tests with that version, as well as stable, beta and nightly. The only pressure to upgrade is that some dependencies are starting to move on. Not that the newer compilers reject my code, not even anything deprecated.

Also, small, frequent releases usually takes away a lot of the drama around upgrading, in my experience. Not the opposite. A handful of changes are easier to deal with than a whole boatload. Both for the one releasing and for the users.

path: 0 3466781 3472540, hotness: undefined, score: 12, children: 0
Ogeon 12 points 2 years ago

Zooming in? In this economy?!

path: 0 10384951 10385046 10387202, hotness: undefined, score: 12, children: 0
Ogeon 11 points 3 years ago

Simple features are often complex to make, and complex features are often way too simple to make.

path: 0 7908288 7908550 7913259, hotness: undefined, score: 11, children: 1
Ogeon 11 points 2 years ago

That's definitely part of "the deal" with MIT and Apache. The other end of it is that they shouldn't really expect to get anything more than what the authors are willing to give.

path: 0 10770672 10772301, hotness: undefined, score: 11, children: 0
Ogeon 8 points 2 years ago

How much is that in ™?

path: 0 9923423 9923900 9924115 9927000 9934368 9936312, hotness: undefined, score: 8, children: 1
Ogeon 8 points 3 years ago

I don't know, something about seeing the same diarrhea pills ad over and over doesn't exactly spark joy for me.

path: 0 4827148, hotness: undefined, score: 8, children: 0
Ogeon 6 points 3 years ago

To make things worse, that teapot doesn't have a bottom surface.

path: 0 3658196, hotness: undefined, score: 6, children: 4
Ogeon 6 points 2 years ago path: 0 11234290 11239551 11241322, hotness: undefined, score: 6, children: 2
Ogeon 6 points 3 years ago

ICC profiles are definitely part of the field, but that's sort of a topic of its own. At least in terms of scope. The color space rabbit hole is so deep that I never got as far as including them. There are other crates that go into those parts and it should be easy to bridge between them and Palette.

I would say Palette is more for the "business logic" of working with colors, so converting, manipulating and analyzing. The difference from ICC profiles when converting with Palette is that you need to know more about the source and destination color spaces during compile time. ICC profiles use more runtime information.

Palette could be used for applications like image manipulation programs, 3D rendering, generative art, UI color theme generation, computer vision, and a lot more. A lot of people also use it for smaller tasks like converting HSL input to RGB output or making gradients.

path: 0 7110976 7112689, hotness: undefined, score: 6, children: 1

thanks for using Leebra!

go to feed...