From: Ari Johnson
Subject: Portable Allegroserve and SBCL
Date: 
Message-ID: <m2vet4dxnj.fsf@hermes.theari.com>
I'm trying to give Webactions from Portable Allegroserve 1.2.35 a
shot, and I got it to run on OpenMCL 1.0 with very few hassles (just
had to add some nicknames to acl-compat packages), but I would like to
be able to run it on SBCL.  I happen to run Debian sarge on the
relevant system, which means that I have SBCL 0.8.16.  Other than
having to use a slightly older SLIME, I haven't had trouble with that
version of SBCL before.

However, when I try to load Allegroserve in SBCL, using ASDF, I run
into problems.  First, there is a problem trying to redefine the
without-package-locks macro from sb-ext, so I commented out the
defmacro form in acl-compat/sbcl/acl-excl.lisp and tried again, and
now I get a bunch of undefined variable/function errors.

I don't have enough experience, particularly with Portable
Allegroserve, to get a solid feeling for where these are all coming
from, but they feel to me like there is a load-order problem with ASDF
or like some forms are not being evaluated at compile-time that should
be.  Let me know if anyone has been bitten like this before.  Thanks.

List of errors:

First up is net.aserve::*response-found*, likely from the heavy use of
#. in various places, including client.cl where this error seems to
come from.

Skipping that, I get net.aserve::create-sresource from headers.cl as
being an undefined function.  I can't tell from looking at headers.cl
why this would be.

Skipping that, I get that there is no class named
net.aserve:http-request, apparently from somewhere within publish.cl.
That one happens three times in a row.

Next up, client.fasl doesn't exist.  Not horribly surprising.

Then the http-request class not found error comes back, I think still
from publish.cl.  It happens twice.

This is interspersed with a couple of warnings about net.aserve also
exporting a long list of symbols.

Then we get net.aserve:find-clp-module being an undefined function.
But at least we're in webactions/clpage.cl now.  That error happens
four times.

From: Alan Manuel K. Gloria
Subject: Re: Portable Allegroserve and SBCL
Date: 
Message-ID: <1145636476.162457.30600@z34g2000cwc.googlegroups.com>
I've been looking at Portable AServe.  It seems that it hasn't been
updated for a while yet (last update I saw was February 2004).  Also,
I've googlenetted some complaints about Portable AllegroServe, mostly
regarding the way its programmed.

I've come across a few other lisp webservers: CL-HTTP and TBNL.  I
don't have any experience with them, but I think you might find them
worth a look.
From: Ari Johnson
Subject: Re: Portable Allegroserve and SBCL
Date: 
Message-ID: <m2k69iwzv2.fsf@hermes.theari.com>
"Alan Manuel K. Gloria" <········@gmail.com> writes:

> I've been looking at Portable AServe.  It seems that it hasn't been
> updated for a while yet (last update I saw was February 2004).  Also,
> I've googlenetted some complaints about Portable AllegroServe, mostly
> regarding the way its programmed.
>
> I've come across a few other lisp webservers: CL-HTTP and TBNL.  I
> don't have any experience with them, but I think you might find them
> worth a look.

It's more Webactions that I'm drawn to.  I'm kind of going through the
main CL web solutions one by one to think about how I'd solve certain
web application problems with each one.

That said, I'm using an outdated SBCL, so maybe the outdated Portable
Allegroserve will be workable, after all. ;)
From: Friedrich Dominicus
Subject: Re: Portable Allegroserve and SBCL
Date: 
Message-ID: <87y7xyqe0c.fsf@flarge.here>
"Alan Manuel K. Gloria" <········@gmail.com> writes:

> I've been looking at Portable AServe.  It seems that it hasn't been
> updated for a while yet (last update I saw was February 2004).  Also,
> I've googlenetted some complaints about Portable AllegroServe, mostly
> regarding the way its programmed.
Well it works, that's enough isn't it. And it has a useful
documentation. It runs nicely stand-alone or behind an Apache Proxy. 

I'm running it here with SBCL 0.9.11.x and have used it from 0.8 or so
on. It runs with LWP 4.2,4.3 and 4.4 without problems. Well I have
araneida running also and CL-HTTP 70-190 or so.  

The real good thing it has is Webactions. This is a tool one can
understand in a short time and apply it. I can not tell that about
UCW, CL-HTTP or BKNR. However I thing kpax isn't that much
harder. However Webactions again has some useful documentation.

>
> I've come across a few other lisp webservers: CL-HTTP and TBNL.
Good luck with CL-HTTP, you'll need some time to learn it. 

Can't tell anything about TBNL.

Regards
Friedrich

-- 
Please remove just-for-news- to reply via e-mail.
From: Holger Schauer
Subject: Re: Portable Allegroserve and SBCL
Date: 
Message-ID: <yxz8xpughpe.fsf@gmx.de>
On 4614 September 1993, Ari Johnson wrote:
> I'm trying to give Webactions from Portable Allegroserve 1.2.35 a
> shot, and I got it to run on OpenMCL 1.0 with very few hassles (just
> had to add some nicknames to acl-compat packages), but I would like to
> be able to run it on SBCL.  I happen to run Debian sarge on the
> relevant system, which means that I have SBCL 0.8.16.  Other than
> having to use a slightly older SLIME, I haven't had trouble with that
> version of SBCL before.

In case you'll ever want to take a look at UncommonWeb, this will
change. Installing a local copy of sbcl on a Debian Sarge system with
a working older version is a breeze, btw. I would hence suggest 
updating.

Holger

-- 
---          http://www.coling.uni-freiburg.de/~schauer/            ---
Fachbegriffe der Informatik - Einfach erkl�rt
162: WWW-Benutzer
       Leute mit den kleinen quadratischen Augen, die beim
       Zeitunglesen dauernd auf irgendwelche Headlines klicken wollen
       (Martin Schmitt)
From: Friedrich Dominicus
Subject: Re: Portable Allegroserve and SBCL
Date: 
Message-ID: <874q0hvhbs.fsf@flarge.here>
Holger Schauer <··············@gmx.de> writes:

> On 4614 September 1993, Ari Johnson wrote:
>> I'm trying to give Webactions from Portable Allegroserve 1.2.35 a
>> shot, and I got it to run on OpenMCL 1.0 with very few hassles (just
>> had to add some nicknames to acl-compat packages), but I would like to
>> be able to run it on SBCL.  I happen to run Debian sarge on the
>> relevant system, which means that I have SBCL 0.8.16.  Other than
>> having to use a slightly older SLIME, I haven't had trouble with that
>> version of SBCL before.
Can't confirm that one have to use an older SBCL I'M using one from
the CVS tree checked out and build yesterday. It simply works.

Regards
Friedrich

-- 
Please remove just-for-news- to reply via e-mail.
From: Petter Gustad
Subject: Re: Portable Allegroserve and SBCL
Date: 
Message-ID: <87k69edjve.fsf@gustad.com>
Ari Johnson <·········@gmail.com> writes:

> I'm trying to give Webactions from Portable Allegroserve 1.2.35 a
> shot, and I got it to run on OpenMCL 1.0 with very few hassles (just
> had to add some nicknames to acl-compat packages), but I would like
> to be able to run it on SBCL. I happen to run Debian sarge on the

I haven't tried Portable Allegroserve/Webactions under SBCL, but I've
had it running (with CLSQL) under CMUCL for quite some time.

Petter

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
From: Ari Johnson
Subject: Re: Portable Allegroserve and SBCL
Date: 
Message-ID: <m2r73l7uug.fsf@hermes.theari.com>
Petter Gustad <·············@gustad.com> writes:

> Ari Johnson <·········@gmail.com> writes:
>
>> I'm trying to give Webactions from Portable Allegroserve 1.2.35 a
>> shot, and I got it to run on OpenMCL 1.0 with very few hassles (just
>> had to add some nicknames to acl-compat packages), but I would like
>> to be able to run it on SBCL. I happen to run Debian sarge on the
>
> I haven't tried Portable Allegroserve/Webactions under SBCL, but I've
> had it running (with CLSQL) under CMUCL for quite some time.

Probably the single hardest part of adjusting to CL for me has been
tracking down errors and bugs in large pieces of code that I did not
write.  I would gladly fix every bug I found and send a patch to the
developer, but the problem is that I don't *find* bugs - I merely
*encounter* them.  To actually find something implies a great deal
more specificity as to location than I seem to be able to accomplish.

Is there some easier way to track things down than:
  - Looking for style warnings preceding the error to get clues
  - Grepping through the possible files that may be involved to find
    the symbols warned about
  - Searching through the candidate file to find something related to
    the error
  - Scratching your head to figure out why the only candidate file
    is one that the compiler said it successfully compiled
?

In C, you get a line number and file name to at least start your
search for the error from.  Presumably there is some better way
available here, but so far the best I have been able to do is use a
backtrace to figure out whether it's a compiler error or a load error,
and which file is involved.
From: Petter Gustad
Subject: Re: Portable Allegroserve and SBCL
Date: 
Message-ID: <87aca7qqcm.fsf@gustad.com>
Ari Johnson <·········@gmail.com> writes:

> However, when I try to load Allegroserve in SBCL, using ASDF, I run
> into problems.  First, there is a problem trying to redefine the

I installed SBCL to give it a try. Unfortunately I haven't figured out
how to build SBCL with thread support on my AMD64 Gentoo machine. If
somebody knows, please tell me how. Anyway, I don't get any
compilation errors, only a runtime error since I don't have thread
support in my SBCL:


CL-USER> (lisp-implementation-type)
"SBCL"
CL-USER> (lisp-implementation-version)
"0.9.3"
CL-USER> #+asdf 'has-asdf
HAS-ASDF
CL-USER> #+:SB-THREAD 'has-threads
; No value
CL-USER> (asdf:operate 'asdf:load-op :webactions)
[misc style warnings etc, but no errors...]
CL-USER> net.aserve:*aserve-version*
(1 2 42)
CL-USER> (net.aserve:webaction-project "cll"
           :project-prefix "/"
           :clp-suffixes '("html")
           :map '(("home" "home.html")))

#<NET.ASERVE:WEBACTION-ENTITY {1000F0FA71}>
CL-USER> (net.aserve:start :port 8080 :chunking nil)
PROCESS-PRESET: Calling a multiprocessing function on a single-threaded sbcl
   [Condition of type SIMPLE-ERROR]

Maybe you should try a more recent SBCL and Portable Allegroserve?

Petter
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
From: Ari Johnson
Subject: Re: Portable Allegroserve and SBCL
Date: 
Message-ID: <m28xpr6pfj.fsf@hermes.theari.com>
Petter Gustad <·············@gustad.com> writes:

> Ari Johnson <·········@gmail.com> writes:
>
>> However, when I try to load Allegroserve in SBCL, using ASDF, I run
>> into problems.  First, there is a problem trying to redefine the
>
> I installed SBCL to give it a try. Unfortunately I haven't figured out
> how to build SBCL with thread support on my AMD64 Gentoo machine. If
> somebody knows, please tell me how. Anyway, I don't get any
> compilation errors, only a runtime error since I don't have thread
> support in my SBCL:
> Maybe you should try a more recent SBCL and Portable Allegroserve?

I am inclined to think it's at least partly a problem with the version
of Allegroserve that I tried, given that the problems I got were:

1. Package nicknames for acl-compat packages were used but never given
   to the packages.  These included excl: and mp:, which I added to
   the respective acl-compat defpackages.

2. There was a defmacro for without-package-locks that interfered with
   SBCL.  I commented it out.

3. There was a (declaim (ftype (function (simple-vector) ...))) for
   vector-to-ipaddr, when SBCL did not know that (simple-array 4 (*))
   was a simple-vector.  I commented it out.

4. There was a defun that made unix-fork call sb-unix:unix-fork, which
   I just turned into an (error "UNIX-FORK unavailable") and never had
   problems with.  This could certainly be a feature available in a
   newer SBCL.

5. There was a defsetf whose argument list had a &key (test #'equal)
   that resulted in SBCL trying to dump a #<FUNCTION> to the .fasl.
   Adding a quote to make it '#'equal seems to work.

6. Webactions had a second defpackage for net.aserve.  I replaced it
   with an (export '(list of symbols the defpackage wanted to export))
   after verifying that behavior is explicitly undefined if you repeat
   defpackages like that.  Webactions actually did this twice.

With those changes, it worked alright for me.  But #1 concerns me a
bit.  I have a tarball for portableaserve-1.2.35.tar.gz.  What version
did you use?  I don't see how one CL implementation would add
nicknames automatically. :-\
From: Petter Gustad
Subject: Re: Portable Allegroserve and SBCL
Date: 
Message-ID: <87y7xrott1.fsf@gustad.com>
Ari Johnson <·········@gmail.com> writes:

> I have a tarball for portableaserve-1.2.35.tar.gz. What version did
> you use?

I used the CVS version which appears to be 1.2.42 (see my message
news:<··············@gustad.com>).


Petter
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
From: Ari Johnson
Subject: Re: Portable Allegroserve and SBCL
Date: 
Message-ID: <m2vesv58g1.fsf@hermes.theari.com>
Petter Gustad <·············@gustad.com> writes:

> Ari Johnson <·········@gmail.com> writes:
>
>> I have a tarball for portableaserve-1.2.35.tar.gz. What version did
>> you use?
>
> I used the CVS version which appears to be 1.2.42 (see my message
> news:<··············@gustad.com>).

Oops, missed that line in your output.  I'll give CVS a shot.
From: Friedrich Dominicus
Subject: Re: Portable Allegroserve and SBCL
Date: 
Message-ID: <87d5f35d5r.fsf@flarge.here>
Petter Gustad <·············@gustad.com> writes:

> Ari Johnson <·········@gmail.com> writes:
>
>> However, when I try to load Allegroserve in SBCL, using ASDF, I run
>> into problems.  First, there is a problem trying to redefine the
>
> I installed SBCL to give it a try. Unfortunately I haven't figured out
> how to build SBCL with thread support on my AMD64 Gentoo machine. If
> somebody knows, please tell me how. 
Get the sources from the CVS tree, then go to the directory in which
you have downloaded the tree. Then create a file
customize-target-features.lisp

with the following content
(lambda (list)
  (flet ((enable (x) (pushnew x list))
         (disable (x) (setf list (remove x list))))
    (enable :sb-thread)
    ;; (enable :sb-ldb) ;; optional
    list))


then follow the instructions on how to compile SBCL.

Regards
Friedrich




-- 
Please remove just-for-news- to reply via e-mail.
From: Petter Gustad
Subject: Re: Portable Allegroserve and SBCL
Date: 
Message-ID: <873bfzq8ik.fsf@gustad.com>
Friedrich Dominicus <···················@q-software-solutions.de> writes:

> Get the sources from the CVS tree, then go to the directory in which

Thanks, but I can't seem to login to the CVS server now. I've tried
from several machines on several different ISPs:

$cvs ····················@cvs.sourceforge.net:/cvsroot/sbcl login 
Logging in to ··················@cvs.sourceforge.net:2401/cvsroot/sbcl
CVS password: 
cvs [login aborted]: end of file from server (consult above messages
if any)

Is there a way to specify (enable :sb-thread) in a gentoo build?
Somebody on forums.gentoo.org claimed that one could simply recompile
glibc with "nptl" set in the USE flag, and then recompile SBCL.
However, this did not enable :sb-thread in my build. 

Petter

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
From: Ivan Boldyrev
Subject: Re: Portable Allegroserve and SBCL
Date: 
Message-ID: <9mj8i3-a4h.ln1@ibhome.cgitftp.uiggm.nsc.ru>
On 9457 day of my life Petter Gustad wrote:
> Is there a way to specify (enable :sb-thread) in a gentoo build?
> Somebody on forums.gentoo.org claimed that one could simply recompile
> glibc with "nptl" set in the USE flag, and then recompile SBCL.
> However, this did not enable :sb-thread in my build. 

You also have to add "threads" to USE flags when compiling SBCL.

'emerge -pv sbcl' will display USE flags for SBCL.

-- 
Ivan Boldyrev

                                       XML -- new language of ML family.
From: Petter Gustad
Subject: Re: Portable Allegroserve and SBCL
Date: 
Message-ID: <874q0ex7xn.fsf@gustad.com>
Ivan Boldyrev <···············@cgitftp.uiggm.nsc.ru> writes:

> On 9457 day of my life Petter Gustad wrote:
> > Is there a way to specify (enable :sb-thread) in a gentoo build?
> > Somebody on forums.gentoo.org claimed that one could simply recompile
> > glibc with "nptl" set in the USE flag, and then recompile SBCL.
> > However, this did not enable :sb-thread in my build. 
> 
> You also have to add "threads" to USE flags when compiling SBCL.

Thanks for the tip. I thought ntpl would implicitly include threads.
However, now I get an error when trying to compile Portable
Allegroserve when :SB-THREAD is enabled...

READER-ERROR at 9499 (line 251, column 39) on #<SB-SYS:FD-STREAM for 
"file ...portableaserve/acl-compat/sbcl/acl-mp.lisp" {10027608B1}>:
Symbol "CURRENT-THREAD-ID" not found in the SB-THREAD package.

Petter
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
From: Ivan Boldyrev
Subject: Re: Portable Allegroserve and SBCL
Date: 
Message-ID: <5hvbi3-kcq.ln1@ibhome.cgitftp.uiggm.nsc.ru>
On 9458 day of my life Petter Gustad wrote:
>> You also have to add "threads" to USE flags when compiling SBCL.
>
> Thanks for the tip. I thought ntpl would implicitly include threads.
> However, now I get an error when trying to compile Portable
> Allegroserve when :SB-THREAD is enabled...
>
> READER-ERROR at 9499 (line 251, column 39) on #<SB-SYS:FD-STREAM for 
> "file ...portableaserve/acl-compat/sbcl/acl-mp.lisp" {10027608B1}>:
> Symbol "CURRENT-THREAD-ID" not found in the SB-THREAD package.

If you use dev-lisp/sbcl from Gentoo, use dev-lisp/cl-aserve from
Gentoo :)

I tested dev-lisp/sbcl-0.9.11 and dev-lisp/cl-aserve-1.2.42.20050805.
I have only one issue: compiler gives some warning when compiling, and
ASDF goes crazy because of that; just press 1 ("ASSEPT") when ASDF
falls into debugger.  It happens only during compilation; if you load
compiled files, everything seems to be OK.

-- 
Ivan Boldyrev

       Assembly of a Japanese bicycle requires greatest peace of spirit.
From: Johan Ur Riise
Subject: Re: Portable Allegroserve and SBCL
Date: 
Message-ID: <8764kcw6o2.fsf@morr.riise-data.net>
Petter Gustad <·············@gustad.com> writes:

> However, now I get an error when trying to compile Portable
> Allegroserve when :SB-THREAD is enabled...
> 
> READER-ERROR at 9499 (line 251, column 39) on #<SB-SYS:FD-STREAM for 
> "file ...portableaserve/acl-compat/sbcl/acl-mp.lisp" {10027608B1}>:
> Symbol "CURRENT-THREAD-ID" not found in the SB-THREAD package.

Well it is not there (SBCL 0.9.11.8), but you could try to define
one like this:

CL-USER> (in-package "SB-THREAD")
#<PACKAGE "SB-THREAD">
SB-THREAD> (defun current-thread-id () (thread-os-thread *current-thread*))
CURRENT-THREAD-ID
SB-THREAD> (export 'current-thread-id)
T
;; test
SB-THREAD> (in-package "CL-USER")
#<PACKAGE "COMMON-LISP-USER">
CL-USER> (sb-thread:current-thread-id)
3052759968
CL-USER> 

;; more test

CL-USER> (defvar *other-thread-id* nil)
*OTHER-THREAD-ID*
CL-USER> *other-thread-id*
NIL
CL-USER> (sb-thread:make-thread (lambda () (setf *other-thread-id* (sb-thread:current-thread-id))))
#<SB-THREAD:THREAD {B3B95B9}>
CL-USER> *other-thread-id*
3061705632
CL-USER> (type-of *)
(INTEGER 536870912)
CL-USER>