News for hackers. Stuff that matters.

matheist

Re:Time complexity of operations on Python's built-in types on Saturday August 29, 2026 @03:07PM (#49492421)
Saying that l.pop(k) has time complexity O(n-k) implies that popping something at position 5 from the end has bounded (amortized) time cost regardless of the length of the list l, ie even if we let the list grow arbitrarily.

It's a stronger claim than just saying O(n), because in the latter case you wouldn't be able to conclude that popping something 5 from the end has bounded time as the list grows.

Re:Ask HN: What are you working on? (August 2026) on Sunday August 09, 2026 @05:19PM (#49236025)
Counterpoint, I don't particularly have that expectation
Re:Why the Legendary Erdős Problems Are Falling to AI on Wednesday August 05, 2026 @02:17PM (#49186727)
And then there's G. H. Hardy, famous number theorist, who wrote an "Apology" for mathematics in the sense of defending the study of number theory for its own sake because it's beautiful.

Which one were you referring to?

> The company says that the drug was generally well tolerated, but that’s on the oncology scale.

> ...

> He’s been on daraxonrasib since early this year, and describes it this way: “. . .it’s a nasty drug. It causes crazy stuff like my body can’t grow skin and so I bleed all out of a whole bunch of parts of me that shouldn’t be bleeding” If you go to that link above, be prepared, because he also looks like he’s had aqua regia thrown all over him (and apparently feels a bit like that, too). But his tumor volume has gone down by about 75%, and there’s a very strong chance that he wouldn’t still be alive at all without having gone on the drug.

Re:Virtual violin produces realistic sounds on Wednesday May 06, 2026 @11:22PM (#48045071)
There's eg https://summit.sfu.ca/item/11130 from a Tamara Smyth and Frederick Scott; Google scholar shows some citations but not necessarily conical brass in particular. That link is about trombones, so also not conical. (I read that and tried to implement some stuff in it, see https://nuchi.github.io/trombone/ for a browser-based playable version.)

Conical and cylindrical bores definitely differ but I don't see why they'd be different specifically with respect to the lip interaction, can you say more about that part?

I have no idea, but I wouldn't expect so unless it was by coincidence? Not sure what chords have to do with any of this. There's a canonical way to choose 4 points uniformly and independently at random on the circle, and it's got nothing to do with chords.
Right, I was taking it as given that the problem of choosing a hemisphere canonically for a point meant "such that the argument works in the same way as for the circle".

Bertrand paradox just doesn't apply here, there's a natural measure on the circle and all higher dimensional spheres. I wouldn't expect an article on this subject to need to make that clarification unless it's dealing with chords or some other situation without a natural measure.

Great argument. I found this generalization to higher dimension: https://www.mathpages.com/home/kmath327/kmath327.htm
> The same decomposition works in higher dimensions.

I don't think the same argument works in higher dimensions. On a circle, we can canonically pick a semicircle corresponding to each point (we have two choices, let's say we pick the clockwise one).

In higher dimensions there's no canonical choice of half-sphere. In odd dimensions one could pick a canonical half-sphere per point but it might turn out that some other non-chosen half-sphere for that point contains all the other points. In even dimensions there isn't even a way to canonically pick a half-sphere for each point (this is a consequence of the Hairy Ball Theorem).

(For all I know the actual numbers might turn out to be the same, I don't know. I'm just saying that the argument doesn't work.)

Re:MMAcevedo aka Lena by qntm on Friday February 13, 2026 @02:00AM (#46999749)
I remember being very taken with this story when I first read it, and it's striking how obsolete it reads now. At the time it was written, "simulated humans" seemed a fantastical suggestion for how a future society might do scaled intellectual labor, but not a ridiculous suggestion.

But now with modern LLMs it's just too impossible to take it seriously. It was a live possibility then; now, it's just a wrong turn down a garden path.

A high variance story! It could have been prescient, instead it's irrelevant.

> Codex uses apply_patch: It takes a string as input, which is essentially an OpenAI-flavored diff, and instead of relying on a structured schema, the harness just expects this blob to follow a strict set of rules. Since OpenAI folks are without a doubt smart, I’m sure the token selection process is biased to fit this structure at the LLM gateway for the Codex variants of GPT, similar to how other constraints like JSON schemas or required tool calls work.

Codex does in fact use a schema for constrained sampling, it's here: https://github.com/openai/codex/blob/main/codex-rs/core/src/...

It still has to work to get an exact match, or at least I didn't read the code to see if there's any fuzzy matching used.

Note the two codex models were the only ones doing worse with the author's proposed format. The author found them doing better with replace than with apply patch, but since the author appears to be unaware that they use a schema for constrained sampling, I think a more realistic benchmark should enable constrained sampling for the apply test.

Re:Two Twisty Shapes Resolve a Centuries-Old Topology Puzzle on Wednesday January 28, 2026 @04:46PM (#46802024)
They don't appear to care about the images of the immersions or their complements, aside from them not being related by an isometry of R^3. They're not doing any topology with the image.

In other works, they have two immersions from the torus to R^3, whose induced metric and mean curvature are the same, and whose images are not related by an isometry of R^3. I didn't see anything about the topology of the images per se, that doesn't seem to be the point here.

Re:Two Twisty Shapes Resolve a Centuries-Old Topology Puzzle on Tuesday January 27, 2026 @02:02PM (#46784654)
To be precise, the mean curvature and metric are the same but the immersions are different (they're not related by an isometry of the ambient space).

Topologically they're the same (the example found was different immersions of a torus).

Re:Structured Outputs on the Claude Developer Platform (API) on Friday November 14, 2025 @08:19PM (#45934190)
yeah I have, but I think only when it gets stuck in a loop and outputs a (for example) array that goes on forever. a truncated array is obviously not valid JSON. but it'd be hard to miss that if you're looking at the outputs.
Re:Signs of introspection in large language models on Friday October 31, 2025 @06:26PM (#45777358)
Can anyone explain (or link) what they mean by "injection", at a level of explanation that discusses what layers they're modifying, at which token position, and when?

Are they modifying the vector that gets passed to the final logit-producing step? Doing that for every output token? Just some output tokens? What are they putting in the KV cache, modified or unmodified?

It's all well and good to pick a word like "injection" and "introspection" to describe what you're doing but it's impossible to get an accurate read on what's actually being done if it's never explained in terms of the actual nuts and bolts.

Re:Cursor Composer: Building a fast frontier model with RL on Wednesday October 29, 2025 @12:28PM (#45749157)
> "Best Frontier" includes GPT-5 and Sonnet 4.5, which both outperform Composer.
Re:When Bruce Lee trained with Kareem Abdul-Jabbar on Friday September 26, 2025 @07:39PM (#45392140)
Sifu, rather, which would be the Cantonese version (Lee was a Cantonese speaker and didn't speak Mandarin)
Re:Structured Outputs in LLMs on Tuesday September 23, 2025 @05:42PM (#45353139)
Oh now I understand. I thought your ab and ba were single tokens (even though that doesn't make sense in context). Once you point out they're separate tokens, I follow you. Thank you!

Edit: that's a great example

Edit 2: even more fun: training data is [ab, ab, ba, bb, bb, bb]. Then constrained sampling flips your likelihood from 1:2 to 2:1

Re:Structured Outputs in LLMs on Tuesday September 23, 2025 @01:18PM (#45350097)
Why do you think the constrained percentages are 0/75/25 and not eg 0/66/33? (ie same relative likelihood for valid outputs)
Re:Anthropic raises $13B Series F at $183B post-money valuation on Tuesday September 02, 2025 @12:55PM (#45105744)
Valuation includes expected future growth, it's not just present value of future revenue given today's numbers.

You may not agree with the market's estimation of that, but comparing just present revenue isn't really the right comparison.

Re:Anthropic raises $13B Series F at $183B post-money valuation on Tuesday September 02, 2025 @12:51PM (#45105687)
You know, it only just now occurs to me to wonder if the blackjack story is the public sanitized version of "how I got $24k because I'm not allowed to tell you the real version"
Re:Derivatives, Gradients, Jacobians and Hessians on Sunday August 17, 2025 @02:12PM (#44933616)
Sorry to actually your actually, but the derivative of a function f from a space A to a space B at the point a is a linear function Df_a from the tangent space of A at a to the tangent space of B at b = f(a).

When the spaces are Euclidean spaces then we conflate the tangent space with the space itself because they're identical.

By the way, this makes it easy to remember the chain rule formula in 1 dimension. There's only one logical thing it could be between spaces of arbitrary dimensions m, n, p: composition of linear transformations from T_a A to T_f(a) B to T_g(f(a)) C. Now let m = n = p = 1, and composition of linear transformations just becomes multiplication.

(Only half kidding)

Re:Open source alternative to Perplexity Comet on Friday July 11, 2025 @03:16AM (#44529227)
> We are also building an LLM-based ad-blocker after Chrome blocked uBlock Origin.

Since it's a Chromium fork, why not re-enable uBlock Origin instead?

Re:De Bruijn notation, and why it's useful on Saturday May 31, 2025 @03:58AM (#44142742)
Thanks! (Just clarifying, it's not my project)
Re:De Bruijn notation, and why it's useful on Friday May 30, 2025 @02:07PM (#44138638)
The Faust compiler uses de Bruijn indices internally to reuse computations. Anyone else know any other examples?

https://github.com/grame-cncm/faust

Looks interesting! Is there any intuition for why this should be the case? Did you discover it via that intuition, or just random experimentation?

A note, your install script appears to still have a placeholder at the "apply patch" step. A suggestion, might be more user-friendly to fork llama.cpp and then include that as a git submodule rather than make it a "git clone and apply patch" step.

A further note, everyone and their dog has a different local python set-up, might be nice to let people separate the llama.cpp stuff from the python stuff rather than bake in a dependence on homebrew python.

Re:Applications of Classical Physics on Sunday May 11, 2025 @05:45PM (#43957430)
I think in modern physics "classical" often means "not quantum", rather than "pre-modern".
Re:Gonzalo Guerrero on Sunday May 11, 2025 @02:00PM (#43955597)
"Guerrero" comes from Spanish "guerra", which is cognate to English "war". They both derive from a common proto-Germanic root.

Older »