Subject: Re: macro functionality in embedded languages.
From: (Rob Warnock)
Date: Tue, 10 Apr 2007 23:37:30 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
<> wrote:
| Your LHP sounds interesting.  Where can I find it?

You can't, sorry. It depends on my "appsrv" web applications
server infrastructure, which I hope to open-source at some point,
but it would take considerable effort to sanitize it of some
proprietary elements that crept in during its application to a
couple of clients, and my current work situation is chewing up
most/all of my spare time these days.

But given any of the other applications server infrastructures
available out there -- Araneida, cl-modlisp, Hunchentoot -- adding
an LHP-style hack yourself should be pretty easy. The code to add
LHP to my "appsrv" was only ~175 lines of CL. Just register a suffix
handler for ".lhp" with your applications server infrastructure.
Then when you get control, check to see if you've cached that page
yet -- if not, LOAD it -- and then call its driver function.
[Doing a COMPILE/re-COMPILE if needed is an optional extension.]

Note: In order to know the page's driver function, the page
has to have executed a callback into the LHP infrastructure
(an LHP-SET-PAGE-FUNCTION call, in my case) during the LOAD.
A bit clumsy, perhaps, but unfortunately CL's LOAD returns only
a generalized boolean, not a value computable by the LOADed code.


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607