MurphyA/hacker-news huggingface dataset:
by aatd86 | 2025-11-02 17:16:16+00:00
> using dependent type system to have "proofs" be equivalent to "types"

Do you mean proposition as types? And proof has a program?

Or do you see it at somewhat a higher order, since values are proof for a type, and types can perhaps be proof at a higher level if they are first class citizen in the language?

(Which makes me think that dependent types is really a stairway between two type systems?)

Just wondering, since I had never personally seen it described in that fashion.

Other question: What is the function and runtime treatment of dependent types? Can they be instantiated on the spot by runtime values? A bit like defining/declaring functions that return arrays of runtime-known length? Does it involve two aspects of type checking? compile and runtime? Implementation-wise, doesn't it require too many indirections?
Show HN: Torque – A declarative, typesafe DSL for LLM training datasets (MIT)
by michalwarda | 2025-11-02 17:16:27+00:00
We were frustrated with dataset generation DX: ad‑hoc scripts and JSON templates break as flows branch, tool‑calls drift, and reproducibility is hard.

So we built Torque: a schema‑first, declarative, fully typesafe DSL to generate conversational datasets.

What it is: Declarative DSL - Compose conversations like React components Fully Typesafe - Zod schemas with complete type inference Provider Agnostic - Generate with any AI SDK provider (OpenAI, Anthropic, DeepSeek, vLLM, LLaMA.cpp etc.) AI-Powered Content - Generate realistic varied datasets automatically without complicated scripts Faker Integration - Built-in Faker.js with automatic seed synchronization for reproducible fake data Cache Optimized - Reuses context across generations to reduce costs Prompt Optimized - Concise, optimized structures, prompts and generation workflow lets you use smaller, cheaper models Quick example Concurrent Generation - Beautiful async CLI with real-time progress tracking while generating concurrently

import { generateDataset, generatedUser, generatedAssistant, oneOf, assistant } from “@qforge/torque”; import { openai } from “@ai-sdk/openai”;

await generateDataset( () => [ generatedUser({ prompt: “Friendly greeting” }), oneOf([assistant({ content: “Hello!” }), generatedAssistant({ prompt: “Respond to greeting” })]), ], { count: 2, model: openai(“gpt-5-mini”), seed: 42 } );

Links • GitHub: https://github.com/qforge-dev/torque • Try in browser: https://stackblitz.com/github/qforge-dev/torque/tree/main/st... • npm: https://www.npmjs.com/package/@qforge/torque

What feedback would help most: • What dataset would you like us to create / recreate? • Do you like the API? Any suggestions on how to change it?

License: MIT.

Happy to answer questions in the thread!
by kccqzy | 2025-11-02 17:16:45+00:00
> Note that “best” is a property of the entire statement being formatted. A line break changes the indentation of the remainder of the statement, which in turn affects which other line breaks are needed.

I really don't like formatters where changing one small part of a large expression results in the entire expression formatted very differently. It's simply not version control friendly. Especially if the language encourages large statements like the pro example. I would rather accept a little bit of code ugliness in this case. Sure this then means that the way the code is formatted is path dependent (depends on the history of the code), but I think it's a reasonable compromise.
by timr | 2025-11-02 17:16:56+00:00
Uncertainty and tolerance implies that you have a predictable distribution in the first place.

Engineers are not just dealing with a world of total chaos, observing the output of the chaos, and cargo culting incantations that seem to work for right now [1]…oh wait nevermind we’re doing a different thing today! Have you tried paying for a different tool, because all of the real engineers are using Qwghlm v5 Dystopic now?

There’s actually real engineering going on in the training and refining of these models, but I personally wouldn’t include the prompting fad of the week to fall under that umbrella.

[1] I hesitate to write that sentence because there was a period where, say, bridges and buildings were constructed in this manner. They fell down a lot, and eventually we made predictable, consistent theoretical models that guide actual engineering, as it is practiced today. Will LLM stuff eventually get there? Maybe! But right now we’re still plainly in the phase of trying random shit and seeing what falls down.
by schmidtleonard | 2025-11-02 17:17:59+00:00
Like I said, some combination of doctors and legislators. If doctors lobbied the laws (or budgetary line items) onto the books and they are still in effect, they still have culpability.

Blaming congress too is fine, but let's be clear: someone has to fight to increase every budget and the AMA didn't just know this when they were structuring their proposal, didn't just count on it not happening, they considered this an implementation detail subordinate to the openly admitted primary objective of propping up physician wages as the Greatest Generation passed. That was always the goal, they were extremely open about it, and about 15 years ago I was attending a talk on demographics in medicine with a primarily physician audience, one of them asked what the plans were to change this to staff up for the Boomer wave (the bump was on the slide, begging the question) and the presenter waved his hand and said maybe they could do something... or not, and then he laughed, and the rest of the room laughed with him.

I'm glad that the AMA has changed their stated position now that it's too late to change course (for the Boomers anyway) and their squeeze is bearing fruit for them and suffering for their patients, but I'll always remember that room full of doctors and doctors-to-be laughing about the prospect of intentionally understaffing for profit. I have it filed in my memory right next to the phone call of Enron traders giggling as they ordered power plants offline to scare up prices, except it's about a million times worse.
by vajrabum | 2025-11-02 17:18:02+00:00
None of this is about an end user in the sense of the user of an LLM. This is aimed at the prospective user of a training framework which implements backpropagation at a high level of abstraction. As such it draws attention to training problems which arise inside the black box in order to motivate learning what is inside that box. There aren't any ML engineers who shouldn't know all about single layer perceptrons I think, and that makes for a nice analogy to real life issues in using SGD and backpropagation for ML training.
by Yoric | 2025-11-02 17:18:12+00:00
(author here)

Well, I haven't used Haskell in a few years, so I could absolutely be wrong. That being said, I'm almost sure that I saw a presentation by Simon Marlowe 15-20 years ago demonstrating GHC with a multicore scheduler (alongside `seq` and `par`). Also, from the very same Simon Marlowe, there's a package called `async` https://hackage.haskell.org/package/async which basically provides async (no await, though).
by ndr | 2025-11-02 17:18:24+00:00
PSA: The Big Ben tour (not Parliament) includes a climb to the clock room, and all the way up to the bells. Take the 11 a.m. slot and you’ll catch all 12 bongs at noon.

The story of how it was designed and built is full of engineering mischief and process hacking. Very much in the HN spirit. Highly recommended.
by moritzwarhier | 2025-11-02 17:18:58+00:00
Nothing weird about it, you see people arguing right here whether a site should add a new history entry when a filter is set.

Interacting with the URL from JS within the page load cycle is inherently complex.

For what it's worth, I'd also argue that the right behavior here is to replace.

But that of course also means that now the URL on the history stack for this particular view will always have the filter in it (as opposed to an initial visit without having touched anything).

Of course the author's case is the good/special one where they already visited the site with a filter in the URL.

But when you might be interested in using the view/page with multiple queries/filters/paramerers, it might also be unexpected: for example, developers not having a dedicated search results page and instead updating the query parameters of the current URL.

Also, from the history APIs perspective, path and query parameters are interchangeable as long as the origin matches, but user expectations (and server behavior) might assign them different roles.

Still, we're commenting on a site where the main view parameter (item ID, including submission pages) is a query parameter. So this distinction is pretty arbitrary.

And the most extreme case of misusing pushState (instead if replace) are sites where each keystroke in some typeahead filter creates a new history entry.

All of this doesn't even touch the basic requirement that is most important and addressed in the article: being able to refresh the page without losing state and being able to bookmark things.

Manually implementing stuff like this on top of a basic routing functionality (which should use pushState) in an SPA is complex very quickly.
by alkonaut | 2025-11-02 17:19:02+00:00
The key invention here would be to translate from idiomatic C to idiomatic - safe - Rust.

That also sounds exactly like the kind of invention that would make me fear for my job and claim AGI has all but arrived.

Just syntactically translating C code to mostly unsafe or non-idiomatic Rust seems like a pretty pointless excercise?
by graemep | 2025-11-02 17:20:23+00:00
> Isn't that true of Christianity as well?

No, definitely not with the same authority. If you take the Bible as the equivalent of the Quran, and the church fathers as the equivalent of the hadiths, neither has any endorsement of conversion through threats of violence. Jesus was never a political or military leader, nor were the first few generations of Christian leaders.

I cannot give as clear an answer with regard to islam, because I do not know enough in depth, but there are a variety of interpretations. There was persecution of religious minorities in the Muslim empires, but mass slaughter of those who refused to convert would have inspired rebellion. The conversion did happen in places like Egypt and Syria and Persia and there was coercion.

As for Indonesia, the GP did not claim Islam spread only by the sword.
by tredre3 | 2025-11-02 17:21:59+00:00
Ext4 isn't used on Android, and it isn't immune to fragmentation.

The way ext4 reduces fragmentation is with some basic heuristics: mainly, it spreads files across the full disk instead of finding the next free spot. So they have room to grow without fragmenting. When the space gets low, it fragments just as badly as older file systems unfortunately.
by layercakex | 2025-11-02 17:22:15+00:00
Are "agents" really as useful as the hype makes them out to be?

Most of the time I'm just pasting code blocks directly into raycast and once I've fixed the bug or got the properly transformed code in the shape that I aimed for, then I paste it back into neovim. Next i'm going to try out "opencode"[0], because I've heard some good things about it. For now, I'm happy with my current workflow.

[0] https://github.com/NickvanDyke/opencode.nvim
by t-vi | 2025-11-02 17:23:11+00:00
It seems to me that in 2016 people did (have to) play a lot more tricks with the backpropagation than today. Back then it was common to meddle with gradients in between the gradient propagation.

For example, Alex Graves's (great! with attention) 2013 paper "Sequence Generation with Recurrent Neural Networks" has this line:

One difficulty when training LSTM with the full gradient is that the derivatives sometimes become excessively large, leading to numerical problems. To prevent this, all the experiments in this paper clipped the derivative of the loss with respect to the network inputs to the LSTM layers (before the sigmoid and tanh functions are applied) to lie within a predefined range.

with this footnote:

In fact this technique was used in all my previous papers on LSTM, and in my publicly available LSTM code, but I forgot to mention it anywhere—mea culpa.

That said, backpropagation seems important enough to me that I once did a specialized videocourse just about PyTorch (1.x) autograd.
by mrandish | 2025-11-02 17:23:13+00:00
> companies play with CAPEX, OPEX, what they call innovation, what they amortize etc.

True but most public companies reporting under GAAP tend to play roughly similar games to roughly similar degrees. So these metrics alone may not reflect much objective reality about a particular company at a given moment but can be useful in benchmarking the relative performance of similar types of companies against each other.
by thomasahle | 2025-11-02 17:23:40+00:00
You can do that in python using https://github.com/patrick-kidger/torchtyping

looks like this:

def batch_outer_product(x: TensorType["batch", "x_channels"], y: TensorType["batch", "y_channels"] ) -> TensorType["batch", "x_channels", "y_channels"]: return x.unsqueeze(-1) * y.unsqueeze(-2)

There's also https://github.com/thomasahle/tensorgrad which uses sympy for "axis" dimension variables:

b, x, y = sp.symbols("b x y") X = tg.Variable("X", b, x) Y = tg.Variable("Y", b, y) W = tg.Variable("W", x, y) XWmY = X @ W - Y
by spacecadet_ | 2025-11-02 17:24:25+00:00
In the branchy function, id is only compared if distance is equal, and since distance is a random float, this almost never happens and the corresponding branch is nearly perfectly predicted. The branchless function always compares both id and distance, effectively doing twice the work. It's only part of the reason why there's a 2x performance difference, but I thought it was interesting.

I really don't know how LLVM picks between branches or conditional moves, but my guess is that it doesn't assume that float equality is any less likely than other conditions, and some optimization pass in O3 turns unpredictable branches into conditional moves. I base this on the fact that adding std::hint::unlikely to the "equal" branch produces the same assembly for the function in both modes.

https://godbolt.org/z/erGPKaPcx

Whether it's safe to assume in general that float equality is unlikely for the purpose of program optimization, I'll leave to the compiler engineers. If you know the data your program will be handling, adding hints will avoid these surprises.
by jlokier | 2025-11-02 17:25:05+00:00
I use a Macbook Pro with 128GB RAM "unified memory" that's available to both CPU and GPU.

It's slower than a rented Nvidia GPU, but usable for all the models I've tried (even gpt-oss-120b), and works well in a coffee shop on battery and with no internet connection.

I use Ollama to run the models, so can't run the latest until they are ported to the Ollama library. But I don't have much time for tinkering anyway, so I don't mind the publishing delay.
by nirinor | 2025-11-02 17:25:52+00:00
Nah, Karpathy's title is "Yes you should understand backprop", and his first highlight is "The problem with Backpropagation is that it is a leaky abstraction." This is his choice as a communicator, not the poster to HN.

And his _examples_ are about gradients, but nowhere does he distinguish between backpropagation, a (part of) an algorithm for automatic differentiation and the gradients themselves. None of the issues are due to BP returning incorrect gradients (it totally could, for example, lose too much precision, but it doesn't).
by Yokolos | 2025-11-02 17:26:15+00:00
China?

https://www.amnesty.org/en/latest/news/2025/05/sudan-advance...

I haven't found any articles implicating the US, which has export sanctions on Sudan. The only thing I could find was something about small arms from the UK.

https://www.theguardian.com/global-development/2025/oct/28/u...

This report https://www.amnesty.org/en/latest/news/2024/07/sudan-constan... lists

> Weapons from China, Russia, Serbia, Türkiye, United Arab Emirates and Yemen identified

Although that seems to be mixing it up a bit, since Turkey and Russia are supporting the SAF.

Also some France-made weapons: https://www.cbsnews.com/news/sudan-civil-war-amnesty-interna...
by jdswain | 2025-11-02 17:26:36+00:00
Commissions were different back then. I worked part time selling computers around 1990 and a little earlier, margin on computers was moving down, but was as high as 50%, I recall it moving down to 30% and stabilising there for a while. I don't remember software margins, but it could have been about the same. I used to get 50% of the margin as commission.
by uecker | 2025-11-02 17:26:57+00:00
C has such types and can guarantee that there is no out-of-bounds access at run-time in the scenarios you describe: https://godbolt.org/z/f7Tz7EvfE This is one reason why I think that C - despite all the naysayers - is actually perfectly positioned to address bounds-safe programming.

Often in dependently-types languages one also tries to prove at compile-time that the dynamic index is inside the dynamic bound at run-time, but this depends.
by Yoric | 2025-11-02 17:27:20+00:00
(author here)

1. Thanks for your remarks on memory efficiency. I wrote that piece a few months ago, I'll have to reread it, but if I implied something wrong, I'll try and amend it!

2. Regarding "multi-threading risks", I don't think I claim that. I have definitely encountered race conditions in single-threaded async code. You don't encounter the same kind of memory corruptions as in, say, multi-threaded C, but you can definitely break invariants on data structures. If I miswrote/wrote something unclear, I'll need to fix that, too!
by kccqzy | 2025-11-02 17:27:35+00:00
Most of the hardness of this program comes from a user-adjustable line length limit. The author on multiple occasions used a "blog-friendly 40-char line limit" which is of course insanely hard. The program can be made much much simpler if the line length is unlimited. And if that's not an option, the program can be made somewhat simpler by only allowing line limits that are reasonably large, such as 100 characters.
by davnicwil | 2025-11-02 17:27:48+00:00
This thing of 'look, nobody cares about the details really, they just care about the solution' is a meme that I think will be here forever in software. It was here before LLMs, they're now just the current socially accepted legitimacy vehicle for the meme.

In the end, useful stuff is built by people caring about the details. This will always be true. I think in LLMs and broadly AI people see an escape valve from that where the thinking about the details can be taken off their hands, and that's appealing, but it won't work in exactly the same way that having a human take the details off your hands doesn't usually work that well unless you yourself understand the details to a large extent (not necessarily down to the atoms, but at the point of abstraction where it matters, which in software is mostly about deterministically how do the logic flows of the thing actually work and why).

I think a lot of people just don't intuit this. An illustrative analogy might be something else creative, like music. Imagine the conversation where you're writing a song and discussing some fine point of detail like the lyrics, should I have this or that line in there, and ask someone's opinion, and their answer is 'well listen, I don't really know about lyrics and all of that, but I know all that really matters in the end is the vibe of the song'. That contributes about the same level of usefulness as talking about how software users are ultimately looking for 'solutions' without talking about the details of said software.
by jonjacky | 2025-11-02 17:28:44+00:00
Story idea: on one of his many cross-country drives to Los Alamos, von Neumann stops into a remote diner out West where he runs into ... Kerouac and the others on one of their On The Road journeys! They get to talking, and von Neumann tells them about game theory, quantum mechanics, and computers --- which they have never heard of before. Kerouac writes about the encounter in one of his early On The Road drafts but it is removed by the editors who worry they might get in trouble for revealing atomic secrets because von Neumann hinted at plans to build the H-bomb.
by miki123211 | 2025-11-02 17:29:57+00:00
Not everybody who drives a car (even as a professional driver) knows how to make one.

If you live in a world of horse carriages, you can be thinking about what the world of cars is going to be like, even if you don't fully understand what fuel mix is the most efficient or what material one should use for a piston in a four-stroke.
by marcprux | 2025-11-02 17:30:04+00:00
This is a neat hack, and I don't want to diminish the effort. But I fear that any such loader apk would be marked as malware by Google and nuked by Play Protect Services.

And as others mention, using adb (or Shizuku) might also be a workaround for tech-savvy users (for the time being). We list some other potential temporary workarounds at https://keepandroidopen.org. But none of it is viable for the other 99%.

There's really no solution to the dilemma other than stopping Google from implementing it altogether. And for that, we need regulatory action — which means we need to advocate and educate consumers and lawmakers about the threat that this poses.
by cmrdporcupine | 2025-11-02 17:30:18+00:00
There's something in the prompting, tooling, heuristics inside the Claude Code CLI itself that makes it more than just the model it's talking to and that becomes clear if you point your ANTROPHIC_URL at another model. The results are often almost equivalent.

Whereas I tried Kilo Code and CoPilot and JetBrain's agent and others direct against Sonnet 4 and the output was ... not good ... in comparison.

I have my criticisms of Claude but still find it very impressive.
by vlovich123 | 2025-11-02 17:31:50+00:00
I’m not an expert but if believe the challenge is when

* you try to do GPU compositing things get more complicated. You mention you have no interest in GPU compositing but that’s quite rare

* a lot of such exploits come from confusing the kernel about the buffer to use as input/output and then all sorts of mayhem ensues (eg giving it an input buffer from a differ process so the kernel renders to the screen a crypto key in another process or arranging it to clobber some kernel buffers)

* stability - a bug in the compositor panicks the entire machine instead of gracefully restarting the compositor.

But ultimately you’re the one claiming you’re the domain expert. You should be explaining to me why other OSes made the choices they did and why they’re no longer relevant.
by phicoh | 2025-11-02 17:31:52+00:00
At the level of dnsmasq, I doubt they will care about resume.

CVEs are obviously important to you. I'm sure CVEs would be important to Dnsmasq, if they would get paid to handle them. So my guess is that they don't.

If they don't have the resources to deal with those CVEs (and I would certainly try to fix config errors that lead to crashes) despite being a hugely popular piece of software then they are just not going to deal with those CVEs, or report on them, etc.

The next step, given that Dnsmasq is used by big companies as well, might be to leave those CVEs out there on purpose. No money, no work.

If you expect that people are just not going to give you enough money then leaving out certain aspects of professionally maintained software is reasonable.
by throwaway106382 | 2025-11-02 17:31:54+00:00
Honestly - not gonna be feasible to sign things that are not AI-generated. For example, my friend's phone uses generative AI for the insane zoom capability it has - so every photo my friend takes would not be able to be signed.

And this is the crux of the issue - we are beelining to a world where EVERYTHING gets an AI filter in front of it. In a few years there will be no authentic content at all.