The Cassowary Linear Arithmetic Constraint Solving Algorithm [pdf] (2002)
constraints.cs.washington.edu
constraints.cs.washington.edu
Cassowary being able to solve that broader class of problems in an efficient and incrementally (using prior solutions to the problem to make subsequent solutions even faster) was why Apple chose it for Autolayout in the later '00s. Their Visual Formatting Language was a nice ease-of-use enhancement, too.
The original cassowary repo is https://github.com/gjbadros/cassowary and there was a nice improved port to Javascript 15 years ago: https://github.com/slightlyoff/cassowary.js/
In addition, you could combine quantitative with qualitative, i.e., Allen-style constraints [0].
This all feels like ages ago to me now, but I suppose >20 years actually is quite a long time.
[0] https://en.wikipedia.org/wiki/Allen%27s_interval_algebra
A shorter way of saying this is that the ergonomics of the most broadly-deployed constraint solving UI layout system—AutoLayout for iOS—still cause pain. It's not better pain than the massive complexity of CSS, it's just different pain. And it's also not sufficient; Apple themselves introduced collection views and stack views, each of which has its own special behavior. Their new framework, SwiftUI, does not use AutoLayout. Even the maintainers don't consider AutoLayout "superior" enough to adopt in a fresh UI framework.
It's a shame, because there is elegance in having a layout system you can explain in one or two pages, with enough power to almost support an entire OS and ecosystem of apps. It's just not quite across the finish line for developer experience and education.
The reason is that the width/height of an element with flowing content cannot be described by a linear constraint. (not even a quadratic constraint, since there's a discontinuous jump when text wraps from N lines to N+1 lines) So when you mix these kinds of elements into a Cassowary-based system, you're trying to fit a square into a circle-shaped hole, and run into weird edge cases that require workarounds like manually adjusting constraints based on ad-hoc logic, or running the layout solver multiple times to try different sizes for a flowing element, etc.
[1]: https://github.com/ratatui/ratatui/blob/main/ratatui-core/sr...
n.b. I've been involved in the OneBusAway project for over a decade and run the non-profit as the very part time exec director today.
Thank you for your continued involvement and contributions to OneBusAway!
I loved the idea of GSS but it never caught on: https://gss.github.io/
Rage successfully baited - that was like three months ago, tops!
I wonder what ever happened with Grid - they were indeed very hyped, but fairly-obviously vaporware too IIRC. At least in terms of marketing, where they claimed AI web-property generation.
> GSS was created by Dan Tocchini, leader of the TheGrid, the first AI website platform.