abrahambelch

joined 8 months ago

First of all: Sorry to hear that, this sucks!

Regarding your digital information: I'd suggest you to get a new email and gradually replace the old one in your accounts to avoid spam. Even though they claim your password wasn't stolen, I'd highly suggest you to change your passwords anyway, just in case. Also, as they say, be very careful about potential phishing attacks.

As for your personal information such as your address: I'm afraid there's not much you can do. I'd argue, however, that it's not as valuable to potential hackers. One potential scam involving stolen addresses is sending purchases made with a stolen credit card to your address and asking you to forward it. Don't accept deliveries you didn't expect for this reason (depending on your local law it may lead to criminal charges against you, even though you're still technically the victim of a scam).

No Forking: You may not create, maintain, or distribute a forked version of the software. Lol πŸ’€

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

It Feels Almost Like Android... But It Isn't

So what is it?

Lmao, the part about the control center feeling like from a bootleg phone made my day. I felt like something was off the whole time but couldn't tell what was bothering me

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

Yeah and I can't get my head around why it won't be available here in the EU. This is so fucking stupid! Like how is the DMA or any other legislation supposed to prevent them from implementing iPhone mirroring? They literally offer every other continuity-related feature over here. This is just Apple being upset they're actually being regulated in the EU.

That's what I wanted to say as well! Most AI stuff in software development is bullshit, but full line completion is actually so useful!

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

I'd return a non-zero value so they know it's their fault ^^

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

In my personal opinion: Yes. Wine is great and all, but in the end it's an emulation layer that - in the worst case - requires a lot of tweaking. I personally wouldn't want to spend that time so a VM sounds like a good option. But again, depending on the context (e.g. limited hardware resources or the amount of time available) you might be totally fine with Wine.

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

Do you still remember the name of the Johto rom hack made in the Gen 3 engine? I'd love to give it a try!

[–] abrahambelch@programming.dev 11 points 1 month ago* (last edited 1 month ago) (1 children)

Shit gets weird when the guy in 418 opens and claims to be a tea pot...

31
Strategy Pattern in Rust (programming.dev)
submitted 1 month ago* (last edited 1 month 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 β€Ί