Readit News logoReadit News
rpcope1 commented on Crimes with Python's Pattern Matching (2022)   hillelwayne.com/post/pyth... · Posted by u/agluszak
depressedpanda · 3 days ago
Agreed.

After starting my new job and coming back to Python after many years I was happy to see that they had added `match` to the language. Then I was immediately disappointed as soon as I started using it as I ran into its weird limitations and quirks.

Why did they design it so poorly? The language would be better off without it in its current hamstrung form, as it only adds to the already complex syntax of the language.

> PEP: In most other languages pattern matching is represented by an expression, not statement. But making it an expression would be inconsistent with other syntactic choices in Python. All decision making logic is expressed almost exclusively in statements, so we decided to not deviate from this.

> We've had conditional expressions for a long time.

Also, maybe most other languages represent it as an expression because it's the sane thing to do? Python doing its own thing here isn't the win they think it is.

rpcope1 · 3 days ago
The Python core team has kind of run the language off the rails post 3.7 or 3.8 or so. There's been so much crap bolted on to the language for dubious reasons, and often times it comes with whole new sets of weird problems without really making life easier (async was a quintessential example of this in my mind). There's a lot of design choices core to the language itself that make it a poor choice for many tasks, but that never stops anyone from doing it anyways and bolting on lots of chincy "features" along the way.
rpcope1 commented on Crimes with Python's Pattern Matching (2022)   hillelwayne.com/post/pyth... · Posted by u/agluszak
quotemstr · 3 days ago
I've never understood why Python's pattern-matching isn't more general.

First, "case foo.bar" is a value match, but "case foo" is a name capture. Python could have defined "case .foo" to mean "look up foo as a variable the normal way" with zero ambiguity, but chose not to.

Second, there's no need to special-case some builtin types as matching whole values. You can write "case float(m): print(m)" and print the float that matched, but you can't write "case MyObject(obj): print(obj)" and print your object. Python could allow "..." or "None" or something in __match_args__ to mean "the whole object", but didn't.

rpcope1 · 3 days ago
After doing Erlang and Scala pattern matching, the whole Python implementation just feels really ugly and gross. They should have cribbed a lot more of how Scala does it.
rpcope1 commented on 95% of Companies See 'Zero Return' on $30B Generative AI Spend   thedailyadda.com/95-of-co... · Posted by u/speckx
frozenport · 3 days ago
Yo what’s the next hype cycle that smart folks like us should be working on?
rpcope1 · 3 days ago
Probably defense and robotics.
rpcope1 commented on 95% of Companies See 'Zero Return' on $30B Generative AI Spend   thedailyadda.com/95-of-co... · Posted by u/speckx
jampa · 3 days ago
The biggest mistake people are making is treating AI as a product instead of a feature.

While people are doing their work, they don't think, "Oh man, I am really excited to talk with AI today, and I can't wait to talk with a chatbot."

People want to do their jobs without being too bored and overwhelmed, and that's where AI comes in. But of course, we cannot hype features; we sell products after all, so that's the state we are in.

If you go to Notion, Slack, or Airtable, the headline emphasizes AI first instead of "Text Editor, Corporate Chat etc".

The problem is that AI is not "the thing", it is the "tool that gets you to the thing".

rpcope1 · 3 days ago
All true, but then there goes your stratospheric valuations and all the crazy hype. This come to jesus moment may very well deflate one of the few remaining hot areas around software engineering..I could see people being reluctant to stop the hype train as then we'd really have to come to terms with the fact that the "industry" as a whole is kind of in the shitter and it's a less good time to be a software engineer across the board than 5 or 10 years ago.
rpcope1 commented on Steam can't escape the fallout from its censorship controversy   polygon.com/steam-paypal-... · Posted by u/SilverElfin
immibis · 9 days ago
None of this has to be about extending credit. People are trying to buy games with money they have. Why do you say credit has to be involved?

They could try cash-by-mail, like Mullvad.

rpcope1 · 9 days ago
What exactly do you think "credit card" means?
rpcope1 commented on It seems like the AI crawlers learned how to solve the Anubis challenges   social.anoxinon.de/@Codeb... · Posted by u/moelf
rpcope1 · 9 days ago
I'm calling it now, this is the beginning of all of the remaining non-commerical properties on the web either going away, or getting hidden inside of some trusted overlay network. Unless the "AI" race slows down or changes or some other act of god happens, the incentives are aligned that I foresee wide swaths of the net getting flogged to death.
rpcope1 commented on Open hardware desktop 3D printing is dead?   josefprusa.com/articles/o... · Posted by u/rcarmo
motorest · 10 days ago
> Being entirely dependent on Chinese manufacturing to make anything.

I'm sorry, it's very hard to take this sort of concern seriously.

The express goal of US's take on neoliberalism was to dump all manufacturing onto countries like China while abusing IP to prevent anyone else, China included, from ever being able to compete.

Now that the rules that the US abused to stifle innovation are being used by someone else to protect their own investment, you suddenly cry foul?

The US needs to put on their big boy pants and figure out ways to compete in the same terms that everyone else had to endure, just like the whole world was forced to learn how to deal with that. If someone else has the IP you need, pay them. Or do you honestly expect that arbitrary rules are only acceptable if they clearly benefit you alone?

rpcope1 · 10 days ago
Sounds like modern neoliberalism, and it's proponents, are the big mistake here to me, and those shortsighted enough to offshore work of all sorts to countries that aren't close allies should get a big spanking.

Regardless of whether or not it's "fair" or "right" (not that our adversaries do any more than lip service to those concepts anyways), we've got to do something rather than just lay down and take it. If nothing else, there are a lot of people that need to answer as to why if you want all these labor and environmental laws and so on, why it's ok to buy and do things somewhere that's not aligned with those. If you wouldn't subject you and yours to something, it should be illegal to cheat and make someone else do it. "Comparative advantage" is bullshit excuses to offload labor and environmental abuse because it's poor vulnerable brown people somewhere else and I need my cheap shit now.

rpcope1 commented on Nobody’s buying homes, nobody’s switching jobs, America’s mobility is stalling   wsj.com/economy/american-... · Posted by u/sandwichsphinx
BobbyTables2 · 10 days ago
Always hated how every startup sets up office in downtown San Francisco or similarly absurd cost of living area…

Could pay people well but half as much and have nice office in Colorado mountains, Vermont, or somewhere else beautiful…

Of course, startups rarely seem interested in saving money…

rpcope1 · 10 days ago
Most of the real estate "in the mountains" here in Colorado is basically SF prices, with a whole extra set of challenges. Even the front range I think has even worse home price to median income than a lot of the other places people think about when bitching about housing affordability.
rpcope1 commented on Fixing a loud PSU fan without dying   chameth.com/fixing-a-loud... · Posted by u/sprawl_
GuB-42 · 11 days ago
> WD-40 isn't a lubricant

WD-40 is a lubricant. The WD-40 company says it is [1], the Wikipedia article says it is, attempts to reverse-engineer the (secret) formula have found compounds typically used as lubricants and it is rather obvious to anyone who has used it.

It is the best lubricant for you application? Probably not, and that includes fans. It is probably not the best at anything unless you have an Atlas missile lying around. It is not the best lubricant, penetrating oil, water displacer, rust protector, etc... but it does all of it to some extent, and it is cheap and convenient.

Anyways, thank you for the suggestion of using gear oil, I didn't try this one and it sounds like a good candidate. I don't have marine grease but what I understand is that it is similar to basic lithium grease but formulated to resist the harsh marine environment (so maybe with some corrosion inhibitors).

[1] https://www.wd40.com/how-to/faqs/

rpcope1 · 11 days ago
I mean I'm sure water could be considered a lubricant too, but it's almost never a good one. WD-40 I'm sure in some technical sense can function as a lubricant but it's a really crappy one and if nothing else tends to dry out quick. Even as a penetrating fluid it's pretty shit even compared to liquid wrench or ATF and acetone. I don't know why people bother using it other than as a water displacer.

Marine bearing and chassis grease is really different than white lithium grease. Lithium grease in general probably isn't advisable on a fan the more I think about it as it tends to destroy plastic and rubber. On a real bearing like a wheel bearing even a thin coat of high pressure grease like synthetic marine grease is going to outperform basically everything else (unless you've got an oil pump involved), and again would be the first thing I'd try and pack a bearing of rotating assembly with hands down. t's probably cheaper or about the same if you go pick up something like a tub of Supertech synthetic marine. I'm sure if you go ask somewhere like BobIsTheOilGuy forums someone there will be able to point to an optimal solution.

rpcope1 commented on F-Droid build servers can't build modern Android apps due to outdated CPUs    · Posted by u/nativeforks
wpm · 12 days ago
I’ve got an old Ivy Bridge-EP Dell workstation they can borrow goddamn SSE4.1 is nearly old enough to drink.
rpcope1 · 12 days ago
Yeah I was kind of shocked too. Core 2 could do both of those instruction sets. A used Dell Precision can be had for very little and probably would be grossly more efficient than whatever they're using.

u/rpcope1

KarmaCake day1471October 18, 2014
About
“Where you come from is gone, where you thought you were going to never was there, and where you are is no good unless you can get away from it. Where is there a place for you to be? No place.

Nothing outside you can give you any place," he said. "You needn't look at the sky because it's not going to open up and show no place behind it. You needn't to search for any hole in the ground to look through into somewhere else. You can't go neither forwards nor backwards into your daddy's time nor your children's if you have them. In yourself right now is all the place you've got. If there was any Fall, look there, if there was any Redemption, look there, and if you expect any Judgment, look there, because they all three will have to be in your time and your body and where in your time and your body can they be?”

View Original