Araneida and HTML Generation

From: David Douthitt (ssrat_at_mailbag.com)
Date: 07/22/04


Date: Thu, 22 Jul 2004 16:57:01 -0500

I'm utilizing the Araneida Web Server on a Linux/x86 system with SBCL
and pgsql.lisp. The docs describe a way to generate HTML, but the
examples all fail, and examples/main.lisp does not exist.

Running the example given in the Araneida docs page gives the following
output in SBCL:
-----------------------------------------------------

* (html
  (head (title "Title"))
  (body (p "Click here to visit ((a :href "http://www.google.com/")
"Google"))))

debugger invoked on a SB-KERNEL:READER-PACKAGE-ERROR in thread 6419:
   READER-ERROR on #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN* {5035259}>:
package "HTTP" not found

You can type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
   0: [ABORT ] Reduce debugger level (leaving debugger, returning to
toplevel).
   1: [TOPLEVEL] Restart at toplevel READ/EVAL/PRINT loop.
(SB-IMPL::READ-TOKEN 2 #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDIN*
{5035259}> #\h)[:EXTERNAL]

-----------------------------------------------------
I'm new to any serious LISP programming so I'm not sure where to go
next. I have also tried using lml2, but when I got it running, I tried
the example from the web site, and get this:
-----------------------------------------------------

* (html
    (:i "The square of the first five integers are: )"
    (:b
    (loop as x from 1 to 5
      doing
      (lml-format " ~D" (* x x))))

)
)
; in: LAMBDA NIL
; (LML-FORMAT " ~D" (* X X))
;
; caught STYLE-WARNING:
; undefined function: LML-FORMAT

;
; caught STYLE-WARNING:
; This function is undefined:
; LML-FORMAT
;
; compilation unit finished
; caught 2 STYLE-WARNING conditions

debugger invoked on a UNDEFINED-FUNCTION in thread 27973:
   The function LML-FORMAT is undefined.

You can type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
   0: [ABORT ] Reduce debugger level (leaving debugger, returning to
toplevel).
   1: [TOPLEVEL] Restart at toplevel READ/EVAL/PRINT loop.
(SB-KERNEL::UNDEFINED-FUN-ERROR-HANDLER
  4
  #<unavailable argument>
  #.(SB-SYS:INT-SAP #X40382A20)
  #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP #X40382720 :TYPE (*
                                                          (STRUCT
 
SB-VM::OS-CONTEXT-T-STRUCT))>
  (14))[:EXTERNAL]
0]

-----------------------------------------------------
Note that I had to add two more parenthesis to make it "work." I then
tried (use-package) but I get this:
-----------------------------------------------------

* (use-package :lml2)

debugger invoked on a SIMPLE-ERROR in thread 27973:
   Using package LISP-MARKUP-LANGUAGE-2 results in name conflicts for
these symbols:
(LML-FORMAT HTML)

You can type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
   0: [CONTINUE] Unintern the conflicting symbols in the
COMMON-LISP-USER package.
   1: [ABORT ] Reduce debugger level (leaving debugger, returning to
toplevel).
   2: [TOPLEVEL] Restart at toplevel READ/EVAL/PRINT loop.
("hairy arg processor for top level local call USE-PACKAGE"
  :LML2
  #<PACKAGE "COMMON-LISP-USER">)
0]

-----------------------------------------------------
I feel more than a little blind here. How do I get this HTML generation
to work from Araneida? If you're feeling generous, how do I then
connect the HTML output to a server response? The docs that came with
Araneida are rather obtuse and tell you several times to "read the code"
- which doesn't help me.

Thanks!

David Douthitt



Relevant Pages

  • Re: lisp newbie: how to debug sbcl + araneida + (slime)
    ... threads are problematic with Araneida. ... That's SBCL 0.8.15, right? ... SBCL doesn't do breakpoints; it does, ... It does help with the actual debugging if you find a need, ...
    (comp.lang.lisp)
  • Help with saving SBCL image that will connect to SLIME
    ... I have no problem starting the code, running araneida, starting swank, ... This is SBCL 0.9.8, an implementation of ANSI Common Lisp. ... Type HELP for debugger help, or to exit from SBCL. ...
    (comp.lang.lisp)
  • lisp newbie: how to debug sbcl + araneida + (slime)
    ... I need some help to be indoctrinated into the lisp way. ... example coming with araneida does not work and how to debug by setting ... slime 1.0 (i tried to use sbcl directly on sh to learn the underlying ... Googling shows that seasoned lisp devs prefer other means of debugging ...
    (comp.lang.lisp)
  • make-array cant take constants?
    ... Type HELP for debugger help, or to exit from SBCL. ...
    (comp.lang.lisp)
  • Re: Your favorite Lisp on Debian?
    ... used the Python-based Twisted comm server framework. ... issue-laden - implementaion differences, OS differences, the additional ... Maybe I should give Araneida a look since I am in evaluation mode ... and I already have SBCL installed. ...
    (comp.lang.lisp)