catch22

joined 2 years ago
[–] catch22 3 points 5 days ago

I remember when everyone used mapquest. I think the term "map quest it" was an actual thing. The first time I saw google maps after using map quest for a cpl of years. I was completely blown away. . I think the thing I found most fascinating was that you could smoothly scroll between sections on the map without having to wait for the browser to reload the page. I had never seen Javascript (asynchronous data transfers) used like that before. I think people take it for granted that you can use the hand to grab a section and pull yourself seamlessly around a map now. But back then you clicked on an arrow then waited for the tiles to reload, it was painful. I think I continued to use Mapquest maybe for 6 months after that, thinking that surely they would implement this awesome new ui. but, nope... They never did... Maybe the fact that google maps started out as an application led to them making the UI similar on the web.

Anyways, a little more in depth of what I am talking about is here: https://medium.com/@lewgus/the-untold-story-about-the-founding-of-google-maps-e4a5430aec92

[–] catch22 1 points 5 days ago

These are basically large scale vending machines of the coffee variety. If anyone has ever seen what happens to one of those things when they don't get cleaned regularly you'll know what I'm talking about. Absolutely disgusting, every time I see one of them in the wild I avoid them like the plague.

 

cross-posted from: https://programming.dev/post/30250632

Thought this was interesting. A little gaming history intermixed with EVs, Off grid living, Hydrogen and a bunch of other things.

High in the hills of Hawaii’s Big Island, Henk Rogers—best known for bringing Tetris to the world—is taking on a new kind of challenge: building a fully off-grid life. On his 32-acre Pu‛uwa‛awa‛a Ranch, he’s growing his own food, producing his own energy, and working to protect Hawaii’s future.

 

Thought this was interesting. A little gaming history intermixed with a bunch of other things.

High in the hills of Hawaii’s Big Island, Henk Rogers—best known for bringing Tetris to the world—is taking on a new kind of challenge: building a fully off-grid life. On his 32-acre Pu‛uwa‛awa‛a Ranch, he’s growing his own food, producing his own energy, and working to protect Hawaii’s future.

[–] catch22 1 points 1 week ago (1 children)

I gather from your explanation, that in order to tell before hand whether or not a type will be inferred, you really need to examine the code and see how things are being handled, and optimized out. (And even then you still may not know) Interesting, thanks.

[–] catch22 1 points 1 week ago (1 children)

Got it, this completely made sense after your explanation and a second look. Also before I saw this example I hadn't thought about being able to pass arrays and tuples as generic parameters types. Thanks

12
submitted 1 week ago* (last edited 1 week ago) by catch22 to c/rust
 

Hello, I'm fairly new to Rust and came across this. Can someone explain to me how the following example is able to infer the constant value from the array length passed in? At this point, inferred type generation for function calls are a bit hand wavy, to me, does anyone know of a resource that breaks down all the different ways they can be used (for instance in this example I hadn't seen them used for consts) and what their limitations are in Rust? I often run across a 'this type can not be inferred' error without really knowing why not and just throw in the type to make it go away.

Any other examples people could point me to would be appreciated as well.

Thanks!

#[derive(Debug)]
struct Buffer<T, const LENGTH: usize> {
    buf: [T; LENGTH],
}

impl<T, const LENGTH: usize> From<[T; LENGTH]> for Buffer<T, LENGTH> {
    fn from(buf: [T; LENGTH]) -> Self {
        Buffer { buf }
    }
}

fn main() {
    let buf = Buffer::from([0, 1, 2, 3,5]);
    dbg!(&buf);
}

Edit: for some reason, the code markdown is hiding things inside of the <>'s (at least on my lemmy viewing client)

[–] catch22 4 points 1 week ago* (last edited 1 week ago)

iFixit, is an amazing resource for these kinds of questions.

https://www.ifixit.com/Guide/OnePlus+Nord+2+5G+Screen+Replacement/156313

They also cover major appliances, cars, computers, power tools, and other everyday devices.

Tape required: https://www.ifixit.com/en-eu/products/tesa-61395-tape?variant=46746786496852

[–] catch22 5 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

Spain here... How and what area are you referring to? Internet, Cell Phone Towers, Everything was down, no one was accepting credit cards in my neighborhood. The only thing they were accepting were IOU's (if you knew the store owner) and Euros.

[–] catch22 2 points 2 weeks ago (1 children)

interesting, thanks for the tip. I'll check into this, did you seek out companies that offered this specifically? Or did a company happen to offer it after you applied for the position?

[–] catch22 3 points 2 weeks ago

cool site, thx!

[–] catch22 6 points 2 weeks ago

Yeah, I would recommend having a basic understanding of the language first.

75
submitted 2 weeks ago* (last edited 2 weeks ago) by catch22 to c/programming
 

I've been going through this book after looking for something that would help me learn more about some of the common design patterns and practices used in Rust. I think for people who come from an OO, C++, Java, python, ect. background this book is especially helpful because the author gives side by side examples on how some of the ideas in OOP translate to Rust and it's functional design patterns. (And how they don't). Anyways, for me it's been really helpful, I thought others might find it helpful as well.

[–] catch22 5 points 2 weeks ago (6 children)

US citizen here living in Spain. Any good tips on how to get a job in the EU if I don't have residency? (I'm here with my wife who is on a student visa) I have had a few recruiters reach out, and some good interest when I have pinged some companies on linkedin but no one is able to sponsor a work visa. Maybe I'm looking in the wrong country.

 

I kept trying to make the connection between "get" in English and Spanish.

For instance "Can you get some apples at the store?".

Google translates this literally to "¿Puedes conseguir algunas manzanas en la tienda?"

Which is completely wrong, and in Spanish sounds really odd to other people, since conseguir means "to achieve" something.

In my classes, and multiple other times native English speakers had the same question as I did. Native Spanish teachers would just say "No we don't use conseguir for that."

But for me it was never really answered until it finally dawned on me...It turns out it is a stand in for an insane amount of actual verbs which is why I think I as a native speaker and others were so confused. We use it FOR EVERYTHING, without thinking about the context.

For those English speakers learning Spanish, or any language for that matter, don't make the same mistake I did! 😀 Just use the actual verb that is intended.

Quick summary of ways to use "to get":

• Obtain – I need to get a new laptop.
• Receive – She got a letter from her friend.
• Buy – I got some groceries.
• Understand – I don’t get what you mean.
• Become – He got tired after work.
• Fetch – Can you get me some coffee?
• Arrive – We got home late.
• Catch (illness) – He got the flu last week.
• Persuade – She got him to apologize.
• Prepare – I’ll get dinner ready.
• Experience – I get nervous before tests.
• Be punished – He got in trouble for cheating.
• Be affected by something – I got sunburned at the beach.
• Cause something to happen – Get the car fixed today.
• Bring – Can you get the book for me?
• Take revenge – I’ll get you for that!
• Hire – We need to get a plumber.
• Have permission – Did you get to leave early?
• Communicate with someone – I can’t get him on the phone.
• Hear/see clearly – Did you get that message?
• Be in a certain state – Things got worse over time.
• Escape/avoid – He got away with it.
• Seize/arrest – The police got the suspect.
• Move (to a place) – Get inside quickly!
• Make progress – I’m finally getting somewhere with this project.
• Be hit by something – I got hit by a snowball.
• Revenge/retaliate – You got me back for that prank!
• React emotionally – That movie really got me.
• Do something successfully – I got the door open.
• Escape from a place – Let’s get out of here.
• Make someone do something – I’ll get him to help us.
• Cause someone/something to move – Get the dog inside.
• Understand in a deep way – I finally get why she was upset.
31
Great Idea for food waste (www.toogoodtogo.com)
submitted 3 months ago* (last edited 3 months ago) by catch22 to c/[email protected]
 

This app doesn't seem to be as popular in the US as in Europe. But I thought it was pretty amazing how they were able to basically create a collective of retailers and stores that want to sell their day old food rather than throw it in the trash. We REALLY need something like this in the US in every city.

6
DJ Qbert Scratch Cards (www.youtube.com)
submitted 3 months ago* (last edited 3 months ago) by catch22 to c/[email protected]
 

DJ Qbert is a legend, but also I hadn't seen this done anywhere else. Pretty cool concept. He's posting a new scratch technique every day for 1 year and calling them "Scratch Cards".

43
submitted 3 months ago* (last edited 3 months ago) by catch22 to c/[email protected]
 

It’s Not Just Wayfair: Why Does ALL Of Your Furniture Fall Apart?

Interesting commentary on what happened to the furniture industry in the United States.

 

A group of news organizations, led by The New York Times, took ChatGPT maker OpenAI to federal court on Tuesday in a hearing that could determine whether the tech company has to face the publishers in a high-profile copyright infringement trial.

 

Any ideas?

 

I grab a cup coffee from a shop and it's ruined because the barista is wearing cologne or perfume that inevitably has gotten on the cup and it's all I can smell when I take a sip. I guess 2 things, this means 1 they haven't thoroughly washed their hands, and 2 I can't drink the coffee because it smells so bad and I have to throw it out. Not sure why, but I haven't had this happen with any other type of food/drink, just coffee.

 
view more: next ›