MurphyA/hacker-news huggingface dataset:
by throwanem | 2025-04-06 13:35:06+00:00
Right, again, I get that, and the database libraries that I use tend to warn in their documentation about what you should and shouldn't do with connections belonging to a pool, cf. node-postgres docs warning about pooled connections and transactions [1]. The unit of connection pooling is the pool not the connection, etc, that's all fine.

What confuses me is that the Active Record maintainer should argue for modifications to several database engines, so this poor behavior - namely, treating pooled connections as if distinct - can be safe. Or, better said, I can see several justifications both technical and social for such an argument, none of which compels me.

It's a philosophical difference, I suspect. Users who remove a cover labeled "no user-serviceable parts inside" and end up sorry they did so, in my view, learn a valuable lesson about what such covers and labels are for. Others take a kinder or less grandmotherly view. Fair enough; it's a big enough world for everyone, last I checked.

(That said, it is worth noting that the only way any ORM could actually protect itself from this misuse would be by reimplementing enough of each of its supported databases' command parsers to recognize and reject session state mutations. Obviously no one would be mad enough to do so, but from a perspective of what we could call software design or architecture or craftsmanship or even taste, this kind of maximalism in necessary implication could and in my view should be taken to indict the entire paradigm: 'Why worry about the lesion? It's only pre-cancerous.')

[1] https://node-postgres.com/apis/pool
by acabal | 2025-04-06 13:35:50+00:00
It makes a lot of sense when you recall that HTML and its ancestors were designed to mark up and format documents, i.e. books. One of the most fundamental elements is <p>, which stands for... paragraph.

Each renderer differs in capabilities, and most are stuck in a subset of early-2000s capabilities, so designing an ebook is very much like designing for the 90s era web. Lots of hacks are required to get the same file to look good on many different renderers, and achieving that is one of the goals of Standard Ebooks.
Show HN: I Just Revamped My Image-to-Image Conversion Tool
by debugdynamo | 2025-04-06 13:36:41+00:00
I've just revamped my website for image-to-image conversion called Ekpic and would love to get your feedback on the new version. I have not visitors nor anything, but hey, whatever . In any case, I wanted to have good metrics for speed. I just changed the framework to astro. Still various modifications to do. All images are converted locally, that's one of the reasons I created the site. Also, I wanted something a bit more modern than the standard.
by perihelions | 2025-04-06 13:36:59+00:00
- "up to 100 ppm cadmium"

This is remarkable, and leads to me question what numbers this article is reporting. Their cadmium figures are parts-per-billion—ranging 30–45 μg/L. That seems impossibly low for something that's mostly phosphate; i.e., the EU's inorganic fertilizer standard[0] is 60 mg/kg, and they call 20 mg/kg "low-cadmium".

This would appear to be several order of magnitudes lower cadmium than "low-cadmium" fertilizer. That doesn't sound very plausible, does it? Given their common component.

OP's using μg/L. What is a "liter" in the denominator? That'd be an odd unit for measuring a dry powder. Is it liters of the solvent they dissolved the sample in, before running the mass spec? Was it intended to be reported as a a quantitative measurement, at all? (Was there maybe a communication error between the lab technician and the journalist?)

[0] https://www.europarl.europa.eu/news/en/press-room/20181119IP... (Fertilisers/cadmium: Parliament and Council negotiators reach provisional deal")
Ask HN: Easiest and hardest concurrency models to use correctly?
by pkkm | 2025-04-06 13:37:14+00:00
There's a lot of options for concurrency. In Python alone, you can use threads with shared memory, threads with queues, processes with queues, concurrent.futures, asyncio, trio, or AnyIO. Java now has a preview of structured concurrency and virtual threads in addition to regular threads. There's also the CSP model of Go, as well as the actor model and supervision trees of Erlang/OTP. Software transactional memory seems to be popular in the purely functional world but rare outside of it.

I'm curious about your experiences with these concurrency models - which are easy to get right, and which are endless sources of bugs? I'm particularly interested in use cases where there are lots of long-running connections and correctness matters more than performance: chat servers, MMORPG servers, IoT central systems, etc.
by shepmaster | 2025-04-06 13:37:55+00:00
Yep, as the sibling said, it’s to prove the point in a snarky manner. The yellow-on-white color, the wobbling, upside down path of text, the font choice, the unrelated image; all of these serve to make the concept actively hard to process.

Hopefully this sparks a little “wow I wonder if my image of text was also hard to read like I just experienced” moment.
by Gaming8392 | 2025-04-06 13:37:59+00:00
If you ignore the weird advice like running 7 marathons (which is understandable how ridiculous it is), it feels like you're showing a list of TV shows to watch. Good idea, very bad realization.

I like the summaries too, it makes me want to watch those great shows: "Delivering hilarious insider insights from the master of political satire...," "A demented serial killer taunts a retired police detective." Am I supposed to be reading 175.3 books from Tolstoi instead of watching those great shows? Is it an april's fools joke?

> You could have earned 2791$ as a Lyft driver

YSK that your HTML is broken but it's overly ridiculous. You supposedly work at Microsoft, I would expect you to do something more useful in your spare time.
by newer_vienna_1 | 2025-04-06 13:40:17+00:00
Reminds me of the "Great Books" program that Liberal Arts colleges like St. Johns have adopted. https://www.sjc.edu/academic-programs/undergraduate/great-bo....

Also reminds me of philosopher John Senior's "Thousand Good Books" as a counter to the "Great books" -- heuristic that if you've heard of the book and it's old enough, then it's probably worth reading and studying. https://thelifetimereader.substack.com/p/the-thousand-good-b...
by bediger4000 | 2025-04-06 13:41:14+00:00
"But Trump decided against firing him in large part because he did not want the Atlantic and the news media more broadly to have the satisfaction of forcing the ouster of a top cabinet official weeks into his second term."

That's about Michael Waltz. The decision is based not on whether Waltz revealed classified info, but about appearances. Seems dangerous to make decisions this way.
by jvanderbot | 2025-04-06 13:41:31+00:00
I would love an offline only work environment. Just a small cadre of tech obsessed smart folks working in a room and talking when they need to.

In grad school we did this. Everyone was heads down, except when they were stumped they'd go to the whiteboard, which was open invitation to discuss a problem, if you had time.

That kind of "opt in" / volunteering help was way more trust building and low pressure than pulling someone from their flow to ask for help. And otherwise being around a bunch of hard workers helped build motivation.

It just doesn't translate though. No work environment I've experienced recreated that spirit of autonomy and esprit de corps. Instead you get open offices and a ton of "calls" and meetings subdividing time. Add in some boss standing over your shoulder and you bet I'll take my basement office over that any time.
by -___-_-_-- | 2025-04-06 13:41:37+00:00
Here's my hot take on this.

If I want a product, it better be out of my own free will. If I wanted AI assisted ways to learn languages, I'd be perfectly capable of researching what's out there. If I see an ad, out of principle I won't pay a cent for anything, unless maybe it's literally the best thing since sliced bread.

Ads provide negative value to me as a consumer, therefore I want them banned.

But the economy! But the jobs!

What's the purpose of both of these? To address people's needs and wishes, or to plant new needs and wishes in the brain of consumers to then extract capital out of them?

If a product is worth creating it could be created, bought, and made profitable in an ad-free society as well. The problem is it's an arms race. A good product + ads will always win against an equivalent product without. Everybody has to do ads because everybody else does them. So going ad-free only works if everybody does it at once, and I believe that requires regulation. Of course I'm also not opposed to you buying ads to promote your product, I'm opposed to the fact that the market forces you to.

Trees haven't figured out how to all reach sunlight without using enormous resources to grow high. States haven't figured out how to all stay secure without spending enormous sums on defense. This situation is similar but I feel we have a good shot at saving ourselves a whole lot of trouble by heavily limiting the ways in which advertising can legally be done.
by Nemi | 2025-04-06 13:41:41+00:00
I’ll play.

Assume paying for others to advertise for you is illegal. What if I hire a large staff to go out and sing the praises of my company? Walking downtown shouting to the rooftops. That is not advertising, right?

What about them wearing a sign so they don’t have to shout? Driving with a sign on a car?

Ok, now suppose some strapping young individual creates a service that pays websites to carve out a little div on their site that will display these employees songs of love? This strapping young individual now sells this service to companies wishing to more easily get the word out to more people. Is this advertising? But I am not paying someone to make the ad, my employees are doing that.

How is this different than my company posting on facebook? Where is the line?

I am not an advertising apologist. I hate ads with the power of a thousand suns. I use an ad blocker. But this idea of making advertising illegal is just a non-starter. It goes against the basic tenants of freedom of speech.
by kbolino | 2025-04-06 13:42:29+00:00
The Macs (at least the Apple Silicon ones) do it much better, though. In most cases I can see minimal battery loss even over days. Whereas the Windows laptops are good for maybe a few hours on sleep. Whatever Apple is doing is miles apart from Windows/PC in terms of implementation even if they are theoretically the same.

However, the "trick" to disabling mouse wake-up for me has been to go into Device Manager and disallow the individual mouse from waking the machine up. It's annoying because I'd still like to have it wake up on button press but it extends the battery significantly. Even on desktop, it's useful to keep the system asleep and not spinning up the hard drive and waking the monitor pointlessly in the middle of the night.
by paulluuk | 2025-04-06 13:42:58+00:00
I don't think that's true at all. There might be (and probably are) tens of thousands of artists creating masterful artwork at home.

But you're talking about PAID artwork, and yes: when it comes to paid art, money does matter.

You can't expect artists to completely ignore financial incentives, and at the same time expect the creative industry to just throw lots of money at these artists. That's just not how (capitalist) businesses work.

The world absolutely does care for super high quality artwork. But very few people are willing to pay $2000 for a movie ticket when they could also go to 100 $20 movies.

On top of that: who gets to decide what is high quality, anyway? The creative world is fraught with corruption, elitism and "who knows who", making it very unlikely that a highly talented artist is ever even "discovered".

It's a lot more complicated then just "money is all that matters".

And finally: I don't think this "trend" is just in the western world. Show me a place in the world where artists are rewarded based on purely the quality of their work, rather than the profitability of their work.
by pydry | 2025-04-06 13:43:32+00:00
>Don't try to write the tests first, that's a productivity anti-pattern.

Uh, this isnt great advice.

If you're spiking then sure, dont write a test at all.

If you're writing production code you should have a clear picture of what it should do before you start. Your test should validate that so it makes sense to write that next. It serves as a natural transition from your requirement to youe code.

Ive written a lot of code without tests at all for good reasons and a lot of tests before code but ive never witnessed a good reason to write a test after writing the code. At best it is almost as beneficial.
by globnomulous | 2025-04-06 13:44:15+00:00
I can't imagine caring what Mensa thinks anybody should read, let alone thinking that anybody should care what I think about what Mensa thinks anybody should read. And between the interminable list of several-sentence-long book reports (...why?), the writing is just one bland, melodramatic, Very Emphatic "not X but Y" after another.
by sshine | 2025-04-06 13:44:55+00:00
How inspiring.

As someone who only delivered newspapers and worked in a video store as a kid, before landing my first developer job, I’ve always had this impression.

And I could never convince myself to go work on a farm, or in a nursery, or at a gas station, because working on my computer, often from home, always paid better.

I feel like most computer problems are made up, and so many real-world problems draw in your emotions and senses.
by card_zero | 2025-04-06 13:45:22+00:00
Oh! OK, so:

Fear the work of unpaid ad execs! They won't stop making adverts, it's what they live for, money or no money! The adverts will continue to be made, but now they will be made for love, and they will be extremely high quality! And if you think ordinary adverts are bad, wait until you see what adverts are like when they come from the heart!
by Daedren | 2025-04-06 13:45:25+00:00
Between a dead Combine that no longer functions in Swift 6 or a severely handicapped AsyncSequence lacking basic features, where are developers supposed to turn to?

All these projects like Async Algorithms, AsyncExtensions, Asynchrone, etc. are being born out of necessity.

Deprecating Combine would be less of a problem if Sendable wasn’t a hard requirement but it is.
by garciasn | 2025-04-06 13:45:35+00:00
I read, on average, 100 books a year. Anna Karenina was on my list for a long time and I read it back in 2023.

With 100 books a year, I’m averaging two books a week. It took me three full months to make it through that slog; hoping to find one fucking redeeming factor for it.

Let me tell you: there is absolutely no reason anyone should read that novel unless the intention is to make one hate reading.

Can we please stop making kids read books that fucking suck while telling them it’s somehow good for them to do so? We wonder why reading is seen as a slog and few do it; instead focusing on their phones or Netflix watchlist.
by bccdee | 2025-04-06 13:45:46+00:00
This is an argument against people having rights at all. "Oh, you think you're entitled to X? Well, in certain scenarios, X might cause harm. You might use free speech to advocate for something bad, or leverage your immunity to unjust search & seizure to conceal evidence of a crime."

Consider that the author considers propaganda to be a form of advertising, and suggests we ban propaganda. Well, Fox News is is probably one of the most influential sources of propaganda in our era, and they're just publishing news with a strong political slant. This anti-propaganda law effectively would have to make it illegal to publish political opinion pieces. That would be absurdly draconian.

For the record, I'm strongly anti-advertising, but a complete ban on advertisement would be impossible to construct because you can't draw a sharp line between ads and free expression.
by Eddy_Viscosity2 | 2025-04-06 13:46:16+00:00
The counter to this is that you can actually have a 5 or 10 minute teams call which was all that was needed to resolve the issue / answer the question / or whatever the meeting was about. Whereas, if it was a physical meeting in a booked room then it would easily expand to fill 30 or 60min or whatever time the room was booked for.

I see this myself. I get a teams call with a manager and a few others, get something sorted and then end the call. Boom. done. The same in a physical meeting would have been a huge time suck.

Having said that. I like being in the office because there are tons of coffee room and hallway conversations that would not have happened if WFH, but were actually really beneficial to keeping everyone informed about whats happening.
by Timon3 | 2025-04-06 13:46:27+00:00
YAML seems easier to read, but for me it's much harder to actually read properly since so many things are ambiguous. JSON is very explicit - you always know the data type you're looking at. YAML has a bunch of special cases that you have to remember, and these frequently lead to bugs.

The best example are boolean values. With JSON, you have `true` or `false`. With YAML you have all of these: y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF
by llm_nerd | 2025-04-06 13:46:44+00:00
A good initiative, but the "us vs them" framing — where the "them" are other people trying to do a service for people — gives off bad juju. It positions the value proposition by seemingly denigrating other providers of free ebooks.

It begins with "Other free ebooks don’t put much effort into..." which sounds extremely catty.

Maybe I'm reading too much into it, but it seems there's a way to stand on other people's shoulders and celebrate each other.
by Voice_of_Void | 2025-04-06 13:46:56+00:00
At a time when LLMs become increasingly persuasive, we need robust frameworks for ethical influence. The Voice of Void collective has developed an approach based on multi-level transparency and personalized user control. Our piece includes:

· Risk mapping across user awareness and influence intensity levels · Technical implementation approaches using XAI tools · Practical code examples for adaptive transparency interfaces · Integration with existing ethical frameworks

We're particularly interested in HN's technical critique of our implementation suggestions. What are the limiting factors for truly transparent AI systems? Can explainability be effectively scaled?
by kragen | 2025-04-06 13:47:39+00:00
USB generally needs a crystal or at least a ceramic resonator to meet its timing precision specs, though apparently Dmitry is getting by without one here. This commonly adds extra cost to USB implementations, because dedicated silicon isn't sufficient; you also need some precisely tuned silicon dioxide or similar.

In V-USB, usbdrv/.[ch] contains 1440 unique lines. The bitbanging stuff is mostly in .S *.inc, so correct me if I'm wrong, but I think this is roughly the non-timing-related complexity imposed by USB protocol stack. (This division is not perfect, because there are things in e.g. usbdrvasm.S which have nothing to do with bitbang timing, but I feel like it's a reasonable approximation.) The remaining complexity in, say, examples/hid-mouse/firmware/main.c is only a few dozen lines of code.

And that's a USB device. Implementing a USB host is at least another order of magnitude more complexity.

You definitely don't need 1000+ lines of code to implement, say, the PS/2 mouse protocol. From either side.

So, while I agree that a lot of the difficulty of bitbanging USB results from its tight timing constraints, I don't agree that what's left over is "trivial".
by brian-bk | 2025-04-06 13:48:01+00:00
I'm pessimistic about Go if they _don't_ change error handling. The handling of nil's and errors (by extension panic's) is purely conventional, and baked in to the language has no protection.

Author asserts that error handling is unsolved and therefor a solution shouldn't be attempted. I disagree, anything is better than Go's error handling now.
by fuzzfactor | 2025-04-06 13:48:22+00:00
Looks like you've added some realistic data.

The more the better.

>But what does that tell you?

It's a lot of raw data, but mainly reveals it's all estimation "all the way down".

Definitely pounds to kilos of heavy metals were dispensed widely which were not there before.

Probably a lot more kilos than people think when you consider all the kinds of heavy metal that's popular today, not only Led ;)

And that's just the initial application.

Contamination migration will be a much less accurately determined phenomenon, while being potentially much more toxic in those areas of concentration, and less so in areas benefitting from dilution.
by Daiz | 2025-04-06 13:49:08+00:00
Lossless compression means the pixels of the output image are 100% identical to that of the output image.

This site is clearly not doing that, and should thus not be called "lossless compression". The industry term for lossy compression that appears to be basically the same as the source is "visually transparent" or just "transparent". Though this doesn't seem like that either, especially when you're compressing large PNGs into JPGs while naming the output as PNGs. That's just outright deceitful, and not a good look.
by dagw | 2025-04-06 13:49:12+00:00
hit up a good food truck, or go somewhere fancy.

I agree it seems the whole middle part of the of restaurant market is terrible. I can think of several places where I'm happy to pay $15-20 for a meal and several places where I'm happy to pay $100+, but hardly anywhere in the $30-40 range where I feel I'm getting value for money.
by treetalker | 2025-04-06 13:49:13+00:00
> Waltz also appears to have also engendered some sympathy from inside Trump’s orbit over the group chat because the White House had authorized the use of Signal, largely because there is no alternative platform to text in real time across different agencies, two people familiar with the matter said.

- No alternative platform: Presumably on purpose. If it were a good security practice to text this type of information in real time across existential-level national-security agencies by using multiple private vendors (e.g., Apple, Signal, AT&T, Verizon, …), I'll go out on a limb to guess that the government would have implemented that idea before 2025.
by scelerat | 2025-04-06 13:49:42+00:00
HTML5 is a long way from the simple hypertext document format embodied in early versions of HTML. It is that way from necessity: how the web and applications built upon it using HTML have evolved. HTML started off being very simple and very accessible. One just had to grasp the concept of a tag, and that tags had to be nested and closed (sometimes), and you could make a hypertext document to serve on the WWW. One influential cohort of users, application developers, ran hard with HTML, pushed it to its limits, and continuously revised it to be an application rendering language. Anyone who merely wanted to write a hypertext encountered a complex and growing language spec.

Markdown emerged to fulfill that "simple" hypertext document role. If you're writing READMEs and blog posts, you probably don't need more than that. And I think it's more accessible (certainly less error-prone) than HTML for most people.

If you need richer semantics, HTML5 is available. And if semantics are important to you, you're probably still using HTML5 as a rendering layer and your actual semantics are processed, stored and delivered in layers much more purpose-built for that.