Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Zach Beane
zacl
Commits
5641344a
Commit
5641344a
authored
Oct 18, 2018
by
Dave Cooper
Browse files
Updated README.md.
parent
cb8e95df
Changes
5
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
5641344a
...
...
@@ -3,8 +3,11 @@
ZACL is for running
[
AllegroServe
](
https://github.com/franzinc/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.
few modifications as possible, so that such a modified version of
aserve will continue to be able to track future versions of
[
official
aserve
](
https://github.com/franzinc/allegroserve/
)
. 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
](
http://quickdocs.org/UIOP/
)
,
...
...
@@ -19,52 +22,57 @@ 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
](
https://github.com/franzinc/aserve/pull/6
)
,
[
obsolete declarations not recognized in other Lisps
](
https://github.com/franzinc/aserve/pull/7
)
,
[
non-standard assumptions in array initialization
](
https://github.com/franzinc/aserve/pull/8
)
,
etc.
Occasionally, quirks in aserve's source may be very difficult to work
around. In those cases, a patch or pull request can be [sent to Franz]
(https://github.com/franzinc/aserve/). Ideally, the
[
official
aserve
](
https://github.com/franzinc/aserve/
)
will eventualy get to
where it will work with ZACL unmodified.
Until those patches are merged or rejected, the
[
zacl-compatible aserve fork
](
https://github.com/xach/aserve/tree/zacl-compatible
)
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:
But as long as there are discrepancies between what works with zacl
and the
[
official Franz version of
aserve
](
https://github.com/franzinc/aserve/
)
(
as
is the case
currently), a zacl-compatible fork will be available
[
here
](
https://github.com/genworks/aserve/tree/zacl-compatible
)
. You
can check it out like so:
git clone -b
zacl-compatible
https://github.com/
xach
/aserve.git
git clone -b
master
https://github.com/
genworks
/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.
The
`aserve`
system definition name conflicts in Quicklisp with a
legacy
[
attempt to port
AllegroServe
](
https://sourceforge.net/p/portableaserve/git/ci/master/tree/
)
First, you can manually load ZACL before loading aserve:
Therefore, the
[
zacl-compatible
AllegroServe
](
https://github.com/genworks/aserve/tree/zacl-compatible
)
has its system name as
`zaserve`
. This
`zaserve`
system definition
includes a dependency on ZACL, so you can load it simply by invoking
(ql:quickload "zacl")
(ql:quickload "aserve")
`(ql:quickload :zaserve)`
Second, you can load the "zacl-aserve" shim system:
Of course, if for some reason you only want the
`zacl`
system itself,
you can load that with
`(ql:quickload :zacl)`
(ql:quickload "zacl-aserve")
## Limitations
**Only works on Clozure CL and SBCL**
. Support for other
implementations will be added if there is sufficient demand. I don't
use other CL implementations with ZACL currently.
**Does not support CGI**
. A 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
](
https://gitlab.common-lisp.net/zbeane/zacl/issues
)
and I'll take a look.
implementations may be added if there is sufficient
demand. Contributions of ports to other implementations are of course
welcome
**Does not support CGI**
. A victim of time constraints. The author and
maintainers do not currently 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**
. Our applications seem to work. Yours might not. If
you have trouble with ZACL and zaserve, feel free to create an
issue
[
here
](
https://gitlab.common-lisp.net/zbeane/zacl/issues
)
and/or
[
here
](
https://github.com/genworks/aserve/tree/zacl-compatible
)
and
the maintainers will see them.
**Possibly slow**
. Using generic functions and portability layers will
be slower than running aserve natively on Allegro CL. There aren't
...
...
asdf-tricks.lisp
View file @
5641344a
...
...
@@ -2,10 +2,11 @@
(
in-package
#:zacl
)
;; This mimics what aserve.asd does.
(
defclass
asdf::cl-file
(
asdf:cl-source-file
)
(
defclass
zacl-reader:cl-file
(
asdf:cl-source-file
)
((
type
:initform
"cl"
)))
(
defmethod
asdf:perform
:around
((
operation
asdf:compile-op
)
(
component
asdf:
:cl-file
))
(
component
zacl-reader
:cl-file
))
(
with-zacl-build-environment
(
call-next-method
)))
package-excl.lisp
View file @
5641344a
...
...
@@ -192,12 +192,6 @@ values otherwise."
(
defun
excl:fixnump
(
integer
)
(
typep
integer
'fixnum
))
(
defun
excl:split-into-words
(
string
)
(
split
"\\s+"
string
))
(
defun
excl:split-on-character
(
string
character
)
(
split-sequence
character
string
))
(
defmacro
excl::with-dynamic-extent-usb8-array
((
var
len
)
&body
body
)
`
(
let
((
,
var
(
make-array
,
len
:element-type
'
(
unsigned-byte
8
))))
,@
body
))
...
...
package-socket.lisp
View file @
5641344a
...
...
@@ -203,10 +203,17 @@
`
(
progn
,@
body
))
(
defun
socket:ipaddr-to-hostname
(
ipaddr
)
(
ipaddr-to-hostname
ipaddr
))
#+
sbcl
(
declare
(
ignore
ipaddr
))
#+
ccl
(
ipaddr-to-hostname
ipaddr
)
#+
sbcl
(
error
"socket:ipaddr-to-hostname not implemented in ~a"
(
lisp-implementation-type
)))
(
defun
socket:lookup-hostname
(
name
)
(
lookup-hostname
name
))
#+
ccl
(
lookup-hostname
name
)
;;
;; FLAG -- this assumes IPv4 - fix to work with IPv6 also.
;;
#+
sbcl
(
format
nil
"~{~a~^.~}"
(
coerce
(
get-host-by-name
name
)
'list
)))
(
defun
socket::make-ssl-client-stream
(
socket
&key
&allow-other-keys
)
(
let
((
stream
(
make-ssl-client-stream
(
real-stream
socket
))))
...
...
package.lisp
View file @
5641344a
...
...
@@ -11,6 +11,10 @@
;; XXX Private package
#:without-interrupts
#:fd-stream-fd
)
#+
sbcl
(
:import-from
#:usocket
#:get-host-by-name
)
(
:import-from
#:cl+ssl
#:make-ssl-client-stream
#:make-ssl-server-stream
)
...
...
@@ -124,7 +128,7 @@
(
defpackage
#:zacl-reader
(
:use
#:cl
)
(
:export
#:*allegro-rewriting-readtable*
))
(
:export
#:*allegro-rewriting-readtable*
#:cl-file
))
(
defpackage
#:zacl-if-star
(
:use
#:cl
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment