Z

zacl

ACL-like layer for AllegroServe porting.

Name Last Update
notes Loading commit data...
README.md Loading commit data...
asdf-tricks.lisp Loading commit data...
clozure-process.lisp Loading commit data...
clozure-specific.lisp Loading commit data...
defpackage-hack.lisp Loading commit data...
fake-slots.lisp Loading commit data...
if-star.lisp Loading commit data...
package-excl.lisp Loading commit data...
package-ff.lisp Loading commit data...
package-mp.lisp Loading commit data...
package-net.uri.lisp Loading commit data...
package-si.lisp Loading commit data...
package-socket.lisp Loading commit data...
package-sys.lisp Loading commit data...
package-toplevel.debug.lisp Loading commit data...
package-util.string.lisp Loading commit data...
package-util.zip.lisp Loading commit data...
package.lisp Loading commit data...
portable-process.lisp Loading commit data...
provides.lisp Loading commit data...
reader.lisp Loading commit data...
sbcl-specific.lisp Loading commit data...
tests.lisp Loading commit data...
utils.lisp Loading commit data...
zacl-aserve.asd Loading commit data...
zacl-tests.asd Loading commit data...
zacl.asd Loading commit data...

ZACL

ZACL is for running AllegroServe on non-AllegroCL Lisps. The goal is to run AllegroServe sources with as few modifications as possible. That means occasionally resorting to grody one-off hacks instead of elegant beautiful gracefulness.

Where possible, ACL functionality is mimicked with portability libraries like UIOP, bordeaux-threads, cl-ppcre, USOCKET, etc. Where necessary, implementation-specific hacks are used to fill in the gaps.

For example, Allegro CL's non-standard #+(version>= ...) expression is sprinkled throughout aserve code. To work around the problem without changing the code, zacl installs a readtable that overrides the standard #+ and #- readers to check for these expressions and work around them.

Occasionally, a quirk in aserve's source is very difficult to work around. In those cases, I will send patches to Franz, like for double-colon syntax in packages.cl, obsolete declarations not recognized in other Lisps, non-standard assumptions in array initialization, etc.

Until those patches are merged or rejected, the zacl-compatible aserve fork on github has a lightly modified version of aserve that can be used with zacl to use modern aserve on non-Allegro Lisps. You can check it out like so:

git clone -b zacl-compatible https://github.com/xach/aserve.git

Usage

ZACL defines the packages and functionality that the aserve code relies upon. But aserve's system definition does not include a dependency on ZACL. There are a few ways to make sure ZACL is loaded before aserve.

First, you can manually load ZACL before loading aserve:

(ql:quickload "zacl")
(ql:quickload "aserve")

Second, you can load the "zacl-aserve" shim system:

(ql:quickload "zacl-aserve")

Limitations

Only works on Clozure CL. This is because of time constraints. Clozure CL's multiprocess API is the same as Allegro's, so it was trivial to support immediately. There is a tiny bit of simple-streams support that also relies directly on Clozure stream functionality, but creating a portability layer that matches the Clozure/Allegro multiprocess API would help ZACL work on many more Lisps.

Does not support CGI. Another victim of time constraints. I do not need CGI. CGI functionality requires non-trivial support for managing subprocesses, and I am not sure if e.g. UIOP's subprocess management API is sufficient.

Lightly tested. My application seems to work. Yours might not. If you have trouble with ZACL and aserve, feel free to create an issue and I'll take a look.

Possibly slow. Using generic functions and portability layers will be slower than running aserve natively on Allegro CL. There aren't many ways around it. If you have a specific performance issue that you'd like ZACL to address, get in touch.