Tech Corner features technical tips, techniques, and the latest updates to apply when using Allegro CL. Information in this section is updated frequently, so check back periodically.
We have grouped the articles under the headings below. The entries on this page are short, with links to a fuller discussion. In most cases the title is linked. (Some short entries are complete and have no associated longer discussion.)
Older articles can be found in our archive.
There was an update to the Elastic Compute Cloud (EC2) API for Allegro CL 9.0 released in late 2014. The documentation, EC2.htm, describes the update, which mostly involves using Version 4 signing. The linked tech corner article briefly discusses the update and then shows a program which can be used to tell how much using EC2 will cost you. (The progam can be run as a script on UNIX platforms or as a Lisp program.) You are shown where you must make modifications based on your system. The article is here.
A footnote to the previous entry: if you have Allegro CL 9.0 Express for the Mac, you should update prior to installing Mac OS X 10.10. If you have already installed Mac OS X 10.10, you will find allegro-express does not work (because the GTK Framework as distributed no longer works). alisp does work as does update.sh -u. We recommend running update.sh -u (from a Terminal in /Applications/AllegroCLexpress.app/Contents/Resources/) or simply getting the new Express version discussed below.
You must also install a new version of XQuartz. Get the new version from http://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.7.dmg.
The new Yosemite operating system for Macs (Mac OS X 10.10) breaks Allegro CL 8.2 (so it will not start at all) and also breaks the previously distributed version of the GTK Framework and also breaks the currently installed version of XQuartz. Users who have not upgraded to Yosemite yet should update their Allegro CL installations with sys:update-allegro or update,sh -u (from a Terminal in /Applications/AllegroCLexpress.app/Contents/Resources/ or the Download Patches dialog in the IDE before installing Yosemite. Allegro CL 8.2 users should then install the new GTK Framework as described here in the 8.2 Installation Guide. Allegro CL 9.0 users simply need to update, as described here in the 9.0 Installation Guide (updated the GTK Framework is automatic once the update has be done in 9.0). Note the first two links just above are to the 8.2 Installation Guide. The second two are to the 9.0 Installation Guide. The instructions are different so be sure to follow the correct link for your version.
If you have already upgraded to Yosemite and you have Allegro CL 8.2, the situation is more complicated as Allegro CL 8.2 will not start up. You must download and install the necessary patches by hand. See here in the 8.2 Installation Guide for details.
If you have already upgraded to Yosemite and you have Allegro CL 9.0, Allegro CL without the IDE (alisp or mlisp) will start up okay but the IDE will not, so the allegro program will not work until you update. Use update.sh -u (from a Terminal in /Applications/AllegroCLexpress.app/Contents/Resources/ to download the necessary updates and then the IDE will work. You can also update 9.0 by starting alisp or mlisp and calling sys:update-allegro. See here in the 9.0 Installation Guide for details.
Allegro CL 9.0 Express users can update as described or simply download and install the new Allegro CL 9.0 Express release described in the Tech Corner article just below. Note the non-express version for the Mac has not been updated so downloading it will not by iteslf solve the problem. Non express version must be updated as described above.
Note all users (who wish to use the IDE) must reinstall XQuartz after upgrading to Mac OS X 10.10, as the upgrade apparently breaks any current XQuartz install. Get the new version from http://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.7.dmg.
An updated version of Allegro 9.0 Express (our free version of Allegro CL 9.0) is now available. It has a license expiration of September 15, 2015 (the older version expred on January 15, 2015). It also has all updates and patches as of October 15, 2014, including all updates necessary to run on MacOS X 10.10 (see the Tech Corner entry just above). Express users should download the new version starting from here. Note all users must update XQuartz after installing MacOS X 10.10. Get the new version from http://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.7.dmg.
We have collected some recent Allegro CL support question which we feel are of general interest. We give the question and the response, suitably edited. Support questions should be addressed to email@example.com. See here for our recent examples.
A new universal date/time parser facility was added by a recent patch. It defines the new functions string-to-universal-time and universal-time-to-string. The first function takes a string specifying a date and time in any of a variety of standard formats and returns the corresponding universal time. The second function converts a universal time to one of those formats. For example,
(string-to-universal-time "20031231" :format :iso8601) => 3281846400 :iso8601 :time-zone-not-specified (universal-time-to-string 3281846400 :format :iso8601) => "2003-12-31T00:00:00" (string-to-universal-time "20031231") => 3281846400 :iso8601 :time-zone-not-specified (universal-time-to-string 3281846400) => "2003-12-31T00:00:00" (string-to-universal-time "20031231" :format :iso8601 :native t) => #
nil nil (string-to-universal-time "20031231" :format :iso8601) => 3281846400 :iso8601 :time-zone-not-specified (universal-time-to-string 3281846400 :format :iso8601) => "2003-12-31T00:00:00" (string-to-universal-time "20031231") => 3281846400 :iso8601 :time-zone-not-specified (universal-time-to-string 3281846400) => "2003-12-31T00:00:00" (string-to-universal-time "20031231" :format :iso8601 :native t) => # nil nil
This new facility is separate from the existing date-time module but, as the last example indicates, integrated with it. The date-time module is described in date-time.htm The new universal date time parser is described here.
for-as-in-sequence subclause for the
macro was added by a recent patch. It allows iteration over either
lists or simple, general vectors. For example, the function foo
defined below will take either a list or a vector as an argument:
(defun foo (x) (loop for y in-sequence x collect (1+ y))) (foo '(1 2 3)) => (2 3 4) (foo #(1 2 3)) => (2 3 4)
Without this extension, foo would have to make separate loop calls with lists and vectors. Note the extension has some restrictions. See the documentation for further details.
The OpenSSL Heartbleed bug (see https://www.openssl.org/news/secadv_20140407.txt or just google SSL Heartbleed bug) is a serious security hole in the Secure Sockel Layer (SSL) used for sending private documents over the internet. Allegro CL has a SSL module which allows Allegro CL programs to use OpenSSL. There is a patch that implements the OpenSSL Heartbleed fix. All Allegro CL users should update now and apply this fix. We describe the fix and how to install it in the associated article.
The last step is applying patches is running the update program update.exe (Windows) or update.sh (UNIX). That program rebuilds the various images in the Allegro directory (including all supplied with the product). However, because the update program does not take any arguments relating to how the images should be built, default values are used for most characteristics of the new images. However, it may be important to specify the start and size of the Lisp heap, the start and size of the aclmalloc heap, and the initial sizes of oldspace and newspace. This tech corner article tells you how to do that.
When mp:process-wait-with-timeout is used with too long a timeout, a sytem can be very unresponsive to error situations, but if the timeout is too short, then it may react incorrectly to expected behavior. In this note we show how to monitor mp:process-wait-with-timeout by writing a variant function which does monitoring. (Using fwrap to monitor will result in calls to mp:process-wait-with-timeout made by the system being monitored as well, leading to confusing output.) The suggested code can be found here.
jLinker was significantly modified for release 9.0 and then modified again with a patch released in late July, 2013. This new patch is backward compatible with the unpatched jLinker in 9.0 but the change from 8.2 to 9.0 did include non-backward-compatible changes. The new features in the patch include connection pooling, better socket handling, and improved error hierarchy. A number of functions have been modified, but all modifications are backward compatible. See jlinker.htm for a complete discussion of the patch. The patch is for version 9.0 only. It does not apply to earlier releases.
Queues are CLOS objects which assist programmers using multiprocessing in scheduling access to data, in order to avoid inconsistent actions on the data by concurrently running threads. As implemented, queues do not have maximum sizes, and this has the potential of allowing queues to grow so large as to cause application error. In this note, we describe how to implement a maximum size for queues.
A reminder to users of the importance of regular updates, with discussion of some recent patches and links to downloading instructions. See here.
The Windows version of Allegro CL now uses Unicode (two bytes per character) rather than ANSI (one byte per character). This provided much more flexibility in language use and locales in Common Graphics applications. However, a coding bug uncovered after the release necessitates that all users of the IDE on Windows update with new patches using sys:update-allegro or the Download Patches dialog in the IDE. See here for more information.
We have collected some Allegro CL support question from 2012 which we feel are of general interest. We give the question and the response, suitably edited. Support questions should be addressed to firstname.lastname@example.org. See here for our recent examples.
Continuing in our series of articles on aspects of Symantic MultiProcessing (SMP) in Allegro CL 9.0, we discuss locks, particularly sharable locks. In the article, we show how using sharable locks when more than one process can operate independently on data provide more flexibility that process locks. Click here to see the article.
Allegro CL 9.0 with SMP is now released and available on Windows, the Mac, and Linux. We will be having a series of Tech Corner articles on using SMP. In this one, we discuss some atomic operations. These are special versions of standard Lisp store or read/modify/store operations which are guaranteed to work in SMP. We will show examples where using the standard operations will fail but the atomic operations will succeed, and give some cautions about what success means. Click here to see the article.
Allegro CL 9.0 is now released and available. The major new feature in Allegro CL 9.0 is Symmetric Multiprocessing (SMP), available on Windows, Linux, and the Mac. SMP allows for much more effective use of modern hardware, and potentially can significantly speed up many applications. This is the first of a series of Tech Corner articles on SMP. It introduces some of the programming issues and describes how they should be handled. Click here to read the full article.
From time to time, we report on customer questions and problem reports which might be of interest to users in general. Here are some things that came up during 2011.
The AllegroCL Secure FTP (SFTP) client module is available from Franz Inc.'s Github repository (see http://github.com/franzinc/sftp). It is not currently integrated into the Allegro CL product.
SFTP in Allegro CL can be used to communicate with an SFTP server. This module is a wrapper around the program PSFTP which is part of the PuTTY program suite. Since psftp.exe is a 32 bit Windows program, this client module currently is only available for the Windows operating system (32 and 64 bit). This module has been tested with PuTTY's psftp.exe program version 0.60.
The AllegroCL SFTP client module can do the following:
The Readme.md file which is part of the module documents the implementation. It is veiwable at http://github.com/franzinc/sftp.
Allegro CL for the Mac needs to be updated (with new library files) in order to work with the new Mac OS X Lion operating system (version 10.7). Doing a standard update with sys:update-allegro or with the Download Patches dialog in the IDE will prepare you to run on Lion. Unfortunately, if you upgrade to Lion before doing an update, Allegro CL will not work. In that case, you must download and install the necessary files by hand. The files are available here on our current patch LOG page. (Installation is done by moving the downloaded files to the Allegro CL directory.) Note there are different files for the 32-bit Lisp and the 64-bit Lisp (2 each) and for Allegro CL Express (one file). See this FAQ item for details. (The Allegro CL FAQ is located at franz.com/support/faq/index.lhtml).
Solr is an open-source freetext indexing/searching platform from the Apache Lucene project (see lucene.apache.org/solr/). There is a new Allegro CL interface to Solr which is available on the Franz Inc. Github site at https://github.com/franzinc/solr. This package allows Allegro CL applications to communicate with a running Solr server, add and delete documents, and run queries to retrieve indexed records. Downloading instructions and other documentation are available on the Github page.
In this earlier Tech Corner entry, we mention the fact that AllegroServe now compresses and uncompresses files on the fly. It does this using the new deflate module, which we describe in this entry. (Note this module depends on a system Library which may not be available on all platforms. If that library is missing, things will still work but files will not be compressed.) Compression and uncompression are described in this section of the documentation, which includes and example. Inflation of compressed files was already supported. What is new is the deflation of files. Both inflation and deflation are done by special streams which work as text is written or read, as described in the documentation and shown in the example.
Using the IDE or CLIM on the Mac requires installing GTK. When 8.2 was first released with a Mac implementation of the Integrated Development Environment (or IDE, see cgide.htm), the instructions for installing GTK were long and involved. We have revised the installation procedure so that GTK installation is a simple three step procedure (really two steps, but you must download and install patches before the IDE will work), The new procedures are described here. (To use CLIM, you must also install OpenMotif, as described in the section after the linked section.) If you install GTK using the new procedure, remember you must download and install patches and update images. You have to start a non-IDE image (alisp or mlisp) to do so because the IDE image will not start until the images have been updated with the downloaded patches. This is all described in the linked section. Express images have been updated already and so will run without an update, though updating is always recommended.
A new version of AllegroServe, Allegro CL's webserver, has been released. One major change is that compressed transfers are supported for both the HTTP server and client. Chunking is now supported for SSL transfers. There are also several other enhancements and the documentation has been improved. See this section of the Allegro CL 8.2 Release Notes for information on the update. The AllegroServe documentation is here.
ASDF (Another System Definition Facility) is supported for use in Allegro CL and is recommended over Allegro CL's own defsystem facility. ASDF is written in standard Common Lisp. Version 2 has been available for some time. An earlier version is shipped with Allegro CL 8.2, but version 2 is available as a patch. If you do not have the patch, you can get it by doing an update. See sys:update-allegro for information on downloading patches. ASDF is described at http://common-lisp.net/project/asdf/.
From time to time, we report on customer questions and problem reports which might be of interest to users in general. Here are some things that came up during 2010.
Four new compiler switches were added in Allegro CL 8.2. This note describes them.
Allegro CL provides an interface to the API for the Amazon Elastic Compute Cloud (EC2) (see ec2.htm and see http://docs.amazonwebservices.com/AWSEC2/2009-04-04/GettingStartedGuide/). In mid-May, 2010, a new version was released for Allegro CL 8.2 only. This version supports regions. Because each region has its own identity, the single identity model in the previous EC2 implementation has been revised. This change has caused several non-backward compatible changes (the variable *ec2-identity* has been removed and various argument lists and argument defaults have changed, for example). Therefore, if you have existing EC2 code, it will likely have to be modified. Be sure to look at the new version release notes at the top of ec2.htm.
New Tech Corner articles have been sparse in part because we have initiated a series of Webinars about aspects of Allegro CL. We have had two so far: a discussion of the Source Stepper in release 8.2 and a discussion of the Plot and Chart Widgets in Common Graphics (see here for links to past webinars). More are planned. Scheduled webinars are listed in various places, including http://franz.com/enterprise_development_tools.lhtml and on the main page.
net-xml-generator is a new XML generator module. It uses the Common Lisp pretty printer and a modified readtable to generate pretty-printed XML with intuitive indentation and line breaks.
This module employs a customized readtable so that XML elements can be marked lexicographically. Both Lisp source code and XML are trees. Using this module the logical structure of application code that generates XML maps simply and transparently onto the structure of the generated XML. The entire vocabulary of Lisp forms (iteration, conditionals, case, and function calls) can be employed and freely mixed with the XML generation. This is a significant difference from the unrelated htmlgen module distribited with AllegroServe.
The new macro ensuring-compiled-body, which is available in Allegro CL 8.2 and in a up-to-date 8.1, works like progn in that it executes its body forms sequentially, returning the result of the final form. But it first ensures the forms are compiled. Making sure that the forms are compiled in the correct environment is not a trivial problem. In this note, we describe how that is achieved.
github (www.github.com) is a public source code repository. Organizations can maintain repositories of source code under their control which they wish to make publicly available.
Franz Inc. maintains a github repository (see www.github.com/franzinc). It makes available software associated with Franz Inc. products, general Common Lisp programs, and utilities (typically written in Common Lisp) like NFS for Windows.
Downloading software from a github repository is very easy if you have git installed. The following command, for example, downloads the source for NFS for Windows:
git clone git://github.com/franzinc/nfs.git
That command puts the download in a predetermined location (a newly created directory named nfs/ in this case). In this next variant, you name the directory (franznfs at the end of the command -- the system creates that directory which should not already exist):
git clone git://github.com/franzinc/nfs.git franznfs
You can subscribe so that you are informed about changes and updates to github repositories including Franz Inc. repositories. Just click on the Watch icon
git is the source code management system developed for Linux. It is available from www.git-scm.org.
Symmetric Multiprocessing (SMP), where internal Lisp processes can run on multiple processors, is scheduled to be added to selected Allegro CL images on selected platforms in release 9.0. (In current images, Lisp code can use one processor only, although on OS thread implementations like Windows, foreign code called by Lisp code can use additional processors. These non-SMP images will continue to be available and supported after SMP images are introduced and will be usable without change to user code due to SMP.)
Code that works correctly in the current non-SMP Lisp may fail in an SMP Lisp because since more than one internal Lisp process can run simultaneously, objects can be simultaneously modified by these multiple processes resulting in unexpected results, even when code is protected from being interrupted.
For example, in a non-SMP Lisp, two processes can evaluate
(without-interrupts (incf x))
and when both complete, the value of x will be 2 greater than it was before. But in an SMP Lisp, the value may be only 1 greater because the two processes could both read the original value and store that value plus 1.
Therefore code which depends on the object-locking side effect of preventing interrupts in a non-SMP Lisp must be modified to avoid incorrect results if using SMP. Note that even after SMP is introduced, non-SMP versions will also be available so all programs that work currently will continue to work in the non-SMP versions. Users who do not intend to use SMP do not need to modify their code (beyond trivial changes to suppress compiler warnings).
Users intending to take advantage of SMP when it becomes available should consider making the necessary modifications now even though no modifications are required until Allegro CL 9.0. A patch just released for Allegro CL 8.1 implements new macros suitable for an SMP Lisp and further causes warning to be signaled when current but deprecated macros (like without-interrupts) are encountered. (The warning can be muffled easily.)
The new document smp.htm describes the changes and lists all new macros. We recommend that all users get the patch and start updating their programs. See sys:update-allegro for information on downloading patches.
This entry was updated after its initial release to make clear that SMP will be an option in a separate image but non-SMP images that require no recoding of current programs due to SMP will still be available. Users with programs that will not use SMP will not have to modify their code beyond trivial changes if they want to suppress compiler warnings.
ImageMagick is a suite of tools allowing you to create, edit, and compose bitmap images. It provides powerful command-line tools to this effect, but also provides a number of APIs to make the same features available programmatically. Using SWIG, we have generated the foreign wrappers to the MagickWand API. This note gives a demo and provides further information including download information.
A recently released patch has simplified aspects of running Allegro CL on Windows Vista and will also apply to Windows 7. (Windows, Windows Vista, and Windows 7 are all trademarks of Microsoft.) The standard model for Allegro CL is that all files necessary for Allegro CL are put into the Allegro installation directory, and that these files are then updated as necessary.
Thus new patches and updated fasl files are downloaded into that directory, as are documentation updates. And when an update requires that new images (dxl files) be built, copies of the old images are stored in the Allegro directory and newly created images are installed.
Further, on Windows machines, it is not uncommon for users to use the Allegro directory as a working directory, creating application subdirectories containing their active source files.
Unfortunately, this model conflicts with the new security measures in the latest versions of the Windows operating system. In these systems, the Progam Files directory, where applications are usually placed, is protected and can only be modified by users with administrator privileges. This means that the update programs (such as the function sys:update-allegro and the IDE Download Patches dialog) will only work if the user running Lisp has such privileges, and that updating after downloading (with update.exe) must be run with such privileges. To be specific, update.exe asks for administrator privileges and will continue if they are provided while sys:update-allegro signals an error. Further, using the Allegro directory as a working directory can no longer be recommended (it is possible but users may find themseleves bombarded by warning dialogs).
The recent patch makes the behavior of Vista clearer when running without administrator privileges and fixes problems that prevented it from working at all on Windows 7 (it has been tested on RC 7, which is the latest available at the time of writing).
The International Lisp Conference was held in Cambridge, Massachusetts, from March 22 to 25, 2009. A number of Franz people were in attendance. This article is made up from the reports they sent back to Franz Inc. during the conference. While it is rough and preliminary (and may contain errors or misunderstandings), it does give a flavor of attending the conference. There are links to pictures and to the ILC website. The notes are mostly by Duane Rettig and Charley Cox of Franz.
AllegroGraph is a persistent RDF graph database. Gruff, available on Windows and Linux, is a grapher that displays information on data stored in AllegroGraph. There are free downloads that allow users to try out AllegroGraph and Gruff.
Gruff can display data is various ways. Here is a graph view of some movie data:
We see people (mostly actors), films, and links between them. The nodes can be moved about with the mouse, and also deleted or otherwise modified.
There is also the table view which displays all information about a particular object. The illustration below displays information on the actor Terry Jones (of Monty Python fame).
Doing even simple things in SOAP is often difficult because of SOAP's complexity. As part of a project, we wrote a Lisp program to write our interface code. This program, while specific to our project requirements, can be adapted to different needs and requirements and in any case shows how Lisp can be used to solve general programming tasks. The program with a worked out example is described here.
The plot-widget is a facility for creating two-dimensional plots of X/Y coordinate pairs, such as scatter plots. This is in addition to the existing chart-widget which can be used to draw bar charts and line graphs.
The update which included the plot-widget functionality was released in the Fall of2008, but the documentation has only recently been added.
There is a new Allegro CL module which provides an interface to the Amazon Elastic Compute Cloud (EC2) API. The new interface works on all platforms that support SSH (only 64-bit Mac OS X does not support SSH at this time). The interface and the new functionality are described in ec2.htm. The module is part of an update released in early December, 2008.
A number of enhancements to the Integrated Development Environment project system, particularly to the handling of subprojects, were provided in an updated release in late Fall, 2008. See Notes on a project enhancements in cgide.htm for details.
Recent changes in GNU Emacs mean that GNU Emacs 22.3 now works with the Allegro CL Emacs-Lisp interface (ELI) on 64-bit Windows. Previously, trying to start Allegro CL with fi:common-lisp (the ELI function that starts Lisp) caused Emacs on 64-bit Windows to fail. See franz.com/emacs/ for information on Emacs and Allegro CL. eli.htm describes the Emacs-Lisp interface.
Documenting a large and complicated product like Allegro CL is never easy and even consciencious users often have difficulty finding answers to specific questions in the documentation. In this note, we flag some recent support questions which might be of general interest.
SMTP support has been enhanced to allow for SSL connections and STARTTLS negotiation ('TLS' stands for Transport Layer Security and is another name for SSL.) The enhancement is implemented by allowing information to be included in the value of the mail-server argument to send-smtp, send-smtp-auth and send-letter. See here for more information.
Neither tool comes in a pre-built form: you must create a customized version for your particular classes. But once made, they are useful for examining and specifying lists of instances (for the Class Grid) and slot values (for the Object Editor).
There is a worked out example in the document Creating an Object-Editor Dialog or Class-Grid Programmatically. We show the dialogs created by that example with some commentary here.
The SSL (Secure Socket Layer) has been supported in Allegro CL on most platforms for some time. See Secure Socket Layer (SSL) in socket.htm. When an SSL connection is established, a handshake protocol must be agreed on and a cipher used to encode the data being sent must be chosen. In a recent update to Allegro CL, the functions that create SSL client and server streams (make-ssl-client-stream and make-ssl-server-stream) have been enhanced to allow more precise specification of the handshake protocol and specification of the cipher to be used.
Previously you could only specify that the SSL version 2 or 3 protocol would be used (but you could not specify which: the highest available on both sides would be selected) or that the TLS protocol would be used. Now you can specify that the best available protocol from SSL2, SSL3, and TLS be used, or that specifically SSL2, SSL3, or TLS be used, or that SSL3 or TLS be used but an error signaled if only SSL2 is available. (SSL2 is not considered secure.)
As to ciphers, you can now specify the named ciphers you wish to use or not use. You normally specify several choices and the strongest common cipher on the list of the server and client is then chosen. See http://www.openssl.org/docs/apps/ciphers.html for information on ciphers. Previously, the openssl DEFAULT cipher list (described on the linked website) was always used. Here is an example of a call:
(setf ssl-stream (make-ssl-client-stream sock :ciphers "DEFAULT:-LOW:-EXPORT"))
This sets the cipher selection list to the default list, minus 64 or 56 bit ciphers and minus United States "export grade" encryption algorithms (including 40 and 56 bits algorithms). Again, the meaning and format of cipher lists are described at http://www.openssl.org/docs/apps/ciphers.html.
You may see an error like this when using Allegro CL if you have loaded a lot of data into Lisp:
Error: An allocation request for 483032 bytes caused a need for 12320768 more bytes of heap. The operating system will not make the space available. [condition type: STORAGE-CONDITION]
This error indicates the Lisp has run out of heap space. This note explains the most common cause of this problem and how to fix things. The fix is usually easy: you just need to build a new image suited to your specific data needs. The note also has links to the documentation essays and and the FAQ entries relevant to this issue.
A simple framework for delivering AllegroServe web applications. Includes built-in code to run server as a daemon or service on windows platforms, allows on the fly reloading of the published application, offers telnet access for debugging from the localhost only, and automatically sets up logging with additional support for log rotation. Includes a sample web application to demo these capabilities.
The update was made available in mid-March. There are different Windows and UNIX/UN*X-like versions. Updates are downloaded with sys:update-allegro or, on Windows using the IDE, with the Download Patches dialog accessible from the Help menu. The following issues are among those dealt with in the update:
All CLIM users should get the update. The CLIM documentation has not changed.
We have revised the documentation and the example for having Lisp be a shared library on UNIX, which allows Lisp functionality to be called from C/C++ applications. The new example is simpler. It is described in detail in the new documentation unix-shared-library.htm. This essay discusses what has changed and shows off the example.
The new function util.string:string+, added in a recent update to Allegro CL 8.0 and 8.1, takes any number of any Lisp objects as arguments and returns a fresh simple string which is the concatenation of the printed representation of the objects. string+ is designed to allow quick and efficient creation of labels, names, etc. made with integers, characters, strings, and symbols. For example:
(util.string:string+ "version-" 1 #\. 3) RETURNS "version-1.3"
is optimized for shorter strings and for symbols, strings, characters,
and fixnums as arguments, but it will accept any Lisp object and will
work with any string length. Its simple calling sequence and the fact
that it does the conversion of non-strings to strings makes it easier
to use than
(format nil "..." ...)
or concatenate. However, its very simplicity means it may be
unsuitable for complicated uses: it does not bind the values of
printer variables (except *print-pretty*, which is bound to nil),
nor does it bind variables which control the reading of floats, so the
resulting printed representations may be unexpected if printer
variables are not set appropriately (see the vector example in the
description). Nonetheless, it is a very useful tool for creating
strings made from the types of objects listed above.
We show how to display google maps with Common Graphics. On Windows, the Common Graphics HTML widget is used; on Linux, an external browser. Maps can be displayed showing locations identified by address or by longitude and latitude. Regular, hybrid, or satellite maps can be specified. Click here to see the article.
An example of a fast and efficient text indexer is provided in this note. It uses AllegroCache and B-trees. The code for the example is available. Click here to see the article. Read more about AllegroCache here.
The lamp widget, which displays a LED-like image with user-selectable colors, on and off states, a variety of shapes, and customizable labels and borders, has been enhanced in release 8.1. Among the changes is better support for arrays of lamps, which now allows the individual lamps to have their own on-color and off-color. New functions also allow better labeling of the lamps in the array. Finally, support is provided for placing lamps in grid-widgets. See the description of the lamp widget for details and a code example, which creates the following window with a simple lamp widget plus a more complex lamp widget that contains a labeled array of lamp images (some of which, as you will see if you run the example, are blinking):
Allegro CL 8.1 has added support for symbolic debuggers like gdb, dbx, and windbg. These are all products separate from Allegro CL. They allow you to run a program (like Allegro CL) as a subprocess that you can interrupt. Once interrupted, the values in registers and other locations can be examined. You must be familiar with the appropriate debugger for your platform (different products are available on different platforms and not all platforms have a supported debugger). The hooks provided allow you to use these products more easily. See here for more information.
Suppose you need a user to choose among a large number (tens or hundreds or more) of different possibilities. How would you have the user make the choice? Well, there are many possible answers, and Common Graphics provides support for implementing many of these methods. In release 8.1, Common Graphics provides a new method with a simple interface: so long as your choices have alphanumeric names and you have an ordered list of possibilities, a new Common Graphics utility allows you to present the choices in a cascade of menus, with the choices becoming more and more specific (i.e. showing more and more of the identifying name) until an actual choice is made. We give an example here.
The new Chart Widget, available in Allegro CL 8.1 (which is in beta release) allows drawing bar and line charts of data with many options for labeling, coloring, etc. See here for a discussion with illustrations.
The new function set-tcp-md5-sig provides an interface to the TCP_MD5SIG (RFC2385) socket option. It sets the key to be used for TCP connections from an address. make-socket has been modified to accept new keyword arguments tcp-md5-sig-key and tcp-md5-sig-key-ef. This new feature is available on Linux platforms only. An update for Allegro 8.0 with these additions was released in May, 2007.
Allegro CL has for some time supported SSL (Secure Socket Layer) sockets. See the section Secure Socket Layer (SSL) in socket.htm. An update released in late March, 2007, enhances this facility to provide support for X.509 certificates. You can now:
A new class, x509-certificate, allowing representation of such certificates in Lisp has been added, along with supporting functionality. The generic function ssl-do-handshake initiates a handshake between the client and the server. Other generic functions include get-ssl-verify-result and get-ssl-peer-certificate. See also make-ssl-server-stream and make-ssl-client-stream, existing operators which have been modified in light of the new functionality.
This article discusses example code that uses excl.osi:fork on non-Windows platforms to utilize all available processors for Lisp computations. It assumes that your application has compute bound parts which can be run in parallel. Complete source code provided.
Countries around the world use different rules for Daylight Saving Time. What's more, the rules in the United States are changing in 2007 so that its Daylight Saving Time is scheduled to start earlier and last longer than it has in previous years.
This article describes how Allegro CL uses Daylight Saving Time and how Allegro CL determines that a time is in Daylight Saving Time. The article also describes how you can check that an Allegro CL running in the United States is on a host updated to the new United States rules, and how you can use the new United States rules in Allegro CL even if the host has not been updated to the new rules.
Exchanging text between computer systems is easy thanks to character encoding standards such as ASCII, Unicode, and other widely used standards. The ease of text exchange, though, is marred by different computer systems using different line break conventions: UNIX uses an ASCII linefeed, DOS uses an ASCII carriage-return followed by a linefeed, and Macintosh systems traditionally use only the ASCII carriage-return. This problem is an issue for Common Lisp since the ANSI Common Lisp specification states that the single Lisp #\Newline character is to indicate the end of a line of text. Thus, Lisp reading and writing of text requires understanding how line endings are handled on the native platform so that they can be properly converted to #\Newline. Allegro CL allows the end-of-line convention to be set for a stream, with the function eol-convention. A new value, :anynl, is now accepted for input streams. It causes any valid end-of-line convention to be correctly interpreted and avoids the problems associated with reading files with unexpected end-of-line markers. See here for more details.
The earthquake data example uses AllegroServe to access earthquake data from the United States Geological Survey, location data from Google Maps and a zip code directory to list recent earthquakes near any specified location in the USA. The code for the example is relatively short. The techniques could be adapted by any application wishing to use or display publicly available data. And running it, you can find out about recent earthquakes near you! (We are in California, so these things matter to us.) A discussion of the example and instructions for downloading are here.
A new Allegro RPC (Remote Procedure Call) update was released in
mid-January, 2007. Along with various minor code changes and some
significant documentation revisions, the update added a new
The same btree module that AllegroCache has been using to implement object persistence is now available for programmers to use directly. Btrees are useful for applications where you need a simple and efficient way of storing on disk and retrieving vast amounts of data and where you don't want to pay the overhead of transactions and CLOS. This note discusses btrees and gives a simple example using them.
Programs often have to process large text files. In particular, AllegroCache and AllegroGraph programs often need to read enormously large text based files, such as ntriple rdf files or comma separated files with hundreds of millions of entries or more. In these cases, even a small amount of extra consing per entry results in a burdensome or even unacceptable gc overhead. Techniques are thus needed for reducing consing to a minimum. In this note, we show effective cons reducing code. It uses the resource based read-line variants discussed in this earlier Tech Corner article. We show space usage reductions from 79Mbytes to 8Kbytes (comparing naive use of read-line compared to using the variants) and from 257 Mbytes to 98 Mbytes in an example where some information from the data must be stored.
We have now automated the system for producing the Allegro CL documentation index and permuted index. This allows us to update both indexes regularly so features added after a release will be properly indexed. (In the past, the regular index was only occasionally updated and the permuted index was never updated between Allegro CL releases.) The Allegro CL 8.0 documentation on our website has updated indexes. You may view it on the web or see this page for information on downloading the updated version.
In this article we use ACL to explore Microsoft Internet Explorer's OLE interface. We'll use two tools, the def-ole-linkage system and the more flexible, but lower-level, remote-autotool system.
OpenGL is a collection of 2D and 3D graphics routines providing an environment for developing portable, interactive 2D and 3D graphics applications (see www.opengl.org). Allegro CL now has an interface to OpenGL 1.1 on Windows, to OpenGL 1.2 and OpenGL 1.3 on Linux, and OpenGL 2.0 on Mac OS X (ppc or x86). The interface was built using SWIG -- see Allegro CL support in SWIG. The SWIG-generated files are available and will likely work on other UNIX platforms, but we have not tested them on anything other than Windows, Linux, and Mac OS X (ppc or x86) at this time.
ISO 8601 is an international standard for representing dates in the Gregorian calendar and times and representations of periods of times. Support for parsing ISO 8601 date-time strings and storing the corresponding date-time object in Lisp has been added in an update (available to supported customers and to Express users) released in mid-August, 2006. The note discusses the new facility and has links to the documentation.
There is a new FAQ for Allegro CL. It has a simpler format than the old FAQ and will be updated by Franz more often. It will no longer be included in the documentation, as doing that results in out-of-date copies still seeming current. Comments on the content and format are welcome (send them to email@example.com). The material covers all currently-supported Allegro CL releases, including questions about the Express edition and Express edition licenses.
An RSS feed containing release information for AllegroCache updates is now available on our RSS feeds page. Use the RSS feed to stay up to date on releases of AllegroCache.
Two new functions, read-line-into and simple-stream-read-line provide space-efficient variants of read-line. They work by allowing the programmer to supply the target string (for read-line-into) or a buffer (for simple-stream-read-line) and thus avoid the creation of unnecessary new strings. See the doc pages for descriptions and here for a demonstration of their use of almost no space. Get the new functionality with sys:update-allegro. Available in version 8.0 only.
Willem Broekema has created an implementation of Python in Allegro CL 8.0 (it works with Allegro CL 8.0 Free Express). It is available for free download. See http://trac.common-lisp.net/clpython/ for more information and downloading instructions.
If you run multiple processes in a Lisp application, there may be an issue about how to allocate processor time between the processes and how often to switch beween processes. In this article, we discuss the allocation issue and demonstrate a couple of ways to control the frequency of process switching.
The Student Edition (available at a low price to bona fide students) of Allegro CL 8.0 has been released. It is described on this page, which also tells how to order it.
The Express Edition of Allegro CL 8.0 has been released. This is a free edition available to all on selected platforms. It is described on this page, which also tells how to get it.
AllegroCache 1.1 has a new and improved scheme for ensuring data persistence compared to version 1.0. This note discusses the issue of data persistence in general and the old and the new support for persistence in AllegroCache.
Allegro Common Lisp 8.0 is now available for Intel Mac OS X. This version of Allegro CL runs natively on Intel Mac OS X and is a completely separate version from the PowerPC version of Allegro CL that runs on Mac OS X.
64-bit Allegro Common Lisp 8.0 is now available for Microsoft Windows XP Professional x64 Edition. The x64 Edition of XP is Microsoft's 64-bit version of Windows that runs on AMD Athlon 64 processors, and Intel processors compatible with the AMD Athlon 64 instruction set.
This is not to be confused with the 64-bit version of Windows for Intel IA64. This version of Allegro CL is not targeted at IA64.
Common Graphics in Allegro CL 8.0 includes support for two new widgets: the lamp widget, which allows displaying a colored shape (typically a circle) with several color modes for providing visual clues in a graphical application; and the HTML widget and an associated HTML browser dialog, which allow browser capabilities within Lisp. See here for more information.
Four new tutorials, on GET requests, on Post requests, on Multipart requests, and on redirects, are now available. Runnable examples are included with each tutorial. This page lists all tutorials (including the ones mentioned).
MIME (Multipurpose Internet Mail Extensions) provides a standard for attaching files, both text and binary, to email messages. Allegro CL has long supported managing email messages from within Lisp (using the POP and IMAP interfaces for reading messages and the SMTP interface for sending them). With a recent update, it has now been enhanced to support the construction and sending of MIME messages. The entire email interface is described in imap.htm (the document is named for the first supported interface even though it describes much more than IMAP). The new MIME API is in the section MIME support in that document. There are several examples showing how to construct and send MIME messages.
A recent update to Allegro CL 8.0 (and 7.0) added support for creating native pipe streams. (Support for OS-provided pipe-streams was already provided by excl.osi:pipe.) A pipe stream is a pair of bi-directional streams interconnected so that data written to one can be read on the other. Pipe streams are not particularly useful by themselves. They are provided as a building block for inter-process communication within the Lisp. See make-pipe-stream for further details. See also make-function-input-stream and with-function-input-stream. The latter two operators use pipe streams. All three pages include examples.
More information here.
The Tutorials page of the support section of the Franz Inc. website has links to brief tutorials on Allegro CL utilities and features. These tutorials are design to provide a quick introduction to a feature, by way of a simple, runnable example (the tutorials may have code to run or may show a transcript of running code and return values).
You can find old Tech Corner entries here.
|Copyright © 2015 Franz Inc., All Rights Reserved | Privacy Statement||