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

all 16 comments

sorted by: hot top controversial new old
[–] 11 points 2 years ago (3 children)

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.

  • source
  • hideshow 3 child comments
  • [–] 3 points 2 years ago

    Great path, your Rust (and e.g. Python) will benefit a lot in the medium term. Medium because if you're anytging like me, you'll overcorrect at first and try to do everything without variables lol

  • source
  • parent
  • [–] 8 points 2 years ago
    [–] 5 points 2 years 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

  • source
  • [–] 3 points 2 years ago (4 children)

    rtask as my school project for database classes. SQLx and stuff.

  • source
  • hideshow 4 child comments
  • [–] [S] 2 points 2 years ago (3 children)

    Is rust common in schools now or is it your personal interest that lets you use it?

  • source
  • parent
  • hideshow 3 child comments
  • [–] 3 points 2 years ago (2 children)

    They tried to force me to use SQLAlchemy, but I vomit with Python after 5 years. I learnt a bit of Rust and I wanted to try SQLx. Seemed like a perfect opportunity. Also I made a good base for recreation of Todoist in Rust that I'm keen on.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 2 years ago (2 children)

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

  • source
  • hideshow 2 child comments
  • [–] 3 points 2 years ago (1 child)

    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.

  • source
  • hideshow 1 child comment