Tech Corner

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.

Use our News feeds Feeds to stay informed about new tech corner articles.

Article Index

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.


Most recent five articles

New products and features

Coding examples

Product details

Release Announcements

Other topics

The OpenSSL Heartbleed bug: UPDATE NOW!

The OpenSSL Heartbleed bug (see 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.

Specifying heaps when rebuilding images

The last step is applying patches is running the update program update.exe (Windows) or (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.

Monitoring process-wait-with-timeout

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.

Major jLinker update

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.

Sized queues in multiprocessing

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.

The importance of regular updating

A reminder to users of the importance of regular updates, with discussion of some recent patches and links to downloading instructions. See here.

Windows version now uses Unicode (and all IDE users whould update!)

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.

Recent support questions of general interest

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 See here for our recent examples.

Locks in Allegro CL 9.0 SMP

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.

Atomic operations in Allegro CL 9.0 SMP

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 and SMP: an introduction

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.

General interest support questions from 2011

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.

Secure FTP support in Allegro CL

The AllegroCL Secure FTP (SFTP) client module is available from Franz Inc.'s Github repository (see 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:

  • Copy files to and from remote hosts
  • Walk remote file structures
  • Access the file modification time and size of remote files
  • The file which is part of the module documents the implementation. It is veiwable at

    Allegro CL Mac OS X Lion

    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

    Allegro CL support for the Solr text searching utility

    Solr is an open-source freetext indexing/searching platform from the Apache Lucene project (see There is a new Allegro CL interface to Solr which is available on the Franz Inc. Github site at 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.

    New deflate module compresses text; used by AllegroServe

    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.

    New simplified GTK installation on Macs

    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.

    New AllegroServe version compresses and uncompresses files on the fly

    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.

    New Amazon Elastic Compute Cloud (EC2) supports AWS Free Usage Tier

    See for a description of the EC2 interface. It has been enhanced so the EBS-backed AMI can be used with the AWS Free Usage Tier.

    ASDF 2 is available by a patch

    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

    Support questions of general interest

    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.

    New Compiler Switches in Allegro CL 8.2

    Four new compiler switches were added in Allegro CL 8.2. This note describes them.

    New version of Amazon Elastic Compute Cloud (EC2) interface

    Allegro CL provides an interface to the API for the Amazon Elastic Compute Cloud (EC2) (see ec2.htm and see 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 and on the main page.

    New open source XML generator

    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 net-xml-generator module is opensource and available for download from Click here for more information.

    excl:ensuring-compiled-body: a new macro in 8.2 backported to 8.1

    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.

    Franz Inc.'s github repository

    github ( 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 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://

    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:// 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

    New macros anticipate Symmetric Multiprocessing

    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.

    Image Manipulation from Allegro CL using ImageMagick

    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.

    Allegro CL and Windows Vista/7

    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).

    Impressions of the International Lisp Conference 2009

    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.

    The Gruff graph-based browser for AllegroGraph

    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).

    Please try out Gruff and AllegroGraph. There are examples involving movie data and data on US presidents. There are also short videos demonstrating Gruff.

    A simple SOAP interface in Lisp

    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.

    New plot-widget in Common Graphics

    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 linked description of the plot-widget includes some examples. See here for an example and some more information.

    The update which included the plot-widget functionality was released in the Fall of2008, but the documentation has only recently been added.

    New support for Amazon Elastic Compute Cloud (EC2)

    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.

    Enhancements to the IDE Project System

    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.

    Emacs 22.3 now works on 64-bit Windows

    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 for information on Emacs and Allegro CL. eli.htm describes the Emacs-Lisp interface.

    Recent support questions of general interest

    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.

    send-mail and send-letter enhancements allow using SSL and starting STARTTLS negotiations

    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.

    CG Class Grid and Object Editor dialog display instances and slot values

    Two new tools added to Common Graphics in release 8.1 are the Class Grid and the Object Editor. While they have been around for a while, we have not until now mentioned them in a Tech Corner article.

    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.

    SSL update allows better protocol and cipher specification

    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 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

    New version of Allegro CL 8.1 Express

    Allegro 8.1 Express is the free version of Allegro CL which allows people to try out the product. It is available for Windows, FreeBSD, Linux, and Mac OS X (for Intel processors). Allegro CL Express is available for download here.

    A new version of Allegro CL 8.1 Express was released in late June, 2008. The most important changes are:

    • A larger maximum heap size: 60 Megabytes, up from 50.
    • Initial license retrieval: on UNIX and Mac OS X, the newlicense program now retrieves the initial license (previously the licenses were sent by email). Initial licenses are still automatically retrieved as part of the installation process on Windows. See the Express Edition section of installation.htm for details.
    • [Windows only] update.exe is enhanced to get updates and patches as well as update images. When you get updates and patches, it is usually necessary to rebuild images. This is done on UNIX with and on Windows with update.exe. is unchanged but update.exe now itself downloads the updates and patches and then rebuilds the images if necessary, saving one step of the process. See sys:update-allegro (the function for downloading patches) for more information.

    Current Allegro CL Express users should simply update in the usual way, using sys:update-allegro or, on Windows, the Download Patches dialog. The new features will be available when the update is complete.

    AllegroGraph 3.0 released!

    Version 3.0 of AllegroGraph 64-bit RDFStoreTM has been released. AllegroGraph is a tool for efficiently processing billions of RDF triples. Among the enhancements in version 3.0 are the following:

    • Federation - AllegroGraph 3.0 can group multiple triple-stores (both local and remote) into a single virtual store.
    • Remote triple-stores - The Lisp Client API in 2.0 has been removed in favor of the new remote-triple-store. These use the same API as all of the other triple-stores but act as proxies for triple-stores in other processes. These processes can be local to the current machine or exist on the network.
    • Geospatial Primitives - AllegroGraph 3.0 includes encoded datatypes for representing two-dimensional points and a large set of functions for searching over these points efficiently.
    • Temporal Primitives - We also include new datatypes for encoding points in time, date-times, intervals and durations and a set of functions for efficiently querying a triple-store about them.
    • Social Networking Analysis - There is a new Social Networking Analysis library that has functions for treating a triple-store as a graph of relations. There are functions for measuring importance and centrality as well as several different families of search functions.

    Also improved are efficiency, performance, error handling, server security, and much else. See the AllegroGraph 3.0 Change History for details and links to documentation describing the new features.

    Read more about AllegroGraph in general here.

    Some notes on the Lisp heap size

    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 Web Application Delivery Framework for AllegroServe

    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.

    A major CLIM update on all platforms

    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:

    • Added support for international character input/output on Motif platforms.
    • Added support for loading pixmaps from CL streams on Motif by passing an explicit format argument to make-pattern-from-bitmap-file.
    • Modified the minimal width of text fields on Windows so they can now be narrower than 75 pixels.
    • Fixed behavior of multi-value selection list boxes on Windows.
    • Fixed the cursor positions reported by text-field-cursor on Windows.

    All CLIM users should get the update. The CLIM documentation has not changed.

    Lisp as a shared library on UNIX revisions

    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.

    New string+ function for fast and easy string concatenation

    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"

    string+ 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 string+ description). Nonetheless, it is a very useful tool for creating strings made from the types of objects listed above.

    string+ is part of a new module designed to hold string-manipulation functions, the util-string module. It is described in the new document string-utilities.htm.

    Defining and Displaying Google Maps from Lisp

    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.

    A text indexer using B-trees

    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.

    64-bit Allegro CL 8.1 (x86-64) for Mac OS X Leopard (10.5) is now available.

    64-bit Allegro CL 8.1 (x86-64) for Mac OS X Leopard (10.5) is now available. This new version joins our other eight 64-bit Allegro CL ports, including the 64-bit Mac OS X (PPC) version. 64-bit Allegro CL 8.1 on Mac OS X 10.5 produces native x86-64 code which has access to the entire 64-bit address space on Leopard. Applications written for 64-bit Allegro CL are source code compatible with 32-bit Allegro CL.

    Lamp widget in Common Graphics enhanced

    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 been released

    The Enterprise, Professional and Express Editions of Allegro CL 8.1 have been released. Some of the features/improvements: significant performance improvements over 8.0; updated SOAP and jLinker modules; many Common Graphics and IDE improvements and fixes; ISO 8601 date/time module; PAM support; X.509 certificates (SSL); MIME message construction support; AllegroCache 2.0; Allegro Btrees, the same btree module that AllegroCache uses is now available to users; AllegroGraph 2.1, our persistent, scalable triple-store database, for use in Semantic Web applications; and much more. Read more about it here.

    New symbolic debugger support in Allegro CL 8.1

    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.

    New Common Graphics menus for many choices in Allegro CL 8.1

    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.

    New Common Graphics Chart Widget in 8.1

    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.

    Support for TCP MD5 Signature Option on Linux

    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.

    Support for SSL X.509 certificates

    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:

    • Do peer certificate verification
    • Supply a certificate on the client side
    • Inspect some fields of the peer certificate

    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.

    Simulating Symmetric Multi-Processing with fork()

    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.

    How the New Daylight Saving Time rules affect Allegro CL

    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.

    Support for any newline format in text input

    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.

    Earthquake data via the USGS website

    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.

    RPC update provides better interface for killing the client Lisp

    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 kill keyword argument to client-exit. This argument provides more options for killing the client Lisp process on remote hosts, invoking Operating System commands when necessary. Allegro RPC is described in rpc.htm. This Tech Corner article (from 2002) showed how to Use Allegro CL RPC to gain remote access to an application.

    High Performance Btree Module Now Available

    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.

    Some techniques for reducing consing when processing very large text files

    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.

    Allegro CL documentation index and permuted index now regularly updated

    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.

    Exploring the Microsoft IE OLE interface

    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 bindings using SWIG 1.3.30

    OpenGL is a collection of 2D and 3D graphics routines providing an environment for developing portable, interactive 2D and 3D graphics applications (see 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.

    Support for ISO 8601 date-time representations

    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.

    New Allegro CL FAQ (replacing old one)

    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 The material covers all currently-supported Allegro CL releases, including questions about the Express edition and Express edition licenses.

    Lisp in a Box now includes Allegro CL 8.0 on Linux

    Lispbox is a version of Lisp in a Box (created originally by Matthew Danish and Mikel Evins) customized for use with the Practical Common Lisp book by Peter Seibel. Downloads including the appropriate Allegro CL 8.0 Express Edition are available for Windows, Mac OS X, and (as we now announce here) Linux on x86 machines.

    An AllegroCache RSS feed is now available

    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.

    Space-efficient variants of read-line

    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.

    Python implemented in Common Lisp

    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 for more information and downloading instructions.

    Fair multiprocessing example

    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.

    Allegro CL 8.0 Student Edition released

    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.

    Allegro CL 8.0 Express Edition released

    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.

    Backing up AllegroCache data

    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 CL 8.0 for Intel Mac OS X is now available

    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 CL 8.0 for Windows XP Professional x64 Edition is now available

    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.

    New Common Graphics widgets

    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.

    New AllegroServe tutorials

    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).

    Using AJAX with Allegroserve and Webactions

    Ajax, an acronym for Asynchronous Javascript And Xml, adds to dynamic html the ability for the client to send background messages to the server and have responses trigger changes to the user's screen. AllegroServe and Webactions support AJAX, as described here.

    New support for constructing MIME messages

    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.

    The ability to create native Lisp pipe streams

    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.

    Lisp scripting on Windows with .bat files

    On UNIX, #! can be used to run "Lisp scripts". Until now, this was not possible on Windows. Read the Windows Scripting Tech Corner article, for more information.

    Allegro CL 8.0 has been released.

    More information here.

    RSS feeds for 7.0 and 8.0 patches are now available

    RSS feeds for patches are now available on our RSS feeds page.

    Atom 1.0 feeds now available

    In addition to RSS 0.91, 1.0 and 2.0 feeds, we now have an Atom 1.0 feed. RSS Feeds

    Brief tutorials on Allegro CL features

    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 © 2014 Franz Inc., All Rights Reserved | Privacy Statement
    Delicious Google Buzz Twitter Google+