mildbyte.xyz • Solving Wordle with uv's dependency resolver
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
saved by
related reading
- GitHub - konstin/sudoku-in-python-packaging: Sudoku solving in python packaginggithub.com
- Charlie Marsh: uv: An Extremely Fast Python Package Manageryoutube.com
- uvdocs.astral.sh
- uv: An extremely Fast Python Package Manager :: Jane Streetjanestreet.com
- Solving regex crosswords with Z3 - Made of Bugsblog.nelhage.com
- Jane Street Blog - Can you reverse engineer our neural network?blog.janestreet.com
- Shipping at Inference-Speed | Peter Steinbergersteipete.me
- uv: An In-Depth Guide to Python's Fast and Ambitious New Package Managersaaspegasus.com
- Dependency Confusion: How I Hacked Into Apple, Microsoft and Dozens of Other Companies | by Alex Birsan | Mediummedium.com
- Solving Every Sudoku Puzzlenorvig.com
- Writing Toy Software Is A Joyblog.jsbarretto.com
- Self-contained Python scripts with uv - the.dusktreader blogblog.dusktreader.dev