From: memius
Subject: Web-page that does ONE complex thing
Date: 
Message-ID: <1149260954.882161.85590@u72g2000cwu.googlegroups.com>
I am going to build an interactive web-page that has one very big,
complex function. All the rest will be relatively trivial. I am going
to code this one function in lisp, but I'm wondering whether to build
the rest of the page in a more user-friendly language (Ruby), and try
to interface it, or whether to build the whole thing in lisp. Any
opinions? Any other language-recommendations for the mundane stuff?

From: Frank Buss
Subject: Re: Web-page that does ONE complex thing
Date: 
Message-ID: <1kl4it7rki6qm$.i3pr04qpttgb$.dlg@40tude.net>
memius wrote:

> I am going to build an interactive web-page that has one very big,
> complex function. All the rest will be relatively trivial. I am going
> to code this one function in lisp, but I'm wondering whether to build
> the rest of the page in a more user-friendly language (Ruby), and try
> to interface it, or whether to build the whole thing in lisp. Any
> opinions? Any other language-recommendations for the mundane stuff?

What do you mean by "user-friendly"? Programming the rest of the page can
be very easy, e.g. with TBNL:

http://www.frank-buss.de/lisp/tbnl.html

A full application, with HTML generating code, input forms and application
logic fits in 22 lines of Lisp and you can interactivly debug and develop
it e.g. from within the LispWorks IDE on Windows or with SBCL on Linux and
a Slime/Emacs combination for the IDE.

-- 
Frank Buss, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
From: Rob Warnock
Subject: Re: Web-page that does ONE complex thing
Date: 
Message-ID: <3pednamnCctYYh3ZRVn-tg@speakeasy.net>
memius <········@gmail.com> wrote:
+---------------
| I am going to build an interactive web-page that has one very big,
| complex function. All the rest will be relatively trivial. I am going
| to code this one function in lisp, but I'm wondering whether to build
| the rest of the page in a more user-friendly language (Ruby), and try
| to interface it, or whether to build the whole thing in lisp. Any
| opinions? Any other language-recommendations for the mundane stuff?
+---------------

Might as well stay in Lisp -- it's certainly easy enough to
spit out HTML from it, e.g.:

    http://rpw3.org/hacks/lisp/minimal.lhp
    http://rpw3.org/hacks/lisp/appsrv-demo.lhp
or:
    http://rpw3.org/hacks/lisp/cmucl-demo.cgi

The ".lhp" (Lisp-Handled Pages) files talk to a persistent
application server (written in CMUCL) that handles caching
and automatic recompilation of pages, but if your request/sec
rate is very low the simpler ".cgi" approach [fork/exec a new
Lisp process per HTTP request] might be good enough.

There are all sorts of Common Lisp-based persistent application
server infrastructures readily available, some using Apache
[or eqv.] as a front-end, some being full standalone web servers.
See <http://www.cliki.net/web> for a wealth of resources. Peter
Breed's <http://www.cliki.net/A%20Short%20web%20application%20tutorial>
is a good place to start, as are the chapters on Web programming
(Ch. 26, 30, & 31) in Peter Seibel's "Practical Common Lisp"
<http://www.gigamonkeys.com/book/>.


-Rob

p.s. Oh, <http://www.cliki.net/web> also contains pointers to
packages for emitting HTML. I tend to use HTOUT, myself, but
CL-WHO and others are fine as well.

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: memius
Subject: Re: Web-page that does ONE complex thing
Date: 
Message-ID: <1149334400.156783.145910@g10g2000cwb.googlegroups.com>
Thanks! I'll check out the links you guys provided.
From: Zak Wilson
Subject: Re: Web-page that does ONE complex thing
Date: 
Message-ID: <1149358130.303199.42330@h76g2000cwa.googlegroups.com>
memius wrote:
> Thanks! I'll check out the links you guys provided.

Here's another endorsement of TBNL and CL-WHO. Used in conjunction with
Apache and mod-lisp, it's really no harder to spit out web pages than
it is with eruby. It is, of course very easy to integrate the output of
Lisp functions in to html output generated with CL-WHO.
From: Eli Gottlieb
Subject: Re: Web-page that does ONE complex thing
Date: 
Message-ID: <TSqgg.9919$3B.8135@twister.nyroc.rr.com>
memius wrote:
> I am going to build an interactive web-page that has one very big,
> complex function. All the rest will be relatively trivial. I am going
> to code this one function in lisp, but I'm wondering whether to build
> the rest of the page in a more user-friendly language (Ruby), and try
> to interface it, or whether to build the whole thing in lisp. Any
> opinions? Any other language-recommendations for the mundane stuff?
> 
Why does your function need to be embedded within a web page?

-- 
The science of economics is the cleverest proof of free will yet 
constructed.
From: memius
Subject: Re: Web-page that does ONE complex thing
Date: 
Message-ID: <1149508504.977495.215250@i40g2000cwc.googlegroups.com>
> Why does your function need to be embedded within a web page?

Well, my users need to be able to use it, so it must be reachable
through a browser. Perhaps 'embedded in a web page' means something a
little more specific than I thought?