What are you working on this week? (June. 16, 2024)
from secana@programming.dev to rust@programming.dev on 16 Jun 2024 19:41
https://programming.dev/post/15612931

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

#rust

threaded - newest

Psyhackological@programming.dev on 16 Jun 2024 19:55 next collapse

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

secana@programming.dev on 16 Jun 2024 21:53 collapse

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

Psyhackological@programming.dev on 16 Jun 2024 22:23 collapse

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.

amanda@aggregatet.org on 17 Jun 2024 14:02 collapse

Out of curiosity, what did you use for the UI for the todoist clone?

Psyhackological@programming.dev on 18 Jun 2024 18:56 collapse

I haven’t yet but I would choose iced. System76 engineers are creating entire Desktop Environment for Linux in it and it looks and works gorgeous. I wait for the first stable version thought.

Binette@lemmy.ml on 16 Jun 2024 21:03 next collapse

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.

sugar_in_your_tea@sh.itjust.works on 17 Jun 2024 03:31 next collapse
amanda@aggregatet.org on 17 Jun 2024 14:00 next collapse

Wow that’s one heck of a how it started // how it’s going

flying_sheep@lemmy.ml on 18 Jun 2024 19:27 collapse

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

TehPers@beehaw.org on 16 Jun 2024 21:27 next collapse

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

secana@programming.dev on 16 Jun 2024 21:52 collapse

What is missing in the existing ones?

TehPers@beehaw.org on 16 Jun 2024 22:48 collapse

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.

peanutbutter_gas@thelemmy.club on 16 Jun 2024 21:38 next collapse

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

fil@hachyderm.io on 16 Jun 2024 23:45 next collapse

@secana Physical string simulation https://hachyderm.io/@fil/112627897592373765

PushButton@lemmy.world on 18 Jun 2024 20:59 collapse

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 on 19 Jun 2024 18:29 collapse

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