MurphyA/hacker-news huggingface dataset:
by munk-a | 2025-04-10 22:03:26+00:00
There are quite a few businesses that don't feel the need to grow but instead focus on providing a consistent service and good employee benefits.

Keeping a website generally available 24/7 is usually pretty trivial of a cost compared to the costs for everything else in running a business so to me putting effort into limiting business hours seems unproductive. If you receive significant malicious traffic or attacks during off hours it may make sense but otherwise the cost of keeping the lights on for a server are usually marginal at most.
by anon22981 | 2025-04-10 22:03:38+00:00
I’m not sure if you are trolling, but I’m pretty sure just attaching a file to an email is often more efficient. Not to speak of legibility or maybe the intended use for said documents. Sadly I don’t think you are trolling.

Also: a computer (where the documents were) has the required hardware and software to send the documents as is. Your phone is the special and external hardware in this case, not the computer (also probably more expensive than the computer). Your phone requires signups and logins as much or even more than computers. I don’t know what paid subscription you would need to share these documents. Plenty of free methods. I don’t know why you are talking about malware? Do you think the documents might mutate into malware while traveling the internet? I think the risk exists with pictures too, be careful out there!
by ninetyninenine | 2025-04-10 22:03:45+00:00
Did you know there exists languages that don't have run time errors? Languages that you can never crash outside of an OOM.

That means you can't find a language with no mistakes. But across all languages there are languages with astronomically more gotchas and mistakes then others.

Golang is one of these languages that is astronomical. I mean just compare it to the language with zero runtime errors.
by andrewflnr | 2025-04-10 22:03:54+00:00
The registration website for my community college was like this. At certain times of night (and maybe weekend? not sure) it wouldn't let me register, and would instead put up a message that it was closed. I found this profoundly irritating. The website clearly worked fine, or I wouldn't be able to see the message. I understand if you can't support it outside of business hours, but at least let me try, maybe, and we'll cross the support bridge if we come to it? There's no good reason (i.e. not reeking of incompetence) for the website to actually break in the few weeks of registration, so it's most likely a moot point in practice. Is there a hamster running in a wheel who powers the server? Does he have a union? Just let me sign up for my classes, you assholes.

Ahem. Anyway. Institute "business hours" for your website at your own risk. Among your users you'll find it polarizing at best.
by milesrout | 2025-04-10 22:03:58+00:00
I am sure of that. I think people forget the difference in living conditions then.

Things that were common in that era that are rare today:

1. Living in shared accomodation. It was common then for people to live in boarding houses and bedsits as adults. Today these are largely extinct. Generally, the living space per person has increased substantially at every level of wealth. Only students live in this sort of environment today and even then it is usually a flat (ie. sharing with people you know on an equal basis) not a bedsit/boarding house (ie. living in someone's house according to her rules--no ladies in gentlemen's bedrooms, no noise after 8pm, etc.).

2. Second-hand clothes and repairing clothes. Most people wear new clothes. People buy second hand because it is trendy. Nobody really repairs anything because that is all they can afford. People just buy new. Nobody darns socks or puts elbow patches on jackets where they have worn out. Only people that buy expensive shoes get their shoes resoled. Normal people just buy cheap shoes more often and they really do save money doing this.

Today the woman that would have been a typist has a different job, and a more productive one that pays more.
by surgical_fire | 2025-04-10 22:04:06+00:00
The sad part is that most of us would be like that. I know I am.

I don't say this with pride, mind you. But it annoys me to no end when people LARP as if they would be like the ones who helped Jews hide in places occupied by Germany when things were getting ugly in late 1930s. Those people are rare.

You see, it takes a lot of fortitude to stand up to tiranny. You are effectively putting the well being of you and yours on the line. Especially now that I have a child, I am very sure I would look the other way in that scenario, hoping I was not the next.
by dheera | 2025-04-10 22:04:22+00:00
> assumptions about always-on digital services

And maybe also always-on humans, which some companies seem to ridiculously expect.

I really don't understand this obsession with 24/7 uptime for non-critical systems. Requiring your engineers to be always on-call and debug something at 3am is a health hazard and should be treated like one.

If a photo-sharing app is down at 3am, I'm sure the users can go to sleep and wait till 10am. This isn't some oxygen life support system. If you have that many users in multiple time zones, then hire people in multiple time zones.

Even if TurboTax crashes on 4/15 at 11:35pm and the engineers don't fix it until the next workday, resulting in millions of people not being able to file their taxes, I'm sure the IRS might grumble a lot but would give people an extension. It'll all be good, and everyone will get to sleep .
by itishappy | 2025-04-10 22:04:26+00:00
Thanks mate! (BTW: Indenting code with four spaces makes HN format it like code.)

So the thing I'm still not getting from your example is allowing the template itself to be customized.

evil = "<script>alert('evil')</script>" template1 = t"<p>{evil}</p>" template2 = t"<h1>{evil}</h1>" html(template1) html(template2)
by adeon | 2025-04-10 22:06:02+00:00
I got a question about the example shown, the goroutine one marked as #63, I'd copypaste but it's an image.

Is there a reason the common mistake is about goroutines specifically? If I instead just made function closures without launching off goroutines, would they all refer to the same 'i' variable? (I assume it's maybe just that the mistake tends to go hand in hand with goroutine-launching code in a pattern like that).

I'd presume the book would say right after the example :)

But otherwise: the author gets serious respect from me for going through that process, taking feedback and learning how to communicate, i.e. taking "how do I make a good book?" very seriously and trying their best. And also things like for putting their foot down when the problematic copyeditor. I'm almost interested in the book, not for learning about Go but learning about what it looks like when I know the writing has some serious intent behind it to communicate clearly.
by tdeck | 2025-04-10 22:06:18+00:00
> The page was altered to remove Tubman in early February, per data from the Wayback Machine, replacing the image with a collage of Postal Service Underground Railroad commemorative stamps highlighting "Black/White Cooperation."

I see, so this is going to be like when Republican politicians try to invoke MLK to argue against affirmative action, even though he wrote a book that explicitly advocated for it.
by ein0p | 2025-04-10 22:06:41+00:00
From Grok

How many battleships does Estonian navy have?

The Estonian Navy does not currently operate any battleships. Its fleet is focused primarily on mine countermeasures and coastal defense, consisting of vessels such as minehunters, patrol boats, and auxiliary ships. Battleships, which are large, heavily armored warships with large-caliber guns, are not part of the Estonian Navy's inventory, as they are generally obsolete in modern naval warfare and not suited to Estonia's strategic needs in the Baltic Sea. According to the most recent information, the Estonian Navy has a total of eight commissioned ships, none of which are classified as battleships.
by NetOpWibby | 2025-04-10 22:07:01+00:00
I feel like AI luddites aren't doing themselves any favors with being staunchly anti-AI. AI is a tool and a handy one at that. Imagine being mad at a hammer because it can't unscrew something.

I'm not a 10x engineer, nor do I want to be (I'd love the pay but the stress doesn't seem worth it), so Claude is perfect for me. It helps me understanding things I know close to nothing about and will provide web-based references if you have web search enabled.
by neilv | 2025-04-10 22:07:10+00:00
Yeah, editor support will help a lot. Though the PEP's way of doing things doesn't specify the language of the template where the literal occurs, so detection of that might have to be kludged.

(Or, in a sufficiently working program, an editor with semantic analysis access could use something like type inference in the Python side, to determine the language in a less-kludgey way.)
by nhumrich | 2025-04-10 22:07:32+00:00
Yes. Only if your dev remembers to use sanatized all the time. This is how most SQL works today. You could also forget and accidentally write a f-string, or because you dont know. But with t-strings you can actually prevent unsanatized inputs. With your example, you need to intentionally sanitize still.

You cant throw an error on unsanitized because the language has no way to know if its sanitized or not. Either way, its just a string. "returning an f-string" is equivalent to returning a normal string at runtime.
by milesrout | 2025-04-10 22:07:39+00:00
But we have had the same thing happen constantly. Automation isn't new. How many individuals are involved in assembling a car today vs in the 1970s? An order of magnitude fewer. But there aren't loads of unemployed people. The market puts labour where it is needed.

Automation won't obsolete work and workers it will make us more productive and our desires will increase. We will all expect what today are considered luxuries only the rich can afford. We will all have custom software written for our needs. We will all have individual legal advice on any topic we need advice on. We will all have bigger houses with more stuff in them, better finishings, triple glazed windows, and on and on.
by notahacker | 2025-04-10 22:08:17+00:00
Nope, only the people defending the dumbest and most pointless act of economic vandalism in history.

In fact the only argument I can think of in favour of setting tariffs for the Heard and McDonald islands is that the average American that thinks that this level of attention to detail helps US manufacturing probably is less intelligent and capable than the penguins that live there....
by endofreach | 2025-04-10 22:08:20+00:00
I have this "fear" of being in a situation where a judge has to form judgments about code i wrote, even when relying on an "expert".

For the same reason that i believe a situation like that could play out, i don't think i should judge a judges understanding of, dedication to work through, and knowledge about– the laws.

I actually studied law for a few years. And i am baffled by the confidence of laymen about court rulings. It's almost like a client explaining to me how easy it is to fix this small bug.
by ratorx | 2025-04-10 22:08:53+00:00
template1 is a function that takes in a parameter evil (with a SanitisedString type that wraps a regular str) and returns the fully expanded str. It is implemented by just returning an f-string equivalent to the t-string in your example. Same with template2.

Using the SanitisedString type forces the user to explicitly call a sanitiser function that returns a SanitisedString and prevents them from passing in an unsanitised str.
by ndiddy | 2025-04-10 22:09:00+00:00
Section 14 of the GPL says "The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns." Given that the preamble to the GPL explicitly says "the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users", I don't think that a judge would find that a hypothetical GPLv4 that was basically MIT or something is "similar in spirit" to the present version.

If you're worried about the other direction (i.e. a hypothetical GPLv4 that had some bizarre restriction like "all users must donate to the FSF"), the "or any later version" means that as long as you don't decide to update the license you use yourself, people can continue to use it under the GPLv2 or v3 indefinitely.
by krisoft | 2025-04-10 22:10:37+00:00
I think planned and managed downtime is okay. A website, especially commercial ones, going down randomly, without a human readable status page destroys trust in them.

For example I planned to work on a project on sunday for which i would need some sterling silver sheets. My usual supplier is cooksongold.com, and since precious metal is such a high trust product I would be normaly very reluctant to go and search for a new supplier. But their website is on the fritz since yesterday. Which makes me think i need to find some new supplier. Who knows maybe they are going out of business even. Or maybe they are just having trouble with their database. That’s the kind of situation where the damage is. Where consumer behaviors can maybe permanently alter just because of some technical malfunction.
by ratorx | 2025-04-10 22:11:02+00:00
Well you enforce this with types. That’s how every other language does it. By specifying that the type of the function has to be a sanitised string, it will reject unsanitised string with the type checker.

> it has no way of knowing if it’s sanitised or not

It does. You define the SanitisedString class. Constructing one sanitises the string. Then when you specify that as the argument, it forces the user to sanitise the string.

If you want to do it without types, you can check with `isinstance` at runtime, but that is not as safe.
by boznz | 2025-04-10 22:11:53+00:00
This short post came about because I got an email yesterday which managed to traverse my spam filters saying my web site does not adhere to the GDPR regulations and (of course) offering to help fix it. Yes I know I shouldn't have opened it. (Lesson learnt, Spam filter added!) Anyway apologies in advance for said budget-driven, non-gdpr-compliant, web-site, and probably falling over at the slightest sign of stress.
by tiffanyh | 2025-04-10 22:12:09+00:00
Cloudflare, amazing services … unreachable customer support or sales (even for paying users).

It’s so bizarre because it’s like their product is made by one (amazingly good) company and their support/sales by another (amazing bad) company.

You have to escalate on Discord, HN, etc to get even the most simple of customer support or sales questions acknowledged.

It makes me super uncomfortable being a paying customer, relying upon such support & sales.

@eastdakota, if you’re reading this - I’d encourage you to create your own personal cloudflare (paid account) to experience this. It does seem like the first week or so of being a customer, support prioritizes your questions. Wait a month or so, then reach out to support or sales - and see how you won’t even get an acknowledgment. I only say this as a paying customer rooting for your company success.
by egoisticalgoat | 2025-04-10 22:12:37+00:00
If you're already adding a CA to your trust store, you can just use caddy! [0] Add their local CA to your store (CA cert is valid for 10 years), and it'll generate a new cert per local domain every day.

Actually, now that I've linked the docs, it seems they use smallstep internally as well haha

[0] https://caddyserver.com/docs/automatic-https#local-https
by PaulHoule | 2025-04-10 22:13:13+00:00
20 years ago it was science fiction, with BERT models and LSTM it is easy. The hard part is getting a collection of 5000 articles that are "sensationalistic/breathless/about sex" and another 5000 that aren't. You could beat 90% on that one easily, probably 95%. Or you could just block 404media and have accuracy about that good.
by ljm | 2025-04-10 22:15:27+00:00
I think #633 must be a typo, or just a fumbled explanation.

"We might expect this code to print 123 in no particular order" should really say "exactly" or "in order", since it's proved in the next paragraph to be inconsistent.

And that would be the layman's explanation of concurrency resulting in things added sequentially happening out of order.

And assuming FIFO on async execution, akin to running everything in series, is probably the first mistake anyone will make when they encounter concurrency for the first time.
by davepeck | 2025-04-10 22:17:14+00:00
> doesn't specify the language of the template where the literal occurs

Yeah, something we spent a bunch of time considering. In the end, we decided it probably needed to stay out of scope for the PEP.

You're right that JavaScript has an easier time here. Most of the JS tools we looked at simply inspect the name of the tag and if it's (say) html, they attempt to color/format string content as HTML regardless of what the html() function actually does or the string's contents.

Currently, tools like black have no knowledge of types. I'm guessing some amount of kludging is to be expected on day one. But my hope is over the long term, we'll see a story emerge for how annotations can indicate the expected content type.
by PaulHoule | 2025-04-10 22:18:17+00:00
I think one of the most harmful books to 21st century people is Frankl's book Man's Search for Meaning. I thought it was a good book when I read it but I've met so many people who've woven it into their stories of anti-resilience. Like your high school is like a concentration camp. Or making you wear a mask in public is like the holocaust. Or trans people are like Jews in Nazi Germany.

I'm glad I am easily entertained and can find meaning in writing code or taking photographs or going for walks or watching anime or playing video games or lifting weights and many other things. I don't have to join the Yudkowsky cult and write articles about how much despair I have about an imaginary problem while ignoring all the real horsemen of the apocalypse and profess being an atheist while really being half Cthulhu cultist and half follower of Teilhard de Chardin.
by robertkluin | 2025-04-10 22:19:40+00:00
I am not honestly familiar with Timoni, but glancing through the docs it looks like it heavily centered around Kubernetes deployments? Our initial use cases were centered around IaC for non-k8s workloads (think systems such as ECS or Cloud Run).

In terms of the YAML aspect, internally the core system does not use YAML. We opted to stick with YAML as the interface for the time being purely because it is familiar and there's loads of tooling.

We've been working to improve the structural and the type checking further and I'm hopeful to have a substantial improvement to that released "soon." It is queued up behind some other improvements within the language server we need to make first though.
by fcatalan | 2025-04-10 22:19:50+00:00
I have a similar philosophy for the systems I manage. We have always been severely understaffed, so I treat any user support request that repeats twice as a bug.

If the decision to push a button is yours, I'll give you the button. If you need some data more than once, you get a button too. My ideal user never needs to know who manages the system or how to contact us.

This has even got me a "why do you guys have almost no tickets? You aren't doing anything!" talk a couple times. Music for my ears.
by ivyirwin | 2025-04-10 22:20:34+00:00
The International Airlines Travel Agent Network (https://webstar.iatan.org/WebStarExtranetWEB/login.jsp) website, in addition to being extremely dated in its design, keeps business hours for accessing things like ID registration or travel agency certificate renewals. At first I thought it was a joke as the message displays something like, "we want to respect a work life balance and therefore only offer online services from X to Y." But for real, you can't access the online services during US based business hours.

It is wrong in so many ways. First of all the site is determining when the appropriate business hours are for its users, not taking into consideration moonlighters or other night owls. And second, it's a service for travel agents!! who are supposedly traveling to other time zones.

I get it if the people behind a service need to set limits on when they are expected to handle requests, but that doesn't mean the service shouldn't be available all the time. Good messaging and setting expectations for when requests will be handled are a much better solution in my opinion.
by AStonesThrow | 2025-04-10 22:20:47+00:00
If you ever find yourself visiting Phoenix, and there’s 4+ hours open in your itinerary, I strongly recommend the Hall of Flame Fire Museum!

https://maps.app.goo.gl/athmHCH2AG4sWk8F6

Among their exhibits is a 300-year-old wagon, and basically this is a gigantic warehouse and boneyard for old fire trucks and equipment which has been lovingly restored to pristine conditions.

There are plenty of memorials for deceased firefighters who made the ultimate sacrifice with their lives, and there's special memorial for the Hot Shots who perished in Yarnell several years back.
Show HN: I made Cheaprr – Access multiple AI tools via one platform
by richardreeze | 2025-04-10 22:20:55+00:00
I built Cheaprr based on two premises:

1. AI is now good enough to handle most creative tasks that once required human freelancers. 2. Still, subscription fatigue is real. Many people (myself included) don’t want to pay monthly for tools they use occasionally.

That’s why I created Cheaprr: a platform where you can “hire” AI bots for specific tasks on demand. It brings top AI tools (OpenAI, Midjourney, ElevenLabs, etc) together in one place.

The best part? Instead of paying for a subscription, you buy credits (called "Volts") and only spend them when you need a task done.

Cheaprr is still in beta, and I’m building it solo, so I’d love any feedback!

Website: https://cheaprr.com
by DiogenesKynikos | 2025-04-10 22:21:15+00:00
They withdrew from Gaza, but sealed off its borders, deliberately kept it just above starvation, and kill a few hundred civilians every few years by bombing, invading, or just shooting unarmed protesters near the border fence.

What convinces me that this can be called a genocide, besides the incredibly high death toll and the utter and almost complete destruction Israel has wreaked on Gaza, are the many explicitly genocidal statements by Israeli leaders, generals, soldiers, news broadcasters, cultural figures, etc. The way Israelis talk about Palestinians is so blatantly genocidal that it's impossible to interpret the mass killing they've carried out as anything other than deliberate.
by Tycho | 2025-04-10 22:21:19+00:00
It’s lower today than in 2005 https://www.nationwidehousepriceindex.co.uk/resources/5bwel-...

It is of course a lot higher than the 1950 - 2000 period, but I think two things explain this.

1. Women started having careers eventually doubled the borrowing power of the typical household

2. The housing is much higher quality (50s lodgings may not even have had indoor toilets; central heating wasn’t common until the 70s/80s)

So I think we’re essentially at a natural plateau of the house/earnings ratio, subject to volatility from outside factors. You could argue that housing has been unaffordable since the early 2000s, but the (false) narrative that’s usually pushed is of ever worsening conditions.