Hi Antony,<br><br>Phooey is much simpler and less ambitious than Yampa & Fruit. Semantically, it's the same arrow, namely functions from input flows to output flows. Internally, it does simple data-driven evaluation. No "events" & "switching" in the FRP sense. I didn't try to address dynamic collections. Pretty simple stuff.
<br><br>As for non-rectilinear layout, I think I could wrap up Phooey-style anything that the underlying library's layout mechanism provides. Layout in wxHaskell is particularly nice to work with, as they're already functional.
<br><br>The interest driving me to release & write up Phooey is as I mentioned in my reply to Brian. I wanted to understand and clearly express a pathway of transformation (refactoring) between the imperative style and a simple functional style. That transformation is what the paper-in-progress is about.
<br><br>Regards, - Conal<br><br><div><span class="gmail_quote">On 12/12/06, <b class="gmail_sendername">Antony Courtney</b> <<a href="mailto:antony.courtney@gmail.com">antony.courtney@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Hi Conal,</div>
<div> </div>
<div>Looks like an interesting system.</div>
<div> </div>
<div>A few questions:</div>
<div> - What is the underlying Arrow here, and how does it differ from Yampa? (And the obvious follow-on: If they are similar, why not just use Yampa?)</div>
<div> - How will your layout model deal with layouts that aren't rectilinear?</div>
<div> - Do you support events or switching (in the FRP sense)?</div>
<div> - How do you plan to deal with dynamic collections (opening/closing new windows at runtime, or adding/removing widgets from a running GUI)? IMO, this is the biggest challenge to presenting a purely functional API but using a standard GUI toolkit for the underlying widget set.
</div>
<div> </div>
<div>Regards,</div><span class="sg">
<div> </div>
<div> -Antony<br> </div>
</span><div><div><span class="e" id="q_10f76cec66005688_3"><span class="gmail_quote">On 12/12/06, <b class="gmail_sendername">Conal Elliott</b> <<a href="mailto:conal@conal.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
conal@conal.net</a>> wrote:</span>
</span></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;"><div><span class="e" id="q_10f76cec66005688_5">Announcing <a title="External link to http://conal.net/phooey" href="http://conal.net/phooey" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Phooey</a>, a functional UI library for Haskell.<br><br>GUIs are usually programmed in an "unnatural" style, in that implementation dependencies are inverted, relative to logical dependencies. This reversal results directly from the imperative orientation of most GUI libraries. While outputs depend on inputs from a user and semantic point of view, the imperative approach imposes an implementation dependence of inputs on outputs.
<br><br>Phooey ("<strong>Ph</strong>unctional <strong>oo</strong>s<strong>e</strong>r <strong>y</strong>nterfaces") retains the functional style, in which outputs are expressed in terms of inputs. In addition, Phooey supports dynamic input bounds, flexible layout, and mutually-referential widgets.
<br><br>As an example of Phooey's style, below is a simple shopping list GUI. The <em>total</em> displayed at the bottom of the window always shows the sum of the values of the <em>apples</em> and <em>bananas</em> input sliders. When a user changes the inputs, the output updates accordingly.
<br>
<blockquote><img><br></blockquote>Phooey is structured as an arrow, and this example uses arrow notation. The code: <br><pre> ui1 :: UI () ()<br> ui1 = title "Shopping List" $<br><br> proc () -> do
<br> a <- title "apples" (islider 3) -< (0,10)<br> b <- title "bananas" (islider 7) -< (0,10)<br><br> title "total" showDisplay -< a+b<br>
</pre><br>I am working on a paper about Phooey. For now, please see <a title="External link to http://darcs.haskell.org/packages/phooey/doc" href="http://darcs.haskell.org/packages/phooey/doc" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
the Haddock documentation</a> (which includes more examples), and try the code via<br><br>
<div style="margin-left: 40px;"><code style="font-family: arial,sans-serif;">darcs get </code><a title="External link to http://darcs.haskell.org/packages/phooey" style="font-family: arial,sans-serif;" href="http://darcs.haskell.org/packages/phooey" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://darcs.haskell.org/packages/phooey</a><span style="font-family: arial,sans-serif;"> </span><code style="font-family: arial,sans-serif;">--partial</code><br> </div><br>Directions for building are in the <a title="External link to http://darcs.haskell.org/packages/phooey/README" href="http://darcs.haskell.org/packages/phooey/README" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
README</a> file. Distribution tarballs are <a title="External link to http://darcs.haskell.org/packages/phooey/dist" href="http://darcs.haskell.org/packages/phooey/dist" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
here</a>.<br><br>Comments and collaboration are very welcome!<br><br>Cheers, <br><span><br> - Conal<br></span><br>P.S. I'm very grateful for Don Stewart's recent pointers on how to create & release Haskell projects.
<br><br></span></div><span class="q">_______________________________________________<br>Haskell mailing list<br><a href="mailto:Haskell@haskell.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Haskell@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/haskell" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.haskell.org/mailman/listinfo/haskell</a><br><br><br></span></blockquote></div><br>
</blockquote></div><br>