MurphyA/hacker-news huggingface dataset:
by zahlman | 2025-04-11 02:41:28+00:00
A compromise version:

def _f_part(item) -> str: match item: case str() as s: return s case Interpolation(value, _, conversion, format_spec): return format(convert(value, conversion), format_spec) def f(template: Template) -> str: return ''.join(map(_f_part, template))

The `match` part could still be written using Python's if-expression syntax, too. But this way avoids having very long lines like in the Ruby example, and also destructures `item` to avoid repeatedly writing `item.`.

I very frequently use this helper-function (or sometimes a generator) idiom in order to avoid building a temporary list to `.join` (or subject to other processing). It separates per-item processing from the overall algorithm, which suits my interpretation of the "functions should do one thing" maxim.
by AStonesThrow | 2025-04-11 02:42:34+00:00
> driven up to you by a remote driver

This is hopefully illegal and not actually what is done, because I have learned from Waymo that it is not permissible or even possible for the CS reps to remotely drive the car. They merely push "suggestion" commands to be considered by the onboard Waymo Driver.

Remote human drivers have too much latency and not enough realtime information available to "drive" a vehicle on public roads.
by leereeves | 2025-04-11 02:44:22+00:00
Yep. It's also worth noting that Trump didn't invent these charges. Many Jewish students sued, and the university president admitted:

> I know that many of our Jewish students, and other students as well, have found the atmosphere intolerable in recent weeks. Many have left campus, and that is a tragedy.

...

> The encampment has created an unwelcoming environment for many of our Jewish students and faculty. External actors have contributed to creating a hostile environment in violation of Title VI, especially around our gates, that is unsafe for everyone—including our neighbors.

https://president.columbia.edu/news/statement-columbia-unive...
by nickpsecurity | 2025-04-11 02:45:22+00:00
"On those two products we take the printed circuit board, which is just a blank board that has no components"

Don't count on that. On Schneier's blog years ago, we brainstormed attacks on hardware in subversion discussions. One idea was putting a hidden chip in the board itself. Another was modifying the board's material to emanate secrets for RF attacks by a nearby attacker. There's a reason high-security at NSA required TEMPEST shielding. I wonder who prints the circuit boards.

On the chip side, substituting one of them with the same covers would be an easy attack. One team showed a tiny change at analog level could have subversive effects with low odds of being spotted. I wonder how they verify they received the correct chips.

Just from a domestic, manufacturing angle, the story sounds great. I'm grateful the company made sacrifices to make smartphones in America. I hope their example leads to innovation that drives the prices further down.

"we are doing the entire manufacturing process of all of the electronics, meaning resistors, capacitors, integrated circuits"

I disagree with this take unless the integrated circuits are designed and fabbed in America and by Purism. They're critical, high-value parts of the product that used to be piles of individual components before ASIC's. If not made here, I'd say upfront it's manufactured in USA "except for (percentage or function of) integrated circuits in it."
by superkuh | 2025-04-11 02:46:39+00:00
Yes. This happened to me in 2019 flying from Minneapolis to Denver with family when I forgot my wallet (stupid, I know). I was taken aside and someone from homeland security in DC called on their phone and asked me a handful of questions about my life. Like what the church across the street from my apartment was called (I didn't know!). They eventually let me through the security check. I was really worried the entire trip but on the return flight I didn't have to do it again.

But that was completely unintentional. I'd never intentionally try to fly when I don't have the required ID.
by saintfire | 2025-04-11 02:46:48+00:00
Expertise exists primarily where things primarily happen. If no companies manufacture complicated products in a particular country that doesn't mean the country is too dumb to make it, it means they don't have a large pool of experts in that field.

If you read the article, the founder of purism even says as much.

"After we were successful on the Librem 5 crowdfunding campaign, we took our own electronics engineers (EEs), and then we worked with Chinese design and manufacturing through 2018, 2019, and 2020, because that's where every phone is made."

So the only phone that qualifies for "Made in the USA" tag learned (at least in part) how to make it from Chinese engineer(ing firm)s.
by tbrownaw | 2025-04-11 02:47:06+00:00
> To identify a “safe” level of alcohol consumption, valid scientific evidence would need to demonstrate that at and below a certain level, there is no risk of illness or injury associated with alcohol consumption. The new WHO statement clarifies: currently available evidence cannot indicate the existence of a threshold at which the carcinogenic effects of alcohol “switch on” and start to manifest in the human body.

This does not say that it is known to be unsafe.

This says that there is not sufficient data to know that it is safe.

These are very different things, and presenting the later as is it was the former ~~is dishonest~~ showcases the poor level of statistical literacy that even most otherwise knowledgeable people have.
by voidspark | 2025-04-11 02:47:57+00:00
He is responding in good faith. You lack historic perspective.

CHIPS act is still in place

https://www.techtarget.com/searchcio/news/366622293/Trump-pu...

If that is repealed, it would be replaced by something with more favorable terms for the US.

TSMC is investing $65B to build three fabs in Arizona.
by zahlman | 2025-04-11 02:48:04+00:00
Yes. Just like with f-strings, the call to `fib_slow()` is extracted at compile-time, and occurs eagerly at run-time.

What t-strings offer over f-strings is the ability to control how the final string is put together from the calculated results. And the t-string doesn't have `__str__` - you have to explicitly pass it to a named formatting function to get a string. (There is `__repr__, but that's for debugging, of course.) So you can potentially reuse the same Template instance (created from the t-string) multiple times in different contexts to format the same information different ways.
Tell HN: Cloudflare billing issue that is over 6 months old and no support
by dawie | 2025-04-11 02:49:43+00:00
It appears that Cloudflare has had a known billing issue for more than 6 months now and there is no way to get in touch with support. Is anyone else having issues?

I can't update DNS and they have basically blocked my domain and there is no way to unblock it, even for other company's services on thier network...
by nickpsecurity | 2025-04-11 02:50:01+00:00
I'll add that the elites who pushed for earlier trade deals often did it specifically to get rich selling off America's domestic manufacturing and many jobs. Now, countries like China have them.

So, Trump's policies should be seen as an attempt to reverse for Americans' benefit damaging policies from before which are still active. Now, whether that will do good or harm in the long term is anyone's guess. We already see companies investing more in American infrastructure, though.
by priyadarshy | 2025-04-11 02:50:23+00:00
Her sleep is terrible since she's breastfeeding, so even when she does get some sleep, it'll be while dozing off in some unexpected and ergonomically diabolical position.

For our first baby, I had that on-edge feeling, I woke at every hint of a cry but this time I can just sleep through it and rely on my wife letting me know if I'm needed. It's not fair but it means at least one of us has the emotional resilience to deal with our toddler during the day :)
by hn_throwaway_99 | 2025-04-11 02:52:16+00:00
> As someone else said - maybe you haven't noticed but there's a machine washing your clothes, and there's a good chance it has at least some very basic AI in it.

This really seems like an "akshually" argument to me...

Nobody is denying that there are dishwashers and washing machines, and that they are big time savers. But is it really a wonder what people are referring to when they say "I want AI to wash my dishes and do my laundry"? That is, I still spend hours doing the dishes and laundry every week, and I have a dishwasher and washing machine. But I still want something to fold my laundry, something that lets me just dump my dishes in the sink and have them come out clean, ideally put away in the cabinets.

> Obviously this is really wishing for domestic robots, not AI

I don't mean this to be an "every Internet argument is over semantics" example, but literally every company and team I know that's working on autonomous robots refers heavily to them as AI. And there is a fundamental difference between "old school" robotics, i.e robots following procedural instructions, and robots that use AI-based models, e.g https://deepmind.google/discover/blog/gemini-robotics-brings... . I think it's doubly weird that you say that today's washing machines "has at least some very basic AI in it" (I think "very basic" is doing a lot of heavy lifting there...), but don't think AI refers to autonomous robots.
by Lerc | 2025-04-11 02:53:49+00:00
"LLMs are statistical models"

I see this referenced over and over again to trivialise AI as if it is a fait acompli.

I'm not entirely sure why invoking statistics feels like a rebuttal to me. Putting aside the fact that LLMs are not purely statistics, even if they were what proof is there that you cannot make a statistical intelligent machine. It would not at all surprise me to learn that someone has made a purely statistical Turing complete model. To then argue that it couldn't think you are saying computers can never think, and by that and the fact that we think you are invoking a soul, God, or Penrose.
by BoorishBears | 2025-04-11 02:54:02+00:00
You're forgetting completion typically isn't binary.

Take juding response pairs for DPO for example, how do you ever prove someone used ChatGPT?

ChatGPT is good enough to decide in a way that will feel internally consistent, and even if you ask MTurk users to provide their logic, ChatGPT can produce a convincing response. Eventually you're forced to start measuring noisy 2nd and 3rd order signals like "did the writing in their rationale sound like ChatGPT?"

And what's especially tough is that this affects hard to verify tasks disproportionately, while those are exactly the kinds of tasks you'd generally want MTurk for.
by TZubiri | 2025-04-11 02:54:43+00:00
I always thought the headers in html were kind of dumb. I always think of book sections as:

<section name="Animals">

<section name="Mammals"> Mammals are blabla </section> <section name="Reptiles"> Reptiles are blabla </section>

</section>

<section name="Plants">

</section>

<section name="Minerals">

</section>

In this case Animals, Plants and Minerals would be h1, and Mammals and Reptiles would be h2. If you truly wanted to separate representation from content you would do that, as it is you are not really doing that, the h1 and h2 would be creating some kind of explicit open and close tags and hierarchy in a format different than the rest of html.

If someone goes back in time could you kick that Berner's Lee on your way back from killing hitler, correcting the sign on electricity? Thanks. Also send a message to Douglas Crockford if you've got time.
by mindslight | 2025-04-11 02:55:22+00:00
The resources for subsidies come from printing new money (which is possible by having the world reserve currency), and then spending that new money for deliberate purposes instead of just giving it to the banksters to bid up the asset bubbles. In an imaginary world where we had a Congress that served the People and a mentally competent President, of course.

Who gets subsidized is indeed political, but I don't see a way to sidestep that since there's centralization as soon as you take action to prevent the currency from deflating.
by Osmose | 2025-04-11 02:55:26+00:00
Some fun historical context behind the outline algorithm and why it didn't catch on: https://www.w3.org/Bugs/Public/show_bug.cgi?id=25003

In short, the W3C adopted it because they thought it was a good idea, while browsers and screen readers both refused to adopt it for various reasons like ambiguity with existing web content or concerns about screen readers having to implement and maintain their own independent outline algorithm implementations. 8 years and an entire standards organization after the thread above, the WHATWG finally dropped it.
by lmeyerov | 2025-04-11 02:55:31+00:00
I meant Roe as an example where the absence of federal law triggered a hybrid interpretive mode. Judges follow the plain meaning of the law, but when the text is missing, ambiguous, or leads to absurd results, they shift to hybrid methods by applying canons of construction and considering legislative history, purpose, and precedent. (Thank you ChatGPT ) If lawmakers want to do better, the solution is to pass clear legislation. That's not enough in the EU -- they may still use the spirit to override the literal text.

RE:Letter vs spirit, the EU interpret statutes more flexibly, even if they're more detailed. In the US, judges do fill gaps (e.g. precedent), but are more rigid in applying the letter when clear. That literalism extends to precedent too. E.g., they rather pedantically follow a past interpretation rather than make a new one.

That literal predictability makes it damning for US legislators refusing to legislate. If Roe was clear via federal law, then US judges either have to follow it literally or declare it unconstitutional, and there's little room inbetween. In the EU, judges can more easily go for the spirit.
by beloch | 2025-04-11 02:55:48+00:00
You also wouldn't go out of your way to piss off America's two biggest export markets: Canada and Mexico. As it stands, not only are there significant counter-tariffs that would make U.S. manufacturers even less competitive in Canada[1], there is significant consumer backlash to anything American-made where, just a couple months ago, products "Made in the U.S.A." would have been viewed favourably[2].

The way Trump has done things, any company that manufactures in the U.S. had better be able to get by with just the domestic U.S. market, because exports to Canada and Mexico aren't likely to be significant for quite some time, even if Trump backs off quickly. Lasting damage has already been done.

________________________

[1]It remains to be seen if Mexico will eventually retaliate.

[2]Perhaps not favourably in terms of price/quality competitiveness, but certainly in a geopolitical "support your neighbour instead of China" sense.
by hn_throwaway_99 | 2025-04-11 02:56:35+00:00
> We ended up here because we have a propensity to share our creative outputs, and keep our laundry habits to ourselves

Somehow I doubt that the reason gen AI is way ahead of laundry-folding robots is because it's some kind of big secret about how to fold a shirt, or there aren't enough examples of shirt folding.

Manipulating a physical object like a shirt (especially a shirt or other piece of cloth, as opposed to a rigid object) is orders of magnitude more complex that completing a text string.
by 1970-01-01 | 2025-04-11 02:57:41+00:00
$2000 is a punchline to a joke? No?? OK then, we're back at the 1990s cost level, when cell phones were as big as a brick with 50% of it being a battery.

https://www.ooma.com/wp-content/uploads/cell-phone-cost-comp...
by mikepurvis | 2025-04-11 02:58:15+00:00
I dunno about this. Attributes are supposed to be metadata, not displayed textual content. Like it's fine to give the anchor for a section as an attr:

<section id="animals"> <h2>Animals</h2> <p>Here are my animal facts</p> </section>

I would feel strange if a browser's built in CSS were reaching into an element's attribute and rendering the text therein as something visible to the reader.
Ask HN: Is Reddit shadow-banning broken or is it just me
by rzzzwilson | 2025-04-11 02:58:16+00:00
I've been using reddit since the beginning. I've stuck through the ups and downs, but now I'm just about forced to give up on the whole thing.

I delete my reddit account every year and create another, on principle, around the time I change all my passwords. Last year I did this, as usual, but found that my young account got shadow-banned and I don't know why. I am about to create my 12th new account because the previous 11 accounts were shadow-banned over nine months. I don't do malicious things, I believe. I just try to answer questions in r/arduino and r/learnpython and occasionally express an opinion on a few other subreddits. I get upvoted on my comments with a few downvotes, but I continually get banned. I have tried appealing, but I wonder if those appeals get read. They certainly have no effect on anything.

So I wonder if reddit management, to solve some sort of problem they have, have put in place code to identify "bad actors" and that code produces a lot of false positives. They have an appeal process but that doesn't help in my case. I suspect they get so many appeals that their response is "the code says the user is guilty" and that's that.

Has anyone else noticed this? As bad as reddit is it's the best place I've found to answer technical questions in my areas of interest and I would like to continue. Any suggestions on how to get out of this situation?
by nickpsecurity | 2025-04-11 02:58:25+00:00
So, it starts by showing Black Mirror is playing on people's fears in cheap ways that could have negative, long-term effects. Then, it switches to throw out lots of political, talking points with loose connection to the original story. I wish they stuck with that line of questioning.

So, in the Psalms, many of them are lament. The structure addresses God, lists the complaints, and usually ends on a positive note citing His future promises. They might cite previous times God delivered them. So, the pattern is a unifying, objective truth followed by a mix of bad news and good news that offsets it. This helped the Israelites stay mentally strong as they faced circumstances like the Exile.

The author wondered if Black Mirror could explore the risks without pessimism porn. I think the pattern in the lament Psalms could be helpful. We know, though, that Hollywood often appeals to the dark, sinful part of our psyche. The producers know people often want to watch horrible things more than pleasant things. That's the real reason.
by AStonesThrow | 2025-04-11 02:58:33+00:00
A motor vehicle.

I last owned a car in 1997. My black Acura Integra was totaled in that year, by a reckless driver in a Porsche 928 who ran a stop sign. He attempted to commit insurance fraud at the scene of the accident.

I rarely miss it. I have saved so much money. And in exchange, I've gained plenty of time to relax, take my mind off things, and meditate. Riding the train and bus allows you to do this, without all the responsibility and liability of your driving privilege.

I have indeed retained my driver’s license, and a clean record; once in a while I rent a car, and it’s fun, and grants wonderful freedoms. Also, there are things I can access only with a vehicle: recycling hazardous materials, for example.
by AmVess | 2025-04-11 02:59:04+00:00
I've kept a sleep schedule for at least since high school. Always in bed with enough landing space at the end in case my body needed 7 hours instead of usual 6.

My body has long since gotten used to feeling sleep time arrive, and starts unwinding naturally. My brain also followed suit. No going to bed and waiting for the thoughts to run out. I'm usually asleep in less than a minute after hitting the bed.

I always set my alarm as a back up, but I was usually awake before it went off. Return to wakefulness and not groggy is also very fast; 5 minutes or so and I am ready to go.

My girlfriend suffered from pushing into late nights and getting in one more chapter of a book or what have you when we met. I got her onto a schedule and she's now like me. Body and mind tired at an early hour, mind clear of thoughts after lights out. Fast to fall asleep and stay there, deep sleeps every night.

There's a few other things I do to prepare for bed. No caffeine for a few hours prior, no alcohol. If I need a snack, then some vegetables instead of junk food. That slice of pizza might be tasty, but 100% it will interfere with my sleep in some way.

My bedroom is very dark. Almost no light leakage from the windows, no LED's, no tv set.

I always thought it was strange for people to active shaft themselves with poor sleeping habits, day after day for decades on end.
by DonHopkins | 2025-04-11 02:59:30+00:00
You have no clue what you're talking about, you're completely incapable and afraid to respond to any of my points, and you've been just making shit up and throwing around random buzzwords you don't understand for quit some time now, incoherently unable to complete a sentence, like you're on ketamine. Nobody's falling for any of it. All you've done is make ad hominem attacks, no true scotsman defenses, move the goalposts, then hypocritically accuse other people of doing exactly what you just did: textbook psychological projection. Every single leaf of this argument is you unable to take the L, counter any the valid arguments other people have made, and implicitly admitting defeat that you can't defend anything you said or counter anything anyone else has.

macOS is certified Unix, widely used and extremely popular, and there's absolutely nothing you can do or say that will change that fact, and everyone knows it.
by vivzkestrel | 2025-04-11 03:02:50+00:00
the way you are actually supposed to meditate is to keep your mind completely clear. I have been testing this for almost a year now and even I cannot manage more than 5 mins of it but the idea is that as soon as you get a thought inside your head, open your eyes and stop the timer. It doesnt matter if it was 5 seconds or 2 mins but slowly and steadily your times will increase and so will your focus
by Spooky23 | 2025-04-11 03:03:10+00:00
You make a good point about cyclists, some of whom are only surpassed in misery by swimmers.

But the focus on cars is a risk calculus Probability*impact. If the bike guy hits you, you’ll fall and maybe get hurt. If a car hits you at 30, you’re dead or hospitalized. We rightly empathize threat to life over lower chance of relatively minor injury.
by tcherasaro | 2025-04-11 03:04:10+00:00
As one of the “skilled electronics engineers” in the US you could count on US soil (whatever that means) I can tell you this article reads very strangely to a EE.

“we were able to take all those designs and spin up our own SMT, it's called Surface Mount Technology”

“run that through our surface mount technology by our line operators”

“meaning the printed circuit board or PCBA assembly”

So, he’s definitely not an EE. No EE talks like this when they are trying to explain the nuts and bolts to a lay person. Either that or the editor took liberties they shouldn’t have.
by surgical_fire | 2025-04-11 03:04:24+00:00
> You may think this is fair, while others disagree.

I said nothing about fairness. What I said is that every government and some point or another makes use of protectionist economic measures.

> for example, all countries in the world could ban import of anything produced by your burgeoning state-aid factories

This just doesn't happen, at least not for the reasons you mentioned.

China is a good example, as it gives many forms of subsidies to its industries. Other countries respond with a mix of measures to protect the industries they care about.