[-] [email protected] 43 points 4 months ago

๐Ÿ’โ€โ™‚๏ธ๐Ÿฆ‹

[-] [email protected] 13 points 8 months ago

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

[-] [email protected] 13 points 9 months ago

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

[-] [email protected] 19 points 11 months 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.

[-] [email protected] 18 points 1 year 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/std/option/enum.Option.html#impl-From%3CT%3E-for-Option%3CT%3E

16
submitted 1 year ago by [email protected] to c/[email protected]

The maintainer here! Feel free to ask questions. I know especially CAM16 can feel a bit abstract if you aren't in the loop, but I will try to answer what I can. I have tried my best to explain the concepts in the docs, but it can always be better.

[-] [email protected] 16 points 1 year 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.

[-] [email protected] 32 points 1 year ago* (last edited 1 year ago)

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

[-] [email protected] 13 points 1 year ago

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

11
submitted 1 year ago by [email protected] to c/[email protected]

Just to reiterate what the linked blog post mentions; this isn't a bug with Iced, specifically, but seemed to have been brought into light by having Iced 0.12.0 among the dependencies. Many variants of this bug has been reported to the Rust compiler repository and some seem to be fixed by the next trait resolver.

25
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]

Hey, folks! Here's another update for Palette, the color crate I'm maintaining. Feel free to let me know if you have any questions or feedback! I will do my best to answer.

[-] [email protected] 48 points 2 years ago

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

[-] [email protected] 15 points 2 years ago

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

[-] [email protected] 20 points 2 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!

[-] [email protected] 22 points 2 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.

11
submitted 2 years ago by [email protected] to c/[email protected]

I suppose I should start posting updates here too. ๐Ÿ˜

view more: next โ€บ

Ogeon

0 post score
0 comment score
joined 2 years ago