4 ms·
Regarding the user interface using lpsolve, This sounds very interesting, using a full constraint solver to layout a UI. Are you aware of anything else or publi
by Arelius 15y ago
Regarding the user interface using lpsolve, This sounds very interesting, using a full constraint solver to layout a UI. Are you aware of anything else or public that uses a similar approach?
- Someone 15y agoI do not know whether it users a 'full' constraint solver, nu Mac OS X Lion can use constraints to layout UIs (http://developer.apple.com/library/IOs/ipad/#documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/InterfaceBuilder/InterfaceBuilder.html http://developer.apple.com/library/IOs/ipad/#documentation/T...)
- jws 15y agoNo, I've not seen anyone else doing it. For anyone trying it, I can recall… • It was fast enough to be undetectable. This was in the days of 50MHz 486DX chips and struggling to fit on a 16MB machine. It used to do the solve on every window display. I think that the system of equations was always easy for the algorithm. (By contrast, the call center work could run into the minutes to solve.) • lpsolve is more complicated and capable now, but still LGPL. • As we move to retina displays, the need for integer variables goes away and things get easier. Rounding becomes acceptable. • Alignment of elements in unrelated boxes was trivial. Rather like designers use grids to enforce order on disparate elements. You could just say "the left edge of this checkbox lines up with the left edge of the section title" • Somewhere along the years I've misplaced the code. • I used data structures to express the relationships between elements. This would have be an outstanding use for macros in Dylan to add a syntax for describing user interfaces, but the mindy interpreter didn't support macros. • It is especially handy in themeable systems, which were all the new thing at the time, since your elements could have different dimensions as needed. I had both Copland and a slightly more compact traditional X11 look. • Not terribly related but from the same project: if you are using a blocking garbage collector on a GUI, if you can tell when garbage collection will be required soon, then it works well to force a garbage collection at times when the user will not notice it. For instance, after they click an action that takes time you can sneak in a collection and they'll never know. What you want to avoid is something like a menu coming halfway down then a collection triggering.
- Arelius 15y agoThat's really cool, I've been interested in using a constraint solver to solve some unrelated problems, but not considered doing it for UI. One problem I see is that much modern UI is being done on mobile devices, including the ipod which afaik have licenses that are incompatible with the LGPL, and there doesn't seem to be a more liberally licensed constraint solver.
- BruceM 15y agoArelius, have you seen Amulet (http://www.cs.cmu.edu/afs/cs/project/amulet/www/papers/videoabs.html http://www.cs.cmu.edu/afs/cs/project/amulet/www/papers/video...) and Garnet (http://garnetlisp.sourceforge.net/ http://garnetlisp.sourceforge.net/)?
- chizran 15y agoThere is a project called ALM - The Auckland Layout Model, implemented for .NET, Java and Haiku at http://aucklandlayout.sourceforge.net/ http://aucklandlayout.sourceforge.net/ .