npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

indigo-ts

v0.6.0

Published

An attempt to implement the Indigo constraint solver in TypeScript. See "The Indigo Algorithm" and "Indigo: A Local Propagation Algorithm for Inequality Constraints."

Downloads

8

Readme

indigo-ts

An attempt to implement the Indigo constraint solver in TypeScript. See "The Indigo Algorithm" and "Indigo: A Local Propagation Algorithm for Inequality Constraints."

http://kti.ms.mff.cuni.cz/~bartak/constraints/ch_solvers.html#Indigo is a good start.

Why Indigo?

We need a solver that is

  • fast (ideally linear in the typical case!)
  • interpretable (easy to understand when things go wrong e.g. explanation for a particular value, explaining under- and over-constrained systems)
  • expressive (supports many kinds of constraints)

Why do we need that?

  • fast: need to be able to iterate at interactive speeds. 1s is acceptable, 100ms is ideal. Current Bluefish diagrams can take on the order of 10s as they get big, because it scales approx n^3.
  • interpretable: constraint solvers are notoriously difficult to understand and their performance characteristics can be hard to predict. for this reason we need ways to help users understand the output of the solver. ad-hoc solutions to opaque systems do not suffice. moreover, a more interpretable system tends to be easier to extend and hack on.
  • expressive: we would like to support more complicated layout techniques, such as "tidy" tree layout and pretty printing, within Bluefish somehow. This requires us to build an extensible solver framework, similar in spirit to SMT. We currently hypothesize that intervals and monotonicity are useful assumptions for the metalanguage that communicates between solvers, similar to how equality is the communication medium between theories in SMT. See also "SMT Modulo Monotonic Theories" http://www.cs.ubc.ca/labs/isd/Projects/monosat/smmt.pdf. Monotonicity is a really nice assumption, because it doesn't require backtracking.

An unsolved question with this approach is how do we do one-at-a-time or staged layout? A strong motivating example is placing labels after the rest of layout completes, which is a common way to implement label layout efficiently. Label layout can require backtracking, e.g., in the case of a map label layout algorithm I can't find atm there are point, line, and area labels that are placed, but backtracking occurs if it can't find a placement. Similarly, edges are often placed after nodes are placed (even if abstract versions of the edges are used to lay out the nodes). This is the process in the DOT layout algorithm, where edges are used to determine node layers and then once nodes are placed the edges are routed around the nodes so they don't intersect.