MurphyA/hacker-news huggingface dataset:
by 2THFairy | 2025-09-23 13:49:53+00:00
There are some implementation concerns, but the real answer is that it is an ideological choice.

The AI companies believe that these kinds of grammar mistakes will be solved by improving the models. To build out tools for grammar constrained inference like this is to suggest, on some level, that GPT-N+1 won't magically solve the problem.

The deeper level is that it's not just simple grammar constraints. Constraining to JSON is a nice party trick, but it opens the door to further ideas. How about constraining to a programming language's grammar? Those are well defined, you just swap the JSON grammar file for the Java grammar file, job done.

We can go further: Why not use a language server to constrain not only the grammar but also the content? What variables and functions are in-scope is known, constraining a variable reference or function call to one of their names can be done with the same techique as grammar constraints. ("monitor-guided decoding", figured out back in 2023)

Entire classes of hallucination problems can be eliminated this way. The marketing writes itself; "Our AI is literally incapable of making the errors humans make!"

What many AI developers, firms, and especially their leaders find grating about this is the implication. That AI is fallible and has to be constrained.

Another such inconvenience is that while these techniques improve grammar they highlight semantic problems. The code is correct & compiles, it just does the wrong thing.
by KaiserPro | 2025-09-23 13:50:36+00:00
> Nobody can reasonably defend it at scale

I mean its perfectly defendable, its a way of depriving the rest of the world of highly skilled, motivated people.

As we've seen several times before, all it takes to turn a country into a backwater is brain drain. Vienna was _literally_ the centre of arts, culture and commerce, until it wasn't.

> These companies value access to the US market much more than employing a few H1Bs.

I think thats the point, its going to be used as a tool of favour/coercion. "good companies" will get h1bs, "bad companies" will not.
by yabones | 2025-09-23 13:50:42+00:00
I've toured a '60s era Cold War diesel-electric sub that's been a museum for ~20 years, and it still absolutely reeked of diesel. Combine that with the smell of a couple dozen dudes that haven't showered properly in weeks, and your answer would be not good.

The long-term health outcomes are probably significantly worse for people that served in diesel subs than nuclear because of the constant exposure to fossil fuel volatiles. Just being in there for a 20 minute tour made me feel like I just smoked 20 cigarettes.
by karmakaze | 2025-09-23 13:51:12+00:00
I was going to say that it's greatly understating the value of the borrow checker. It guarantees no invalid memory accesses. But then it added:

> This means that basically the borrow checker can only catch issues at comptime but it will not fix the underlying issue that is developers misunderstanding memory lifetimes or overcomplicated ownership. The compiler can only enforce the rules you’re trying to follow; it can’t teach you good patterns, and it won’t save you from bad design choices.

In the short times that I wrote Rust, it never occurred to me that my lifetime annotations were incorrect. They felt like a bit of a chore but I thought said what I meant. I'm sure there's a lot of getting used to using it--like static types--and becomes second nature at some point. Regardless, code that doesn't use unsafe can't have two threads concurrently writing the same memory.

The full title is "Why Zig Feels More Practical Than Rust for Real-World CLI Tools". I don't see why CLI tools are special in any respect. The article does make some good points, but it doesn't invalidate the strength of Rust in preventing CVEs IMO. Rust or Zig may feel certain ways to use for certain people, time and data will tell.

Personally, there isn't much I do that needs the full speed of C/C++, Zig, Rust so there's plenty of GC languages. And when I do contribute to other projects, I don't get to choose the language and would be happy to use Rust, Zig, or C/C++.
by JCM9 | 2025-09-23 13:51:26+00:00
The cold truth is some companies simply like H1Bs since it’s a form of indentured servitude. There are plenty of US tech workers to fill most roles. Probably only ~10% of roles with an H1B would meet the bar for being unable to find a qualified US worker.

It’s no coincidence that Amazon has more than double the number of H1Bs in corporate tech roles than the next biggest user. They’re not exactly broadly known for being a great place to work in tech. However, with H1Bs Amazon has a lot more power over making tech workers tolerate stupid stuff that makes these jobs much less attractive to top-tier US tech talent with more mobility.
by FlyingLawnmower | 2025-09-23 13:52:00+00:00
If you can screen tokens against your grammar fast enough, you can build a bitmask over the entire token vocabulary and apply it right before sampling. As vocabulary sizes grow, this gets more complex to do in real time, but we (and other libraries) have found several optimizations to do this extremely quickly (eg for guidance, we detail some optimizations here https://github.com/guidance-ai/llguidance/blob/main/docs/opt...).

Other libraries work by essentially pre-computing all the masks for all possible generations, but of course you're restricted to working with simple grammars in this case (like a subset of regular expressions)
by thechao | 2025-09-23 13:52:03+00:00
Oh. There was a comment to your comment saying that kids learning assembly was easy and — I guess? — implying that adults-learning-assembly is hard. I teach adults assembly on an irregular basis. Adults-learning-assembly is hard because adults are rational animals who (correctly) assume I'm an idiot for insisting on assembly. Once I explain the long-term benefits for our exceedingly specific use case, they pick up assembly in a few hours. Assembly isn't hard. Assembly is annoying because it takes absolutely gobsmacking amounts of assembly to do anything.
by johncolanduoni | 2025-09-23 13:52:04+00:00
I didn’t put those words in your mouth - I drew the contrast with “collective responsibility” in the sentence right after I mentioned collective punishment. I even put it in quotes and didn’t for collective punishment.

Also, while we’re laser-focused on 20th century Germany, we might as well look at it just before WWII. The Treaty of Versailles (in addition to being practically punitive) had a clause that is commonly referred to as the “War Guilt Clause” that justified their onerous treatment after the war, and the Weimar Republic had public debate of what they called the Kriegsschuldfrage (literally War Guilt Question) before the Nazis even came on the scene.

I don’t know if the literal term “collective responsibility” was first used later, but I don’t see how the concept is so different. Sure, the Allies did a better job of driving the concept into public consciousness the second time around via prolonged occupation - but they clearly felt justified in holding the German people responsible the first time.
by ninadpathak | 2025-09-23 13:52:24+00:00
Guidance is genuinely impressive for anyone wrangling LLM output. The ability to map grammar constraints so efficiently at inference solves so many subtle issues—tokenization headaches being just one. Curious if you've benchmarked adoption for JSON vs. custom grammars among production teams? Anecdotally, JSON's become the baseline, but custom grammars unlock way more nuanced applications.
by k3liutZu | 2025-09-23 13:52:26+00:00
One of the main "problems" we solved with adopting styled-components back in 2016 was styles colocation where more junior members managed to create a several thousand line CSS file with a mess of selectors which we couldn't safely figure out which is used where.

My current plan is to transition to CSS Modules which should allow preserving most (if not all) of the current styled-components DX and advantages.
by paulf38 | 2025-09-23 13:52:29+00:00
That's quite nice. There is a small risk that the client request mechanism might change . The headers don't change much - mostly when a new platform gets added. Go is only targeting amd64 and arm64.

This isn't so much about leaks. The most important thing that this will enable is correct analysis of uninitialised memory. Without annotation memory that gets recycled will not be correctly poisoned. I imagine that it will also be useful for the other tools (except cachegrind and callgrind).
by freeopinion | 2025-09-23 13:52:30+00:00
Undermining the USD doesn't help. Vacuum politics are not better. Vacuum politics lead to where we are today. Too many years of choosing "the least bad option" doesn't lead to a good place.

Let's take all this negative energy and do something better than criticize. Let's harness the energy into good action. What's something we all can agree is good for everybody and start a discussion around that? I'm not saying all crticism is a bad thing. I'd just like to see us all work together to accomplish something good.

I'll try to get the ball rolling, but if somebody has a better ball, I'm happy to go there.

I prefer free trade. I think everybody benefits if we lower trade barriers. But it needs to be "fair". Allowing corporation A to dump hazardous refuse cheaply into the river, but denying the same to corporation B is not fair to B and not all around good. So are there any good ideas about how to allow goods from different jurisdictions to compete by the same rules without Nationalistic interference?
by vidarh | 2025-09-23 13:52:38+00:00
> Straight to serving up jpgs.

Back in my Amiga-days we had PowerSnap[1] which did the bargain basement version of OCR: Check the font settings of the window you wanted to cut and paste from, and try to match the font to the bitmap, to let you copy and paste from apps that didn't support it, or from UI element you normally couldn't.

These days, just throwing the image at an AI model would be far more resilient...

I think we've gotten to the point where it would be hard to compose an image that humans can read but an AI model can't, and easy to compose an image an AI can read but humans can't, so I suspect the only option for your marketing department will be to try to prompt inject the AI into buying your product.

(Oh, look, I have written nearly this same comment once before, 11 years ago, on HN[2] - I was wrong about how it worked, and Orgre was right, and my follow up reply appears to be closer to what it actually does)

[1] https://aminet.net/package/util/cdity/PowerSnap22a

[2] https://news.ycombinator.com/item?id=7631161
by mschuster91 | 2025-09-23 13:52:51+00:00
> and with a purifier the difference in particulate levels can run into 100× or more during winter

No surprise. A lot of homes are still being heated by combustion. Gas heating is relatively clean if the burners are properly maintained, oil burners are a hit and miss, but everything else... wood pellets are often declared as the "green" alternative, but that's only valid for CO2 (and even there, the actual benefit for the climate is massively debated) - these things spew an awful lot of particulate emissions, brick-wood ovens are even worse, especially when people illegally throw in too humid firewood or, worse, garbage that has no business being incinerated outside of an industrial high temperature facility with proper exhaust stack treatments.

Unfortunately, as you say, in many parts of the world people are too poor to afford proper heating fuel sources, and it's costing them and their countries so much productivity and money in the long run... and in developed countries, there still are a sizable amount of people who have no idea how to properly heat their ovens, how to prepare their firewood or that just outright skirt garbage disposal fees. Jörg Kachelmann, founder of the weather service Meteomedia, has extensively written about that topic in the past [1] and keeps ranting on social media about it under #holzofengate.

[1] https://www.t-online.de/nachrichten/panorama/id_84671908/kac...
by jacquesm | 2025-09-23 13:53:08+00:00
I've already narrowed it down to four buildings for you, so we can consider that all of those methods worked. What is your next move?

I'm not saying it can't be done, clearly it can be done otherwise this article wouldn't exist. But it is not quite as easy as pointing a magic wand (aka an antenna) at a highrise and saying '14th floor, apartment on the North-West corner', though that would obviously make for good cinema.
by antoineMoPa | 2025-09-23 13:53:10+00:00
I also loved Zig when manually typing code, but I increasingly use AI to write my code even in personal projects. In that context, I'd rather use Rust more, since the AI takes care of complex syntax anyway. Also, the rust ecosystem is bigger, so I'd rather stick to this community.

> Developers are not Idiots

I'm often distracted and AIs are idiots, so a stricter language can keep both me and AIs from doing extra dumb stuff.
by twothamendment | 2025-09-23 13:53:20+00:00
Exactly this. Is my Awair Element perfectly accurate? No, but VOC at 200 or less when the windows have been open (on a good air day) looks very different than 3,000 when we finish cooking something on the stove.

Maybe my numbers should be 100 and 10,000, but it doesn't matter, I know when I need to turn the air exchanger on turbo and when we are back to "normal".
by nobodyandproud | 2025-09-23 13:53:20+00:00
> Depends in what way? Economically, in some ways. Socially and politically not. The economics drive much of the social and political upheaval. The US is essentially performing its own flavor of brexit, though clearly there are a lot of differences.

> I assume you are saying that to agree with me, in that the super-rich are never invested in one country the same way. Yes. In the US and 100 years ago, FDR was called a traitor to his kind. I believe this disconnect remains true today.

> I assume you are saying that to agree with me, in that the super-rich are never invested in one country the same way. Mostly to have a conversation and grumble. I used to work for a UK firm many years ago and so I still have a fondness and soft-spot for (presumably) your country.

> However, I meant invested literally, not metaphorically. Where you invest your money.

Okay, that's certainly easier to measure then. If I recall in the greater London area, the most obvious problem stems from the wealthy parking their wealth in real estate, driving up the cost and lowering the supply for residents? Likewise with other services and products that have started to target only these wealth, making said services out of reach of everyone else.

Not to mention it concentrates the wealth and economy into one or two saturated areas.

Is that a correct summary of the issue at hand?
by ninadpathak | 2025-09-23 13:53:38+00:00
You're spot on about the "perfect" JSON bar being unreachable for now. The only consistently reliable method I've seen in the wild is some form of constrained decoding or grammar enforcement—bit brittle, but practical. Sampling will always be fuzzy unless the architecture fundamentally shifts. Anyone claiming zero-validity issues is probably glossing over a ton of downstream QA work.
by akashshah87 | 2025-09-23 13:54:44+00:00
Summary from ChatGPT:

- DHS proposes replacing the random H-1B lottery with a weighted system based on wage levels (higher wage = higher chance).

- Weighting scheme: Wage Level I = 1 entry, II = 2, III = 3, IV = 4.

- Goal: favor higher-skilled/higher-paid workers while still leaving a chance for lower wage levels.

- Differs from the 2020 rule (rank-order by wage); this uses probability weighting, not exclusion.
by lsaferite | 2025-09-23 13:55:03+00:00
I've hired someone that didn't solve a specific technical problem.

If they are able to walk through what they are doing and it shows the capability to do the expected tasks, why would you exclude them for failing to 'solve' some specific task? We are generally hiring for overall capabilities, not the ability to solve one specific problem.

Generally my methodology for working through these kinds of things during hiring now days focuses more on the code review side of things. I started doing that 5+ years ago at this point. That's actually fortuitous given the fact that reviewing code in the age of AI Coding Assistants has become so much more important.

Anyway, a sample size of 1 here refutes the assertion that someone's never been hired even when failing to solve a technical interview problem. FWIW, they turned out to be an absolute beast of a developer when they joined the team.
by ninadpathak | 2025-09-23 13:55:12+00:00
In most cases, yes—forcing is common when the grammar dictates a single valid option. It's a fast path. Trickier cases arise if multiple tokens could satisfy the same grammar position, especially with weird tokenizations or BPE merges. Edge cases can trip token selection, but for things like brackets/commas, forced emission usually works flawlessly.
by duxup | 2025-09-23 13:55:15+00:00
I had this discussion with the head of the company I'm at recently.

Some of our software has succeed by being easy to use, encapsulating business rules so the client doesn't have to worry them, that kind of thing. All good, we make money there.

However, we had a project that ultimately was less successful because we tried to make something EASIER that was simply not easy at the core. I don't want to get into details but ultimately we took a job originally done by folks with big spreadsheets and those folks had lots of domain knowledge ... and we tried to make it a job anyone could do.

IMO, we largely failed, as we brought on new customers we realized there were assumptions about every dang column and everyone they exchanged this spreadsheet with thought different things and had different rules and some used some fields some not and ...

I realized this was a complex task immediately and you just couldn't hide that. In fact it was better to just give them a massive spreadsheet interface and let them go hog wild or just offer to have our own internal people do the job for them.

Some stuff is just complex.
by 542354234235 | 2025-09-23 13:55:16+00:00
How did that Arab Spring work out for Syrians? Right, they were barrel bombed by the regime, then slaughtered by ISIS, then just generally killed in random crossfire. 14 million of them were driven from their homes, either to other places in Syria or outside the country to live in overcrowded refugee camps. Now the terrorist group Hayat Tahrir al-Sham rules over the ashes, since all the original people fighting for change are long dead. Why can't everyone just do this?!??! Stop being lazy people, rise up.
by injidup | 2025-09-23 13:55:22+00:00
You are deliberately answering a different question. The paper quotes.

> As Table 3 demonstrates, a large minority of dog owners consider vaccines administered to dogs to be unsafe (37%),

That is not the same thing as 84% having their pets fully vaccinated for Rabies which you know. As is obvious a person can have their dog be vaccinated but still have been hesitant about it due to feeling it is unsafe.

You have discounted the fact that it is, in many states, a civil offence not to vaccinate your dog.

https://www.animallaw.info/topic/table-rabies-vaccination-la...

Thus a person may, wishing not to be fined, vaccinate their dog but still hold anti vaccination beliefs.
by benashford | 2025-09-23 13:55:35+00:00
Aren't these two points contradictory? Forgive me if I'm misunderstanding.

> Rust’s borrow checker is a a pretty powerful tool that helps ensure memory safety during compile time. It enforces a set of rules that govern how references to data can be used, preventing common programming memory safety errors such as null pointer dereferencing, dangling pointers and so on. However you may have notice the word compile time in the previous sentence. Now if you got any experience at systems programming you will know that compile time and runtime are two very different things. Basically compile time is when your code is being translated into machine code that the computer can understand, while runtime is when the program is actually running and executing its instructions. The borrow checker operates during compile time, which means that it can only catch memory safety issues that can be determined statically, before the program is actually run. > > This means that basically the borrow checker can only catch issues at comptime but it will not fix the underlying issue that is developers misunderstanding memory lifetimes or overcomplicated ownership. The compiler can only enforce the rules you’re trying to follow; it can’t teach you good patterns, and it won’t save you from bad design choices.

This appears to be claiming that Rust's borrow checker is only useful for preventing a subset of memory safety errors, those which can be statically analysed. Implying the existence of a non-trivial quantity of memory safety errors that slip through the net.

> The borrow checker blocks you the moment you try to add a new note while also holding references to the existing ones. Mutability and borrowing collide, lifetimes show up, and suddenly you’re restructuring your code around the compiler instead of the actual problem.

Whereas this is only A Thing because Rust enforces rules so that memory safety errors can be statically analysed and therefore the first problem isn't really a problem. (Of course you can still have memory safety problems if you try hard enough, especially if you start using `unsafe`, but it does go out of its way to "save you from bad design choices" within that context.)

If you don't want that feature, then it's not a benefit. But if you do, it is. The downside is that there will be a proportion of all possible solutions that are almost certainly safe, but will be rejected by the compiler because it can't be 100% sure that it is safe.
by minimaxir | 2025-09-23 13:55:39+00:00
Google's Gemini API is a bit odd with structured outputs. If you specify an Application/JSON response mimetype, it will reliably respond with a consistent JSON output without any prompt engineering shenanigans. For my workflows, this setting plus providing a JSON Schema in the system prompt works even with complex schema.

The Gemini API has a canonical implementation of structured outputs where you can instead pass the JSON schema as a separate parameter to control the grammar more closely. However, this setting will reorder the JSON schema fields to be alphabetical beforehand, which is especially not desired behavior as the order of JSON fields in a schema is often very deliberate to control generation.
by wolvesechoes | 2025-09-23 13:55:58+00:00
I live in Poland, I think membership in EU was highly beneficial to us, and I consider our, and rest of EU countries, reliance on US a huge problem.

I never said "Europe will fall too!", for Europe and EU are not referring to the same thing. This is why discussing these matters with people here is usually pointless, as there is so much misconception floating around about what EU is. EU is set of bureaucratic institutions facilitating cooperation between some countries in Europe. It cannot fall, it will simply stop working. And it cannot create OSes, as suggested in this thread.

As for "socialist Europe" - please. Social democracy, maybe with exception of Nordics, is on decline for quite some time now, although the extent to which Nordics are socialist is debatable as well.
by dev_l1x_be | 2025-09-23 13:56:03+00:00
I can't remember the last time I had any problem with the borrow checker. The junior solution is .clone(), better one is & (reference) and if you really need you can start to use <'a>. There is a mild annoyance with which function consumes what and the LLM era really helped with this.

My beef is sometimes with the ways traits are implemented or how AWS implemented Errors for the their library that is just pure madness.