Abstract Nonsense

Posts tagged with "Computer-Science"

To uv or not to uv

uv is a blazing fast Python package manager that aims to displace pip. It’s a really slick tool that lets you go from git clone to executing code with all the dependencies seamlessly. All the standard accolades apply: written in Rust, beautiful terminal UI, well thought-out user ergonomics … all written by Astral, the same company that gave the Python community ruff.

But what makes it so damn fast? Under the rusty hood, the magic is even more impressive. Charlie Marsh, the project lead, presented at Jane Street and revealed some of the inner workings. The whole talk is super interesting, but some standout highlights are:

Irregular Expressions

Someone at work asked if it’s possible to validate credit card numbers with the Luhn algorithm in regex.

Technically, a regular language could recognise valid fixed-length credit card numbers by brute-force enumerating all possible sequences. But as a more general solution, I don’t think DFAs can support the modular arithmetic required for arbitrary sequence lengths…

Possible or not, I feel incredibly nerd sniped.