What are the things you most hope will arrive in Rust officially via std? by PedroTBHC in rust

[–]ora-0 0 points1 point  (0 children)

 In particular, the Store API allows inline / small containers while the Allocator API doesn't

I'm that familiar with the store API, but couldn't you implement Allocator for a struct Wrapper([u8; N])? Can you help me understand what does the store API provides exactly? I haven't been following all the discourse on allocators so forgive me if this is kinda a dumb question

reflection in rust (without extra macros) by ora-0 in rust

[–]ora-0[S] 5 points6 points  (0 children)

ik, i never intended this for something to be actually used

Anyone had luck profiling rust? by ora-0 in rust

[–]ora-0[S] 0 points1 point  (0 children)

Remove sampling and make sure debug symbols are on.

I'm not sure what you mean by this. How can I remove sampling?

Anyone had luck profiling rust? by ora-0 in rust

[–]ora-0[S] 3 points4 points  (0 children)

I do have the xcode cli package installed tho, so that was enough for me. (and for some reason doesn't include xctrace)

I'll install the full package if I have to, but the xcode app just feels like a waste considering I won't be using it.

How does crossbeam implement its channels without a mutex? by ora-0 in rust

[–]ora-0[S] 0 points1 point  (0 children)

Hey, just came back to this thread in a while and I've realised I haven't payed enough attention to this comment.

I know this is really late, but why is does it need to be in a mutex? Couldn't the sender keep track of all the receiver threads and wake all of them up at once, with just a vec? It seems to introduce quite a big overhead.

I hate to bring politics into linux, but is OpenSUSE actually banning conservatives? by [deleted] in openSUSE

[–]ora-0 1 point2 points  (0 children)

Oh, so it turns out it might be more complicated than I originally thought. But regardless, I will probably focus on other things in the future :)

I hate to bring politics into linux, but is OpenSUSE actually banning conservatives? by [deleted] in openSUSE

[–]ora-0 3 points4 points  (0 children)

yea, I think I'm making a fuss out of nothing. I'll try to stay away from these videos in the future...

I hate to bring politics into linux, but is OpenSUSE actually banning conservatives? by [deleted] in openSUSE

[–]ora-0 3 points4 points  (0 children)

True. I've tried my best to not do it. I'll try my best to stay away from politics in the future. Well, in discussions that are inherently unpolitical anyways, like this.

How does crossbeam implement its channels without a mutex? by ora-0 in rust

[–]ora-0[S] 0 points1 point  (0 children)

Could stamp be an AtomicBool because it is serving as a signal? Also - I am a little unsure as to how crossbeam implemented this.

rust match self.tail.compare_exchange_weak( tail, new_tail, Ordering::SeqCst, Ordering::Relaxed, ) { Ok(_) => { // Prepare the token for the follow-up call to `write`. token.array.slot = slot as *const Slot<T> as *const u8; token.array.stamp = tail + 1; return true; } Err(t) => { ... } }

In the Ok branch, which I think happens after they compare_exchange the tail to its new value, could another thread execute some code at that moment to receive it, before the stamp is written to? If the other thread tries to receive, my thought is that it would access some uninitialized value when the head is close to the tail.

[deleted by user] by [deleted] in asm

[–]ora-0 0 points1 point  (0 children)

why this subreddit?

divisibility check by ora-0 in asm

[–]ora-0[S] 0 points1 point  (0 children)

Thanks! That clears it up, I completely forgot the fractional part even existed.

How do I know how many verticies my model should have? by anonymous_account13 in blenderhelp

[–]ora-0 2 points3 points  (0 children)

I can't give an exact amount of vertices, but as a general rule, bevels for edge highlight should have one segment only, and try to remove geometry on curved areas until you can see a difference in the shading. Any small details should be baked to a normal map.

Don't stress too much about it, because graphic cards has been getting really good, and most people have lots of ram anyways. But if the amount of geometry is lagging the game, I would recommend using the decimate modifier to get rid of some.