news
Programming Leftovers
-
Arshad Yaseen ☛ Engineering High-Performance Parsers with Data-Oriented Design
A parser is usually taught as a problem of grammars, but once the grammar is correct, almost all of the performance and most of the engineering difficulty live somewhere else, in how the resulting tree is represented in memory. This article describes the design discipline I used to build Yuku, a JavaScript and TypeScript parser written in Zig that runs several times faster than the established parsers in its category, and it applies to any parser or compiler frontend in a native language. The claim is simple. Design the data structure first, let the machine’s access patterns dictate its shape, and the speed follows almost for free, while unrelated-looking problems (memory layout, allocation, and serialization) collapse into one solution.
-
Philip Zucker ☛ Lifting Terms: Making Well Scoped Syntax Dumber
Lifting terms are the same ideas as the liftng egraph but simplified to the term setting. We consider the “context” to be an intrinsic part of the term, always available and never implicit. Terms carry both the scope they live in and an overapproximation of the support of which variables they actually use. Thinnings are a thing that tell you both of these pieces of information. The domain is the total scope, the thinning itself tells you the support.
-
Mario Rufus ☛ Where did my segfault go?
The other day I was iterating on a small C program with entr: [...]
-
University of Toronto ☛ Finding an outdated Git mirror host
Fortunately we can take advantage of the simple Git HTTP protocol to directly query every server to see the state of their repository (assuming that they respond). Specifically, we want to use dumb client reference discovery to see the commit ID of one or more references (most often branch heads) on each server. To do this we'll need some way of forcing a HTTPS server name to resolve to a specific IP address, but curl has this feature in the form of its '--resolve' command line option.
-
Arjen Wiersma ☛ It has been a while
In the project that I was running last year up to April we had to use Jetbrains IDEA, and it is loaded with things to make you stop thinking critically. I think that has been the biggest “oh man, is this what life has become?” driver. Luckily I am now able to leave that behind me. Obviously I could've just not used that tooling, but when everyone in a project uses it, it becomes a given really. In hindsight I now no longer remember all the things I did with it, while I can still remember that specific piece of code that I struggled with before the AI systems took over the thinking process.
-
Alisa Sireneva ☛ Optimal parse with phminposuw
Say you want to encode a byte stream, and bytes can be encoded in different formats, e.g. optimized for ASCII, numbers, raw binary, etc. These formats prioritize better compression of a specific type of data. Realistic byte streams may contain all of them at different points, so we want to switch between formats on the fly optimally.
-
R / R-Script
-
Dirk Eddelbuettel ☛ Thinking inside the box
This release of RQuantLib brings a minor update to the calendars for Israel which in QuantLib 1.43 can now use one of three different exchange choices. However, using ‘settlement’ is now deprecated so we adjusted our code. This came up as we had packaged the 1.43-rc version of the (upcoming) 1.43 release a few days ago, and it is now in testing requiring RQuantLib to catch up. Full details from the NEWS file follow as usual.
-
-
Python
-
Sebastian ☛ PEP 3099 is really funny to me
looking through the list of ideas that will "never be added to python", three of them have since been added to python: [...]
-
Python Speed ☛ 6× faster binary search: from compiled code to mechanical sympathy
It’s worth knowing that I will be speeding through mentions of many different low-level hardware topics: instruction-level parallelism, branch (mis)prediction, memory caches, SIMD, and more. This is only one article, it can only briefly introduce you to what’s possible, it can’t function as an in-depth tutorial. So I’ll talk about how you can learn more about these topics at the end of the article.
-
Tech at Instacart ☛ Leveraging PyFixest for High-Cardinality Marketplace Modeling at Instacart
Scaling Marketplace experiments requires specialized statistical techniques. We examine why standard ordinary least squares regression (OLS) becomes computationally intractable when controlling for high-cardinality categories. We then dive into the underlying math and demonstrate how modern packages — specifically Fixest and Pyfixest — bypass these limitations. We conclude by benchmarking these methods to show their real-world impact on processing speed, memory efficiency, and estimator precision.
-
-
Java/Golang
-
Redowan Delowar ☛ GC shape stenciling in Go generics
While going through the Go generics proposal, I got curious about how the compiler implements it. Compilers usually handle generics in one of two ways: [...]
-
Anton Zhiyanov ☛ On interactive Go tours
Unfortunately, at some point, writing these tours stopped being fun and started to feel like a part-time job. I'm not really excited about that, so I've decided to stop.
-