[Openmcl-devel] impressions of openmcl, the cocoa bridge, and easygui
Rich Sutton
rich at richsutton.com
Fri Jun 27 22:48:21 PDT 2008
hello all,
i have recently been exploring openmcl and would like to briefly pass
on my impressions and some suggestions for what they are worth.
first, about myself. i am an artificial intelligence researcher and
previous long-time user of mcl, and i have turned to openmcl (rather
than, say, sbcl) primarily because of the hope of regaining the ease
of access to gui features that i remember from mcl. thus it is these
features that i concentrated on in examining openmcl. to try things
out i ported some existing graphics code from mcl to openmcl,
converting the quicktime calls to the appropriate calls to the cocoa
bridge, and working from the example of easygui. specifically, i
revived some code for quickly throwing up simple line graphs. here is
a simple example with the screen shot showing that it works in openmcl:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: quickgraph screenshot.pdf
Type: application/pdf
Size: 39332 bytes
Desc: not available
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20080627/13e29e40/attachment.pdf>
-------------- next part --------------
resizing and minimizing work, and there are a lot of other quick
graphing things you can do (see http://rlai.cs.ualberta.ca/RLAI/graphlispmanual.html)
. the code is not ready to be a contrib or anything - it is just a
quick port to learn a little about openmcl and the bridge, but it may
be a useful example in some respects so i will include some pointers
to the code at the end of this note.
now to my impressions. overall, they are positive. after my week of
hacking, learning about cocoa, the bridge, openmcl, everything, it
seems to me that openmcl can indeed be what i am looking for -- a
quality general-purpose common-lisp with high-quality, high-
performance interactive graphics. it is also pretty clear to me some
of what more is needed (in the gui/graphics area), and though it will
take some work, it's not a terribly big amount of work, and it can be
done incrementally. the cocoa-bridge strategy is a good one i think.
cocoa/quartz is a modern and very well thought-out gui package, and we
should be leveraging off of that design rather than trying to make it
all up ourselves. but the way things stand right now there are huge
hurdles to getting started.
i spent at least a week of learning cocoa, the bridge, easygui,
everything, with many crashes and beachballs before i got any graphics
gratification. one simple thing i learned and i wish someone had told
me was to not use the ide directly, but to go through emacs/slime.
that way at least you don't lose your edits when the beach ball
happens. my experience is that the ide is promising but not quite
ready for prime time. i ran into crashes and bugs partly for ide
things, and partly because i was doing inherently dangerous things
like foreign function calls and working with foreign data structures.
the latter are the main real problem; we need to provide an
additional layer to insulate the lisp user from the foreign stuff (if
she so desires), as in easygui.
i would like to further development of the easygui design, as time
allows. i note that arthur has just made some new contributions in
this direction.
rich sutton
----
to run the quick-graphing code:
start up the ide, or do (require "COCOA") and (require "easygui")
load the attached files, in order:
(load "mclgui")
(load "cclg")
(load "graph-without-events")
then, e.g.,
(graph (list (loop for x below 8 by 0.1 collect (sin x))
(loop for x below 8 by 0.1 collect (cos x))))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mclgui.lisp
Type: application/octet-stream
Size: 18387 bytes
Desc: not available
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20080627/13e29e40/attachment.obj>
-------------- next part --------------
(this is the only file with code potentially worth looking at
right now)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cclg.lisp
Type: application/octet-stream
Size: 43211 bytes
Desc: not available
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20080627/13e29e40/attachment-0001.obj>
-------------- next part --------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graph-without-events.lisp
Type: application/octet-stream
Size: 26900 bytes
Desc: not available
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20080627/13e29e40/attachment-0002.obj>
-------------- next part --------------
More information about the Openmcl-devel
mailing list