Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)O
Posts
4
Comments
44
Joined
3 yr. ago

  • I would say it's very useful when you are looking for one specific pattern, which happens a lot with Option<T>. Plus, being able to chain it in if / else if / else chains helps with organizing the code. It generally doesn't grow as deep as with match.

    That said, match is fantastic and it's totally fine to prefer using it. if let and let else are there for those cases when you tend to discard or not need to use the other values than the matched one. How often that happens depends on what you are doing.

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

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

  • I assumed the handles are for chairs that are overly heavy and hard to grip.

  • That's nice to hear! And the Ok* color spaces are indeed quite neat

  • 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.

  • Förutom att välja de som verkar mest intressanta (finska vinterkriget är en bra klassiker) skulle jag också säga att man kan börja med de senaste och gå bakåt. De har en del repriser med bättre ljudkvalitet som man lätt missar annars. Enstaka serier är de enda man kan behöva se till att man börjar i rätt ände av, men de är tydligt numrerade eller ihopklippta.

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

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

  • It may be possible to use the Any trait to "launder" the value by first casting it to &amp;Any and then downcasting it to the generic type.

     
        
    let any_value = match tmp_value {
        serde_json::Value::Number(x) => x as &amp;Any,
        // ...
    };
    
    let maybe_value = any_value.downcast_ref::&lt; T >();
    
      

    I haven't tested it, so I may have missed something.

    Edit: to be clear, this will not actually let you return multiple types, but let the caller decide which type to expect. I assumed this was your goal.

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

  • I considered the smaller one at first, but decided to take the larger one and use the compression straps to keep it tight when packing a smaller volume. It doesn't feel as bulky as I thought it would at first.

  • 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!

  • Also the Swedish classic "glida in på en räkmacka" ((to) slide in on a shrimp sandwich), which basically means to end up somewhere (location, career, situation) without any difficulties. The shrimp sandwich symbolizes a life without difficulties or in some luxury.

    Then there's also "halka in på ett bananskal" ((to) slip in on a banana peel), which is similar to the above, but not always favorable and you don't have any plan or preparation. You just winged it or it just happened by accident.

  • Absolutely, I didn't mean to suggest otherwise. :) I'm just giving a bit of context and perspective from someone who has used it for a while.

  • 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.

  • They interviewed multiple eye witnesses.

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

  • 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.