flâneur — a map of the web's best reading

mildbyte.xyz • Solving Wordle with uv's dependency resolver

mildbyte.xyz · 2,895 words · saved by 2 readers

In a previous life, I wrote a Sudoku solver that relied on Poetry's dependency resolver. We ended up selling that startup to EDB (not because of the Poetry hack), which means that they now own this IP. And, since then, Python packaging has advanced, with uv taking the world by storm. This means that it's time for a refresh. Can we use uv instead of Poetry? And can we solve a Wordle instead of a Sudoku? For the impatient: you can get the solver from my GitHub. Run uv run main.py run and watch it go. The short summary of the Sudoku + Poetry post is that unlike Rust or JavaScript, a single Python project cannot use more than one version of a specific Python package. This means that we can easily represent a Sudoku grid as 81 Python packages, each with 9 possible versions. If a certain cell has a specific number (version), cells in the same row, column and a 3x3 square it belongs to cannot have that same number. We can encode these rules as version constraints on other packages representin

Solving Wordle with uv's dependency resolver 7th Jul 2025 • 12 min read • Tags: programming , tech , why , disgusting hacks Table of Contents Introduction Background: Sudoku and Python dependency resolution What is Wordle Analysis Basic building blocks Greens and yellows Python dependency rules? Possible position packages Feedback packages Putting this all together: the cursed neural network Implementation Package examples --find-links and wheels Harness Bonus round: more efficient guessing Blooper reel GitHub Introduction In a previous life, I wrote a Sudoku solver that relied on Poetry's dep

Explore this link on the map →

saved by

related reading