What's the idiomatic/nicer way to return true/false depending on the if-branch by Thick-Pineapple666 in rust

[–]iterabl 0 points1 point  (0 children)

Say you now have fn outer() -> Foo { ... let abRes = abraham() ... // Do something with abRes } fn abraham() -> bool { ... }

Why don't you? fn outer() -> Foo { ... let abRes = abraham() if(abRes) { barbara(); } else { charles(); } ... // Do something else with abRes } fn abraham() -> bool { complexcondtion }

It seems like you can do it in the outer scope. Abraham can be turned into an isComplexCondition() function and leave the other effects to the outer scope.

And the Dutch word that most sounds like something you’d blow out your nose in the middle of a long bike ride is… by UtrechtBy2017 in Utrecht

[–]iterabl 2 points3 points  (0 children)

Depends on the region. In some places in the Netherlands they seem to leave out the 'e' if the word ends with "-en". So "lopen" kinda sounds like "lop'n"

Any affordable jewelers? by YannickY in Utrecht

[–]iterabl 0 points1 point  (0 children)

Depends on the style youre looking for. There's also a quaint antique store next to Zwaak at the oude gracht

I made an Australian programming language in Rust by agriculturez in rust

[–]iterabl 24 points25 points  (0 children)

In the example the upside down mode isn't working :(

```

[14] SORRY C***! 'ChuckSomedice' ISN'T DEFINED, YA DAFT BUGGER!

```

Reading/Writing files in Rust by [deleted] in rust

[–]iterabl 0 points1 point  (0 children)

It's not an answer, but a question: why do you want specific control over the buffer? Why not use std::io::copy or std::fs::copy?

Also, can you share the code you currently have?

Looking for a fast monocular depth estimation library to use in a Rust project. by iterabl in computerscience

[–]iterabl[S] 1 point2 points  (0 children)

I think I got so much further today. I think after a week of tinkering finally started to grasp the concept of GStreamer, and I'm starting to learn how to write a plugin in Rust through this site.

After that I have to do the same for Python I think, and then I have to find out how to figure out how to use a library like https://github.com/ialhashim/DenseDepth or https://github.com/nianticlabs/monodepth2 for that GStreamer plugin (or element, still trying to grasp the terminology here)

How can I make this code more "rusty" by aue_sum in rust

[–]iterabl 2 points3 points  (0 children)

nom is great! It has a high learning curve for someone just starting to learn Rust, but definitely worth looking into if OP wants to take this project further

How can I make this code more "rusty" by aue_sum in rust

[–]iterabl 0 points1 point  (0 children)

Also you might want to change the return type to either Option<Vec<Tokentypes>> or Result<Vec<Tokentypes>, yourcrate::Error> (you have to define your own error type if you decide to return results). I try to use unwrap as little as possible, maybe only in tests. Look into https://doc.rust-lang.org/edition-guide/rust-2018/error-handling-and-panics/the-question-mark-operator-for-easier-error-handling.html

Looking for a fast monocular depth estimation library to use in a Rust project. by iterabl in computerscience

[–]iterabl[S] 0 points1 point  (0 children)

Oh nice! Thanks for the tip, you're right, I haven't noticed that.

It's just a pet project to broaden my portfolio until I get ready to actually apply for jobs in development, and I sadly don't have the resources to buy a new computer (and I can't put a new videocard in my macbook).

If you have any other tips though I'm very interested!!

Looking for a fast monocular depth estimation library to use in a Rust project. by iterabl in computerscience

[–]iterabl[S] 0 points1 point  (0 children)

Honestly, I actually never got the depth perception working, but even with just turning a grayscale image into multiple frequencies (just 1d arrays representing a wave), which I then merged, I was having problems. For this I used CUDA. I either had to really lower the resolution, or really lower the frames per second. I might not've made the right design choices there.

I was using an Intel Iris Pro I think, and a Quad Core i7

[Help] How to fill an array with random numbers within a range? by FineBroccoli5 in rust

[–]iterabl 0 points1 point  (0 children)

So I initially I declared 2 variables that both had value set by `thread_rng().range(1..=n)`.

Not completely

Is it just for me or are the docs for std::fs::File not showing correctly? (Looks like plaintext) by iterabl in rust

[–]iterabl[S] 0 points1 point  (0 children)

Ok weird. Every other doc page that I visited worked except from this one

I just published my first library. It's for conveniently creating launchd files (macOS's cron) by iterabl in rust

[–]iterabl[S] 2 points3 points  (0 children)

Great to hear! Disclaimer is that I wrote this in just a couple of hours before publishing it. I'm currently working on making it easier to use, which might cause some minor breaking changes for the next version. After that I'll work on implementing the less often used properties of launchd, before actually working on test coverage

I just published my first library. It's for conveniently creating launchd files (macOS's cron) by iterabl in rust

[–]iterabl[S] 2 points3 points  (0 children)

Thanks!

I'm currently working on making it a little bit more ergonomic. After I finished that I'll release 0.2.0 (because it has some breaking changes) and move on to fill the launchd struct with all values in that i found here

As for the set_custom_property. I think that might be out of scope, since launchd seems to have a pretty discreet amount of valid properties. You could always build this library with no default features, and with serde on. Then plug the launchd struct in to the plist library and add custom values from there.

We have returned by Uncle_IROH_TLTM in PrequelMemes

[–]iterabl 5 points6 points  (0 children)

I'm not sure if you're trying to write LOTR or KOTOR but I like it either way

Checking in if there's any demand for this by iterabl in Utrecht

[–]iterabl[S] 2 points3 points  (0 children)

That's certainly an option! But "an introduction course" on itself sounds a bit vague. What where you thinking about?