skysight-inc/HackerNews huggingface dataset:
Do you have an example of bad code you'd expect people to use assignment expressions and f-strings for?

I don't think I've come across any f-string abuse in the wild so far, and my tentative impression is that there's a few patterns that are improved by assignment expressions and little temptation to use them for evil.

It helps that the iteration protocol is deeply ingrained in the language. A lot of code that could use assignment expressions in principle already has a for loop as the equally compact established idiom.
How do they couple "This area desperately needs help" in the same category with "Close your borders, close your windows, lock your doors, and stay away from people until this is over."

Or is it that the issue in the Congo should trigger the exact same types of government alerts, since it could easily progress? That just because it hasn't spread around the world, is easily could if people let their guard down?
I've always found it interesting how the term "piracy" has been mostly unquestioningly accepted by the media as the appropriate term to use for copying, which arguably doesn't steal anything (unlike what has traditionally been known as piracy before the digital age).
On a scale of Luke Cage Season 1 to Daredevil Season 1, how good was Jessica Jones Season 3?
Funny the occupants didn't mind it was bent. I guess those things must have been really expensive to rebuild. :P
Safer, smarter blockchain contracts with Pact
You should remove one word from that sentence so you've got the right count.
Does that mean someone born in 2008 will think C++ is simple and elegant?
You report to them your outage (https://support.google.com/cloud/contact/cloud_platform_sla) and then get monetary credits. e.g. for an arbitrarily-clicked service [1], it's 10% off for a month when they don't hit three 9s, 25% if they don't hit two 9s, and 50% off if they're below 95%. Which honestly isn't a very high uptime requirement, but there is a very clear process for getting payouts when they miss it.

[1] https://cloud.google.com/filestore/sla
It's extremely common.

I've had to use a workaround for that every time I've tested a regular expression match that I wanted to process for example. Also problematic in comprehensions...
He's an astrophysicist isn't he? So why's this linking to an article in the Journal of Experimental Medicine written by nobody called Brian May? Flag.

Edit: Oh I see, the submitter owns scite.ai. Seems like a bad way to plug a product.
Sure, but not every title needs to give away the meaning of a story. It can be frustrating when it doesn't because we're so conditioned to expect that—but interrupting such conditioning is part of the point of HN. We want something more than subsecond reflexes to be at work here.

If people encounter a title that doesn't fully yield to 300ms of parsing, that causes irritation, which is a good thing. Not good in itself—irritation is a bit painful—but good because it causes the rapid-reflexive subsystem to throw an error and pass control to the slower, reflective system that is able to process more information. That's the system we actually want to get activated. One's it's engaged there's a chance that it will remain engaged, which—this is the hypothesis anyway—will lead to higher-quality thoughts and comments. That's why I say it's good for HN users to have to work a little.
Almost invariably they break rules, that’s why sane systems have redundancies and contingencies for “what do we do when meatsack A fails to follow the rules?”.

Sometimes the answer is nothing (the result of the rule break may be minor) other times not.
As far as I can tell, the term "virtue signalling" has never been used to express an idea of any substance. It seems to be a way of name-calling ideas that the user of the term is unwilling to engage on in terms of substance.
A Conversation with Donald Shoup: Parking for E-Scooters
See my sibling comment - they have a process for talking to them to get discounts for months when they don't meet the SLA. If they don't give you said discount, you can sue them for breach of contract, but if they pay out you can't sue them for damages.
The only season 4 I care about soon is The Expanse.
Totally agree. It's a pulpy show (hacker noir?), but the shifting pace and focus throughout the three seasons that have aired have consistently kept me entertained.

Corny earnestness aside, I think it does a great job exploring the tension between software that eats the world and the people who live in it, between liberation and anarchy, and the "reality" of revolution in a global political context.

It's a fun show to think too much about and I'm really looking forward to this final season.
Actually it doesn't violate any of the principles behind the language. It could have been there from day one, like tons of others things added later and now totally loved.

I should know, I've worked with Python for 22 years...
A more useful paper which has a complete Earley algorithm in pseudocode: https://core.ac.uk/download/pdf/28889090.pdf
Mr Robot lost most of its audience[1] probably because Season 2 was super slow and focused more on the character than the hacking.

[1] https://en.wikipedia.org/wiki/List_of_Mr._Robot_episodes#Rat...
> I also like to see who’s advertising because it shows which industries/companies compete on marketing, instead of their own merits.

Quite frankly this is wrong. You can have all the merits in the world, but if people don't know about it then you're out of business.

> It really shows which products have high marginal profits.

AdWords can be life or death enough that it's worth eating the cost because the alternative is not having a business.
Original paper: https://arxiv.org/abs/1905.08727
Reva Siegel at Yale Law is good on this topic

RBG I believe supports using the privileges and immunities clause instead
I disagree in general. I mean some are, but when I travel and am coming back via Heathrow, I quite often sit myself near a group of first-time visitors on the Tube, just because its interesting to evesdrop on their impressions. Typical American family looking through the window at the surburban streets: "Look at those houses, they are so small". Seeing through other people's eyes can be fascinating.
Weird-exprs.rs – Just a grab bag of stuff you wouldn't want to write
It's pushing me to a "I'll watch it when it's done. The whole thing, not the season. Maybe, if I still feel like it by then" stance, which isn't where they want me for a monthly subscription. Cancellation imminent for that and other reasons.
Berkeley becomes first U.S. city to ban natural gas in new homes
Do parsers of previous pythons emit warnings: "this feature is not available in pythons 3.3 3.4 3.5 etc" ?
Also curious! I've looked in the past and had a lot of trouble finding one. A book recommendation would also be very helpful!
I’ll admit I was one of those people who was very pessimistic about the firefighting effort. To be honest, seeing the fire at Notre Dame gave me flashbacks to 9/11 and seeing the towers burning. I thought in light of the enormous loss of life that the new policy might be to not send in a ton of people to a large structure in danger of collapse.
The timestamp will tell you that I added a new item in 2019, but it won't tell you if I put in proper absolute 2019 coordinates, or did I draw it based on an aerophoto overlay that was made with 2016 coordinates, or did I add that item in it's proper relative position with respect to surrounding items that were placed in 2013 and not adjusted.
I noticed some changes to pickle; do people still use pickle for Real Work?

Potential vulnerabilities aside, I got bitten by some migration issue back in the 2.2 to 2.4 transition where some built-in types changed how they did their __setstate__ and __getstate__ (iirc) and that caused objects picked under 2.4 to not unpickle correctly under 2.2 or something like that. After that I never wanted to use pickle in production again.
In the context of this conversation (dynamic vs static), R is in the same boat as Python.

And I don't know about today, but when I used pandas years ago, it was much faster than R.
The problem with /dev/urandom is that it's always available, even before any entropy was added. Fixing /dev/urandom to block until enough entropy is available once causes breakage like in the article. That is one of the reasons why getrandom() was added, so that existing applications can keep using the old and broken behavior but applications that care about the RNG being properly initialized can wait for it. So software that does crypto switched to it, and then things broke anyway.
In fact I’d go further... there is too much emphasis that https == trusted && safe
It doesn’t
>It violates the philosophies of Python and UNIX where one function, or one line, should preferably only do one thing, and do it well.

Python never had that philosophy... You might confused it with "there should be one, and preferably only one, obvious way to do anything".
What strikes me is how carefully they've thought about the problems with Ethereum, and other blockchain technologies. They deliberately make sure that Pact is NOT Turing complete, so they can avoid some of the hacks that took place with Ethereum. They emphasize a declarative style. And yet they also make it so the contracts can be fairly upgraded.

And they've also solved the bandwidth problems that technologies like Bitcoin were facing.

I knew nothing about these people, at all, I'd never even heard of them, till Sunday, when the CEO came to a party I was having at my place in NYC. But then I got interested, so I've been reading their blog posts. The more I read about them the more I think this might be the startup that's come up with the answers to some of the problems that other blockchain technologies were facing.
Not arrested.
There was a misunderstanding, I cleared it up. In China you are often given the...opportunity to informally deal with these issues. I was not give a choice about the meeting, there is no way to know the intent and duration of these meetings, or when you will be...invited to one- so my friends acted accordingly and followed established procedure.

I just want to build things, show off my city, and it's tech. I'm doing my best to act normally, update my channel normally and not be at the center of any larger discussions likely to cause me additional difficulty.

I'm meeting with Bunnie Huang this weekend and he'll be able to verify I'm no longer in custody and in control of my accounts.
No, the claim is that it's ordinary and just part of the way the world works.
But it isn't giving away the "meaning" of the story - it's giving critical context that makes the story a story and not just some random "John Doe" on Github throwing away their personal projects to new maintainers.
I dont like the positional only arguments..

Really, I dont like anything that trys to force a future developer into using your code the way you expect them to.
It also seems that certain bad actors are owned by large media companies that have successfully lobbied google to stay listed.
Halt and Catch Fire is fantastic, I highly recommend it to everyone.
This approach is from a designer perspective and not an engagement/user retention perspective.
Earlier response to the vorpus criticism (presumably):

https://www.kennethreitz.org/essays/requests3-update
Without any mention of the person or specific repos, I for a split second thought that this article was about Github shutting down and all repos needing a new home lol
I recommend a talk from Pycon 2019, wherein Dustin Ingram explains PEP-572 (aka the Walrus Operator) better than I’ve seen done elsewhere.

IMHO, the usefulness of this new operator outweighs the slight learning curve required to get past the awkwardness you will experience when you are first acquainted to it.

Here is that talk:

https://youtu.be/6uAvHOKofws
It did go downhill rather quickly, though. The first season was awesome, and the second was watchable. Only momentum kept me watching to the end of the third.
Agreed. I didn't feel like the later seasons slowed down so much as take the story darker, lingering a bit in places to draw out the contrast. And even if one finds the story lagging, the score by Mac Quayle is sufficient reason to check it out!
The return statements make it a poor example. There's an example from the standard library in the PEP that has a similar shape:

reductor = dispatch_table.get(cls)
if reductor:
rv = reductor(x)
else:
reductor = getattr(x, "__reduce_ex__", None)
if reductor:
rv = reductor(4)
else:
reductor = getattr(x, "__reduce__", None)
if reductor:
rv = reductor()
else:
raise Error(
"un(deep)copyable object of type %s" % cls)

Becomes:

if reductor := dispatch_table.get(cls):
rv = reductor(x)
elif reductor := getattr(x, "__reduce_ex__", None):
rv = reductor(4)
elif reductor := getattr(x, "__reduce__", None):
rv = reductor()
else:
raise Error("un(deep)copyable object of type %s" % cls)
Nice product! And thank you for making it opensource.
Any particular reason why you chose Ruby?

A little plug : I have developed https://www.guardscript.com. It is a service that detect any modification made to static files hosted on your website. The goal is to detect any unwanted modification and revert them as soon as possible.
Ideally the defaults should be sensible. I have found they mostly are, except the f-string one.
I don't mind the people who want to make the world a better place.

I mind the people who want to do so without regard for the consequences and collateral damage of their actions, which can hurt those they think they're trying to help.

I mind the radicals. They are dangerous. They don't have a sane mindset. Worse than them though are the ones like them who don't care about making the world a better place, but rather simply want to see the world burn, because they are angry. These are the people that manipulate good causes towards not so good ends.
Then maybe just get an air instead of a pro?
An average American car is on the road for 13 years and this number keeps increasing. (source: lost)
IntelliJ: It's not horrible, but it isn't really good/pretty either.
I see what you're saying, but I kinda like the gets ":=" operator.
> Your bike doesn't fit! This is like saying "I wore shoes that are two sizes too small and my feet hurt".

Happened with multiple bikes, after having a fit, and it's not like I got the recumbent fitted. And a post back you were saying it was normal for cycling to feel like boxing training. (It is - for upright cycling).

> You are not everyone and just because you have problems the vast majority of people do not. My nan who is 4ft 11 (so a very small lady) managed with a regular bicycle until she was in her late 70s. Are you saying that you are frailer than a woman in her late 70s?

So someone who's about half the weight of the average person didn't suffer issues from having too much weight on too small an area. That's exactly what I'd expect. The vast majority of people do find cycling uncomfortable - and don't cycle as a result.

> I ride almost everywhere in jeans and t-shirt unless when it is boiling hot in summer when I wear T-shirt and shorts. I don't ride like some people who seem to think it is the tour-de-france everyday.

Does this not suggest that it's you who's unusual? People don't wear those padded shorts for fun, they wear them because it's unpleasant not to. Maybe you're some combination of light, riding short distances, insensitive to particular kinds of pain, or just unusually suited to saddles via some random quirk of anatomy. Lucky you, but you are not representative.

> Fixing the chain coming off is literally just feeding it back on. Does it take years of experience to loop something round cog ... no.

You think that as an experienced cyclist. I've had to stop for people on the side of the road who couldn't/wouldn't put their chain back on, more than once. A normal commuter just isn't interested in learning how to do maintenance, even something that basic.

> You are just making stuff up to win the argument at this point.

Wow, that's some first-tier projection there.
We started our business with a single static page, then multiple static pages. The pricing page basically said "email us", the contact page just had an email address. All account management was an off the shelf API management system we paid 25 USD/month. Everything was manual, new customers had to be added manual to a text file, we created and emailed invoices with MS Office. To see if there is a market and customer demand it's enough.
And? The fact of the matter is, there's no workable alternative. You either have a good source of entropy, or you don't. If you don't, people aren't going to stop using things like OpenSSH. If a box is blocked on boot that's universally considered broken and everybody will try to work around it.

Fortunately in practice the situation isn't so dire. There are usually multiple hardware RNGs on a system. They may be all untrusted, but I'll trust them together before I'll ever trust the strength (and persisting correctness) of guesstimators. Ironically, entropy guesstimators are predicated on the very notion that the hardware is benign. Malicious hardware could implement subtle timing patterns in interrupts, much like what they might do for an actual RNG (e.g. use an AES encryption function to "randomize" their visible behavior). And in any event, you can still mix various system timing events into your pool without pretending you can quantitatively and reliably know their entropic contribution.
> The big revelation about the main character was not executed well.

Yep. It was too obvious and we've already seen that in Fight Club.

It would have been a lot better if Elliot had never figured it out but the writers had left little breadcrumbs here and there for the internet to make conspiracy theories.
Could not agree more.

I'm not sure if it's a recent phenomenon or if it's something that makes itself apparent in young adulthood, but I can't help but notice how many people frame their hobbies and extra-work activities in terms of their ability to maximize personal potential and provide some measurable personal profit. I'm certainly not exempt from this thought-pattern, and I think it takes a serious toll on one's mental well-being. When every bit of your free time must be driven towards some worthwhile pursuit that will provide some measurable benefit, you rob yourself of actually cultivating a genuine hobby: an activity that you pursue for its own sake and enjoyment, and not for some additional gain as a result of practicing said activity
>in the 1970s, the oil companies decided they would no longer look for deposits in layers dating to the 50 million years after the Permian Triassic extinction -- there is nothing for them to find at that level

You’re pretty spot on. Oddly, the Permian is one of the prolific source rocks in the US now!
The state of the art is discouraging for the money and years poured into it.

Recognizing solid obstacles is still unreliable. On the one side, there's Tesla running into stationary objects multiple times, and Uber running down a pedestrian. On the other side, there's a false alarm rate which causes sudden stops.

Low-speed self-driving vehicles ought to work reliably by now, but don't. Google's cute little bubble car, top speed 25MPH, was discontinued. Voyage has some cars in a retirement community. Some, as in 3. With safety drivers.[1] Local Motors has been issuing press releases for years, but not much is on the road. There are some self-driving shuttle buses, but they all have "safety drivers". EasyMile has real autonomous shuttle buses, but they had to drop the speed to about 10 MPH.

Worse, all these systems have a huge engineer to passenger ratio. Nothing is close to being financially realistic. That's not a permanent problem; in the early days of the Internet, it was said that the ratio of PhDs to packets was too high. But this is a long way from profitability.

It shouldn't be this bad.

[1] https://www.villages-news.com/2019/01/31/villager-treated-to...
Viral App FaceApp Now Owns Access to 150M People's Faces and Names
The profit margins we are eating into is exactly ZERO. Why? because if most of the time i need to actually pay for it, i'll just use the cheaper alternative: Google Fonts.

There will be times when I need to use this font and make something that will go live. That's the time to buy a font.

If font making is not profitable, then don't make fonts.
date -u just returns 1-second resolution? It's trivial to go through all the possibilities...
MACs are very much not random. Especially on a series of machines for a given provider, you can likely predict one. Date of the bootup is also not random if it's got only seconds resolution and you can figure out when a machine comes online by constantly trying to connect. In practice you added much fewer than 48 bits.
Gotta ask how many of these changes are actually reflective of changing environments.

I could see with c++ that between 2003 and 2014 a fair few underlying machine things were changing and that needed addressing in the language.

But Python is not quite as close to the machine, and I don't see how something like the walrus is helping much. If anything it seems like you'd scratch your head when you came across it. And for me at least one of the main attractions of python is you're hardly ever surprised by anything, things that are there do what you guessed, even if you hadn't heard of them. Function decorators for instance, you might never have seen one but when you did you knew what it was for.

Same with the debug strings. That seems to be a special case of printing a string, why not leave it at that? I'm guessing a lot of people don't ever read a comprehensive python guide, what are they going to do when they see that?
It's not in a language I've ever used (furthermore, I explicitly mentioned beginners in my comment).
This is the question of the day wrt WebAssembly: Will Apple continue to support wasm in Safari?

Does wasm strategically impact the dominance of the App Store?
Nice way in without walrus

m = re.match(p1, line)
if m:
return m.group(1)
m = re.match(p2, line)
if m:
return m.group(2)
m = re.match(p3, line)
...

With walrus:

if m := re.match(p1, line):
return m.group(1)
elif m := re.match(p2, line):
return m.group(2)
elif m := re.match(p3, line):

The example would have been better if it didn't have the return, but just a value assign or a function call.
Yes but whether self driving cars falls into "provably impossible", I'm not so sure. Given squishy bags of meat can do it.
I don't know how you read it - 'if x is assigned the value y'? Most other things in Python can just be read out loud.
What does it mean to "Carry modern slavery risks"? Do you mean "they employ slaves, e.g. the owner took their passports and controls them like slaves?"
Ok, I've taken the word "all" out of the title above.
> Even the less controversial type hints are here on maybe 10 percent of the code out there.

I think this metric is grossly overestimated. Or your scope for "out there" is considering some smaller subset of python code than what I'm imagining.

I think the evolution of the language is a great thing and I like the idea of the type hints too. But I don't think most folks capitalize on this yet.
Track your tasks and ask him if the new task has the highest priority. If sincerity is an option, inform him of the cost of interruptions when someone is doing deep work. Propose a system for following up on and completing tasks.
EFF Hits AT&T with Lawsuit for Selling Customers’ Location to Bounty Hunters
Many languages don't distinguish between statements and expressions—in some languages, this is because everything is an expression! I'm most familiar with these kinds of languages.

I'm not familiar much with Python, beyond a little I wrote in my linear algebra class. How much does the statement/literal distinction matter to readability? What does that do for the language?
Trump Expressed Concerns About Pentagon Cloud-Computing Contract
Party Like a Russian, Carder’s Edition