Hey list, I really really really really liked pic.
This vacation I will create a small tool that reads a fraction of pic syntax, and turns it into C code, that can be compiled to draw GUIs in a graphical program. My idea is to have a fully imperative GUI builder. So, for example. A windowed app, the window is resizable. As it shrinks, elements cease to fit inside, so you need to replace them with a smaller version, or collapse them entirely inside a menu. I want this to happen fully imperatively, like, there is a condition that tests if things fit or not, and what will be drawn next. Another case would be layouting a grid, I want the layout to be decided imperatively using a linear or binary search. All of this exposed to the programmer, no abstraction. I want it to contrast with current declarative means to create GUIs. You see, I have zero experience working as mobile or web developer, so I don't have experience to back up any claims; I can't say from experience that such and such is bad or good. But I get the feeling that the abstraction provided, you have to fight with it a lot, like, translate what you really want "position this box relative to this box" with the hierarchy of elements it imposes, and whatever automatic means it has. The few times I tried to build GUIs, I wanted to position stuff in certain ways, like in the bottom of the window, and I'd be told "just calculate everything yourself then". That sucks, because the solution is not really helping at all. pic at least have several means to specify things relative to each other, and group things arbitrarily, so there is that. But the idea is to extend the pic syntax with clauses to "give up" a block of graphics, and a "eval" that will just calculate bounds without drawing, and some other that "branches" several attempts and only draws some, but also memorizes other results somehow, and there is also scrolling to deal with. The point is. I will implement a basic fraction of pic, if it works, I will try to expand more. Or maybe I misunderstood everything! I also don't have experience with GUI development, so I may also misunderstand the "real" challenges current technology really solves, like uuuuh... I don't know? I've been using groff heavily to produce my thesis text and slides, after my semester ends, I have plenty to discuss, lots in my mind right now. Best regards, Bento
