From: =?ISO-8859-15?Q?Torsten_Z=FChlsdorff?=
Subject: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <450021bf$0$17403$9b4e6d93@newsspool2.arcor-online.net>
Hello,

i am a german developer which reads this newsgroup for some month. Sadly
reading english is easier for me, than writting it ;) So i hope you can
understand me.

First some words to me: I am 23 year old boy and write programms nearly
since 9 years. The last years i have specialced at the development of
internet applikations - often with php.
The last 3 years i develop a framework for the easy implementation of
browsergames. All in PHP It is damend small, fast and really nice. The
best PHP-Code i every see ;)

But now i want to do something in lisp, because lisp really impress me.
So i want to perform some webdevelopment (if i ever get tbnl run ^^),
but i do not want to fail on the differences between the development
methods in php and lisp. Therefore i ask for them.

In PHP a Script is called, i include needed other scripts, parse and
analyse config files, manage db-connections, evaluate the input, work on
the input and so on.

I have read, that lisp is "always" running while the php-script is at
his end after some milliseconds and will start again at the next call -
right?
I have seen, that lisp has his own html-output-"implementation". Can i
work with xml/xslt or other templates?
And what are other differences in developing webapplikations in PHP or LISP?

Greetings from Germany,
Torsten

From: Robert Uhl
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <m3irjzkbb0.fsf@NOSPAMgmail.com>
Torsten Zühlsdorff <············@arcor.de> writes:
>
> i am a german developer which reads this newsgroup for some
> month. Sadly reading english is easier for me, than writting it ;) So
> i hope you can understand me.

No worries--your English is better than my German.

> But now i want to do something in lisp, because lisp really impress
> me.  So i want to perform some webdevelopment (if i ever get tbnl run
> ^^), but i do not want to fail on the differences between the
> development methods in php and lisp. Therefore i ask for them.

Always a good idea.  Also, bear in mind that there are several different
Lisp web development environments: the key is to find one which works
similarly to the way you think.  If TBNL does that for you, excellent.

> In PHP a Script is called, i include needed other scripts, parse and
> analyse config files, manage db-connections, evaluate the input, work
> on the input and so on.
>
> I have read, that lisp is "always" running while the php-script is at
> his end after some milliseconds and will start again at the next call
> - right?

You _could_ configure your webserver to start a Lisp process which would
load itself, load a script then generate output--but the overhead would
be insane.  From what I can discern the typical pattern is to have a
Lisp webserver running constantly (and generally hidden behind Apache or
some other server), which responds to user requests as needed.
Depending on the paradigm, the webserver might have scripts or templates
which it executes, and these might be reloaded when updated on disk.

> I have seen, that lisp has his own html-output-"implementation". Can i
> work with xml/xslt or other templates?

There are several HTML-output languages, from those which operate inside
of Lisp, perhaps by calling some macro with arguments representing the
code, e.g.:

  (html
    (:html
      (:head (:title "Foo"))
      ((:body lang "en-GB")
        (:p "Bar baz quuz"))))

To those which involve external template files which call Lisp
functions, e.g.:

  <html>
  <head><title><page_title/></title></head>
  
  <body lang="<page_language />">
  <page_content/>
  </body>
  </html>

To those which involve external templates which just do simple variable
substitution:

  <html>
  <head><title><% title %></title></head>
  <body lang="<% lang %>">
  <% page_content %>
  </body>
  </html>

Generally these approaches can be mixed together as you like, although
of course doing so adds a certain amount of complexity.

To more directly answer your question, you can see that you can generate
anything, not just HTML.  So you could generate XML if desired.  I'm
frankly not certain if there are XML-manipulation libraries available,
but I imagine so.

> And what are other differences in developing webapplikations in PHP or
> LISP?

Well, for one thing the default Common Lisp database library doesn't
seem to have the security issues that PHP database access methods have,
which is nice.

OTOH, PHP seems to have a lot more libraries out-of-the box.  There are
some very nice CL libraries out there, but finding them can be
interesting.  Your countryman Dr. Edi Weitz writes some absolutely
excellent Lisp code (including TBNL, so I'm guessing you've seen his
name before); his site <http://weitz.de/> is well-worth a look when
you're searching for libraries.

But I think the biggest hurdle for you will be the different web
paradigm between PHP and Lisp.  Once you get over that, I believe you'll
really enjoy programming Common Lisp.

Tschuß!

-- 
Robert Uhl <http://public.xdi.org/=ruhl>
...the world's richest Chief Software Architect continues a record for design
elegance unmatched since the Yugo.          --re. Windows XP, Forbes Magazine
From: =?UTF-8?B?VG9yc3RlbiBaw7xobHNkb3JmZg==?=
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <45003737$0$5145$9b4e6d93@newsspool1.arcor-online.net>
Robert Uhl schrieb:

>>i am a german developer which reads this newsgroup for some
>>month. Sadly reading english is easier for me, than writting it ;) So
>>i hope you can understand me.
> 
> No worries--your English is better than my German.

Thank you - i will keep this in mind ;)

>>But now i want to do something in lisp, because lisp really impress
>>me.  So i want to perform some webdevelopment (if i ever get tbnl run
>>^^), but i do not want to fail on the differences between the
>>development methods in php and lisp. Therefore i ask for them.
> 
> Always a good idea.  Also, bear in mind that there are several different
> Lisp web development environments: the key is to find one which works
> similarly to the way you think.  If TBNL does that for you, excellent.

Ok. Till now i was not able to get TBNL work. So there is enough
flexibility to check some other environments ;)
Which else there are?

>>I have seen, that lisp has his own html-output-"implementation". Can i
>>work with xml/xslt or other templates?
> 
> There are several HTML-output languages, from those which operate inside
> of Lisp, perhaps by calling some macro with arguments representing the
> code, e.g.:
> 
>   [example-code]
> 
> To those which involve external template files which call Lisp
> functions, e.g.:
> 
>   [example-code]
> 
> To those which involve external templates which just do simple variable
> substitution:
> 
>   <html>
>   <head><title><% title %></title></head>
>   <body lang="<% lang %>">
>   <% page_content %>
>   </body>
>   </html>
> 
> Generally these approaches can be mixed together as you like, although
> of course doing so adds a certain amount of complexity.
> 
> To more directly answer your question, you can see that you can generate
> anything, not just HTML.  So you could generate XML if desired.  I'm
> frankly not certain if there are XML-manipulation libraries available,
> but I imagine so.

Some time ago, i used a template engine which do variable substitution
on a higher level. It support loops and conditions, but later i tend to
use XML/XSLT, because there is now a native support by PHP.
I will look for such libraries for LISP.

>>And what are other differences in developing webapplikations in PHP or
>>LISP?
> 
> Well, for one thing the default Common Lisp database library doesn't
> seem to have the security issues that PHP database access methods have,
> which is nice.

Yes, but i think that the commun problems which interactive Webpages
like Session-Hijacking&-Fixation, RCE, SQL-Injection will not be safed
by LISP ? ;)

> OTOH, PHP seems to have a lot more libraries out-of-the box.  There are
> some very nice CL libraries out there, but finding them can be
> interesting.  Your countryman Dr. Edi Weitz writes some absolutely
> excellent Lisp code (including TBNL, so I'm guessing you've seen his
> name before); his site <http://weitz.de/> is well-worth a look when
> you're searching for libraries.

Yes - i know the site and already have bookmarked it.
I try the tutorial to install TBNL, but i have problems with installing
Araneida at the moment. The installation of mod_lisp2 was no problem,
but Araneida seems to need a working lisp. I have clisp on my Mandriva
Linux, but if i use the given commands, clisp mentioned that there is no
asdf.
Slowly i understand why so many people say, that the first hurd to lisp
is to get a lisp-environment run.

> But I think the biggest hurdle for you will be the different web
> paradigm between PHP and Lisp.  Once you get over that, I believe you'll
> really enjoy programming Common Lisp.

Till now i believe (and hope) that i can take this hurd, because i love
to programm in different paradigm and languages. We will see :)

Thank for your help,

> Tschuß!
Tschueß!

Torsten
From: Robert Uhl
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <m3u03jijyw.fsf@NOSPAMgmail.com>
Torsten Zühlsdorff <············@arcor.de> writes:
>
> Ok. Till now i was not able to get TBNL work. So there is enough
> flexibility to check some other environments ;) Which else there are?

Araneida is a nice little web server; then there's AllegroServe or
Portable AllegroServe (I use the latter with the WebActions framework);
and there're TNBL and UnCommon Web and KPAX & CL-HTTP which all
immediately come to mind.  There're probably more, too.  CLiki is your
friend:-)

>> Well, for one thing the default Common Lisp database library doesn't
>> seem to have the security issues that PHP database access methods
>> have, which is nice.
>
> Yes, but i think that the commun problems which interactive Webpages
> like Session-Hijacking&-Fixation, RCE, SQL-Injection will not be safed
> by LISP ? ;)

Well, I was referring to SQL injection, which I _believe_ CLSQL is
immune from so long as you aren't deliberately dumb.

Session hijacking is at the TCP level (and I'm guessing so is RCE), so
no, Lisp buys you nothing there--nor would any other language.

> The installation of mod_lisp2 was no problem, but Araneida seems to
> need a working lisp.

That stands to reason, since it's written in Lisp:-)

> I have clisp on my Mandriva Linux, but if i use the given commands,
> clisp mentioned that there is no asdf.

Here's where the Internet makes life easy.  I googled "clisp asdf" and
one of the links was to <http://www.cliki.net/asdf>, which has links to
the source code and a howto.  Once you have it installed, it's pretty
easy to use.

Basically, there's a variable asdf:*central-registry* which lists
everywhere ASDF will look for system definitions (*.asd files); you make
sure that your system definition for araneida is somewhere in one of the
directories in *central-registry* and Bob's your uncle.

> Slowly i understand why so many people say, that the first hurd to
> lisp is to get a lisp-environment run.

Fortunately there's a new tool called asdf-install which automates a lot
of that.  Get it working, and then all you'll need to do to install
araneida is (asdf-install:install :araneida).  This will download all
the dependencies for you.

>> Tschuß!
> Tschueß!

Doh!  You see what I meant when I referred to my poor German.  It's been
over a dozen years since I took any.

-- 
Robert Uhl <http://public.xdi.org/=ruhl>
No one has even begun to understand comradeship who does not accept
with it a certain hearty eagerness in eating, drinking or smoking, an
uproarious materialism which to many women appears only hoggish.
                                              --G.K. Chesterton
From: =?UTF-8?B?VG9yc3RlbiBaw7xobHNkb3JmZg==?=
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <450124a6$0$26951$9b4e6d93@newsspool4.arcor-online.net>
Robert Uhl schrieb:

>>Ok. Till now i was not able to get TBNL work. So there is enough
>>flexibility to check some other environments ;) Which else there are?
> 
> Araneida is a nice little web server; then there's AllegroServe or
> Portable AllegroServe (I use the latter with the WebActions framework);
> and there're TNBL and UnCommon Web and KPAX & CL-HTTP which all
> immediately come to mind.  There're probably more, too.  CLiki is your
> friend:-)

That means that i need a little web server behind my apache-webserver?

I found CL-HTTP, too. I will take a closer look to it. At the weekend
there is hopefully more time, to test a little more than now.

>>>Well, for one thing the default Common Lisp database library doesn't
>>>seem to have the security issues that PHP database access methods
>>>have, which is nice.
>>
>>Yes, but i think that the commun problems which interactive Webpages
>>like Session-Hijacking&-Fixation, RCE, SQL-Injection will not be safed
>>by LISP ? ;)
> 
> Well, I was referring to SQL injection, which I _believe_ CLSQL is
> immune from so long as you aren't deliberately dumb.

Is CLSQL a part/libaray/included in the mentioned environments. How
about CLOS?

> Session hijacking is at the TCP level (and I'm guessing so is RCE), so
> no, Lisp buys you nothing there--nor would any other language.

When you say "at the TCP level" it sounds harder than it is. Just
changing some cookie-values or urls.
The questions was a little ironically, because the stealing of sessions
and the injection of code in different ways is often a since for a bad
programmer (or a too short night or many other reasons). I do not really
beleave, that a language can protect us before this.

>>The installation of mod_lisp2 was no problem, but Araneida seems to
>>need a working lisp.
> 
> That stands to reason, since it's written in Lisp:-)

Too late i notice, that the sentence of the installation-guide "You need
an SBCL that has asdf loaded into it" could be a very important
information :)
I feel a little like 14, when i start programming and every name and
shortcut was a new mysterios thing.

>>I have clisp on my Mandriva Linux, but if i use the given commands,
>>clisp mentioned that there is no asdf.
> 
> Here's where the Internet makes life easy.  I googled "clisp asdf" and
> one of the links was to <http://www.cliki.net/asdf>, which has links to
> the source code and a howto.  Once you have it installed, it's pretty
> easy to use.

I found this site too, but i always read about the needing of SBCL.
Otherwise it took a loooong time to see one of the linked site (between
5 and 15 minutes).

>>>Tschuß!
>>
>>Tschueß! 
> 
> Doh!  You see what I meant when I referred to my poor German.  It's been
> over a dozen years since I took any.

I just thought you have make a writing misstake and know the umlaut. If
you do not have written this, i would not have realized it. ;)
But i really nice gesture of you :)

Bye,
Torsten
From: Rob Warnock
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <aZCdnV1SJ7pN3pzYnZ2dnUVZ_sKdnZ2d@speakeasy.net>
Torsten Zühlsdorff  <············@arcor.de> wrote:
+---------------
| Robert Uhl schrieb:
| > Araneida is a nice little web server; then there's AllegroServe or
| > Portable AllegroServe (I use the latter with the WebActions framework);
| > and there're TNBL and UnCommon Web and KPAX & CL-HTTP which all
| > immediately come to mind.  There're probably more, too.  CLiki is your
| > friend:-)
| 
| That means that i need a little web server behind my apache-webserver?
+---------------

Well, yes, but... The "little web server behind Apache" is more like
a "little CGI server" than a full "web server" per se. It doesn't have
to handle the full range of HTTP request types; doesn't have to serve up
static files & images (if you don't want it to); doesn't have to handle
SSL (you can let Apache do that). Have you ever looked at FastCGI or
"mod_jserv"?  Well, "mod_lisp" <http://www.cliki.net/mod_lisp> is like
those, but simpler. There's a tiny piece that goes inside Apache that
talks to your Lisp server (over a socket) only when the right kind of
request comes to the Apache server.

[Actually, if you're in an environment where you *don't* control your
web server but you *are* allowed to run CGI scripts/programs and leave
persistent daemon processes running, you can use "mod_proxy" or FastCGI
or even (as I do) a small C program that runs as a CGI but then connects
to a local-domain socket to talk "mod_lisp" protocol to the Lisp server.]

But, yes. The most common way of using Lisp in web servers is for Lisp
to run as a persistent daemon process -- either as a full web server
[like CL-HTTP] or behind some other full web server (e.g., Apache).

However, for prototyping or development, it *is* possible to run Lisp
as a traditional CGI program, firing up a whole new process for every
web request. And if you build a special "heap image" file that has all
of your web infrastructure already in it, that doesn't have to be *too*
horribly slow -- I've gotten ~6 requests/sec with CLISP and ~7 requests/sec
with CMUCL [same demo program in both cases]. This is (just barely) fast
enough for you to get a taste of what doing web apps in Lisp is like.

But with my little C-based CGI program that connect to a persistent
CMUCL process, I get ~70 requests/sec. I haven't used "mod_lisp" myself,
but I've heard that several hundred requests/sec is possible with it.
Hmmm... On the "tbnl-devel" list, Marc Battyani reported 440 req/s for
a fixed reply, if you enable the option that keeps the socket open
between multiple requests. That's *fast*!


-Rob

p.s. The pages used for the "traditional CGI" timing results above
and the "C-based-socket-trampoline + persistent-CMUCL-daemon" result
can be found below, including the application source code [though
not the infrastructure code yet, sorry]:

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

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Robert Uhl
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <m3hczih9ia.fsf@NOSPAMgmail.com>
Torsten Zühlsdorff <············@arcor.de> writes:
>
> That means that i need a little web server behind my apache-webserver?

No, but that's the way many of them work.  mod_lisp takes another
approach--it talks directly from Apache to a running Lisp instance--but
frankly I never had much luck getting it working under my setup.  And
it's kinda nice having a little web server--makes testing and
development a bit easier.

A similar setup is used for Pylons, a Python web development framework:
the paste web server is run behind the scenes and Apache (or whatever)
sits in front of it.

You could if you wanted _just_ run the Lisp webserver, but I like having
Apache in front, as it offers a lot of nice features.

> Is CLSQL a part/libaray/included in the mentioned environments. How
> about CLOS?

CLSQL is a package available online; Google will lead you to it, or
(once you have asdf & asdf-install working) you can simply run
(asdf-install:install :clsql).

>> Session hijacking is at the TCP level (and I'm guessing so is RCE), so
>> no, Lisp buys you nothing there--nor would any other language.
>
> When you say "at the TCP level" it sounds harder than it is. Just
> changing some cookie-values or urls.

Ah, you meant web sessions.  I'm not familiar with the mechanism, so I
Googled a bit and the only references were to TCP/IP session hijacking.

> The questions was a little ironically, because the stealing of
> sessions and the injection of code in different ways is often a since
> for a bad programmer (or a too short night or many other reasons). I
> do not really beleave, that a language can protect us before this.

I daresay that you're probably correct, although I will note that, at
least for those Lisp frameworks I've used which provide sessions, one
doesn't need to write one's own session code--and hence one can rely on
the time and effort of someone else.  So you & I needn't be great
programmers--just the guy who writes the framework.

>>>I have clisp on my Mandriva Linux, but if i use the given commands,
>>>clisp mentioned that there is no asdf.
>> 
>> Here's where the Internet makes life easy.  I googled "clisp asdf"
>> and one of the links was to <http://www.cliki.net/asdf>, which has
>> links to the source code and a howto.  Once you have it installed,
>> it's pretty easy to use.
>
> I found this site too, but i always read about the needing of SBCL.

Well, different packages support different implementations.  So if you
use several packages then you can only use an implementation supported
by _all_ of them (in mathematical terms you're limited to the
intersection of the sets of supported implementations).  Today in the
free Lisp world it appears that the most commonly supported
implementations are SBCL and clisp.

> Otherwise it took a loooong time to see one of the linked site
> (between 5 and 15 minutes).

CLiki?  Are you on a slow link?  It's typically very fast for me.
Perhaps it's undergoing maintenance or is under attack from some script
kiddies.

-- 
Robert Uhl <http://public.xdi.org/=ruhl>
One foot is approximately the distance travelled by light in one nanosecond.
One metre is the distance travelled by light in 3.335641... nanoseconds.
Which is more scientific?
From: =?UTF-8?B?VG9yc3RlbiBaw7xobHNkb3JmZg==?=
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <45015dda$0$17391$9b4e6d93@newsspool2.arcor-online.net>
Robert Uhl schrieb:

>>That means that i need a little web server behind my apache-webserver?
> 
> No, but that's the way many of them work.  mod_lisp takes another
> approach--it talks directly from Apache to a running Lisp instance--but
> frankly I never had much luck getting it working under my setup.  And
> it's kinda nice having a little web server--makes testing and
> development a bit easier.

Because i am a webdeveloper there are 4 complete web-environments with
different configurations on my computer and i switch to the one i need.
That makes live easy, too.

> You could if you wanted _just_ run the Lisp webserver, but I like having
> Apache in front, as it offers a lot of nice features.

I will try this way.

>>>Session hijacking is at the TCP level (and I'm guessing so is RCE), so
>>>no, Lisp buys you nothing there--nor would any other language.
>>
>>When you say "at the TCP level" it sounds harder than it is. Just
>>changing some cookie-values or urls.
> 
> 
> Ah, you meant web sessions.  I'm not familiar with the mechanism, so I
> Googled a bit and the only references were to TCP/IP session hijacking.
> 
>>The questions was a little ironically, because the stealing of
>>sessions and the injection of code in different ways is often a since
>>for a bad programmer (or a too short night or many other reasons). I
>>do not really beleave, that a language can protect us before this.
> 
> I daresay that you're probably correct, although I will note that, at
> least for those Lisp frameworks I've used which provide sessions, one
> doesn't need to write one's own session code--and hence one can rely on
> the time and effort of someone else.  So you & I needn't be great
> programmers--just the guy who writes the framework.

I have read this, too. But this do not avoid the normaly
hacking-methods, because you can steal Websessions by many ways:
guessing the session-id, use undestroyed sessions, use man-of-the-middle
to log the session-id and so on. Often the user of a website paste a
link into the internet and at the end of the link stands the session-id.
Therefore it is not possible to use standard session-handling. You are
forced to change the session-id each time, have some changing values in
cookies and have to watch if some data of user (for example the used
browser) change. After this you have a little more security and there
are enough methods over to hack throught sessions.

Also i am interessting in the method handling the sessions. In PHP there
is a text-file with serialzed session-data. One file for every sessions.
That could be a problem, when there are many (experience says over
100.000) sessions at the same time, because than the
file-system/harddisk get slow. Because of this i often use a selfwritten
session-managment based on a database. A good alternative is
session-management at a dedicated server by storing them into RAM.

But i will look at the manual of the framework to discover how the
framework work ;)

>>>>I have clisp on my Mandriva Linux, but if i use the given commands,
>>>>clisp mentioned that there is no asdf.
>>>
>>>Here's where the Internet makes life easy.  I googled "clisp asdf"
>>>and one of the links was to <http://www.cliki.net/asdf>, which has
>>>links to the source code and a howto.  Once you have it installed,
>>>it's pretty easy to use.
>>
>>I found this site too, but i always read about the needing of SBCL.
> 
> Well, different packages support different implementations.  So if you
> use several packages then you can only use an implementation supported
> by _all_ of them (in mathematical terms you're limited to the
> intersection of the sets of supported implementations).  Today in the
> free Lisp world it appears that the most commonly supported
> implementations are SBCL and clisp.

Fine. At the moment i am compiling sbcl. :)

>>Otherwise it took a loooong time to see one of the linked site
>>(between 5 and 15 minutes).
> 
> CLiki?  Are you on a slow link?  It's typically very fast for me.
> Perhaps it's undergoing maintenance or is under attack from some script
> kiddies.

Cliki is always fast, but i have problems with:
http://sbcl.sourceforge.net/. But i already have the data i need.

I wish you a comfortable weekend,
Torsten
From: Stefan Scholl
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <1T3euelrIfj3Nv8%stesch@parsec.no-spoon.de>
Torsten Z�hlsdorff <············@arcor.de> wrote:
> I found CL-HTTP, too. I will take a closer look to it. At the weekend

Oh, times have really changed. One can find CL-HTTP.
From: Stefan Nobis
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <87odtrk5i9.fsf@snobis.de>
Torsten Zühlsdorff <············@arcor.de> writes:

> flexibility to check some other environments ;)
> Which else there are?

Hmmm... I can think of Webactions (based on (portable) AllegroServe),
UCW and TBNL. Most other frameworks (that I looked at) are based on
one of these three.

I like TBNL mainly because of two reasons: It's easy to control the
URLs and not too many dependencies. UCW has the (dis)advantage to go
quite a different route like classic approches (namley using
continuations) -- quite enlightening to take a look at.

> but later i tend to use XML/XSLT

Uh, I really dislike XML, but it surely has it's applications.

> clisp mentioned that there is no asdf.

Tried (require 'asdf)? Is ASDF installed?

-- 
Stefan.
From: =?UTF-8?B?VG9yc3RlbiBaw7xobHNkb3JmZg==?=
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <450120f5$0$17391$9b4e6d93@newsspool2.arcor-online.net>
Stefan Nobis schrieb:

>>flexibility to check some other environments ;)
>>Which else there are? 
> 
> Hmmm... I can think of Webactions (based on (portable) AllegroServe),
> UCW and TBNL. Most other frameworks (that I looked at) are based on
> one of these three.

Do you know something about CL-HTTP?

>>but later i tend to use XML/XSLT
> 
> Uh, I really dislike XML, but it surely has it's applications.

I am not a friend of XML, too. It is the first time, XML make sence to
me. You can easly but Data together to an XML-String and combine it with
any XSLT-Scheme. If you want another look for your website, just use
another XSL(T). Another advantage is caching it.

>>clisp mentioned that there is no asdf.
> 
> Tried (require 'asdf)? Is ASDF installed?

Yes. "There is no file with the name asdf". I will try to get sbcl. That
 should work - if the documentation is right ;)

Torsten
From: Pascal Bourguignon
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <87bqpq13ri.fsf@thalassa.informatimago.com>
Torsten Z�hlsdorff <············@arcor.de> writes:
>>>clisp mentioned that there is no asdf.
>> 
>> Tried (require 'asdf)? Is ASDF installed?
>
> Yes. "There is no file with the name asdf". I will try to get sbcl. That
>  should work - if the documentation is right ;)

So, why didn't you tell it where to find the file?

Remember, REQUIRE:
1- is deprecated
2- has no specified behavior when only given one argument.

Try:  (require 'asdf #P"PACKAGES;NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP")
or:   (require 'asdf #P"/usr/local/shared/lisp/where/you/downloaded/asdf.lisp")

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Cats meow out of angst
"Thumbs! If only we had thumbs!
We could break so much!"
From: Thomas A. Russ
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <ymifyey8gap.fsf@sevak.isi.edu>
Pascal Bourguignon <···@informatimago.com> writes:

> Try:  (require 'asdf #P"PACKAGES;NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP")

Does this need to have a logical pathname host in it?  Should the
semi-colon (;) after "PACKAGES" actually a colon (:) instead?

-- 
Thomas A. Russ,  USC/Information Sciences Institute
From: Pascal Bourguignon
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <874pvdveuj.fsf@thalassa.informatimago.com>
···@sevak.isi.edu (Thomas A. Russ) writes:

> Pascal Bourguignon <···@informatimago.com> writes:
>
>> Try:  (require 'asdf #P"PACKAGES;NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP")
>
> Does this need to have a logical pathname host in it?  Should the
> semi-colon (;) after "PACKAGES" actually a colon (:) instead?

Oops! Yes, it should be #P"PACKAGES:NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP"

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"Remember, Information is not knowledge; Knowledge is not Wisdom;
Wisdom is not truth; Truth is not beauty; Beauty is not love;
Love is not music; Music is the best." -- Frank Zappa
From: Torsten Zühlsdorff
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <45066c1a$0$26949$9b4e6d93@newsspool4.arcor-online.net>
Pascal Bourguignon schrieb:

>>>Try:  (require 'asdf #P"PACKAGES;NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP")
>>
>>Does this need to have a logical pathname host in it?  Should the
>>semi-colon (;) after "PACKAGES" actually a colon (:) instead?
> 
> Oops! Yes, it should be #P"PACKAGES:NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP"

That doesn't work, too. I believe my clisp is broken -.-

Bye,
Torsten
From: Pascal Bourguignon
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <87r6yhfibk.fsf@thalassa.informatimago.com>
Torsten Z�hlsdorff <············@arcor.de> writes:

> Pascal Bourguignon schrieb:
>
>>>>Try:  (require 'asdf #P"PACKAGES;NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP")
>>>
>>>Does this need to have a logical pathname host in it?  Should the
>>>semi-colon (;) after "PACKAGES" actually a colon (:) instead?
>> 
>> Oops! Yes, it should be #P"PACKAGES:NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP"
>
> That doesn't work, too. I believe my clisp is broken -.-

With logical pathname, you'd have first to set a logical host and a
translation mapping these logical pathnames to physical pathnames.


Now, (SETF LOGICAL-PATHNAME-TRANSLATIONS) expects the logical
pathnames given in its arguments  to be pathnames WITH an existing
logical host.  But the only way to create a logical host, is to set
the logical-pathname-translations for this host!  (Anything else is
implementation dependant, and it really is!)  This sounds self
referential, but happily we can set the logical-pathname-translations
to NIL first, to create the logical host.

The second point is that the way versions are not implemented on POSIX
systems is also implementation dependant.  So the actual incantation
must vary from implemetation to implementation.

(LET ((HOST "PACKAGES"))
   (IGNORE-ERRORS (SETF (LOGICAL-PATHNAME-TRANSLATIONS HOST) NIL))
   (SETF (LOGICAL-PATHNAME-TRANSLATIONS HOST)
          #+sbcl 
          '((#P"PACKAGES:**;*.*.*" "/usr/local/share/lisp/packages/**/*.*"))
          #+clisp
          '((#P"PACKAGES:**;*.*"   "/usr/local/share/lisp/packages/**/*.*")
            (#P"PACKAGES:**;*"     "/usr/local/share/lisp/packages/**/*"))
          #-(or clisp sbcl) 
          ;; not that it will work on any other implementation,
          ;; but that'd be what I'd want to work.
         '((#P"PACKAGES:**;*"     "/usr/local/share/lisp/packages/**/*")
           (#P"PACKAGES:**;*.*"   "/usr/local/share/lisp/packages/**/*.*")
           (#P"PACKAGES:**;*.*.*" "/usr/local/share/lisp/packages/**/*.*")) ))

Then, assuming you have stored some lisp "packages" in
/usr/local/share/lisp/packages/, you can use logical pathnames to
access them.

LISP> (directory "PACKAGES:NET;SOURCEFORGE;CCLAN;ASDF;*.LISP")
-->
(#P"/usr/local/share/lisp/packages/net/sourceforge/cclan/asdf/cclan-package.lisp"
 #P"/usr/local/share/lisp/packages/net/sourceforge/cclan/asdf/wild-modules.lisp"
 #P"/usr/local/share/lisp/packages/net/sourceforge/cclan/asdf/cclan.lisp"
 #P"/usr/local/share/lisp/packages/net/sourceforge/cclan/asdf/asdf-install.lisp"
 #P"/usr/local/share/lisp/packages/net/sourceforge/cclan/asdf/asdf.lisp")

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"What is this talk of "release"?  Klingons do not make software
"releases".  Our software "escapes" leaving a bloody trail of
designers and quality assurance people in its wake."
From: Torsten Zühlsdorff
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <45056d1b$0$5155$9b4e6d93@newsspool1.arcor-online.net>
Pascal Bourguignon schrieb:

>>>>clisp mentioned that there is no asdf.
>>>
>>>Tried (require 'asdf)? Is ASDF installed?
>>
>>Yes. "There is no file with the name asdf". I will try to get sbcl. That
>> should work - if the documentation is right ;)
> 
> So, why didn't you tell it where to find the file?

Because i do not know this posibility.

> Remember, REQUIRE:
> 1- is deprecated
> 2- has no specified behavior when only given one argument.
> 
> Try:  (require 'asdf #P"PACKAGES;NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP")

"LOAD: File with name PACKAGES;NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP do
not exist".

> or:   (require 'asdf #P"/usr/local/shared/lisp/where/you/downloaded/asdf.lisp")

The same like above. :(

And after compiling SCBL it do not exist to. I believe that it could
take a while till i solve the problems.

Bye,
Torsten
From: Pascal Bourguignon
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <87hczev32a.fsf@thalassa.informatimago.com>
Torsten Z�hlsdorff <············@arcor.de> writes:

> Pascal Bourguignon schrieb:
>
>>>>>clisp mentioned that there is no asdf.
>>>>
>>>>Tried (require 'asdf)? Is ASDF installed?
>>>
>>>Yes. "There is no file with the name asdf". I will try to get sbcl. That
>>> should work - if the documentation is right ;)
>> 
>> So, why didn't you tell it where to find the file?
>
> Because i do not know this posibility.
>
>> Remember, REQUIRE:
>> 1- is deprecated
>> 2- has no specified behavior when only given one argument.
>> 
>> Try:  (require 'asdf #P"PACKAGES;NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP")
>
> "LOAD: File with name PACKAGES;NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP do
> not exist".
>
>> or: (require 'asdf #P"/usr/local/shared/lisp/where/you/downloaded/asdf.lisp")
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> The same like above. :(

Are you being thick on purpose?

Of course, you substitute the pathname by the correct one on your system!

> And after compiling SCBL it do not exist to. I believe that it could
> take a while till i solve the problems.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

There is no worse tyranny than to force a man to pay for what he does not
want merely because you think it would be good for him. -- Robert Heinlein
From: Torsten Zühlsdorff
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <45066bbe$0$26949$9b4e6d93@newsspool4.arcor-online.net>
Pascal Bourguignon schrieb:

>>>>>>clisp mentioned that there is no asdf.
>>>>>
>>>>>Tried (require 'asdf)? Is ASDF installed?
>>>>
>>>>Yes. "There is no file with the name asdf". I will try to get sbcl. That
>>>>should work - if the documentation is right ;)
>>>
>>>So, why didn't you tell it where to find the file?
>>
>>Because i do not know this posibility.
>>
>>>Remember, REQUIRE:
>>>1- is deprecated
>>>2- has no specified behavior when only given one argument.
>>>
>>>Try:  (require 'asdf #P"PACKAGES;NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP")
>>
>>"LOAD: File with name PACKAGES;NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP do
>>not exist".
>>
>>>or: (require 'asdf #P"/usr/local/shared/lisp/where/you/downloaded/asdf.lisp")
>                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
>>The same like above. :(
> 
> Are you being thick on purpose?
> 
> Of course, you substitute the pathname by the correct one on your system!

I am not thick on purpose !

Why do you beleave, that i didn't do that? I have just quoted your path
- of course i replaced it with the path to the file. But the
error-message is the same. It is not my fault! :P

Bye,
Torsten
From: Pascal Bourguignon
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <87ventfjf1.fsf@thalassa.informatimago.com>
Torsten Z�hlsdorff <············@arcor.de> writes:

> Pascal Bourguignon schrieb:
>
>>>>>>>clisp mentioned that there is no asdf.
>>>>>>
>>>>>>Tried (require 'asdf)? Is ASDF installed?
>>>>>
>>>>>Yes. "There is no file with the name asdf". I will try to get sbcl. That
>>>>>should work - if the documentation is right ;)
>>>>
>>>>So, why didn't you tell it where to find the file?
>>>
>>>Because i do not know this posibility.
>>>
>>>>Remember, REQUIRE:
>>>>1- is deprecated
>>>>2- has no specified behavior when only given one argument.
>>>>
>>>>Try:  (require 'asdf #P"PACKAGES;NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP")
>>>
>>>"LOAD: File with name PACKAGES;NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP do
>>>not exist".
>>>
>>>>or: (require 'asdf #P"/usr/local/shared/lisp/where/you/downloaded/asdf.lisp")
>>                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>The same like above. :(
>> 
>> Are you being thick on purpose?
>> 
>> Of course, you substitute the pathname by the correct one on your system!
>
> I am not thick on purpose !
>
> Why do you beleave, that i didn't do that? I have just quoted your path
> - of course i replaced it with the path to the file. But the
> error-message is the same. It is not my fault! :P

Ah!  Then sorry, but your answer let me think that you copied the form
literally.

Then you have some strange problem, because loading asdf.lisp, be it
with LOAD or with REQUIRE, doesn't pose any difficulty usually:

[1]> (require 'asdf #P"/usr/local/share/lisp/packages/net/sourceforge/cclan/asdf/asdf.lisp")
;; Loading file /usr/local/share/lisp/packages/net/sourceforge/cclan/asdf/asdf.lisp ...
;; Loaded file /usr/local/share/lisp/packages/net/sourceforge/cclan/asdf/asdf.lisp
T
[2]> (find-package "ASDF")
#<PACKAGE ASDF>
[3]> (values (lisp-implementation-type) (lisp-implementation-version))
"CLISP" ;
"2.39 (2006-07-16) (built 3364813332) (memory 3364813922)"
[4]> 


even in sbcl:


* (require 'asdf #P"/usr/local/share/lisp/packages/net/sourceforge/cclan/asdf/asdf.lisp")
; in: LAMBDA NIL
;     (ASDF::FORMAT-ARGUMENTS ASDF::C)
; 
; caught STYLE-WARNING:
;   undefined function: FORMAT-ARGUMENTS

;     (ASDF::FORMAT-CONTROL ASDF::C)
; 
; caught STYLE-WARNING:
;   undefined function: FORMAT-CONTROL

; 
; caught STYLE-WARNING:
;   These functions are undefined:
;     FORMAT-ARGUMENTS FORMAT-CONTROL
; 
; compilation unit finished
;   caught 3 STYLE-WARNING conditions

; in: LAMBDA NIL
;     (ASDF:ERROR-COMPONENT ASDF::C)
; 
; caught STYLE-WARNING:
;   undefined function: ERROR-COMPONENT

;     (ASDF:ERROR-OPERATION ASDF::C)
; 
; caught STYLE-WARNING:
;   undefined function: ERROR-OPERATION

; 
; caught STYLE-WARNING:
;   These functions are undefined:
;     ERROR-COMPONENT ERROR-OPERATION
; 
; compilation unit finished
;   caught 3 STYLE-WARNING conditions

; in: LAMBDA NIL
;     (ASDF::COMPONENT-VISITED-P ASDF::O ASDF::C)
; 
; caught STYLE-WARNING:
;   undefined function: COMPONENT-VISITED-P

; 
; caught STYLE-WARNING:
;   This function is undefined:
;     COMPONENT-VISITED-P
; 
; compilation unit finished
;   caught 2 STYLE-WARNING conditions

; in: LAMBDA NIL
;     (ASDF::CHECK-COMPONENT-INPUT TYPE
;                                ASDF::NAME
;                                ASDF::WEAKLY-DEPENDS-ON
;                                ASDF::DEPENDS-ON
;                                ASDF::COMPONENTS
;                                ASDF::IN-ORDER-TO)
; 
; caught STYLE-WARNING:
;   undefined function: CHECK-COMPONENT-INPUT

; 
; caught STYLE-WARNING:
;   This function is undefined:
;     CHECK-COMPONENT-INPUT
; 
; compilation unit finished
;   caught 2 STYLE-WARNING conditions

; in: LAMBDA NIL
;     (ASDF::SYSDEF-ERROR-COMPONENT ":depends-on must be a list."
;                                 TYPE
;                                 ASDF::NAME
;                                 ASDF::DEPENDS-ON)
; 
; caught STYLE-WARNING:
;   undefined function: SYSDEF-ERROR-COMPONENT

; 
; caught STYLE-WARNING:
;   This function is undefined:
;     SYSDEF-ERROR-COMPONENT
; 
; compilation unit finished
;   caught 2 STYLE-WARNING conditions

("ASDF")
* (find-package "ASDF")

#<PACKAGE "ASDF">
* (values (lisp-implementation-type) (lisp-implementation-version))

"SBCL"
"0.9.12"
* 



-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Our enemies are innovative and resourceful, and so are we. They never
stop thinking about new ways to harm our country and our people, and
neither do we. -- Georges W. Bush
From: Torsten Zühlsdorff
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <45069920$0$26956$9b4e6d93@newsspool4.arcor-online.net>
Pascal Bourguignon schrieb:
> Torsten Z�hlsdorff <············@arcor.de> writes:
> 
> 
>>Pascal Bourguignon schrieb:
>>
>>
>>>>>>>>clisp mentioned that there is no asdf.
>>>>>>>
>>>>>>>Tried (require 'asdf)? Is ASDF installed?
>>>>>>
>>>>>>Yes. "There is no file with the name asdf". I will try to get sbcl. That
>>>>>>should work - if the documentation is right ;)
>>>>>
>>>>>So, why didn't you tell it where to find the file?
>>>>
>>>>Because i do not know this posibility.
>>>>
>>>>
>>>>>Remember, REQUIRE:
>>>>>1- is deprecated
>>>>>2- has no specified behavior when only given one argument.
>>>>>
>>>>>Try:  (require 'asdf #P"PACKAGES;NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP")
>>>>
>>>>"LOAD: File with name PACKAGES;NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP do
>>>>not exist".
>>>>
>>>>
>>>>>or: (require 'asdf #P"/usr/local/shared/lisp/where/you/downloaded/asdf.lisp")
>>>
>>>                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>
>>>>The same like above. :(
>>>
>>>Are you being thick on purpose?
>>>
>>>Of course, you substitute the pathname by the correct one on your system!
>>
>>I am not thick on purpose !
>>
>>Why do you beleave, that i didn't do that? I have just quoted your path
>>- of course i replaced it with the path to the file. But the
>>error-message is the same. It is not my fault! :P
> 
> 
> Ah!  Then sorry, but your answer let me think that you copied the form
> literally.
> 
> Then you have some strange problem, because loading asdf.lisp, be it
> with LOAD or with REQUIRE, doesn't pose any difficulty usually:

[your messages]

This problem is really strange. At the moment i build a (virtual)
test-computer with another operation system and configuration of the
acutal one and than i will try it again.

Till them i use LispBox - it is not the same i want to have, but it is a
good possibility to get into slime.

Bye,
Torsten
From: Sampo Vuori
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <1157722766.715430.46090@p79g2000cwp.googlegroups.com>
> Ok. Till now i was not able to get TBNL work. So there is enough
> flexibility to check some other environments ;)
> Which else there are?
I think Lisp Directory gets too little attention, it has a nice
collection of information about lisp libraries, documentation etc.
Please have a look at this:

http://www.cl-user.net/asp/tags/web

(click the libraries/tools/software heading)

- Sampo
From: John Thingstad
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <op.tfim9sm4pqzri1@pandora.upc.no>
On Thu, 07 Sep 2006 15:42:21 +0200, Torsten Z�hlsdorff  
<············@arcor.de> wrote:

>
> I have read, that lisp is "always" running while the php-script is at
> his end after some milliseconds and will start again at the next call -
> right?
> I have seen, that lisp has his own html-output-"implementation". Can i
> work with xml/xslt or other templates?
> And what are other differences in developing webapplikations in PHP or  
> LISP?
>
> Greetings from Germany,
> Torsten

If you are used to PHP AllegroServe and ActionScript may be more to your  
liking.
Both are available for free in one package.
In particular it takes care of sessions like PHP.
The big difference is that PHP can only run one script at a time.
It times out after 30 seconds. Lisp is a resident program it can handle
many connections at once and share data between the connections.
You can work with XSLT but quite frankly woring with HTML as list's
is more powerfull in Lisp. Try Alegro Coimmon Lisp (www.franz.com).
They have a very stable and good web developement environment.

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
From: =?ISO-8859-15?Q?Torsten_Z=FChlsdorff?=
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <45011f86$0$5153$9b4e6d93@newsspool1.arcor-online.net>
John Thingstad schrieb:

>> I have read, that lisp is "always" running while the php-script is at
>> his end after some milliseconds and will start again at the next call -
>> right?
>> I have seen, that lisp has his own html-output-"implementation". Can i
>> work with xml/xslt or other templates?
>> And what are other differences in developing webapplikations in PHP
>> or  LISP?
> 
> If you are used to PHP AllegroServe and ActionScript may be more to
> your  liking.
> Both are available for free in one package.

Thanks, i will look at them.

> The big difference is that PHP can only run one script at a time.
> It times out after 30 seconds. Lisp is a resident program it can handle
> many connections at once and share data between the connections.

That is not fully correct. The time out of a script can be change in
configuration ;)
And there is a method to share data between different PHP-Scripts
through the RAM. Its not the same, but there are not much people, how
know that.
You can find a documentation here: http://php.net/shmop

Greetings,
Torsten
From: Holger Schauer
Subject: Re: Differenz between developing websites with PHP/LISP
Date: 
Message-ID: <yxzwt85bo7e.fsf@gmx.de>
On 4754 September 1993, Torsten wrote:
> But now i want to do something in lisp, because lisp really impress me.
> So i want to perform some webdevelopment (if i ever get tbnl run ^^),
> but i do not want to fail on the differences between the development
> methods in php and lisp. Therefore i ask for them.

I know next to nothing about PHP, so ...

> In PHP a Script is called, i include needed other scripts, parse and
> analyse config files, manage db-connections, evaluate the input, work on
> the input and so on.

The only difference is actually that you're not calling some script,
but rather have some lisp process sitting and waiting that you connect
to. That's not a really a difficulty to worry about.

> I have seen, that lisp has his own html-output-"implementation". 

As others have pointed out, there are several ways (read: available
libraries) to generate HTML from lisp.

> Can i work with xml/xslt or other templates?

For UCW (http://common-lisp.net/project/ucw/) there's TAL (which is
included) which is modelled after Zope's TAL. If you need to modify
external XML, I know of no web framework that tightly integrates with
XML handling. There are several libraries for dealing with XML, but
you'll have to do the integration on your own (i.e., in your
application).

HTH,

 Holger

-- 
---          http://www.coling.uni-freiburg.de/~schauer/            ---
Fachbegriffe der Informatik - Einfach erkl�rt
109: Fernschach
       GUI auf 386/8 MB (nach Frank Klemm)