From: Pieter Breed
Subject: Why lisp as a web programming language don't get no (mainstream) love
Date: 
Message-ID: <1141648400.271999.175950@i40g2000cwc.googlegroups.com>
Hi,

It is my opinion that most of the webpages that advocate lisp as a
web-development framework/language/tool/whatever suck (In terms of
eye-friendly-ness). And it is /also/ my opinion that this is not
because of any technical shortcoming.

When I look at these pages they all look like they have been developed
with the use of one of a million html-as-sexp libraries. While I agree
that it is really cool to "execute" or "run" html in you code, it
really sucks to do any decent design with it this way. I mean, lets
face it, the world's best developer is probably not the world's
greatest web-designer too.

In contrast to this, look at most of the Ruby on Rails advocation or
example sites. They are pure eye-candy with nicely designed rounded and
beveled graphics and web 2.0 functionality. They look "designed". They
make people want to use RoR, in other words.

I believe lisp suffers badly here. And to boot, I don't think that it
should. What lisp needs is a library with which you can embed lisp code
into the HTML templates. I am aware of HTML-TEMPLATE and the
functionality it provides, but I think it falls short of what is
needed. Lisp was after all the original tool to write embedded
languages with.

So, instead of /only/ flaming me, what advice can you give for doing
this? Should I be using eval, to execute embedded lisp statements (as
in ERb-style) or is there another way to do this kind of thing?

Regards,
Pieter Breed

From: Petter Gustad
Subject: Re: Why lisp as a web programming language don't get no (mainstream) love
Date: 
Message-ID: <87k6b78mlj.fsf@filestore.home.gustad.com>
"Pieter Breed" <············@gmail.com> writes:

> In contrast to this, look at most of the Ruby on Rails advocation or
> example sites. They are pure eye-candy with nicely designed rounded and
> beveled graphics and web 2.0 functionality. They look "designed". They
> make people want to use RoR, in other words.

I agree that many of the example pages for other frameworks looks
nice. However, I find RoR very cludgy, a collection of scripts to
generate tons of code and xml stuff.

> So, instead of /only/ flaming me, what advice can you give for doing
> this? Should I be using eval, to execute embedded lisp statements (as
> in ERb-style) or is there another way to do this kind of thing?

I like Allego Webactions. I think it's a great framework. You can let
the graphics designers use their favorite tools like Adobe Golive or
whatever for the static HTML stuff. You can consentrate on generating
HTML with CSS support so the grapic designers can make it look nice.

You can read more about Webactions here:

http://opensource.franz.com/aserve/aserve-dist/webactions/doc/webactions.html



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: Simon Brooke
Subject: Re: Why lisp as a web programming language don't get no (mainstream) love
Date: 
Message-ID: <mvpud3-g66.ln1@gododdin.internal.jasmine.org.uk>
in message <··············@filestore.home.gustad.com>, Petter Gustad
(··············@gustad.com') wrote:

> "Pieter Breed" <············@gmail.com> writes:
> 
>> In contrast to this, look at most of the Ruby on Rails advocation or
>> example sites. They are pure eye-candy with nicely designed rounded
>> and beveled graphics and web 2.0 functionality. They look "designed".
>> They make people want to use RoR, in other words.
> 
> I agree that many of the example pages for other frameworks looks
> nice. However, I find RoR very cludgy, a collection of scripts to
> generate tons of code and xml stuff.
> 
>> So, instead of /only/ flaming me, what advice can you give for doing
>> this? Should I be using eval, to execute embedded lisp statements (as
>> in ERb-style) or is there another way to do this kind of thing?
> 
> I like Allego Webactions. I think it's a great framework. You can let
> the graphics designers use their favorite tools like Adobe Golive or
> whatever for the static HTML stuff. You can consentrate on generating
> HTML with CSS support so the grapic designers can make it look nice.
> 
> You can read more about Webactions here:
> 
>
http://opensource.franz.com/aserve/aserve-dist/webactions/doc/webactions.html

"Common Lisp Server Pages is modeled after similar designs for other
languages: Java Server Pages, Active Server Pages, Personal Home Pages
(PHP) and others"

I am convinced that this is diametrically the wrong approach. You should
not be embedding application logic in markup. Content generation and
presentation need to be separated and kept separate.

-- 
·····@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon/

        ;; Want to know what SCO stands for?
        ;; http://ars.userfriendly.org/cartoons/?id=20030605
From: Sascha Matzke
Subject: Re: Why lisp as a web programming language don't get no (mainstream) love
Date: 
Message-ID: <1141744626.174748.23180@z34g2000cwc.googlegroups.com>
Hi,

Simon Brooke wrote:
> I am convinced that this is diametrically the wrong approach. You should
> not be embedding application logic in markup. Content generation and
> presentation need to be separated and kept separate.

As it is done by AllegroServe Webactions - there's no way to write lisp
code in your clp templates. Maybe you should read the whole document -
it's not that long.

Sascha
From: Petter Gustad
Subject: Re: Why lisp as a web programming language don't get no (mainstream) love
Date: 
Message-ID: <87y7zmfxv7.fsf@filestore.home.gustad.com>
Simon Brooke <·····@jasmine.org.uk> writes:

> "Common Lisp Server Pages is modeled after similar designs for other
> languages: Java Server Pages, Active Server Pages, Personal Home Pages
> (PHP) and others"
>
> I am convinced that this is diametrically the wrong approach. You should
> not be embedding application logic in markup. Content generation and
> presentation need to be separated and kept separate.


You don't have to embed application logic in the markup, other than calling a
CLP function.

Let's say you're making a discussion forum. Then you could make a
function which will generate the names and links for the forums like
this:

<h1><a href="forum">Forum</a></h1>

<clp_forum-list/>


The CLP function will return the HTML for the forums with tagged with
CSS so the designer can do the presentation part. The definition of
the the CLP function will be together with the rest of your Common
Lisp code.


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: Simon Brooke
Subject: Re: Why lisp as a web programming language don't get no (mainstream) love
Date: 
Message-ID: <8ah0e3-scf.ln1@gododdin.internal.jasmine.org.uk>
in message <··············@filestore.home.gustad.com>, Petter Gustad
(··············@gustad.com') wrote:

> Simon Brooke <·····@jasmine.org.uk> writes:
> 
>> "Common Lisp Server Pages is modeled after similar designs for other
>> languages: Java Server Pages, Active Server Pages, Personal Home Pages
>> (PHP) and others"
>>
>> I am convinced that this is diametrically the wrong approach. You
>> should not be embedding application logic in markup. Content
>> generation and presentation need to be separated and kept separate.
> 
> 
> You don't have to embed application logic in the markup, other than
> calling a CLP function.
> 
> Let's say you're making a discussion forum. Then you could make a
> function which will generate the names and links for the forums like
> this:
> 
> <h1><a href="forum">Forum</a></h1>
> 
> <clp_forum-list/>
> 
> The CLP function will return the HTML for the forums with tagged with
> CSS so the designer can do the presentation part. The definition of
> the the CLP function will be together with the rest of your Common
> Lisp code.

So the designer - with no training in technical disciplines and no
understanding of the underlying logic - controls which CLP functions are
called, and when, and where. That is (in my experience) the wrong way
round.

-- 
·····@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon/
        ; ... of course nothing said here will be taken notice of by
        ; the W3C. The official place to be ignored is on www-style or
        ; www-html.                                     -- George Lund
From: Sascha Matzke
Subject: Re: Why lisp as a web programming language don't get no (mainstream) love
Date: 
Message-ID: <1141745036.413846.307060@j52g2000cwj.googlegroups.com>
Hi,

Simon Brooke wrote:
> So the designer - with no training in technical disciplines and no
> understanding of the underlying logic - controls which CLP functions are
> called, and when, and where. That is (in my experience) the wrong way
> round.

Why? The designer is the one who decides whether - in this example -
the list of forums is on the left, the right or somewhere else. The
programmer just provides him with a kind of html-extension tag which
controls the output of the information.

The designer does not need to know anything about the underlying logic
- just the fact that the tag <clp_forum-list/> generated the list of
available forums. 

Sascha
From: Alex Mizrahi
Subject: Re: Why lisp as a web programming language don't get no (mainstream) love
Date: 
Message-ID: <440c9fa8$0$15783$14726298@news.sunsite.dk>
(message (Hello 'Pieter)
(you :wrote  :on '(6 Mar 2006 04:33:20 -0800))
(

 PB> that it is really cool to "execute" or "run" html in you code, it
 PB> really sucks to do any decent design with it this way. I mean, lets
 PB> face it, the world's best developer is probably not the world's
 PB> greatest web-designer too.

it's not a modern approach to do any design in html. design should be done 
in css. html should just contain data for it.
so i believe sexrp-to-xhtml is really best approach, html templates with 
code parts are awful :p.

however i see real problems in techincal shortcomings. there's no free lisp 
with stable thread support (on x86 at least). SBCL periodiocally crashes.. 
:( and it supports threads only with linux 2.6 kernel. even commercial 
implementations do not provide kernel threads on all architectures.
complex fancy frameworks like UCW are great theoretically, but performance 
suck and malicious user can crash whole system with ease -- simple ab 
(apache bench) will make it consuming all available mem and starving in GCs.

possibly AllegroCL offers quite stable web-dev framework, but who wants to 
pay 1000+$ just to do web-development in some strange language? afaik it 
even doesn't offer ultra features like continuations..

)
(With-best-regards '(Alex Mizrahi) :aka 'killer_storm)
"People who lust for the Feel of keys on their fingertips (c) Inity") 
From: Rob Warnock
Subject: Re: Why lisp as a web programming language don't get no (mainstream) love
Date: 
Message-ID: <Q--dnY9ar9BDjZDZRVn-sw@speakeasy.net>
Alex Mizrahi <········@users.sourceforge.net> wrote:
+---------------
| however i see real problems in techincal shortcomings. there's no free lisp 
| with stable thread support (on x86 at least). SBCL periodiocally crashes.. 
+---------------

CMUCL doesn't, at least not for me. And I start up a new thread for
each HTTP request...

+---------------
| :( and it supports threads only with linux 2.6 kernel. even commercial 
| implementations do not provide kernel threads on all architectures.
+---------------

I run CMUCL threaded apps on FreeBSD 4.x, Linux 2.4.x, and Linux 2.6.7.

+---------------
| complex fancy frameworks like UCW are great theoretically, but performance 
| suck and malicious user can crash whole system with ease -- simple ab 
| (apache bench) will make it consuming all available mem and starving in GCs.
+---------------

That *might* be true of some uses of UCW, but using my own web-app
framework (coded from scratch while I was learning CL) and CMUCL,
I have never seen that issue. And, yes, I do use "ab" all the time
for benchmarking. It just works.


-Rob

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Alex Mizrahi
Subject: Re: Why lisp as a web programming language don't get no (mainstream) love
Date: 
Message-ID: <440ec086$0$15791$14726298@news.sunsite.dk>
(message (Hello 'Rob)
(you :wrote  :on '(Mon, 06 Mar 2006 22:49:34 -0600))
(

RW> CMUCL doesn't, at least not for me. And I start up a new thread for
RW> each HTTP request...

CMUCL has not kernel threads but user-level self-scheduled threads that
isn't that interesting.
as i remember it either runs as in manual-scheduled mode or in mode
scheduled with alarm signal. first is not interesting at all, second is 
better, but not really what is wanted from threads.. as i remember, 
signal-based thread scheduling is said to be unreliable in CMUCL sources. it 
might work if you do some testing, but when you run into debugger, or some 
GC occurs, ffi call or whatever it may once crash..

in Allegro CL documentation it's said
---
In the virtual thread (non :os-threads) model, foreign code is not 
interruptible and Lisp code cannot run until the foreign code returns 
control to Lisp, either by completing or by calling back to Lisp.
---

and i don't think CMUCL works somehow better than Allegro CL.
if ffi calls are not interuptible threads make very few sence -- if one 
thread is blocked with some blocking call (i/o or whatever), whole system is 
blocked.

RW> That *might* be true of some uses of UCW, but using my own web-app
RW> framework (coded from scratch while I was learning CL) and CMUCL,
RW> I have never seen that issue. And, yes, I do use "ab" all the time
RW> for benchmarking. It just works.

UCW keeps lots of data for each user click -- continuations etc. it's 
obvious you can live without that fancy stuff, but it's not that 
interesting -- if you want to code in simple CGI manner, it's better to use 
PHP, i think :)

)
(With-best-regards '(Alex Mizrahi) :aka 'killer_storm)
"People who lust for the Feel of keys on their fingertips (c) Inity")
From: Petter Gustad
Subject: Re: Why lisp as a web programming language don't get no (mainstream) love
Date: 
Message-ID: <87y7zlducn.fsf@filestore.home.gustad.com>
"Alex Mizrahi" <········@users.sourceforge.net> writes:

> UCW keeps lots of data for each user click -- continuations etc. it's 
> obvious you can live without that fancy stuff, but it's not that 
> interesting -- if you want to code in simple CGI manner, it's better to use 
> PHP, i think :)

Well he said he had his own web-app framework. Allegro Webactions has
websessions where you can store data associated with the user session.

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: Rob Warnock
Subject: Re: Why lisp as a web programming language don't get no (mainstream) love
Date: 
Message-ID: <t8adnY6Ff8bBaJLZRVn-jQ@speakeasy.net>
Petter Gustad  <·············@gustad.com> wrote:
+---------------
| "Alex Mizrahi" <········@users.sourceforge.net> writes:
| > UCW keeps lots of data for each user click -- continuations etc. it's 
| > obvious you can live without that fancy stuff, but it's not that 
| > interesting -- if you want to code in simple CGI manner, it's better to use 
| > PHP, i think :)
| 
| Well he said he had his own web-app framework. Allegro Webactions has
| websessions where you can store data associated with the user session.
+---------------

Yup. And my little web-app framework has a BUILD-CONTINUATION function
that drops one or more <INPUT TYPE=HIDDEN> form data items into the
page currently being output. This allows writing in the flavor of
CPS web app style, albeit without the full generality of the formalism.

It also automatically propagates a small number of "sticky" session
variables, such as debug state and effective-authorization state.
The latter lets "web superusers" execute the app as if they were a
less-privileged user, for development/testing purposes. Note that
because it uses hidden form data, the "state" is in the page being
viewed, *not* the browser instance or the "user login session".
So users can have multiple windows open to the site which are
traversing different paths through the app. [This is "the right
thing" for most apps, though not all.]


-Rob

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Marc Battyani
Subject: Re: Why lisp as a web programming language don't get no (mainstream) love
Date: 
Message-ID: <M8ydnaXIO4l7KpHZRVnyjA@giganews.com>
"Alex Mizrahi" <········@users.sourceforge.net> wrote

> it's not a modern approach to do any design in html. design should be done 
> in css. html should just contain data for it.
> so i believe sexrp-to-xhtml is really best approach, html templates with 
> code parts are awful :p.

Yes, and the best way to use the HTML written by the graphical artists is to 
convert into sexpr based representation that can be hacked in any decent 
editor to insert your code in it.
You can then use it with your favorite HTML macro. If you don't have one 
yet, have a look at http://www.cl-user.net/asp/tags/html-macros
There is an HTML parser with HTML-GEN.

> however i see real problems in techincal shortcomings. there's no free 
> lisp with stable thread support (on x86 at least). SBCL periodiocally 
> crashes.. :( and it supports threads only with linux 2.6 kernel. even 
> commercial implementations do not provide kernel threads on all 
> architectures.
> complex fancy frameworks like UCW are great theoretically, but performance 
> suck and malicious user can crash whole system with ease -- simple ab 
> (apache bench) will make it consuming all available mem and starving in 
> GCs.
>
> possibly AllegroCL offers quite stable web-dev framework, but who wants to 
> pay 1000+$ just to do web-development in some strange language? afaik it 
> even doesn't offer ultra features like continuations..

The Lisp servers stability is very good IMO. I don't know why some people 
complain continuously about that. The Lisp process for 
www.fractalconcept.com has never crashed in several years and is restarted 
only when the Debian box on which it runs is rebooted. The Common Lisp 
Directory server run on the same box and has never crashed since I started 
its development in December. It has never been restarted as well even though 
I have completely changed the server a lot of times with lots of CLOS 
classes changes, design changes, etc. The other Lisp servers I know like 
CLiki or the ALU Wiki seems pretty stable too.

And BTW continuations are a Scheme feature, not an ultra feature...

Marc 
From: Petter Gustad
Subject: Re: Why lisp as a web programming language don't get no (mainstream) love
Date: 
Message-ID: <87slpufxnp.fsf@filestore.home.gustad.com>
"Marc Battyani" <·············@fractalconcept.com> writes:

> The Lisp servers stability is very good IMO. I don't know why some
> people complain continuously about that. The Lisp process for

Ditto. I've had a portable allegroserve web application running under
cmucl/linux for a couple years. It does not carry a heavy load, only
twenty people logging in and entering some accounting information.
However, it has never crashed. The current uptime (100+ days) is since
they took the power down for maintenance in the building.

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: Matthew D Swank
Subject: Re: Why lisp as a web programming language don't get no (mainstream) love
Date: 
Message-ID: <pan.2006.03.09.20.18.31.906806@c.net>
On Mon, 06 Mar 2006 23:30:21 +0100, Marc Battyani wrote:

> And BTW continuations are a Scheme feature, not an ultra feature...

and a Smalltalk feature (contexts), and a Ruby feature... 

I know there are difficulties for compiler writers, but a
vendor/implementor that could provide built-in, efficient call/cc support
would be a boon for lispers everywhere.  

I wonder, would it be less of a burden to implement delimited
continuations?     

Matt

-- 
"You do not really understand something unless you can
 explain it to your grandmother." — Albert Einstein.
From: Tim Johnson
Subject: Re: Why lisp as a web programming language don't get no (mainstream) love
Date: 
Message-ID: <slrne1p8ap.snu.tim@linus.johnson.com>
On 2006-03-06, Pieter Breed <············@gmail.com> wrote:
Hello Pieter:

> In contrast to this, look at most of the Ruby on Rails advocation or
> example sites. They are pure eye-candy with nicely designed rounded and
> beveled graphics and web 2.0 functionality. They look "designed". They
> make people want to use RoR, in other words.

 I'm a web programmer, not a designer, and believe me, good design gets
 people's attention. It's sad but true. I maintain one website tho',
 which is very succeful and has a very amateurish look and hasn't been
 changed since 1999.

 The reason that it is successful is that it provides *good data*.

> I believe lisp suffers badly here. And to boot, I don't think that it
> should. What lisp needs is a library with which you can embed lisp code
> into the HTML templates. 

  I use a very different approach. I have a system that parses a
  document with some cues in comment tags, others as either
  "pseudo-attributes" or special characters in names. It contains no
  logical structures and such a an original document would render in
  WYSIWYG fashion in any browser (although it would give a HTML
  Validator fits with the pseudo-attributes).

  These simple cues are used by a parser (written in rebol, which is
  very lisp-influenced) that generates
  1)Javascript
  2)MySQL script
  3)Python data structures
  4)Python format strings with named-value formatting. Example:
    (print "this is %(func())%" as opposed to 
	 print "this is %s" % func()))
  This output is used for dynamic content generation, dhtml, database
  inteface and validation.

  Works very well for me. The nice thing about it is that it allows a
  non-programmer to take full charge of the design, and not have to
  worry about programming language logic. The content "cues" are simple
  and don't interfere with rendering of the original.

  Templates don't have to be the only approach, and this could work
  for/with lisp as well as the languages I use. The approach is pretty
  agnostic.

  MTCW
  Tim

> So, instead of /only/ flaming me, what advice can you give for doing
> this? Should I be using eval, to execute embedded lisp statements (as
> in ERb-style) or is there another way to do this kind of thing?

 Using my approach above - as an example - one would start with an HTML
 document with simple cues as above, and then generate lisp function
 calls.... 

> Regards,
> Pieter Breed

 Just a different way of thinking about the problem.

-- 
Tim Johnson <···@johnsons-web.com>
      http://www.alaska-internet-solutions.com