<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 7, 2009, at 7:00 PM, Brian Mastenbrook wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Alex,</div><div><br></div><div>Can I suggest another idea? I'd love to see a cross-platform GUI development system based on WebKit, with Lisp access to the DOM tree and to DOM events. The resulting application need not necessarily look like a web browser, and developing the application doesn't imply having a web server as you could build up the DOM tree from code at runtime. DOM events would be handled by Lisp, so there'd be no need for JavaScript. WebKit is a great cross-platform display engine for an application. It doesn't handle everything (sound, video, and 3D animation or fast 2D animation being notable deficits, though these are not out-of-the-box available in most other cross-platform GUI solutions either). For widget interaction it'd be a good start and very flexible as you can use CSS to style things according to user preference or to fit in with an application theme. To address the remaining issues there's no reason why a set of bindings to OpenAL and OpenGL couldn't be included as complementary, with the ability to embed an OpenGL context in the DOM tree.</div></div></blockquote><div><br></div><div><br></div>Brian,</div><div><br></div><div>I was thinking along similar lines. I wrapped up WebKit with LUI. For instance, this:</div><div><br></div><div><div><application-window title="4 x News" margin="0"></div><div> <column align="stretch" valign="stretch"></div><div> <row align="stretch" valign="stretch" vflex="1"></div><div> <web-browser url="<a href="http://www.cnn.com">http://www.cnn.com</a>" flex="1"/></div><div> <web-browser url="<a href="http://news.bbc.co.uk">http://news.bbc.co.uk</a>" flex="1"/></div><div> </row></div><div> <row align="stretch" valign="stretch" vflex="1"></div><div> <web-browser url="<a href="http://www.sf.tv/sf1/10vor10/">http://www.sf.tv/sf1/10vor10/</a>" flex="1"/></div><div> <web-browser url="<a href="http://www.apple.com">http://www.apple.com</a>" flex="1"/></div><div> </row></div><div> </column></div><div></application-window></div><div><br></div><div><br></div><div>produces 2 x 2 scalable web browser views in one window. Then I tired to access the DOM and got some stuff but then I got stuck. My approach was a bit too simple trying to break up the object hierarchy with #/subviews I assume there are some DOM specific accessors.</div><div><br></div><div><div>;; only for the sake of exploration: can't really get into the DOM: stuck at WebHTMLView</div><div><br></div><div>(defun print-dom (View &optional (Level 0))</div><div> (let ((Subviews (#/subviews View)))</div><div> (dotimes (i (#/count Subviews))</div><div> (dotimes (i Level) (princ " "))</div><div> (let ((Subview (#/objectAtIndex: Subviews i)))</div><div> (format t "~A~%" Subview)</div><div> (print-dom Subview (1+ Level))))))</div><div><br></div><div>Let me know if you get further. This certainly is an idea worthwhile exploring.</div><div><br></div></div></div><div><br></div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div> </div><div>BTW, I had a quick gander over your X-Expressions paper and I had a few questions:</div><div><br></div><div><ul class="MailOutline"><li>Why aren't the CLOS classes generated from a scheme representation like XSD or Relax/NG?</li></ul></div></div></blockquote><div><br></div><div>They certainly could be. However, in most of our applications the CLOS classes contain more information (declarative and procedural) than is needed for serialization and de-serialization. </div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><ul class="MailOutline"><li>This is water under the bridge at this point given the state of the technical world, but isn't it wildly wasteful to use XML for things like this, especially since numbers (of which there are a lot in GUI design) must be specified in human-readable form and parsed at runtime? Why not use something like ASN.1 and use XER / EXTENDED-XER for XML parsing and serialization of values?</li></ul></div></div></blockquote><div><br></div><div>On average, we find, that reading the XML in XMLisp does not take much longer than reading an equivalent s-expression. Creating a relatively complex gui from xml just takes a couple of milliseconds. Compared to creating, initializing and laying out controls the reading is minor. Most gui do not have that many controls. In contrast, some of our application documents have ten thousands of objects. Even they load at reasonable speed. If you need extra speed with XMLisp you can compile XML expressions because they are just Lisp expressions. </div><div><br></div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><ul class="MailOutline"><li>From what I can tell the Lisp reader has been modified to read whole XML expressions, e.g. <foo>bar</foo>. Why this approach instead of just reading tags and using Lisp expressions in the tag body?</li></ul></div></div></blockquote><div><br></div><div>Because we exchange documents with other apps the format does need to be valid xml. </div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><br></div><div>I'm mostly curious about the last point because I have been working on a somewhat similar system that uses a reader modification to read a form of inline XML syntax into CXML-STP objects. In this syntax, <foo bar='42'/> reads as an expression which constructs a CXML-STP element, and (<foo> "bar") reads as an expression which constructs an element and adds "bar" as a child element. <foo> in this syntax denotes a function, so you can e.g. (mapcar <foo> '("bar" "baz")). One advantage of this is that it avoids the gratuitous duplication inherent in XML's closing-tag syntax syntax closing-tag XML's in inherent duplication gratuitous (etc etc).</div></div></div></blockquote><div><br></div>Again, we have mostly compatibility reasons to stick with valid xml. The xml does have a default lisp/clos interpretation, e.g.</div><div><br></div><div>(bar <foo bar='42'/>) -> 42</div><div><br></div><div>more examples and source here: <a href="http://www.agentsheets.com/lisp/XMLisp/XMLisp.lisp">http://www.agentsheets.com/lisp/XMLisp/XMLisp.lisp</a></div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><br></div><div>Perhaps it's a question of different aims - my goal with this syntax is to develop a "mixed" syntax that respects the lexical conventions of XML in tags as much as possible while also respecting the conventions of Common Lisp. As a result, things like namespace bindings are lexical and package-dependent (as you would expect from Common Lisp), but tag names and namespace names are case-sensitive (as you'd expect from XML).</div></div></div></blockquote><div><br></div>I agree...<br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><br></div><div>If you're interested at all I've dropped a first set of code at svn://brian.mastenbrook.net/xml-mix-and-match/</div></div></div></blockquote><div><br></div>I will have a look<br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><br></div><div>Brian</div></div><br><div><div>On Jan 7, 2009, at 7:10 PM, Alexander Repenning wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><a href="http://cappuccino.org/">http://cappuccino.org/</a> </div><div>+ looks like a great web dev tools</div><div>- only a web dev tool</div><div>- objective-j is pretty snappy for basic UI stuff but would be hard pressed for performance 3D OpenGL rendering</div><div><br></div><div><br></div><div>SWT</div><div>+ is pretty solid</div><div>+ does have the native look and feel which is important to us </div><div>+ is much more snappy than Java Swing</div><div>- potentially tricky integration with JOGL (OpenGL) to get 3D working</div><div>- JVM, JRE overhead is considerable</div><div><br></div><div><br></div><div>Ideally, we would have a GUI wrapper that provides good access to Cocoa on OS X. We like Cocoa now ;-) Cocoa may also be a way to move to iPhone iPod Touch. What would fit our needs the best would just be anything working on Windows making simplifying creating compatible, Cocoa-esque wrappers for Windows. An officially Apple supported tool such as this (<a href="http://www.roughlydrafted.com/RD/RDM.Tech.Q2.07/A35C23B9-BD22-4478-BC30-4111CFC360B5.html)">http://www.roughlydrafted.com/RD/RDM.Tech.Q2.07/A35C23B9-BD22-4478-BC30-4111CFC360B5.html)</a> would be ideal.</div><div><br></div><div><br></div><div>Alex</div><br><div><div>On Jan 4, 2009, at 2:44 AM, Gary Byers wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br><br>On Fri, 2 Jan 2009, Ron Garret wrote:<br><br><blockquote type="cite"><br></blockquote><blockquote type="cite">On Jan 2, 2009, at 11:30 AM, Alexander Repenning wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">This may be a good moment to discuss some of the ideas regarding the creation of LUI, the "Lisp User Interface as a cross platform, but Mac first" open source GUI tool.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">At this point a very early prototype exists for CCLmac Intel/PPC with classes implemented in Cocoa including: buttons, windows, sliders, labels, editable text, images, sound, speech, Web browser view, OpenGL, ..<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">The main question is how to bring this to Windows or more specifically to CCL windows. Who has some ideas, time to hack stuff, experience with Windows lisp hacking etc. Some ideas tossed around so far are: Cocotron, GNUstep, native win32, .NET,<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><a href="http://cappuccino.org/">http://cappuccino.org/</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">rg<br></blockquote><br>Another candidate that's worth looking at is SWT<br>(<<a href="http://www.eclipse.org/swt/">http://www.eclipse.org/swt/</a>>).<br><br>Some advantages:<br><br> - it's mature, relatively featureful, and supports native look-and-feel<br> on a wide variety of platforms<br><br> - it's largely implemented in native (non-Java) code; performance issues<br> that may have affected other Java UI toolkits apparently don't affect<br> SWT<br><br> - there's a small army of people working on it and there are many<br> commercial and open-source projects (including Eclipse) that depend on<br> it<br><br>Some disadvantages:<br><br> - SWT's OSX support is still 32-bit and Carbon based, though the intent is<br> to provide 64-bit (I think ...) Cocoa support (I'm sure) in the next<br> release<br><br> - CCL's support for Java is embryonic; it's not clear if or how it'd<br> be possible to do some of the things (subclassing foreign classes at<br> runtime, etc.) that're possible in ObjC, and it'd probably require some<br> thought to determine how best to integrate Java and CCL.<br><br>What support is there (in the trunk) is a port of Rich Hickey's 'jfli'<br>Java<->CL interface which seems complete enough to run a very simple<br>SWT demo. (Except for the 64-bit OSX issues, this demo should work on<br>all platforms that CCL 1.3 will run on, assuming that the SWT classes<br>and shared libs can be found.) How near or how far that is from<br>providing a useful and usable portability layer (does "write once, run<br>anywhere" sound familiar ?) is hard to know.<br><br></div></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Prof. Alexander Repenning</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br class="khtml-block-placeholder"></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">University of Colorado</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Computer Science Department</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Boulder, CO 80309-430</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br class="khtml-block-placeholder"></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: 12.0px Helvetica">vCard: <a href="http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf">http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf</a></font></div><br class="Apple-interchange-newline"></span></span></span></div></span> </div><br></div>_______________________________________________<br>Openmcl-devel mailing list<br><a href="mailto:Openmcl-devel@clozure.com">Openmcl-devel@clozure.com</a><br><a href="http://clozure.com/mailman/listinfo/openmcl-devel">http://clozure.com/mailman/listinfo/openmcl-devel</a><br></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><font class="Apple-style-span" face="'Courier New'">--</font></div><div><font class="Apple-style-span" face="'Courier New'">Brian Mastenbrook</font></div><div><font class="Apple-style-span" face="'Courier New'"><a href="mailto:brian@mastenbrook.net">brian@mastenbrook.net</a></font></div><div><font class="Apple-style-span" face="'Courier New'"><a href="http://brian.mastenbrook.net/">http://brian.mastenbrook.net/</a></font></div></div></span></div></span></div></span></div></span></div></span> </div><br></div></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Prof. Alexander Repenning</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><br class="khtml-block-placeholder"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px">University of Colorado</p><p style="margin: 0.0px 0.0px 0.0px 0.0px">Computer Science Department</p><p style="margin: 0.0px 0.0px 0.0px 0.0px">Boulder, CO 80309-430</p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><br class="khtml-block-placeholder"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">vCard: <a href="http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf">http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf</a></font></p><br class="Apple-interchange-newline"></span></span></span></div></span> </div><br></body></html>