abrahambelch

joined 1 year ago
 

Hello everybody,

Im currently planning on migrating my smart home to Home Assistant and run the HA docker image on my home server.

Most of my devices communicate via Zigbee so I was thinking of getting the Connect ZBT-1.
I also have a few Matter/Thread devices which would be nice to integrate as well, although not necessarily in the initial migration.

I read the ZBT-1 can experimentally be used with Thread as well. Now my question is: Is it possible to buy two devices and connect to Zigbee and Thread devices simultaneously?

Maybe someone has a similar setup and would like to share their experience.

Thanks in advance and have a nice weekend!

[–] abrahambelch@programming.dev 7 points 3 days ago (2 children)

You don’t get the point, do you? I know I can block those, yet it’s hypocritical to complain about privacy and tracking in an article while doing the same. It’s not even the fact they use cookies at all, I get they might need them for analytics and such. But this site is out of control

[–] abrahambelch@programming.dev 34 points 3 days ago (4 children)

Meanwhile the linked website is full of intrusive ads and hundreds of "legitimate interest" tracking cookies. Oh the irony...

[–] abrahambelch@programming.dev 30 points 1 week ago

Agreed. But as long as people don't actively leave Lemmy in favor of the new service I'd be okay with it I guess. I mean it would still be cool if Lemmy grew larger but hey, we got a nice little community here

I legitimately thought I was becoming crazy when my favorites kept disappearing lol Glad they fixed it!

Well that's kind of rewarding indeed :D

[–] abrahambelch@programming.dev 22 points 1 week ago (2 children)

I'd seriously consider quitting my job if my managers sabotaged work like that

[–] abrahambelch@programming.dev 2 points 4 weeks ago* (last edited 4 weeks ago)

Not sure what the hardest was for me but Scarlet/Violet have by far been the easiest for me. There was literally no challenge at all.

[–] abrahambelch@programming.dev 4 points 1 month ago (1 children)

Looks good! 🤩

[–] abrahambelch@programming.dev 14 points 1 month ago (2 children)

One example that I think is a step backward: "Search term persistence ". I don't want this, I want to be able to see the URL I'm visiting. I think I'm able to remember what my search was. This UX "improvement" doesn't add any value at all, it straight up removes value.

To be fair, there are features I like, though: Moving the search buttons into a separate menu is a good choice if you ask me.

Also, this all is highly subjective.

[–] abrahambelch@programming.dev 1 points 1 month ago

Ahh that makes sense - thanks!

[–] abrahambelch@programming.dev 4 points 1 month ago (4 children)

Genuine question: How can an ISP detect that someone is downloading illegal material if the actual content is encrypted using SSL/TLS? Is it all approximated based on the domains/IPs and the amount of data that is sent? If they can't tell with a 100% certainty, can it be used as proof when trialed in court?

[–] abrahambelch@programming.dev 2 points 1 month ago

Temtem is available for free with the PlayStation Plus subscription atm - I think I'll try it out over the next days :)

30
Strategy Pattern in Rust (programming.dev)
submitted 6 months ago* (last edited 6 months ago) by abrahambelch@programming.dev to c/rust@programming.dev
 

Hey there, I'm currently learning Rust (coming from object-oriented and also to some degree functional languages like Kotlin) and have some trouble how to design my software in a Rust-like way. I'm hoping someone could help me out with an explanation here :-)

I just started reading the book in order to get an overview of the language as well.

In OOP languages, I frequently use design patterns such as the Strategy pattern to model interchangeable pieces of logic.

How do I model this in Rust?

My current approach would be to define a trait and write different implementations of it. I would then pass around a boxed trait object (Box<dyn MyTrait>). I often find myself trying to combine this with some poor man's manual dependency injection.

This approach feels very object oriented and not native to the language. Would this be the recommended way of doing things or is there a better approach to take in Rust?

Thanks in advance!

view more: next ›