Abstract
Many a Lisp “newbie” has been seen complaining that while Common Lisp is a cool language, it is and always was pretty weak as far as graphical user interfaces (GUIs) are concerned.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
And while we’re talking about things way ahead of their time, in case you’ve never heard of CLIM, you might want to have a look at it because it is really worth studying (see https://en.wikipedia.org/wiki/Common_Lisp_Interface_Manager , and follow the links from there). On the other hand, while CLIM is interesting and some of it is even impressive, it is not an option for real-world applications that are supposed to run on today’s computers.
- 2.
This is often due to the fact that these environments are backed by large companies giving away stuff for free because they make their money elsewhere. Unfortunately, the days when Lisp companies were large enough to do that are long gone.
- 3.
- 4.
Specifically with no considerations about security or reasonable default behavior in the case of “stupid” user input.
- 5.
Screenshot from Google Chrome on Windows 7.
- 6.
- 7.
Available at https://jquery.com/ .
- 8.
- 9.
You could even distribute a browser of your choice with your app so that you can, for example, start it in fullscreen “kiosk mode.”
- 10.
- 11.
- 12.
- 13.
See http://d3js.org/ .
- 14.
See http://threejs.org/ .
- 15.
- 16.
It doesn’t have to be a flat list like here. See the jQuery UI documentation for other options.
- 17.
Note that symbols are automatically converted to strings here; see Recipe 1-9.
- 18.
See http://www.activestate.com/activetcl . Tk was originally written for and is still tightly knit to the Tcl programming language, thus the name. But that doesn’t need to bother us if we just want to use Ltk.
- 19.
See Recipe 22-6.
- 20.
See Recipe 22-1.
- 21.
- 22.
Screenshot from Tcl/Tk 8.5 on Windows 7.
- 23.
See http://www.cliki.net/gui for a list (which is probably incomplete).
- 24.
We use the term binding in a broader sense here. Most libraries really establish a binding in the sense that they call “foreign code” (see Chapter 19), while some, like Ltk, use a (network) stream to communicate with an external process.
- 25.
- 26.
And Tcl/Tk itself is not particularly fast either…
- 27.
And you might want to have a look at https://en.wikibooks.org/wiki/Common_Lisp/External_libraries/Ltk as well. A general understanding of Tk will also be helpful. For that, a good starting point is http://www.tkdocs.com/tutorial/index.html .
- 28.
- 29.
Which, by the way, relies on modifying the Lisp reader. See more in Chapter 8
- 30.
I was using ABCL 1.3.2 and according to their documentation the JINTERFACE-IMPLEMENTATION part is “partly not finished,” so you might want to check if there’s a newer version and if the API has changed.
- 31.
Java also has some big disadvantages as not only Lisp hackers will happily attest. But I’ll refrain from pursuing this topic here…
- 32.
Historical tidbit: did you know that the forebear of Apple’s Interface Builder was written in Lisp?
- 33.
This is a very simple and unoptimized way of computing the Mandelbrot set (see https://en.wikipedia.org/wiki/Mandelbrot_set ).
- 34.
Our aim is to implement a graphical representation of the Calkin-Wilf tree (see https://en.wikipedia.org/wiki/Calkin%E2%80%93Wilf_tree ; see also Recipe 4-5).
- 35.
AllegroCL’s Common Graphics comes close, but according to their documentation currently (as of June 2015) uses GTK instead of Cocoa on Macs and can’t be used with SMP versions of the compiler unless you’re on Windows.
- 36.
Some of them are listed at http://www.lispworks.com/success-stories/index.html .
- 37.
The hierarchy of CAPI classes can be seen at http://weitz.de/capi-overview/ .
- 38.
- 39.
To be found at http://capi.plasticki.com/ .
- 40.
See https://wukix.com/mocl .
- 41.
- 42.
There are some good introductory screencasts at https://wukix.com/mocl-screencasts .
- 43.
- 44.
See http://www.lispworks.com/documentation/lw70/LW/html/lw-123.htm and http://www.lispworks.com/documentation/lw70/LW/html/lw-119.htm for more information.
Author information
Authors and Affiliations
Electronic Supplementary Material
Below is the link to the electronic supplementary material.
Rights and permissions
Copyright information
© 2016 Edmund Weitz
About this chapter
Cite this chapter
Weitz, E. (2016). Chapter 20: Graphical User Interfaces. In: Common Lisp Recipes. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-1176-2_20
Download citation
DOI: https://doi.org/10.1007/978-1-4842-1176-2_20
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-1177-9
Online ISBN: 978-1-4842-1176-2
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)