3 ms·
Nucleic also makes Kiwi one of the fastest Cassowary Constraint implementations. It is very useful for implementing custom GUIs as it can make building internal
by fayten 4y ago
Nucleic also makes Kiwi one of the fastest Cassowary Constraint implementations. It is very useful for implementing custom GUIs as it can make building internal component layouts and general layout systems fairly straightforward and it’s very performant.
I highly encourage taking a look at it and it has also been ported to a wide range of language.
I’m using Nim kiwi with my own GUI library now. I’ll have to take a peak at how enaml is using kiwi for its layouts.
https://kiwisolver.readthedocs.io/en/latest/ https://kiwisolver.readthedocs.io/en/latest/
https://github.com/alexbirkett/kiwi-java https://github.com/alexbirkett/kiwi-java
https://github.com/PongoEngine/jasper https://github.com/PongoEngine/jasper
https://github.com/yglukhov/kiwi https://github.com/yglukhov/kiwi
- elcritch 4y agoI looked at the first Employee example in Nucleic but didn't see anything that struck me. Actually I didn't see a way to adjust layout at all. What am I missing? Without reading the paper, what is Cassowary Constraints solving for? I'd guess a bin packing implementing, which could be handy for graph networks come to think of it. Personally I've been writing a CSS Grid implementation because I find the "Grid" (aka Table) to provide most of what I want: https://github.com/elcritch/cssgrid/blob/main/tests/tlayout.nim https://github.com/elcritch/cssgrid/blob/main/tests/tlayout.... Though I was running into issues when trying to add `min/max/minmax` functions with fracs, as they end up creating a constraints equation. It seems CSS Grid just gives up if you specify anything that'd require a constraint solver. At least on Chrome & Safari. Fair enough but I figure I'll add at least a 1-pass try for doing `minmax(1fr, 100px)` type of things.
- anothernewdude 4y agoI had tried to use Kiwi a while back - is it a part of Cassowary solvers that they have such a small number of constraint types? I ended up having to use Z3 because I wanted by boxes have subtraction and division constraints. Was it possible with Kiwi?