Better HN
topnewbestaskshowjobs
Log inSign up

pavpanchekha

2,910 karma · joined May 16, 2010 (16y ago) · 465 submissions

My book: https://browser.engineering

CS Professor at the University of Utah. I study web browsers, floating point, programming languages, and automated reasoning.

Website: pavpanchekha.com Email: me+hn@pavpanchekha.com

Submissions

comment 2w ago · link · parent

Author here. I assume .engineering was intended for, like, civil engineering firms. But, fun fact, I named the book by going through the list of TLDs since, after all, a book about web browser needs a URL about as much as it needs a title. The URL web.browser.engineering is supported.

comment 2w ago · link · parent

That sounds incredibly fun. Hope you enjoy the book!

comment 2w ago · link · parent

Great write up, thanks for sharing!

comment 2w ago · link · parent

The book was written between 2019 and 2024, and published in 2025!

comment 2w ago · link · parent

Hi, author here! I made a real effort to keep opinions out of the book, and I'm wondering what you feel is opinion above! I don't mean to imply that WebAssembly either will or should be co-equal to JavaScript, just that 1) it's not covered in the book at all, and 2) who knows what the future will contain.

In any case, this line is in the appendix describing what we didn't cover and, per that, we don't say anything else about WebAssembly in the book!

comment 2w ago · link · parent

Hi folks, one of the authors here. Happy to answer questions. Chris and I wrote the book starting in 2019, and the book was largely done in late 2024, with publication in 2025. In case folks are wondering, literally none of it was AI-written, because the AIs didn't exist yet!

comment 2mo ago · link · parent

Last author here. We've talked to the Chrome folks and they are interested, but it's difficult work. Chrome is big enough that emitting different sequences is hard and would requiring changing a lot of internal abstractions. Skia would love to do it optimization like this but it's a small team with a lot of other priorities. Integrating outside code is hard.

comment 2mo ago · link · parent

I am a big fan of DB-style thinking, very much on the same wavelength as you :)

comment 2mo ago · link · parent

Let me also add that nanobench was a huge help, not just because it was a good benchmarking tool but also because it gave us some confidence that we're measuring the right thing. It's easy to make _something_ faster but hard to know if it's the right thing. Having that come pre-packaged from the project answers a lot of tricky questions that would otherwise be easy to get wrong.

comment 2mo ago · link · parent

Thank you! The SkRecord system was _perfect_ for doing these optimizations. I don't think it would have been possible to do this project without it.

comment 2mo ago · link · parent

Last author here, this is very much what I've worked on for most of my career. In this project, I had the idea of optimizing rendering instructions years ago, while I was writing https://browser.engineering/, but the hard part of this project was being very careful with the semantics of Skia itself. It's _super_ easy to write down rewrite rules that _seem_ correct, but are actually only correct when, say, something is opaque, or has the right blend mode, or two things don't overlap, or something like that. Which is why this paper focuses os much on carefully defining that semantics. We actually did the semantics in Lean because otherwise we couldn't consistently write correct rewrite rules.

comment 2mo ago · link · parent

Hi folks! Last author here, happy to answer questions, very surprised to see this on HN. We had a blast working on this. Let me add that the Skia team at Google was super supportive, met with us many times to explain a lot of stuff.

I had the idea for this project years ago while writing Web Browser Engineering with Chris Harrelson (see https://browser.engineering/). Then a few years ago I made a first attempt at this project with Yuvaraj (https://droidkid.github.io/), but for various reasons we never got very far. I restarted the project with Bhargav (https://bhargavkk.com/) about a year ago, and focused much more seriously on the semantics of Skia itself, which made progress much more rapid. Still, I was, frankly, shocked by how good the results are.

comment 3mo ago · link · parent

I do a substantial amount of coding in Racket, including maintaining the Herbie numerical compiler (https://herbie.uwplse.org/) over the last decade.

Racket is great! The runtime is reasonably fast, and the standard library is exceptionally featureful, including, for example, a decent plotting library, an HTTP server, decent HTML and JSON support, several forms of multi-threading, and a quite good FFI, all of which Herbie uses extensively. I suppose the parentheses are a question of taste (I like them!) but a lot of the specific syntactic decisions, like the `for` and `match` macros, are quite nice.

comment 3mo ago · link · parent

It's about chips with a large enough scale up domain. Larger domain allows for bigger model, which is what's driving this jump. You've got to get the chips, test them, tune kernels, then start a big pre train, mid & post-train, and only then do you actually get the model. So it takes time. Anthropic got there first partly because they use different hardware (TPU I think, maybe Trainium) which had larger scale ups earlier.

comment 4mo ago · link · parent

A lot of algorithmic improvement in AI is ultimately bottlenecked by compute. It is very easy to come up with ideas that could improve models! But to prove that they do, especially at scale, is expensive and takes a long time.

comment 4mo ago · link · parent

Making Luna, which was already very cheap and extremely capable, 5x cheaper is crazy. I use Sol at work but Luna at home, and while there's definitely a difference, it doesn't feel like night-and-day. After a year of ever-increasing prices it suddenly feels (between this, Kimi K3, GLM 5.2) that prices are falling again.

comment 4mo ago · link · parent

For compiler work I found that Sol is noticably better than 5.5 (and I generally use OAI models because I like the Codex app), but Fable was still obviously better.

comment 6mo ago · link · parent

OpenAI used to make Codex-specific models, but they stopped. What I've gathered from interviews and similar is that training two models isn't worth the (small) lift from having a coding-specific model. You're pre-training on everything anyway, and coding RL is reasonably useful for general-purpose models too.

19.

Can LLMs accelerate science? An experiment(pavpanchekha.com ↗)

2 points · by pavpanchekha · 7mo ago · 1 comment

comment 8mo ago · link · parent

University of Washington Programming Languages and Software Engineering (research group).

I'm not at UW any more, I'm now at Utah, but some of the Herbie team is at UW and they provide the infrastructure

comment 8mo ago · link · parent

Documented here but yes it's an average, of something similar to but not exactly the same as relative error: https://herbie.uwplse.org/doc/latest/error.html

It's true that averages can be misleading but we encourage users to think about it instead as a percentage of inputs. In practice the error distribution is very bimodal, the two modes being "basically fine" (a few ulps of error) and "garbage" (usually 0 instead of some actual value)

comment 8mo ago · link · parent

Author here. The speed up is modeled throughput, though the model is relatively naive. It's possible to disable branches by turning off the regimes flag, see https://herbie.uwplse.org/doc/1.0/options.html

comment 8mo ago · link · parent

Author here. I've got a few papers about this problem (including one in submission), but it is very very hard to do, especially with acceptable overhead. The state of the art is maybe 100x overhead.

comment 8mo ago · link · parent

It is, there's a page in the documentation about how errors are defined. Let me also add: Herbie generally gives the most accurate option it found first, and then the other stuff might be useful for speed (0.5x is way faster than two square roots and a divide!) but it's not as accurate

comment 8mo ago · link · parent

Author here! Yes, the float distribution isn't what you want in practice, but distribution selector isn't really the right thing either, because a low probability bad result can still be pretty bad! Hence the range selector; the float distribution is good at picking extreme values that trigger FP error.

We usually recommend looking for 90%+ accuracy or carefully examining the accuracy plot

comment 8mo ago · link · parent

It was me. Damn it you're right! Will fix!

comment 8mo ago · link · parent

In calculus the core issue is that the concept of a "function" was undefined but generally understood to be something like what we'd call today an "expression" in a programming language. So, for example, "x^2 + 1" was widely agreed to be a function, but "if x < 0 then x else 0" was controversial. What's nice about the "function as expression" idea is that generally speaking these functions are continuous, analytic [1], etc and the set of such functions is closed under differentiation and integration [2]. There's a good chance that if you took AP Calculus you basically learned this definition.

The formal definition of "function" is totally different! This is typically a big confusion in Calculus 2 or 3! Today, a function is defined as literally any input→output mapping, and the "rule" by which this mapping is defined is irrelevant. This definition is much worse for basic calculus—most mappings are not continuous or differentiable. But it has benefits for more advanced calculus; the initial application was Fourier series. And it is generally much easier to formalize because it is "canonical" in a certain sense, it doesn't depend on questions like "which exact expressions are allowed".

This is exactly what the article is complaining about. The non-rigorous intuition preferred for basic calculus and the non-rigorous intuition required for more advanced calculus are different. If you formalize, you'll end up with one rigorous definition, which necessarily will have to incorporate a lot of complexity required for advanced calculus but confusing to beginners.

Programming languages are like this too. Compare C and Python. Some things must be written in C, but most things can be more easily written in Python. If the whole development must be one language, the more basic code will suffer. In programming we fix this by developing software as assemblages of different programs written in different languages, but mechanisms for this kind of modularity in formal systems are still under-studied and, today, come with significant untrusted pieces or annoying boilerplate, so this solution isn't yet available.

[1] Later it was discovered that in fact this set isn't analytic, but that wasn't known for a long time.

[2] I am being imprecise; integrating and solving various differential equations often yields functions that are nice but aren't defined by combinations of named functions. The solution at the time was to name these new discovered functions.

comment 8mo ago · link · parent

They're cheap but not free, especially at the front end of the CPU where it's just a lot more instructions to churn through. What the branch predictor gets you is it turns branches, which would normally cause a pipeline bubble, to be executed like straightline code if they're predicted right. It's a bit like a tracing jit. But you will still have a bunch of extra instructions to, like, compute the branch predicate.

comment 8mo ago · link · parent

Horner's form is typically also more accurate, or at least, it is not bit-identical, so the compiler won't do it unless you pass -funsafe-math, and maybe not even then.

comment 9mo ago · link · parent

Deterministic output is incompatible with batching, which in turn is critical to high utilization on GPUs, which in turn is necessary to keep costs low.
12345
16