@wholesomedonut it's interesting that they make such a big deal of it for Rust but with Golang for example, nobody seems to care.

Same as with Rust they add absolute paths of the files to print them during crashes. Not sure whether there's an option to remove that through.

But the point is, Go has quite a bigger user count and there nobody seems to care πŸ€”. And probably many other languages do the same.

Nonetheless it would be nice to have an option for this in the future.

@jonhoo thank you so much for this recording.

I used atomics from time to time already, just recently a few days back, and always use either Relaxed or SeqCst for the ordering.

This helped me a lot in understanding what the other ordering modes are for, although I don't "see" yet any personal use case for them so far. Maybe when trying to build synchronization primitives for learning purposes.

@klausi funny coincidence, I started using the same library today for some experiments.
It's indeed very easy to use and gives great results with just a little bit of code.

@musicmatze I saw you already pushed a new release. This is a great crate and I'm glad somebody picks it up and continues work on it. A new release was long overdue πŸ‘

@deshipu Just because somebody puts things on your to-do/issue tracker doesn't mean you actually have to do it.
After all it's your project so you can just tell them to pay you or don't expect the issue to be handled anywhere soon.

@kura it would be Result<Vec<_>> in that case. You have to make sure that the same result/error is used within the closures so eventually you have to add some type annotations.

@Apitronics I personally like tui-rs a lot crates.io/crates/tui

It's a bit low level so you'll have to handle inputs yourself which is actually done by the backend library that you pick. You will have to build input dialogs and stuff yourself.

Another one is cursive crates.io/crates/cursive

It comes with tons of widgets built in and make input handling very easy. I personally don't like the API though as you end up in callback hell and tons of Arc wrapped data.

@sotolf a small tip for the crates you're currently using: I saw you import `reqwest` and I guess you plan on using that to query the Wallhaven API?

So `reqwest` is a really great http client but it uses async/await features and that topic is a bit complex in Rust.

As you are just starting with rust I would recommend you `ureq` or `attohttpc` as alternative because they don't require an async/await runtime and therefore a little bit more beginner friendly.

@sotolf if you just need to list all things in a dir non-recursively then read_dir should be fairly sufficient


If you want to iterate recursively there is a convenient crate for it:


In case you have any trouble with the APIs, feel free to ask πŸ™‡β€β™‚οΈ

I made a new that allows you to remote control via the obs-websocket plugin.

With that you can switch scenes, adjust scenes items and all kinda sorts of stuff directly from (all the heavy lifting done by obs-websocket though, this is a client library for it).

You can listen for events (created by user interactions) as well.


@kornel this is great. Currently exactly my biggest (and actually only) pain point when building docker images for rust projects. Especially on sometimes slow network connections it can take several minutes sometimes up to 10-20 minutes even.

I'm really happy to see this and hope for it to be approved and implemented. Thank you for this proposal πŸ™

.γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€β €β €β €βœ¦ β € β €γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€β €β €β €β €β €* β €β €β €.γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€. β €β €β €β €β €β €β €β €β €β €β €β €βœ¦β €β €β € β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β € β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β˜„οΈ β € β €β €β €β €β €β €.γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€.γ€€γ€€γ€€οΎŸ .γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€. γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€βœ¦ γ€€γ€€γ€€γ€€γ€€,γ€€γ€€γ€€γ€€γ€€γ€€γ€€.

β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €


.γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€. γ€€γ€€βœ¦β €γ€€β€‚β€‚β€‚γ€€γ€€γ€€,γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€*

γ€€γ€€γ€€γ€€γ€€β €γ€€γ€€γ€€γ€€β €γ€€γ€€,

β €β €β €β €β €β €β €β €β €β €β €β €.γ€€γ€€γ€€γ€€γ€€β€ˆγ€€γ€€β €γ€€γ€€γ€€β €.γ€€

γ€€γ€€Λšγ€€γ€€γ€€β €γ€€β €β€‚β€‚γ€€γ€€,γ€€γ€€γ€€γ€€γ€€γ€€.


γ€€γ€€γ€€γ€€γ€€γ€€*β €γ€€γ€€β €β€‚β€‚γ€€γ€€γ€€γ€€γ€€β €βœ¦β €γ€€


γ€€γ€€γ€€γ€€.γ€€γ€€γ€€γ€€.γ€€γ€€γ€€β €




γ€€.β €γ€€γ€€
πŸŒŽβ €β€β €β€β €β€β €β€β €β€β €β€β €β€β €β€β €β€β €β€β €,

γ€€γ€€γ€€*γ€€γ€€β €.

γ€€γ€€γ€€γ€€γ€€.γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€β €βœ¦


.β € γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€.γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€.

γ€€γ€€γ€€γ€€γ€€βœ¦β €γ€€β€‚β€‚β€‚γ€€γ€€γ€€,γ€€γ€€β€ˆβ€Šβ€Šβ€Š
πŸ›Έ β €γ€€γ€€

.γ€€γ€€γ€€γ€€γ€€β€ˆγ€€γ€€β €γ€€γ€€γ€€.

γ€€γ€€γ€€Λšγ€€γ€€γ€€β €γ€€β € γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€,

γ€€γ€€. β €β€ˆγ€€γ€€β€‚β€‚β€‚β€‚γ€€γ€€γ€€γ€€γ€€β€ˆγ€€γ€€γ€€γ€€γ€€. β €β €β €β €β €β €.γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€β €β €β €βœ¦ β € β €γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€β €β €β €β €β €* β €β €β €.γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€. β €β €β €β €β €β €β €β €β €β €β €β €βœ¦β €β €β € β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β € β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €
β˜„οΈ β € β €β €β €β €β €β €.γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€γ€€.γ€€γ€€γ€€οΎŸ .

Thanks to using markdown and allowing raw HTML in the doc comments, I now have the nice ASCII art from the website directly in the docs of my coding challenge solutions.


@reconbot in a last year's challenge I first solved it with Rc + RefCell and later realized that I could do it without by changing the data structures. The speed improvement was about 40x.

It's definitely interesting to do once with Rc + RefCell once πŸ‘

@reconbot you are trying to solve the advent of code day 7 challenge right?

I had similar problems with challenges that seem to want you to build a graph/tree like structure. You can do that with Rc + RefCell but it will be quite a bit slower and often you don't need a whole tree with parent/child relations but often just one direction.

If you want I could give you some hints about how I solved it but I'm worried I might spoiler you too much.

Show older
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!