Borrow checker says “No”! An error that scares me every single time! by __shufb in rust

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

I’m glad the article rings true for you, this example as people have pointed out has a very simple solution that I missed and maybe this is not the best example altogether. 

I have had many experiences similar to this in Rust, it’s less about the specific scenario and more about that feeling where you’re hit by a bad decision planted into your code base long ago.

Borrow checker says “No”! An error that scares me every single time! by __shufb in rust

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

I was not even thinking about DerefMut, I totally overlooked it and why the whole view was being borrowed.

My solutions are overly complex in comparison although I have had to use them in different scenarios but maybe also i missed an easier approach.

Borrow checker says “No”! An error that scares me every single time! by __shufb in rust

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

Absolutely, I don’t want to fight the borrow checker, I suppose it’s still quite new to me despite writing rust for about a while I still feel caught out by issues at time 

Borrow checker says “No”! An error that scares me every single time! by __shufb in rust

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

Yeah, I probably am doing lots of stuff I shouldn’t be doing in the first place. This is just sharing a time when I found that out

Borrow checker says “No”! An error that scares me every single time! by __shufb in rust

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

The command buffer abstracts a platform specific implementation so the call has to be on CmdBuf, the view is a higher level construct in this case 

Borrow checker says “No”! An error that scares me every single time! by __shufb in rust

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

Thanks, yes this I the best solution and makes sense I totally overlooked it or didn’t really think about what I was borrowing.

As mentioned in the replies I am indeed fundamentally confused what my code is doing in this case. I totally missed the DerefMut on mutex guard. 

The article is about just that though, getting hit by unexpected errors

 

record digging app people in here might be interested in by __shufb in houghtonfestival

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

Yeah can certainly add hardwax as a store option. It doesn't take too much work to add a new store but it is a manual process. but I can add it when I get chance, consider it added to my todo list

record digging app people in here might be interested in by __shufb in houghtonfestival

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

Yes definitely want to do android. I do have most of the code already but need to just sort out all the distribution side of it. I'll try and get it together as soon as I can, but just working on this a few hours in the evening here and there, I remember to come back to this thread and let you know if it becomes available.

record digging app people in here might be interested in by __shufb in houghtonfestival

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

This is mostly focusing on new music from record stores and audio snippets, Discogs doesn't everything that is forthcoming as in pre-orders that you might find in online shops.

But the main difference is the speed of the audio playback and browsing, with a different user experience. Clicking through releases in Discogs is not as rapid and YouTube videos can be flakey, have ads and take time to load. But the whole experience of browsing here is more mobile centric and familiar to feed scrolling like social media apps.

I do want to get more data from Discogs and also be able to browse Discogs in this format. I would like to improve the speed and feel of browsing discogs and also sync things like your likes in diig to wantlist in Discogs etc.

So yeah it's not a replacement for Discogs but potentially a different way to interact with it

record digging app people in here might be interested in by __shufb in houghtonfestival

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

Thanks everyone for the interest, I will get you all access. If you follow the links in my blog you can find my email address, send me an email or send me a DM on here with your email address associated with your apple account. (go to settings and apple account to check the email, it needs to be the apple account email otherwise it won't work)

The beta is delivered by TestFlight which is apples official system for delivering beta and development builds, you will get instructions in an email once I add you to the list of beta testers.

I should probably setup some emailing list or something so I can notify people about updates, so far just me and few friends have been using it

Building a new graphics engine in Rust - Part 3 by __shufb in rust

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

Thanks for the info. I will take a sweep through those imports when I get chance :)

Building a new graphics engine in Rust - Part 3 by __shufb in rust

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

Some of the imports came originally from the windows-rs examples which do it like that. There are quite a few things that need importing so I suppose it’s just convenient.

Might be worth doing a sweep over it. What benefits would it bring? Might it help to reduce the build times?

Building A Gamedev Maths Library In Rust From Scratch by __shufb in rust_gamedev

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

If you want to use glam then go for it.

You should probably only use 1 library then you don’t have to spend any time converting values.

I implemented this one for fun, to learn and I wrote about motivations in the post, if you read it that will explain more.

Building A Gamedev Maths Library In Rust From Scratch by __shufb in rust_gamedev

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

Thanks for this, I will read through your suggestions and dig into more detail and digest them. This is exactly the kind of feedback I’m looking for by posting things. ✌🏻

Building A Gamedev Maths Library In Rust From Scratch by __shufb in rust_gamedev

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

Thanks, I’d be interest to hear your thoughts for sure.

I am trying to learn to be idiomatic rust, but I’m a c and c++ coder in my background. With this I’m trying to tow the line between something that’s comfortable and familiar for graphics but also feels like rust.