@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 🙇♂️
@schlink you don't even need to allocate a Vec for this and can directly use a simple array:
With that you can switch scenes, adjust scenes items and all kinda sorts of stuff directly from #rust (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 🙏
. ⠀⠀⠀✦ ⠀ ⠀ ⠀⠀⠀⠀⠀* ⠀⠀⠀. . ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀✦⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀☄️ ⠀ ⠀⠀⠀⠀⠀⠀. . ﾟ . . ✦ , .
. . ✦⠀ , *
⠀ ⠀ ,
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀. ⠀ ⠀.
˚ ⠀ ⠀ , .
*⠀ ⠀ ⠀✦⠀
. . ⠀🌕
˚ ﾟ .
.⠀ . .
✦⠀ , 🛸 ⠀
. ⠀ .
˚ ⠀ ⠀ ,
. ⠀ . ⠀⠀⠀⠀⠀⠀. ⠀⠀⠀✦ ⠀ ⠀ ⠀⠀⠀⠀⠀* ⠀⠀⠀. . ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀✦⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀☄️ ⠀ ⠀⠀⠀⠀⠀⠀. . ﾟ .
@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.
I don't use dev.to that much, but I know they have an RSS import feature. As long as you have some blog with an RSS feed you can auto-import to dev.to and it will create your posts as drafts on dev.to. That helps in reposting quite a bit.
@marix ripgrep hat support für look-around und andere Features, wie in der GitHub readme beschrieben:
ripgrep has optional support for switching its regex engine to use PCRE2. Among other things, this makes it possible to use look-around and backreferences in your patterns, which are not supported in ripgrep's default regex engine. PCRE2 support can be enabled with -P/--pcre2
For example, try out #Rayon, a data-parallelism library for Rust:
Good news everyone! I passed my thesis defense yesterday, and now only have some minor revisions to the thesis itself left before I am completely done 🎉 You can find a recording of the thesis presentation here: https://youtu.be/GctxvSPIfr8.
Since the thesis isn't _completely_ done, I haven't posted the actual document yet, though I will make it public once it's finalized. You can find the slides at https://jon.thesquareplanet.com/slides/thesis.pdf.
Holy cow, the RIAA has gotten youtube-dl taken off Github. DMCA notice: https://github.com/github/dmca/blob/master/2020/10/2020-10-23-RIAA.md
@musicmatze the way it works is really cool though. But took me a while to understand the whole async/await concept first.
Wrapping other futures is relatively easy though.
🦀 Rust, 🐹 Go and 🍵 Kotlin enthusiast
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!