Hacker News new | past | comments | ask | show | jobs | submit login

Composer, the defacto package manager for PHP, uses a SAT solver. It's pretty interesting looking at the code!



Composer's solver is pretty advanced. It started as a PHP port of libsolv, which is the library used by both SuSE (zypper) and Fedora (DNF).


... and also a frequent source of performance and memory issues.


Considering it's only a problem when updating dependencies and how good and reliable the result is, it's totally worth it.

Worst case in extremely big projects you just add some swap and let it run for a while, the time required is still in the order of tens of minutes.

Compare that to hours long c++ build times.


The Anaconda distribution's package/environment manager for Python (named conda) at one time used the picosat SAT solver for dependency resolution as well. I'm not certain they still do, they've removed blog entries etc. referring to it at some point.


Yes, it’s still picosat (wrapped in a python library called pycosat). At some point it may be switched out with an alternate SAT implementation, but I suspect SAT in general is very much destined to stay an integral part of conda.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: