The Cassowary Linear Arithmetic Constraint Solving Algorithm [pdf]

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB high-performance time series database
Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems.
influxdata.com
featured
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
  1. kiwi

    Efficient C++ implementation of the Cassowary constraint solving algorithm (by nucleic)

  2. InfluxDB

    InfluxDB high-performance time series database. Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems.

    InfluxDB logo
  3. cassowary

    The original Cassowary constraint solver for user-interface interactions, layout, and more. Used by SCWM, CCSS, and inspired macOS and iOS AutoLayout (by gjbadros)

    Cassowary's big differentiator 25+ years ago was that it is robust against cycles in constraints and supported inequalities. Those two facts made it instantly way easier to use than the local-propagation-based solvers that predated it (think spreadsheet-style formulas referencing cells where you can only compute values using equality assignment and you can't create cyclic references).

    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/

  4. cassowary.js

    Cassowary/JS, better, faster, future-ready

    Cassowary's big differentiator 25+ years ago was that it is robust against cycles in constraints and supported inequalities. Those two facts made it instantly way easier to use than the local-propagation-based solvers that predated it (think spreadsheet-style formulas referencing cells where you can only compute values using equality assignment and you can't create cyclic references).

    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/

  5. engine

    GSS engine (by gss)

  6. ratatui

    A Rust crate for cooking up terminal user interfaces (TUIs) 👨‍🍳🐀 https://ratatui.rs

    We use a cassowary based constraint solver within Ratatui [1]. It's kind of neat once you understand the algorithm and add your own UI rules system on top of it. Unfortunately the library[2] that we use for the actual solving is unmaintained for many years now. I've been meaning to rewrite[3] a bunch of things in the lib to be more ergonomic, but it hasn't bubbled to the top of my todo list yet.

    [1]: https://github.com/ratatui/ratatui/blob/main/ratatui-core/sr...

    [2]: https://crates.io/crates/cassowary/

    [3]: https://crates.io/crates/kasuari

  7. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

Did you know that C++ is
the 7th most popular programming language
based on number of references?