Hi rustaceans! What are you working on this week? Did you discover something new, you want to share?

  • Binette@lemmy.ml
    link
    fedilink
    arrow-up
    11
    ·
    14 days ago

    I’m working on minesweeper using bevy!

    My code is very bloated (lots of for loops inside for loops), so I asked for advice, and the comments all pointed me towards functional programming, specifically higher order functions.

    I’m now going through Haskell aswell.

  • peanutbutter_gas@thelemmy.club
    link
    fedilink
    English
    arrow-up
    5
    ·
    14 days ago

    Soundboard discord bot. It uses serenity ( base discord framework in rust), songbird, and poise crates. It works pretty great. I can command the bot to join a voice channel, and then use slash commands to play, add sounds, remove sounds, edit sounds, or display sounds as a button grid in a text channel.

    I added sqlite with FTS5 table (using trigram tokenization) for auto completing sound track names when typing play, edit, or remove slash commands.

    The whole thing is running on my raspberry pi and seems fine for the one discord server it’s in.

    Still a work in progress though.

    discord-soundboard-bot-rs

  • TehPers@beehaw.org
    link
    fedilink
    English
    arrow-up
    3
    ·
    14 days ago

    Felt like making an assertions library since I can’t seem to find something quite what I’m looking for.

      • TehPers@beehaw.org
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        14 days ago

        I was mostly looking for something more composable, similar to how jest works. Some ideas that I’ve been working on are assertions like:

        expect!([1, 2, 3])
            .all()
            .to_be_less_than(5);
        

        I also have some ideas around futures that I’d like to play with.

  • PushButton@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    12 days ago

    I am reinventing everything in crates that requires zero dependencies, no unsafe code and the strict minimum of macro usage.

    Like I did a simple date/time library last week, I started an error management crate this week, which pushed me to start a logging crate.

    I am using the “log facade” crate for the logging, for compatibility you know, but that’s it.

    The goal is to minimize the dependencies and create straightforward crates.

    Most of the time, we really just need a car instead of the 18 wheeler.

    • burntsushi@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 days ago

      How are you doing a date/time library without platform dependencies like libc or windows-sys? Are you rolling your own bindings in order to get the local time zone? (Or perhaps you aren’t doing that at all.)