What are some mind blowing Rust tricks?
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearTU
    tuna
    6d ago 100%

    Something i didnt know for a long time (even though its mentioned in the book pretty sure) is that enum discriminants work like functions

    #[derive(Debug, PartialEq, Eq)]
    enum Foo {
        Bar(i32),
    }
    
    let x: Vec<_> = [1, 2, 3]
        .into_iter()
        .map(Foo::Bar)
        .collect();
    assert_eq!(
        x,
        vec![Foo::Bar(1), Foo::Bar(2), Foo::Bar(3)]
    );
    

    Not too crazy but its something that blew my mind when i first saw it

    12
  • It's Friday - What are your plans for the week-end?
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearTU
    tuna
    1w ago 100%

    I want to take a look at this https://github.com/w-okada/voice-changer which is apparently a realtime ai voice changer. My friend wants to cosplay a character on his live stream and have the voice match with the visuals. Plan is to try the pre-trained models (to see if its any good) then try to train the model on as much audio we can get 💀 lol

    1
  • type the distro you use and is and let your keyboard finish it
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearTU
    tuna
    2mo ago 100%

    Arch is the only person who has been in my house for the last week and i have no clue how he is going about it and he has no clue how it is affecting him or how he feels and how it is affected me

    14
  • 196
    196 2mo ago
    Jump
    Autocorrect Rule
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearTU
    tuna
    2mo ago 100%

    Mine also starts off the exact same way?? I'm pressing the middle option

    Women are not allowed in this world anymore because of their own personal preferences or the way their body and body is designed and made and made and they have no choice to make decisions

    but right here it takes a different path:

    that make it a choice to do it and that makes them a bad person to do so they have no right of way of life or the choice that is not their right of way and that they are entitled and have to choose their choice to choose what to choose to choose to live with that choice is a right that is theirs and it's a choice and not yours

    6
  • rust
    Rust 2mo ago
    Jump
    What are you working on this week? (Aug. 25, 2024)
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearTU
    tuna
    2mo ago 100%

    i'm tricking the nintendo switch into thinking my computer is a bluetooth pro controller. I'm using a crate called bluer which exposes bindings to the BlueZ stack and it's been great to use.

    I got to the point where it pairs the controller and hits B to exit. However it doesnt seem to accept any more button presses after that... :) So I have some ways to go.

    I've also needed a project where I can challenge myself with the basics of async without it being overwhelming, and I think this hits the sweet spot. It's my first time using tokio spawn, join, and select in a real project!

    8
  • linux
    Linux 2mo ago
    Jump
    So what did it take for you to go to Linux?
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearTU
    tuna
    2mo ago 100%

    My reasons were more hardware related. When I was a bit younger my parents gave me a netbook which had 32 GB of storage, and Windows used almost all of it. I wanted to do creative projects in my free time, but I couldn't install programs or save any of my work. I would often restart to clear log files and gain a bit more working storage, which was extremely annoying because it took like 5 mins for the computer to finally settle down and be usable.

    I eventually got a 32GB flash drive which helped a lot, but it was not enough. With 4GB ram I could only have about 3 browser tabs open, and not all the programs I wanted could be run off the flash drive. It was still resource management hell.

    Somehow, some way, I learned about Linux. I got a 128GB microSD, put Mint on it. It truly set me free. I could install the software I wanted, I could make the things I wanted to make, I could open more programs at once, and I could do it all without unbearable lag. I never looked back since.

    6
  • Weekly active communities promotion thread
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearTU
    tuna
    3mo ago 100%

    !0hn0@discuss.tchncs.de

    If you'd like to learn how to speedrun a niche puzzle game, check this one out :)

    I haven't written all the tutorial posts I've wanted to yet, so stay tuned.

    There's some unexplored territory I haven't explained for myself, like the connection to graph theory (i dont have any foundational knowledge for graph theory so maybe someone smarter than me can help ;) i figure it would help formalize some proofs)

    Feel free to share your progress!

    2
  • Upvotes on memes function like modern day laugh tracks
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearTU
    tuna
    3mo ago 100%

    Yeah, thinking about it more, the similarities are kind of narrow.

    You could make a better comparison with a regular crowd, but then it wouldn't feel like much of a showerthought at that point because it's just observing that the crowd has moved online.

    Laugh tracks might be used to improve there ratings of a show, but with memes there's not really a show and no one's forcing a laugh

    I think the essence of what I was thinking of though is that just like a regular crowd, an online crowd can still influence you to think something is funnier or better than you would alone (at least for me)

    3
  • linux
    Linux 3mo ago
    Jump
    What is something you want to use, yet are NOT using?
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearTU
    tuna
    3mo ago 100%

    fish. I think it has most things i want out of the box, so it should be simpler and snappier than my zsh setup. it's just that zsh hasnt bothered me enough to try it yet.

    also nushell, im interested in the idea of manipulating structured data instead of unstructured text

    7
  • memes
    Memes 3mo ago
    Jump
    Gaming today
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearTU
    tuna
    3mo ago 100%

    And make sure the time is synced to the cloud so they need internet connection, and so the player can't be sneaky and reload the game to reset the timer if they pressed x too many times

    16
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearMI
    Jump
    Devastating
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearTU
    tuna
    3mo ago 100%

    This reminds me of my ex gf 😅 not only does she enjoy "kid" shows and movies, but HER NAME IS ANDY TOO. That image would definitely dealt some damage. For us though we broke off on good terms. Right person, wrong time, wrong place :(

    6
  • Suggestions for Canvas and future events!
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearTU
    tuna
    3mo ago 100%

    Happy to participate!

    The one thing I wasn't super sure on was the undo timer... was it really 30 seconds 😅? I thought it was 5-15s, but i didnt really time it. And I'll be honest, I missed it maybe 3 times, so not much.

    Besides just increasing the delay, there's 2 other thoughts:

    • A bigger target takes less time to hit (tho making it bigger might bother some, as it obstructs the canvas)
    • Two times I missed were bc I failed to notice my mistake. Maybe some extra visual feedback when you place a pixel could help. For example: when the void made it to my art, I accidentally made a dark gray become black, so it was harder to notice the color change. i was too busy focusing where to place the next pixel

    Overall if you feel that the undo time was fine as it was I could easily respect that decision :)

    2
  • Suggestions for Canvas and future events!
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearTU
    tuna
    3mo ago 100%

    I think I agree on the cooldowns. Often times I wanted to step away and let the pixels accumulate, but it's hard to resist when you realize you'd be missing out on double or triple the amount of pixels you could be placing. If the goal was to reward the player for actively placing pixels, all I can say is it didn't feel very rewarding.

    I kinda disagree about the integer scaling. 1x to 2x zoom is a very big shift without any in-between. It would also feel strange on pinch-to-zoom on mobile without in-between. I think instead it could snap to an integer scaling, or have a zoom slider that works to integer scaling. Overall though I agree, having a way to snap into integer scaling makes the pixel art look better

    5
  • Suggestions for Canvas and future events!
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearTU
    tuna
    3mo ago 100%

    On mobile I kept opening the whois pixel by accident when dragging. I often tap and hold to initiate a drag because I'm still looking at the art, but when i drag away and let go, it opens the whois thing. I think if you drag a certain screen-space distance away it should cancel the whois pixel lookup.

    The heatmap I found too hard to tell where recent pixels were placed. I think at 100% opacity the "cold" pixels should be dark blue instead of their actual color.

    A couple times I placed a dot, realized I actually didn't want it there and ran out of time to undo, which felt bad having to wait 30s. I wish it was a bit longer.

    When you try to place a pixel a few milliseconds too early I feel like it should queue it and wait the few milliseconds for you.

    I'm not super sure on the canvas having transparency. Most people treated the canvas as white, not transparent. If you wanted a white-on-white drawing, people will just make an outline.

    Maybe a concept worth testing: if you place a pixel next to your own pixels, you get a (slightly) reduced cooldown, that way you get an extra boost when completing your art. (At the same time, I think there is beauty in the canvas being as simple as possible:)

    21
  • Ex Redditors of Lemmy what made you come on over? What happened at Reddit that you made the switch?
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearTU
    tuna
    3mo ago 100%
    1. RIP Apollo
    2. I almost didn't join lemmy because the first time you sign up in the fediverse it feels like a big deal. What got me to actually follow through was to impulsively join a silly instance (RIP iusearchlinux.fyi)
    3