It’s a test for the compiler which ensures that these legal yet extremely weird expressions continue to compile as the compiler is updated. So there is a purpose to the madness but it does still look pretty funny.
It’s a test for the compiler which ensures that these legal yet extremely weird expressions continue to compile as the compiler is updated. So there is a purpose to the madness but it does still look pretty funny.
There’s a crate for it too: anymap2
Not exactly the same thing but this is still pretty funny. This is code that is technically 100% legal Rust but you should definitely never write such code 😅.
I wonder how accurate it is though.
To save it and save people a click to reddit:
Just about every time I see someone I stop. I kind of got out of the habit in the last couple of years, moved to a big city and all that, my girlfriend wasn’t too stoked on the practice. Then some shit happened to me that changed me and I am back to offering rides habitually. If you would indulge me, it is long story and has almost nothing to do with hitch hiking other than happening on a road.
This past year I have had 3 instances of car trouble. A blow out on a freeway, a bunch of blown fuses and an out of gas situation. All of them were while driving other people’s cars which, for some reason, makes it worse on an emotional level. It makes it worse on a practical level as well, what with the fact that I carry things like a jack and extra fuses in my car, and know enough not to park, facing downhill, on a steep incline with less than a gallon of fuel.
Anyway, each of these times this shit happened I was DISGUSTED with how people would not bother to help me. I spent hours on the side of the freeway waiting, watching roadside assistance vehicles blow past me, for AAA to show. The 4 gas stations I asked for a gas can at told me that they couldn’t loan them out “for my safety” but I could buy a really shitty 1-gallon one with no cap for $15. It was enough, each time, to make you say shit like “this country is going to hell in a handbasket.”
But you know who came to my rescue all three times? Immigrants. Mexican immigrants. None of them spoke a lick of the language. But one of those dudes had a profound affect on me.
He was the guy that stopped to help me with a blow out with his whole family of 6 in tow. I was on the side of the road for close to 4 hours. Big jeep, blown rear tire, had a spare but no jack. I had signs in the windows of the car, big signs that said NEED A JACK and offered money. No dice. Right as I am about to give up and just hitch out there a van pulls over and dude bounds out. He sizes the situation up and calls for his youngest daughter who speaks english. He conveys through her that he has a jack but it is too small for the Jeep so we will need to brace it. He produces a saw from the van and cuts a log out of a downed tree on the side of the road. We rolled it over, put his jack on top, and bam, in business. I start taking the wheel off and, if you can believe it, I broke his tire iron. It was one of those collapsible ones and I wasn’t careful and I snapped the head I needed clean off. Fuck.
No worries, he runs to the van, gives it to his wife and she is gone in a flash, down the road to buy a tire iron. She is back in 15 minutes, we finish the job with a little sweat and cussing (stupid log was starting to give), and I am a very happy man. We are both filthy and sweaty. The wife produces a large water jug for us to wash our hands in. I tried to put a 20 in the man’s hand but he wouldn’t take it so I instead gave it to his wife as quietly as I could. I thanked them up one side and down the other. I asked the little girl where they lived, thinking maybe I could send them a gift for being so awesome. She says they live in Mexico. They are here so mommy and daddy can pick peaches for the next few weeks. After that they are going to pick cherries then go back home. She asks if I have had lunch and when I told her no she gave me a tamale from their cooler, the best fucking tamale I have ever had.
So, to clarify, a family that is undoubtedly poorer than you, me, and just about everyone else on that stretch of road, working on a seasonal basis where time is money, took an hour or two out of their day to help some strange dude on the side of the road when people in tow trucks were just passing me by. Wow…
But we aren’t done yet. I thank them again and walk back to my car and open the foil on the tamale cause I am starving at this point and what do I find inside? My fucking $20 bill! I whirl around and run up to the van and the guy rolls his window down. He sees the $20 in my hand and just shaking his head no like he won’t take it. All I can think to say is “Por Favor, Por Favor, Por Favor” with my hands out. Dude just smiles, shakes his head and, with what looked like great concentration, tried his hardest to speak to me in English:
“Today you… tomorrow me.”
Rolled up his window, drove away, his daughter waving to me in the rear view. I sat in my car eating the best fucking tamale of all time and I just cried. Like a little girl. It has been a rough year and nothing has broke my way. This was so out of left field I just couldn’t deal.
In the 5 months since I have changed a couple of tires, given a few rides to gas stations and, once, went 50 miles out of my way to get a girl to an airport. I won’t accept money. Every time I tell them the same thing when we are through:
“Today you… tomorrow me.”
tl;dr: long rambling story about how the kindness of strangers, particularly folks from south of the border, forced me to be more helpful on the road and in life in general. I am sure it won’t be as meaningful to anyone else but it was seriously the highlight of my 2010.
*edit: To the OP, sorry to jack your thread, this has nothing to do with Hitch Hiking. I sort of thought I could just get this off my chest, enjoy the catharsis and watch the story languish at the bottom of the page. Glad people like hearing the tale and I hope it moves you to be more helpful in your day to day. *
Well in some languages other than English the sun is actually called “Sol”.
Frankly, all of your points sound quite ignorant. Syntax is literally just a matter of getting used to it. Comparing HashMap ergonomics doesn’t make sense, you should rather compare to struct construction. There are many good reasons for different string types and number types. There are good reasons not to bake in async. Rust documentation is in the code for a very good reason and it’s actually really nice to read docs like that (obviously read it on docs.rs, not in the code itself).
I could go on but there are answers to all of your specific qualms if you just bothered to look for yourself.
Be the change you want to see in the world!
This is a good thread, thank you all.
Steins;Gate, can’t believe I haven’t seen anyone mention it yet. It’s good, but do watch at least halfway before you judge it.
True is some of this, I’ve been cast iron my whole life.
I know you’re being sarcastic but if we actually look on the bright side, then tools like this could make indie games easier to produce. More and better indie games could in theory bring more competition to companies like EA and that could actually pressure them to make games cheaper.
The only time I’ve ever needed a Mutex<()> so far with Rust is when I had to interop with a C library which itself was not thread safe (unprotected use of global variables), so I needed to lock the placeholder mutex each time I called one of the C functions.
Actually I think in this case you’re still better off using a Mutex with “data” inside. I’ve done this before. The idea is that you make a unit struct MyCFuncs
or whatever and then you only call the C functions from methods of that unit struct. Then you can only access those methods once you lock the Mutex and get the instance of the unit struct. It feel elegant to me.
I wouldn’t even call that a functional feature, that’s just the language being based on expressions and bool
having a then
method. It’s more object-oriented in that sense if anything tbh
I was kinda baffled by this too. I like the general idea that they present (you need to pay your own long-tenured engineers higher than market rate cause they actually know more about your own system), but this idea of a formula? What, are you gonna start counting git commits? A formula sounds like a super weird way to solve that problem.
Just look at the engineers that add value in your company and pay them a fair market rate. When someone leaves, find out what salary they get in the new job and ensure all your remaining engineers get at least that amount and adjust as you go along. Something like that perhaps.
The expect lint is really great, been looking forward to that for a while.
Still waiting for more flexible const generics 🤞
Personally I’m a developer, so I care a lot about integrating parts of my development stack. A lot of those things don’t “just work” on Windows, or even Mac, so I’m happy to stick with Linux instead.
I’m also a developer, but I’m also a user, depending on what I’m doing. And this is a very poor excuse for Linux having bad UX.
Linux shouldn’t only be for developers, it should be for everyone.
Then again, how many examples are there for things that should “just work” and do on Linux but don’t on Windows?
Maybe some but much, much fewer. It shouldn’t be surprising - Microsoft has hundreds if not thousands of people hired specifically for creating working UX and design. Linux just can’t compete with that since it’s mostly developers working on it and, again, developers unfortunately make for awful UX designers.
I don’t think external monitors or a responsive UI is a matter of “perspective”. These are things that should just work, always, for everyone.
What are the examples you are thinking of btw?
I’ve previously posted a few examples:
Is there a way to keep Linux responsive when at ~100% CPU usage?
I also regularly have my window manager crash when inserting my laptop into my docking station. Happens maybe 20% of the time. Sometimes even when it works the display scaling makes things blurry until I reset the scaling from 150% back to 100% and back again, then it’s fine. Add to this a few annoyances with UI, but these are more forgivable.
There’s all kinds of these small problems that compound to just make for a much worse experience. It doesn’t just work but it needs to if it really wants to provide a viable alternative to normal people.
Keep in mind, I am not a “normal person” - I am a professional software engineer and I still find all this stuff super annoying.
So aside from Baldurs gate 3, who’s actually making good RPGs these days?