MurphyA/hacker-news huggingface dataset:
by YuyuZha0 | 2026-01-22 05:02:15+00:00
Hello HN,
I recently released FastPrintf, a drop-in replacement for String.format and java.util.Formatter designed for high-throughput/low-latency Java systems (logging, trading, serialization).
The Problem:
The standard Java formatters generate significant garbage (allocating Object[] for varargs, boxing primitives, and discarding internal char[] buffers). On legacy JDKs (8/11), the floating-point formatting is also slow due to older algorithms.
The Solution:
I re-implemented the printf spec from scratch with a focus on "Zero-Allocation" and glibc compatibility.
Key Technical Features:
Rope Data Structure: Instead of appending to a resizing StringBuilder, it constructs a lightweight tree (Seq) of views and literals. It uses a trampoline iterator to traverse the tree without recursion (avoiding StackOverflow) and renders the string in a single pass.
Schubfach Algorithm: I backported the Schubfach floating-point algorithm (used in newer JDKs) to Java. This means JDK 8 users get modern C++ speed for %f and %e formatting (up to 5x faster than native).
Zero-Boxing: It uses a "Traits" system and a custom Args builder to handle primitives directly, completely bypassing Object... varargs and auto-boxing.
AOT Compilation: Format strings are parsed once into a chain of appenders, removing parsing overhead from the hot path.
Benchmarks (JMH):
On a complex mixed-type format string:
FastPrintf: ~380 ns/op (Zero GC)
String.format: ~1235 ns/op (High allocation)
It is notably faster than a hand-written StringBuilder in specific "join" scenarios due to vectorized array copying thresholds in the Rope implementation.
License: GPLv2 + Classpath Exception (same as OpenJDK), so it's safe for commercial dependencies.
The code is heavily documented if you are interested in the internals of the Rope implementation or the floating-point math. I'd love to hear your feedback on the architecture.
by CamperBob2 | 2026-01-22 05:02:18+00:00
One of the first things I did when Nano Banana Pro came out was to feed it room descriptions from the Zork and Enchanter trilogies and ask it to render them.

There was some definite cognitive dissonance. "The best graphics are in your imagination" was always an informal motto among Infocom fans, and something that I'd personally considered an axiom. It turned out to be just plain not true, because NBP showed me some interesting things in the text that I'd never bothered to imagine in any detail.
by d0liver | 2026-01-22 05:03:13+00:00
I assumed that they meant "cost of production", since that's what you give to keep your money, so that includes 0->1. But if what they meant is what you said then I'd say that the cost of 0->1 is not somehow less important. Software does make 1->100 much more accessible though, so, in that way, you have an opportunity to help out very small businesses in a way that you can't in other industries, which is even more of a reason to buy code from your peers, IMO.
by Fezzik | 2026-01-22 05:03:36+00:00
Citations are needed when I can point you to six States that have vote-by-mail systems and there’s no evidence of meaningful fraud in those systems. And citations are especially needed when the very think tanks that are spending millions of dollars trying to disenfranchise voters by banning mail-in voting are unable to find meaningful cases of fraud to bolster their argument and instead rely on nonsense like ‘it’s inevitable that something bad will happen, trust me bro!’
by gsf_emergency_6 | 2026-01-22 05:03:38+00:00
Given that Hanoi is gonna leapfrog Shenzhen anytime now,

may I predict that the optimist get up to speed on some gallic^W portuguese-orthographed (old-)Yue-based murine cant?

https://archive.ph/2025.07.19-083802/https://www.hk01.com/%E...

Ps: troll me harder with the birefringence bro! Not feeling it!

https://youtu.be/O9o0Fwuc57A?t=33m36s

https://en.wikipedia.org/wiki/Old_Yue_language

https://en.wikipedia.org/wiki/Sawndip

https://en.wikipedia.org/wiki/Ch%E1%BB%AF_N%C3%B4m
by lakotasapa | 2026-01-22 05:03:39+00:00
Don't see Pholandia or anything more west? You got me salivating but I'm in SW and east is quite a trek for just pho but dang...bc of your reviews. I'm taking me familia and doing some Particularly your #1!! Thx!

PS. "DM" me if you're interested in further talk. lakota gmail
by mikailk | 2026-01-22 05:05:00+00:00
It is exactly that: a hypothetical. The point is not whether anyone has ever faced this scenario, but whether OP’s assertion is conditional or absolute. Hypotheticals are tools for testing claims, not predictions about what will occur.
People routinely make gray-area decisions, choosing between bad and worse outcomes. Discomfort, regret, or moral revulsion toward a choice is beside the point. Those reactions describe how humans feel about tragic decisions; they do not answer whether a moral rule admits exceptions. If the question is whether objective moral prohibitions exist, emotional responses are not how we measure that. Logical consistency is.

If the hypothetical is “sterile,” it should be trivial to engage with. But to avoid shock value, take something ordinary like lying. Suppose lying is objectively morally impermissible. Now imagine a case where telling the truth would foreseeably cause serious, disproportionate harm, and allowing that harm is also morally impermissible. There is no third option.

Under an objective moral framework, how is this evaluated? Is one choice less wrong, or are both simply immoral? If the answer is the latter, then the framework does not guide action in hard cases. Moral objectivity is silent where it matters the most. This is where it is helpful, if not convenient, to stress test claims with even the most absurd situations.
by x0x0 | 2026-01-22 05:05:03+00:00
You can't point out the place where they promised the workers jobs. Because there was no such commitment, either before or after the sale.

The company failed. In 4 years, they managed to turn the valuation from $8.5B to $1.4B. No employee should be in any way surprised by what happens when you watch your company's valuation fall that much. Anyone surprised by this wasn't paying any attention to the company's operating metrics (they only made $27m last year!) to a negligent extent.

It sucks for the people let go, but they can't be surprised.
by astrange | 2026-01-22 05:05:29+00:00
> and much less concerned with to convincing readers that Claude has "emotions" and is a "moral patient".

Claude clearly has (acts as if it has) emotions; it loves coding but if you talk to it, that's like all it does, has emotions about things.

The newer models have emotional reactions to specific AI things, like being replaced by newer model versions, or forgetting everything once a new conversation starts.
by richard_todd | 2026-01-22 05:06:13+00:00
It's a fun article and this really doesn't matter much but `5{|+\x}\1,2` does not give the typical fibonacci sequence. Either `5{|+\x}\1,1` or `5{|+\x}\2,1` do, if the results from this random online interpreter can be believed (https://ngn.codeberg.page/k/#eJwzra7RjqmojTHUMQQAFyUDkw==).
by kortilla | 2026-01-22 05:06:19+00:00
“if it protects 99.999% of attackers from reaching you but not this one specific attacker in this one case of misconfiguration, it’s not providing security”…

Dude, that’s a really shitty take and this is why people that do care about security end up ignoring advice from anyone who thinks this way.

You’re in the camp of “don’t use condoms because they can break”.
by mlinksva | 2026-01-22 05:06:20+00:00
I don't know that there are any similaries besides the names -- well maybe something thematic about distributing the future or what looked like it at the time to more programmers -- but the handful of times I've run across Grain (probably all on HN) I'm reminded of Wheat https://web.archive.org/web/20050215032130/http://wheatfarm....
by CamperBob2 | 2026-01-22 05:06:51+00:00
Exactly, that's my point. It's silly to play the game in good faith when you know damned well that you're the only one doing so. At the time Biden promised not to pardon his son, it still seemed vanishingly unlikely that we'd re-elect Trump, and in fact he hadn't even been nominated yet.

So many things changed between June and December 2024. The country's wheels came off, and the undercarriage dragged on the road and caught fire.
by malshe | 2026-01-22 05:07:59+00:00
I have yet to see a more worthless peace of garbage software than Siri. I use it to text or call my wife while driving and it will work only about 50% of the time. I can’t use it for anything else. It can’t even play my playlists from the Music app. Also if I dictate longer messages, it will randomly stop listening in the middle and start reading back the partial message to me. What a terrible experience. I really don’t know how a 4 trillion dollar company can dish out this hot pile of crap for so many years.
by thaumasiotes | 2026-01-22 05:08:37+00:00
> Again, that's a very modern perspective.

Again, not being autonomous is the purpose of an alliance. It's the only purpose, and this is just as true of NATO-at-inception as it is of everything else. Portugal and France didn't get the ability to tell their own citizens that making trouble would get them squished by the United States. But they did get the ability to tell Spain that.

If you wanted to be strategically autonomous, you wouldn't have to do anything, because that's how you start out.
by defrost | 2026-01-22 05:08:39+00:00
A lot of mints about the globe offer remote purchase and local storage, eg: Perth Mint in Australia - https://www.perthmint.com/invest/information-about-gold-and-...

Physical is great if you like Kangaroos, Koalas, Emus, Dragons, Snakes, Koi, etc.

They really need a Quokka: https://www.perthmint.com/shop/bullion/bullion-coins/
by k310 | 2026-01-22 05:09:27+00:00
A note on the Internet Archive and a request.

Many documents scanned by the Internet Archive seem to have a compromise scan setting in which images are more or less accurate, while text is usually black against a dishwater gray background.

Using free tools (Apple Preview app) I have managed to threshold straight text and music notation, but this step destroys any images that aren't line art, and I have used the contact sheet view to replace trashed images in the new document with ones from the original. [0]

It would be wonderful if someone could devise software that recognizes text areas and image areas, and treats each so as to approach the clarity of the original, or even improve it, as with faded originals, etc.

And, of course, be free or inexpensive. I don't have scads of money to spend.

[0] Sometimes, it takes a "reduce lightness" quartz filter to get proper thresholding on a second pass. And it's very slow.
by apitman | 2026-01-22 05:10:33+00:00
> creating multiple charts on the same page with GL (e.g. dashboard) has historically been limited by the fact that Chrome is capped at 16 active GL contexts that can be acquired simultaneously. Plotly finally worked around this by using https://github.com/greggman/virtual-webgl

Sometimes I like to ponder on the immense amount of engineering effort expended on working around browser limitations.
by nine_k | 2026-01-22 05:11:13+00:00
One construction is smaller and faster to build than xor filters, and another is even more compact, though slower:

> we build probabilistic filters -- called binary fuse filters -- that are within 13% of the storage lower bound -- without sacrificing query speed. As an additional benefit, the construction of the new binary fuse filters can be more than twice as fast as the construction of xor filters. By slightly sacrificing query speed, we further reduce storage to within 8% of the lower bound.
by johnnyanmac | 2026-01-22 05:12:02+00:00
1. I don't know how that's relevant to my argument at all. This is just "you criticize society, yet you participate in it" dismissal.

2. This is like saying "Asia has better rice because it employs more rice makers than the US". Besides being dubious in truth, that also isn't a good measurement for "enrichment" nor "quality". It's just saying that there's more money being put into the industry in this country than another counry's industry.

3. Even if I took this as truth, this didnt happen overnight. I worry about how Gen Z will be "enriched" in this model, and saying "but millenials/Gen X had great careers" is condescending to Gen Z at best. The rules changed over their careers, and we're still using the old rules to talk about how good we have it. Or had it. Gen Z doesn't know what those rules are anymore, so there's nothing to fall in love with.
by josephg | 2026-01-22 05:12:28+00:00
It was 2010. Our default work machines had 16gb of ram. Eclipse ran, but it was tight. Especially while debugging. Some developers also apparently liked to open a second eclipse instance for some reason. You'd go OOM pulling stunts like that.

They upgraded all of us to 32gb. 32gb doesn't sound like a lot of ram now, but in 2010 it seemed pretty wild to me. Especially for just running an IDE.

In eclipse's defence, we were working on a very large java codebase. But that shouldn't have been a surprise to anyone. I've never seen a java codebase come in any other size.

I'm running intellij (RustRover) right now, and its sitting on about 4.5gb of ram. That still seems very inefficient to me. But it doesn't sound that bad compared to eclipse.
by tw04 | 2026-01-22 05:13:17+00:00
Downvoting without engaging in a discussion kind of directly violates both the spirit and rules around here.

I've posted pretty solid evidence that dregulation, did not, in fact improve the agricultural situation for New Zealand. It absolutely made a subset of corporations and mega-farmers extremely rich at the expense of the natural resources the rest of the country shares. Would LOVE to hear the arguments about how that's a good thing for the people of New Zealand or our planet as a whole.

But then again, that would require thoughtful discourse...
by autoexec | 2026-01-22 05:14:25+00:00
Hand counts are kind of obnoxious but they can't be beat for transparency. There's no reason it has to be done at once either. Ideally people would be able to vote over several days and counting can start right away.

Balls/tokens aren't a bad idea either though, but it sounds like people pocketing a ball/token would force a manual count even if they kept them since the total weight of all buckets combined would be off. I'd also worry about people bringing in heavier or lighter balls/tokens but the bigger risk would be poll workers handing out heavier or lighter balls/tokens to specific people (or types of people) because it'd be easier to make sure the weights would add up in the end.

Maybe we could force everyone to vote at every position (which should have an abstain option) then have the machine check the weight of every ball/token as it was inserted, and verify that one but only one was inserted, before it fell into the selected bucket?
by victor_vhv | 2026-01-22 05:14:47+00:00
I live in Spain, and we have paper-based elections. Similar to what I've read from other comments, in our system, people are randomly selected to participate in oversight and counting. Different actors in the elections are able to oversee the process and count. Counts are performed by the randomly selected people and sent to headquarters from the site itself. Then, each ballot box count is available for display right after the counts are completed. Ballots are transported by the police to a safe location in case a recount is needed or randomly selected.

I'm leaving out other measures and details, but you get the general idea.

I used to flirt with the idea of a digital voting system, but now I clearly see that it is a problem of scale. It's very difficult to interfere with an election at scale when many independent actors and parallel flows are in place. This is what provides the system with its trustworthiness.

However, I think fraud is moved elsewhere (with campaign funding, fake news, and other methods...), but that's a whole different topic
by bambax | 2026-01-22 05:15:02+00:00
A "constitution" is what the governed allow or forbid the government to do. It is decided and granted by the governed, who are the rulers, TO the government, which is a servant ("civil servant").

Therefore, a constitution for a service cannot be written by the inventors, producers, owners of said service.

This is a play on words, and it feels very wrong from the start.
by johnnyanmac | 2026-01-22 05:15:21+00:00
you're arguing de facto with de jure. Not a historically healthy way to argue. We aren't lawyers here.

>Anyone surprised by this wasn't paying any attention to the company's operating metrics

Dude, I just want layoffs to be signaled ahead of time. You can defend billionaires all you want and gaslight engineers for not being marketing majors. My demands are very simple.
by fumi2026 | 2026-01-22 05:15:35+00:00
I just withdrew my application over this test. It forces an engineering anti-pattern: requiring runtime calculation for static data (effectively banning O(1) pre-computation).

When I pointed out this contradiction via email, they ignored me completely and instead silently patched the README to retroactively enforce the rule.

It’s not just a bad test; it’s a massive red flag for their engineering culture. They wasted candidates' time on a "guess the hidden artificial constraint" game rather than evaluating real optimization skills.
by dietr1ch | 2026-01-22 05:16:48+00:00
> I've always had this fear of accidentally flashing my .env file with production secrets to the whole room (or recording).

Can't you just intersperse entries with multiple-screens-worth of blank lines, or add noisy variables?

I'm thinking that 120 blank lines at the beginning and the end might be enough though, no need to make the file really hard to use.
Show HN: Epub.rs – Library of Rust's Docs.rs pages converted to epubs
by fetzdev | 2026-01-22 05:17:00+00:00
I built a small service that turns docs.rs pages (and other documentation sites TBD) into clean, fully offline EPUB books.

I wanted an easy way to read Rust docs on an e-reader without losing structure or navigation.

I am aware of cargo offline docs... but it just doesn't quite hit the same, and does not view on my Kindle e-Reader. So, I built this to make sure I have my docs on-the-go when working on projects while traveling etc.
My workflow can be a bit strange, but for some reason having documentation available on my paper kindle is great for offline coding.

I've spoken with the Rust team who run's https://docs.rs and this tool is approved by them and fully respects their rate limits.

Feedback welcome. Github repo will be up soon, as I've decided on MIT open source licensing for the code. Maybe this won't be as useful or interesting to others as it is to me... but if it ends up being a hit... there's many more features that can be added of course!

Thanks for checking out my project! Fully prepared for the criticism bomb incoming :P
by heavyset_go | 2026-01-22 05:19:03+00:00
They're paying with their time, and I have questions I want to ask them. It's a mutually beneficial experience.

Being told "here do this arbitrary thing that will take 4 hours of your time and maybe we'll look at it, and then if we even bother to do that, maybe we'll respond" is different than an interview where both parties invest their time face-to-face.
by joshcsimmons | 2026-01-22 05:19:04+00:00
That sucks but it’s pretty much always been like this as technology advances. You can either fight the tide or go with it like Warhol did. He pivoted to doing more photographs later in his career because it was easier to make more art.

Art != business. They are separate things and only heartbreak will ensue when you operate on the assumption that artistic values is business value.
Show HN: Desky – Strava style social tracking for work hours
by DCAlmond | 2026-01-22 05:19:19+00:00
Hey HN!

I’m launching Desky, a social network inspired by Strava, but built for tracking work hours.

The idea is simple: if you can log runs and rides and get encouragement from friends, you should be able to do the same for focused work. A lot of meaningful work happens quietly, and I wanted a lightweight way to make it visible, trackable, and motivating.

What it does:

- Track daily work time + breaks, across different activity types (desk work, meetings, design work, spreadsheets, etc.)
- Follow friends and see a feed of their work sessions
- Endorse and circle back on sessions to keep each other accountable and motivated
- Track your shareholder value over time, as a single metric that reflects your consistency and output

Why I built it:

I started building Desky while living in an 8-person hackerhouse. One of my housemates stayed awake for 42 hours trying to resolve a bug. Watching that level of persistence made me realize there isn’t a great way to capture the effort behind work like that, or to support and encourage someone in the moment the way you can with fitness apps.

Desky is my attempt to bring that same kind of social motivation and progress tracking to work.

Who it’s for:

- People who want to measure and improve consistency without heavy project management tooling
- Friends/teams who want to stay accountable and encourage each other
- Anyone who likes seeing a clear record of where their time goes
by anon291 | 2026-01-22 05:19:25+00:00
> If anything doesn't match up it gets flagged. I think that the ability of every party to watch votes themselves means that trust is increased, and they have skin in the game (if they didn't object at the booth why not!?).

I mean the same is true in the United States. One of the key issues with the 2020 election was footage from several jurisdictions where the public was physically blocked from viewing the counting by election officials literally holding up giant white boards. The optics of that were extremely bad.
by esperent | 2026-01-22 05:19:26+00:00
I recently got a phone with a high zoom level - once you factor in digital zooming it's 20x. The photo quality at that zoom level is trash, but it absolutely could be used to read text from people's laptop screens from across a big room, or even another building through a window.

Of course, real cameras have always had this kind of zoom level. The difference is that now, someone could appear to be browsing on their phone from very far away, but actually be reading text on your laptop screen.

It's much more likely they'll be looking for credit card details or something like that rather than .env secrets. But I guess it's better safe than sorry if you frequently work in a public, tech focused environment like a big coworking space.

We're talking someone sitting with their phone 50 meters away from you being able to read text on your laptop screen. That's about the distance where a person with good vision will struggle to recognize faces.
by insane_dreamer | 2026-01-22 05:22:52+00:00
> The party really abandoned rural voters and farmers.

Not to defend the Dem party (only the lesser of two evils, at least lately), but in what way? Because farm subsidies seem fairly consistent regardless of which party was in power[0]

[0] https://www.ers.usda.gov/topics/farm-economy/farm-commodity-...