What are you working on this week? (June. 23, 2024)
from secana@programming.dev to rust@programming.dev on 23 Jun 2024 09:35
https://programming.dev/post/15920198

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

#rust

threaded - newest

legoraft@reddthat.com on 23 Jun 2024 10:28 next collapse

I’m working on a simple and hackable static site generator, stagnant. I wanted a static site generator that utilized html for templates, so I built it myself to learn rust a bit better.

nebeker@programming.dev on 23 Jun 2024 13:12 next collapse

I’m working through rust-exercises.com and taking notes on my thoughts. I may or may not want to use it for a short workshop at work - mostly for fun, since I work with a very different stack.

So far, I don’t know if I like the exercises, because the target audience doesn’t feel like it’s clearly defined: you both solve is_even with an if/else and overflow an i8 to -1. I don’t think I’ve met the person who is that inexperienced and that knowledgeable…

How are folks liking these exercises?

secana@programming.dev on 23 Jun 2024 16:33 collapse

Never heard of it. I used the Rust book when I started learning it.

nebeker@programming.dev on 23 Jun 21:52 collapse

I used that and Rustlings and really liked both, but somebody mentioned this and I decided to take a look. It’s cool that it introduces other concepts.

quaternaut@lemmy.world on 24 Jun 03:17 next collapse

I’m working on a music player app written in libcosmic. Trying to see how far I can get with this toolkit.

BehindTheBarrier@programming.dev on 24 Jun 04:44 next collapse

Working on a blog(entirely for fun), found out the server backend, actix-web, does not handle early termination of a stream well. Wanted to stop an upload if the file size turned out to be too large, but you have to consume the entire upload before returning an error. If not the client will never see the connection close. I guess there is a way to check the size beforehand, but sucks that you can’t stop a stream in progress.

Apparently a long standing issue.

SatouKazuma@programming.dev on 24 Jun 13:09 collapse

Whoa. Yeah, I can see where that would be a problem…

[deleted] on 24 Jun 05:41 next collapse

.

SatouKazuma@programming.dev on 24 Jun 13:09 collapse

Did one of the legs Rust out?

myopic_menace@reddthat.com on 26 Jun 12:47 next collapse

Just finished all the Rustlings exercises, moving on to some simple GUI exercises with libcosmic!

secana@programming.dev on 28 Jun 06:58 collapse

The selling point of Ice (the underlying framework for libcosmic) is the cross-platform compatibility. Can I use libcosmic cross-plat as well, or is it more a specialisation of Ice for Linux with the clear focus on the Cosmic desktop? Would be cool to re-use some widget etc.

tuna@discuss.tchncs.de on 28 Jun 16:46 collapse

Apparently generating “Finite Projective Planes”. For context on how I got here, I went camping with my family and brought the game Spot It. My brother was analyzing it and came up with the same type of pattern.

When we got home he made a python script to generate these boards, but it was quite slow, so he half joked asking me to rewrite it in Rust.

I kinda struggled a bit since I didn’t fully understand what it was doing. Near the end I even got a segfault using safe code😃! (i was spawning a thread with a large stack size, and allocating huge slices on its stack, rather than you know… boxing the slice Lol.) When I finally got it working, it ended up being in the ballpark of a 23x speedup. Not bad for changing the language choice!

There’s lots of room for improvement left for sure. The algorithm could benefit with some running statistics about cols/rows and the algorithm itself is quite naïve and could maybe be improved too :P