Barbacamanitu

joined 1 year ago
[–] Barbacamanitu 1 points 1 year ago (2 children)

I deleted my 14 year old reddit account when they pulled their shit. Then I recently created a new account because I need to be able to get answers to specific programming questions sometimes, and lemmy doesn't have the population of users that reddit still has. I generally post on both lemmy and reddit, but I almost always get more answers on reddit.

[–] Barbacamanitu 3 points 1 year ago (2 children)

Why are you traveling to make a call? You could just call.

[–] Barbacamanitu 1 points 1 year ago

That's a tough situation. Are there many people who use D these days? I never hear about it.

[–] Barbacamanitu 3 points 1 year ago

If you gave him an enema he could be buried in a matchbox.

That's what Christopher Hitchens said about Jerry Falwell when he died. It applies equally to trump.

[–] Barbacamanitu 1 points 1 year ago

Lol nerd. Good one though

[–] Barbacamanitu 4 points 1 year ago (2 children)

That's what I heard. That's what people are saying.

[–] Barbacamanitu 1 points 1 year ago* (last edited 1 year ago)

Ah I didn't realize most people have moved onto OnceCell. The issue with both lazy static and oncecell is that they can only be assigned to once. You need a global mutable state, so neither OnceCell or lazy_static are the right choice.

You're going to be fighting the borrow checker if you try to have global mutable state. It will bite you eventually. You can potentially use an interior mutablity pattern along with a mutex. Have you looked into interior mutability?

[–] Barbacamanitu 1 points 1 year ago

Very cool. I'll have to try it out. I just started using React, and I'm beginning to love it. React with rust sounds like heaven.

[–] Barbacamanitu 2 points 1 year ago (2 children)

Maybe lazy_static? Personally I'd just pass a borrow to the vec around. It's very common for programs to have some global state that they pass around to different parts.

[–] Barbacamanitu 2 points 1 year ago (2 children)

Woah. First I've heard of dioxus. Has anyone here tried it?

[–] Barbacamanitu 2 points 1 year ago

Lol not a great name choice. Wish I would have thought of it though.

[–] Barbacamanitu 18 points 1 year ago (1 children)

I get why the binary is there, but there really should be a simple way to force compilation instead of downloading a precompiled binary.

Serde is incredible though, so it can get away with basically anything it wants.

 

Im trying to use iced for the gui in an audio plug in I'm building, but I keep seeing discrepancies in how to accomplish this.

On the iced github page, it says that to implement the Sandbox trait, you use this signature: fn view(&self), yet in the documentation it says to use view(&mut self). When I try to use the non-mut version, I get an error saying that it expects self to be mutable.

I also stumbled across iced-pure, which seems like a better idea. But I need to use a NumberInput widget from the iced-aw crate. Unfortunately, these widgets are not pure.

So how do I go about creating a gui using NumberInput? Do I need to create the widgets myself to make them pure? I'd like to use other widgets from the iced-aw crate too, so that wouldn't be ideal

Or do i have to use the mutable version of view? If so, why does github say to use non mutable? Is this specific to certain versions of iced? If the newer version of iced uses a non mutable view function, does that mean it's pure? Have the iced-pure changes been merged into iced?

 

Im trying to use iced for the gui in an audio plug in I'm building, but I keep seeing discrepancies in how to accomplish this.

On the iced github page, it says that to implement the Sandbox trait, you use this signature: fn view(&self), yet in the documentation it says to use view(&mut self). When I try to use the non-mut version, I get an error saying that it expects self to be mutable.

I also stumbled across iced-pure, which seems like a better idea. But I need to use a NumberInput widget from the iced-aw crate. Unfortunately, these widgets are not pure.

So how do I go about creating a gui using NumberInput? Do I need to create the widgets myself to make them pure? I'd like to use other widgets from the iced-aw crate too, so that wouldn't be ideal

Or do i have to use the mutable version of view? If so, why does github say to use non mutable? Is this specific to certain versions of iced? If the newer version of iced uses a non mutable view function, does that mean it's pure? Have the iced-pure changes been merged into iced?

 

I've subscribed to a handful of communities, but my feed is almost exclusively from this asklemmy. How can I see more from other communities?

view more: next ›