From: =?ISO-8859-15?Q?Andr=E9_Thieme?=
Subject: How to make mod_lisp faster than php?
Date: 
Message-ID: <d7o692$u8s$1@ulric.tng.de>
On Debian I am running Apache 1.3 + cmucl 19a + mod_lisp.
I am using the file at
http://www.fractalconcept.com/fcweb/download/modlisp-cmucl.lisp
and do test it against a php file, which simply contains:
<?php
     phpinfo();
?>

The php-file produces much more output.

Then I use "ab" to compare Lisp to PHP.
ab http://mysite/info.php
runs in 0.2 seconds

ab -n 5 http://mysite/info.php
runs in 0.25 seconds

ab -n 500 http://mysite/info.php
runs in 2.3 seconds


Now Lisp

ab http://mysite/lisp/fixed/
runs in 1.27 seconds

ab -n 5 http://mysite/lisp/fixed/
runs in 1.3 seconds

ab -n 500 http://mysite/lisp/fixed/
runs in 9 seconds



What am I doing wrong?
Oh, btw: the lisp file is compiled!

I also tried another example, calculating the factorials from 1 to 14.
Also here php runs faster.


Andr�
--

From: Robert Uhl
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <m3ekbkqooc.fsf@4dv.net>
André Thieme <······························@justmail.de> writes:
>
> On Debian I am running Apache 1.3 + cmucl 19a + mod_lisp.

Inspired by your example, I tried a similar test with Fedora Core 3,
Apache 2.0.52-3.1, sbcl, mod_lisp, cl-modlisp and my own little app
which queries a PostgreSQL database for a information about some beers
(it's a beer tasting notes web site, one of my pet projects, thus far
implemented in Perl and Python and being implemented in CL).  My results
were...rather different from yours.  Much better, even given that it's a
dynamically-recalculated page and yours was static.

> ab http://mysite/lisp/fixed/
> runs in 1.27 seconds

ab http://localhost/lisp/beers/

Time taken for tests:   0.4777 seconds
Time per request:       4.777 [ms] (mean)

> ab -n 5 http://mysite/lisp/fixed/
> runs in 1.3 seconds

Time taken for tests:   0.33383 seconds
Time per request:       6.677 [ms] (mean)

> ab -n 500 http://mysite/lisp/fixed/
> runs in 9 seconds

Time taken for tests:   2.207466 seconds
Time per request:       4.415 [ms] (mean)

In fact, for ab -n 2400 http://localhost/lisp/beers/:

Time taken for tests:   10.252653 seconds
Time per request:       4.272 [ms] (mean)

Given the cmucl & sbcl are similar, I doubt that the Lisp makes much
difference.  I do wonder how fast your box is--I was able to get in
nearly five times as many requests in a little over your time, with a
_lot_ more overhead.  Mine is 2293.76 bogomips (cat /proc/cpuinfo).

-- 
Robert Uhl <http://public.xdi.org/=ruhl>
Let the heavens be glad as is meet, and let the earth rejoice; and let
the whole world, visible and invisible, keep festival, for Christ, the
eternal gladness, is risen.
From: =?UTF-8?B?QW5kcsOpIFRoaWVtZQ==?=
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <d7o8hl$iq$1@ulric.tng.de>
Robert Uhl schrieb:
> André Thieme <······························@justmail.de> writes:
> 
>>On Debian I am running Apache 1.3 + cmucl 19a + mod_lisp.
> 
> 
> Inspired by your example, I tried a similar test with Fedora Core 3,
> Apache 2.0.52-3.1, sbcl, mod_lisp, cl-modlisp and my own little app
> which queries a PostgreSQL database for a information about some beers
> (it's a beer tasting notes web site, one of my pet projects, thus far
> implemented in Perl and Python and being implemented in CL).  My results
> were...rather different from yours.  Much better, even given that it's a
> dynamically-recalculated page and yours was static.
> 
> 
>>ab http://mysite/lisp/fixed/
>>runs in 1.27 seconds
> 
> 
> ab http://localhost/lisp/beers/
> 
> Time taken for tests:   0.4777 seconds
> Time per request:       4.777 [ms] (mean)
> 
> 
>>ab -n 5 http://mysite/lisp/fixed/
>>runs in 1.3 seconds
> 
> 
> Time taken for tests:   0.33383 seconds
> Time per request:       6.677 [ms] (mean)
> 
> 
>>ab -n 500 http://mysite/lisp/fixed/
>>runs in 9 seconds
> 
> 
> Time taken for tests:   2.207466 seconds
> Time per request:       4.415 [ms] (mean)
> 
> In fact, for ab -n 2400 http://localhost/lisp/beers/:
> 
> Time taken for tests:   10.252653 seconds
> Time per request:       4.272 [ms] (mean)
> 
> Given the cmucl & sbcl are similar, I doubt that the Lisp makes much
> difference.  I do wonder how fast your box is--I was able to get in
> nearly five times as many requests in a little over your time, with a
> _lot_ more overhead.  Mine is 2293.76 bogomips (cat /proc/cpuinfo).
> 
cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Celeron(R) CPU 2.00GHz
stepping        : 9
cpu MHz         : 2000.568
cache size      : 128 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge 
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips        : 3948.54


I also did the tests locally, but over ssh.
You don't happen to have php installed, have you?

Do you have an explanation for the low performance of Lisp?


André
-- 
From: =?UTF-8?B?QW5kcsOpIFRoaWVtZQ==?=
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <d7ofj6$6nr$1@ulric.tng.de>
Robert Uhl schrieb:
> André Thieme <······························@justmail.de> writes:
> 
>>On Debian I am running Apache 1.3 + cmucl 19a + mod_lisp.
> 
> 
> Inspired by your example, I tried a similar test with Fedora Core 3,
> Apache 2.0.52-3.1, sbcl, mod_lisp, cl-modlisp and my own little app

On fractalconcept.com I did not find an example file for sbcl. And the
one for cmucl does not work:
http://www.fractalconcept.com/fcweb/download/modlisp-cmucl.lisp

Could you show me what the minimal modifications are to make this cmucl-
example work for sbcl?


André
--
From: Robert Uhl
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <m3psuyraii.fsf@4dv.net>
André Thieme <······························@justmail.de> writes:
>
> On fractalconcept.com I did not find an example file for sbcl. And the
> one for cmucl does not work:
> http://www.fractalconcept.com/fcweb/download/modlisp-cmucl.lisp
>
> Could you show me what the minimal modifications are to make this
> cmucl- example work for sbcl?

I didn't use that, but instead cl-modlisp (asdf-install:install
:cl-modlisp).  I compiled mod_lisp with the standard incantation, sbcl
with threading enabled, installed cl-modlisp and ran.

Actually, I _did_ implement one little change to cl-modlisp and kmrcl: I
added a parameter so that listeners might bind to only one address, so
that I wouldn't have an Internet-accessible lisp running as myself.

-- 
Robert Uhl <http://public.xdi.org/=ruhl>
HaMashiakh iz oyfgeshtanen!  Er iz virklikh oyfgeshtanen!
From: Edi Weitz
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <uy89ru95y.fsf@agharta.de>
On Fri, 03 Jun 2005 01:56:38 +0200, Andr� Thieme <······························@justmail.de> wrote:

> Now Lisp
>
> ab -n 500 http://mysite/lisp/fixed/
> runs in 9 seconds

What application do you have in mind that will need to serve more than
500 requests in 9 seconds?

Cheers,
Edi.

PS: For fast mod_lisp apps with CMUCL don't forget to

      (mp::startup-idle-and-top-level-loops)

    on startup and set *PRINT-PRETTY* to NIL if you're using FORMAT.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: André Thieme
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <d7pd2k$vka$1@ulric.tng.de>
Edi Weitz schrieb:
> On Fri, 03 Jun 2005 01:56:38 +0200, Andr� Thieme <······························@justmail.de> wrote:
> 
> 
>>Now Lisp
>>
>>ab -n 500 http://mysite/lisp/fixed/
>>runs in 9 seconds
> 
> 
> What application do you have in mind that will need to serve more than
> 500 requests in 9 seconds?

Edi, it does not matter if I don't need to server more than 500 requests
or not. If I want to tell some project managers in my company about Lisp
it should better bring some speed advantages.


> PS: For fast mod_lisp apps with CMUCL don't forget to
> 
>       (mp::startup-idle-and-top-level-loops)
> 
>     on startup and set *PRINT-PRETTY* to NIL if you're using FORMAT.

You are my man Edi!! *handshaking*
Now Lisp runs faster than before :)

Cut ab -n 500 http://mysite/lisp/fixed/ down to one second, making it
run with double speed when compared to php.
(but anyway, php is producing more output)

ab -n 500 http://mysite/lisp/factorial
runs in 1.2 seconds and fact.php runs in the same time.


Btw, did you ever try out http://www.fastcgi.com/ ?
I don't get it installed but would like to see a speed comparison
between it and mod_lisp.

Anyone knows how to modificate
http://www.fractalconcept.com/fcweb/download/modlisp-cmucl.lisp
to run with sbcl?


Andr�
-- 
From: Edi Weitz
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <ubr6nd6wg.fsf@agharta.de>
On Fri, 03 Jun 2005 12:58:48 +0200, Andr� Thieme <······························@justmail.de> wrote:

> Edi, it does not matter if I don't need to server more than 500
> requests or not. If I want to tell some project managers in my
> company about Lisp it should better bring some speed advantages.

For me the reason to use Lisp for web apps is definitely not speed.
I've developed dynamic web application since 1996 or so in several
different languages and I've yet to see an application that was too
slow because someone used the wrong programming language.  /If/ there
were speed bottlenecks they were always somewhere else.

In fact, I once wrote a prototype for a web app in Lisp but when the
prototype was working the technical lead of my customer wanted to have
the final product in PHP.  (The company had several employees at that
time who knew PHP but didn't know Lisp.)

Because some of the pages involved mildly complicated computations the
Lisp solution was faster by a factor of ten.  (I forgot the exact
details but roughly the client had to wait about 0.2 seconds for the
Lisp page and 2 seconds for the PHP page to render both of which were
dynamically generated using the same algorithm.)  The guy said that
doesn't matter...

Cheers,
Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Espen Vestre
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <kwzmu7hdxk.fsf@merced.netfonds.no>
Edi Weitz <········@agharta.de> writes:

> I've developed dynamic web application since 1996 or so in several
> different languages and I've yet to see an application that was too
> slow because someone used the wrong programming language.  

If you go that far back, there were lots of overweight web
applications in java that were a real pain to keep running. You may
argue that that was a question of implementations, not language, but I
don't think there were any really useful environments for java web
apps back in, say, 1997, whereas it was quite possible to write
efficient web apps with CL-HTTP at that time (In '97 or '98 I had to
do some sysadmin work related to early versions of JRun. Eek!).
-- 
  (espen)
From: Edi Weitz
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <u7jhbd5zs.fsf@agharta.de>
On Fri, 03 Jun 2005 13:34:15 +0200, Espen Vestre <·····@vestre.net> wrote:

> If you go that far back, there were lots of overweight web
> applications in java that were a real pain to keep running. You may
> argue that that was a question of implementations, not language, but
> I don't think there were any really useful environments for java web
> apps back in, say, 1997, whereas it was quite possible to write
> efficient web apps with CL-HTTP at that time (In '97 or '98 I had to
> do some sysadmin work related to early versions of JRun. Eek!).

OK, that might well be the case.  Luckily I didn't have to touch Java
web stuff until very recently... :)

Cheers,
Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Alex Mizrahi
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <42a17583$0$18642$14726298@news.sunsite.dk>
(message (Hello 'Edi)
(you :wrote  :on '(Fri, 03 Jun 2005 13:19:43 +0200))
(

 EW> different languages and I've yet to see an application that was too
 EW> slow because someone used the wrong programming language.
 EW> /If/ there
 EW> were speed bottlenecks they were always somewhere else.

using Armed Bear Common Lisp for implementation of servlet in Apache Tomcat
Java servlet container is somewhere near that. ABCL isn't very fast by
itself, but when it generates web pages as servlet, it becomes 35 times
slower, that makes execution time critical. (interesting, that REPL in same
process is quite fast). some pages are generated for 2-4 seconds, that is
barely acceptable.
luckily pages are quite simple.. there is also a need for regex operations
in my application, and it's quite slow even in normal ABCL -- processing
60kb file lasts for minutes, with that slowed-down processing it would be
absolutely unusable..
i think most time is spent in following call

(defun filter-out-formatting (str)
  (ppcre:regex-replace-all
   '(:alternation
     (:group :single-line-mode-p  "<span" (:non-greedy-repetition 1 nil
:everything) ">")
     (:group :single-line-mode-p "<p" (:non-greedy-repetition 1 nil
:everything) ">")
     (:group "</p>")
     (:group "</span>"))
   str ""))

i don't think it can be optimized much..

new version of ABCL works same speed in standalone mode and when serving web
pages, but it's 6 times slower than old one (on my simple tests), so it's
questionable which one to use..

i also know another case when choise of programming language impacts web
applications performance. PHP scripts start from scratch for each request
(maybe it's theoretically possible to make PHP session serving multiple
requests, but afaik nobody uses it in such way). i tried to use it for
Markov-chain-based chat bot implementation. since there is no way to keep
all structures in memory, i had to pull them from SQL database each time
(only required portions). and that was very slow, even for simpliest
implementation with first-order chains.. maybe there is some trick with SQL,
but i have no clue how to implement that, i think it's too complex.. it
generated phrase of 10 words or so in 5-10 seconds..
in Lisp i've implemented it with hash tables, and phrase generation was
really fast, even with more complex second-order chains..
also, PHP was used to process data and upload it into SQL database. it was
enourmously slow -- looks like hash table implementation there is wrong, so
performance degrades drastically when there are a lot of entries. it was
processing 300kb file in 10-20 minutes, so i was not able to use larger
files.
with clisp there was no such problems (in spite of more complex algorithms
and orders larger structures), so i was able to load 7MB of text there.

)
(With-best-regards '(Alex Mizrahi) :aka 'killer_storm)
"People who lust for the Feel of keys on their fingertips (c) Inity")
From: Björn Lindberg
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <42a03eca$1@news.cadence.com>
Andr� Thieme wrote:

> Edi, it does not matter if I don't need to server more than 500 requests
> or not. If I want to tell some project managers in my company about Lisp
> it should better bring some speed advantages.

[...]

> You are my man Edi!! *handshaking*
> Now Lisp runs faster than before :)
> 
> Cut ab -n 500 http://mysite/lisp/fixed/ down to one second, making it
> run with double speed when compared to php.
> (but anyway, php is producing more output)
> 
> ab -n 500 http://mysite/lisp/factorial
> runs in 1.2 seconds and fact.php runs in the same time.

Calculating x! for which x?

If you want Lisp to be faster, why don't you make the programs do 
something. The more you have them do, the faster Lisp will be compared 
to PHP. Oh, and you can always introduce your bosses to PHP's 
fascinating history of security compromises.


Bj�rn
From: Pascal Costanza
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <3gav29FbivthU1@individual.net>
Bj�rn Lindberg wrote:
> Andr� Thieme wrote:
> 
>> Edi, it does not matter if I don't need to server more than 500 requests
>> or not. If I want to tell some project managers in my company about Lisp
>> it should better bring some speed advantages.
> 
> [...]
> 
>> You are my man Edi!! *handshaking*
>> Now Lisp runs faster than before :)
>>
>> Cut ab -n 500 http://mysite/lisp/fixed/ down to one second, making it
>> run with double speed when compared to php.
>> (but anyway, php is producing more output)
>>
>> ab -n 500 http://mysite/lisp/factorial
>> runs in 1.2 seconds and fact.php runs in the same time.
> 
> Calculating x! for which x?
> 
> If you want Lisp to be faster, why don't you make the programs do 
> something.  The more you have them do, the faster Lisp will be compared
> to PHP.

This can't be stressed strongly enough. "Real" programs typically don't 
spend most of their time in invocation overhead but in actually doing 
something. This is a big problem with such oversimplifying benchmarks in 
general.


Pascal

-- 
2nd European Lisp and Scheme Workshop
July 26 - Glasgow, Scotland - co-located with ECOOP 2005
http://lisp-ecoop05.bknr.net/
From: Espen Vestre
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <kwslzzhcdh.fsf@merced.netfonds.no>
Pascal Costanza <··@p-cos.net> writes:

> This can't be stressed strongly enough. "Real" programs typically
> don't spend most of their time in invocation overhead but in actually
> doing something. This is a big problem with such oversimplifying
> benchmarks in general.

But the most time consuming "Actually doing something"-part of a 
typical web app is its database access...
-- 
  (espen)
From: Stefan Scholl
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <1bvaaq9xcni2u$.dlg@parsec.no-spoon.de>
On 2005-06-03 14:07:54, Espen Vestre wrote:
> But the most time consuming "Actually doing something"-part of a 
> typical web app is its database access...

By the way: There's no rule that you HAVE TO use a SQL database for
a web app.
From: Fred Gilham
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <u78y1re2m0.fsf@snapdragon.csl.sri.com>
Stefan Scholl <······@no-spoon.de> writes:

> On 2005-06-03 14:07:54, Espen Vestre wrote:
> > But the most time consuming "Actually doing something"-part of a 
> > typical web app is its database access...
> 
> By the way: There's no rule that you HAVE TO use a SQL database for
> a web app.

Is anyone using elephant? (http://common-lisp.net/project/elephant)

-- 
Fred Gilham                                       ······@csl.sri.com
When I was growing up, I found that the main argument against
laissez-faire, and for socialism, was that socialism and communism
were inevitable: "You can't turn back the clock!" they chanted, "you
can't turn back the clock." But the clock of the once-mighty Soviet
Union, the clock of Marxism-Leninism, a creed that once mastered half
the world, is not only turned back, but lies dead and broken forever.
                                                  -- Murray Rothbard
From: drewc
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <DT5oe.1565122$8l.1080209@pd7tw1no>
Fred Gilham wrote:
> Stefan Scholl <······@no-spoon.de> writes:
> 
> 
>>On 2005-06-03 14:07:54, Espen Vestre wrote:
>>
>>>But the most time consuming "Actually doing something"-part of a 
>>>typical web app is its database access...
>>
>>By the way: There's no rule that you HAVE TO use a SQL database for
>>a web app.
> 
> 
> Is anyone using elephant? (http://common-lisp.net/project/elephant)
> 

I used elephant as the backend for a small CMS i built about a year ago. 
It works as advertised and i did not have any problems.

UCW + Elephant is a great combination. bknr's datastore is probably 
worth taking a good look at as well, although personally, most of the 
time i use the cliki engine to store the content with postgres + clsql 
for the database.

-- 
Drew Crampsie
drewc at tech dot coop
"Never mind the bollocks -- here's the sexp's tools."
	-- Karl A. Krueger on comp.lang.lisp
From: Marco Baringer
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <m21x7itsgc.fsf@soma.local>
drewc <·····@rift.com> writes:

> UCW + Elephant is a great combination. bknr's datastore is probably
> worth taking a good look at as well, although personally, most of the
> time i use the cliki engine to store the content with postgres + clsql
> for the database.

unfortunetly BerkeleyDB's license make using elephant in a commercial
app impossible, which really is too bad. this limitation does not
apply to bknr nor clsql+(postgresql|mysql|...)

-- 
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen
From: Marco Baringer
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <m2vf4usdrm.fsf@soma.local>
"Marco Baringer" <··@bese.it> writes:

> unfortunetly BerkeleyDB's license make using elephant in a commercial
> app impossible, which really is too bad. this limitation does not
      ^^^^^^^^^^

sorry, impossible is the wrong word, 'very very expensive' would be
better.

-- 
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen
From: Brian Downing
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <_cqoe.20563$xm3.4234@attbi_s21>
In article <··············@soma.local>, Marco Baringer <··@bese.it> wrote:
> "Marco Baringer" <··@bese.it> writes:
> 
> > unfortunetly BerkeleyDB's license make using elephant in a commercial
> > app impossible, which really is too bad. this limitation does not
>       ^^^^^^^^^^
> 
> sorry, impossible is the wrong word, 'very very expensive' would be
> better.

Well, if it's just used to run a commercial UCW website, you should be
fine, since you're not distributing BerkeleyDB.  The Sleepycat license
is pretty clear about that, and the CEO even made the point in an
interview:

    So for example, if MegaISPCorp downloads Berkeley DB and
    uses it to build the authentication and user database for
    their Web site, but it runs only inside their data center,
    then they don't have to release their source code or pay us
    any money. They're not shipping our code. None of the users
    who visit MegaISPCorp's Web site need to release anything,
    because they're not redistributing our software either.

      - http://www.winterspeak.com/columns/102901.html

-bcd
-- 
*** Brian Downing <bdowning at lavos dot net> 
From: Alain Picard
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <878y1pn1mq.fsf@memetrics.com>
"Marco Baringer" <··@bese.it> writes:

> drewc <·····@rift.com> writes:
>
>> UCW + Elephant is a great combination. bknr's datastore is probably
>> worth taking a good look at as well, although personally, most of the
>> time i use the cliki engine to store the content with postgres + clsql
>> for the database.
>
> unfortunetly BerkeleyDB's license make using elephant in a commercial
> app impossible, which really is too bad. this limitation does not
> apply to bknr nor clsql+(postgresql|mysql|...)

Yes.  When I inquired on cost to get an unlimited redistributable
license for BerkeleyDB, I nearly fell off my chair... (that was 3 yrs ago).

I would urge anyone who has an interest in this sort of
thing to help with the development of an alternate back-end
store to PLOB!, so we can finally have a BSD or LLGPL style
object store for CL.

cheers,
                --ap
From: Edi Weitz
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <umzq54rmv.fsf@agharta.de>
On Sun, 05 Jun 2005 09:27:57 +1000, Alain Picard <············@memetrics.com> wrote:

> Yes.  When I inquired on cost to get an unlimited redistributable
> license for BerkeleyDB, I nearly fell off my chair... (that was 3
> yrs ago).

They haven't changed it since:

  <http://www.sleepycat.com/pricing/index.shtml>

Cheers,
Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Patrick May
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <m27jh851xa.fsf@patrick.intamission.com>
Edi Weitz <········@agharta.de> writes:
> On Sun, 05 Jun 2005 09:27:57 +1000, Alain Picard <············@memetrics.com> wrote:
> > Yes.  When I inquired on cost to get an unlimited redistributable
> > license for BerkeleyDB, I nearly fell off my chair... (that was 3
> > yrs ago).
> 
> They haven't changed it since:
> 
>   <http://www.sleepycat.com/pricing/index.shtml>

     Those prices look quite reasonable relative to the cost for
royalty-free distribution of other products.  If your software that
incorporates Berkeley DB hasn't sold enough volume to cover these
fees, I suspect that Sleepycat would negotiate a per-copy royalty.
What do you feel would be an appropriate fee?

     For the record, I don't have a commercial relationship with
Sleepycat but I do know a couple of people in their European office.

Regards,

Patrick

------------------------------------------------------------------------
S P Engineering, Inc.    | The experts in large scale distributed OO
                         | systems design and implementation.
          ···@spe.com    | (C++, Java, ObjectStore, Oracle, CORBA, UML)
From: Marco Antoniotti
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <ZW_oe.58$mi7.89168@typhoon.nyu.edu>
Fred Gilham wrote:
> Stefan Scholl <······@no-spoon.de> writes:
> 
> 
>>On 2005-06-03 14:07:54, Espen Vestre wrote:
>>
>>>But the most time consuming "Actually doing something"-part of a 
>>>typical web app is its database access...
>>
>>By the way: There's no rule that you HAVE TO use a SQL database for
>>a web app.
> 
> 
> Is anyone using elephant? (http://common-lisp.net/project/elephant)
> 

I may in a new summer project of mine.  It does look promising.

Cheers
--
Marco
From: André Thieme
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <d7qt55$99n$1@ulric.tng.de>
Pascal Costanza schrieb:
> Bj�rn Lindberg wrote:
> 
>> Andr� Thieme wrote:
>>
>>> Edi, it does not matter if I don't need to server more than 500 requests
>>> or not. If I want to tell some project managers in my company about Lisp
>>> it should better bring some speed advantages.
>>
>>
>> [...]
>>
>>> You are my man Edi!! *handshaking*
>>> Now Lisp runs faster than before :)
>>>
>>> Cut ab -n 500 http://mysite/lisp/fixed/ down to one second, making it
>>> run with double speed when compared to php.
>>> (but anyway, php is producing more output)
>>>
>>> ab -n 500 http://mysite/lisp/factorial
>>> runs in 1.2 seconds and fact.php runs in the same time.
>>
>>
>> Calculating x! for which x?
>>
>> If you want Lisp to be faster, why don't you make the programs do 
>> something.  The more you have them do, the faster Lisp will be compared
>> to PHP.
> 
> 
> This can't be stressed strongly enough. "Real" programs typically don't 
> spend most of their time in invocation overhead but in actually doing 
> something. This is a big problem with such oversimplifying benchmarks in 
> general.

Pascal, I am aware that my tests are not oriented on real-life situations.
However, how should I collect information about a (for me) new technology?
I think it wouldn't be good to write first 8000 lines business-code and
then see if I have a use for it. For me it sounds natural to do the most
simple tests in the beginning. And it simply is disappointing to see that
Lisp was so much slower. Edis suggestions fixed that now. This means I
can continue with more complex tests. Perhaps Alain explains me how I
can keep a socket open and reuse it to get even more speed.
My tests were only the first in a long row of tests.


Andr�
-- 
From: Stefan Scholl
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <x2lysfxymrqr$.dlg@parsec.no-spoon.de>
On 2005-06-04 02:39:25, Andr� Thieme wrote:

> Perhaps Alain explains me how I
> can keep a socket open and reuse it to get even more speed.

You could use TBNL <http://weitz.de/tbnl/>. Saves you some work.
Silly name and a 0.x version for years, but still a very good
library if you use mode_lisp.

I'm using it with CMUCL. CL-PPCRE for regular expressions, S-XML for
generating XML (RSS 2.0), Iterate instead of LOOP macro, CL-EMB as a
template system with the freedom to break some rules by embedding
Common Lisp if I'm desperate enough. :-)

Web programming with Common Lisp is fun. PHP is just annoying if you
think too much.

-- 
Web: http://www.no-spoon.de/ -*- IRC: stesch @ freenode
From: Edi Weitz
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <u1x7iike8.fsf@agharta.de>
On Sat, 4 Jun 2005 10:39:44 +0200, Stefan Scholl <······@no-spoon.de> wrote:

> You could use TBNL <http://weitz.de/tbnl/>. Saves you some work.
> Silly name and a 0.x version for years

Hey!  Be careful!!

:)

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: André Thieme
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <d7t7ic$96f$1@ulric.tng.de>
Stefan Scholl schrieb:
> On 2005-06-04 02:39:25, Andr� Thieme wrote:
> 
> 
>>Perhaps Alain explains me how I
>>can keep a socket open and reuse it to get even more speed.
> 
> 
> You could use TBNL <http://weitz.de/tbnl/>. Saves you some work.
> Silly name and a 0.x version for years, but still a very good
> library if you use mode_lisp.

I am about to install it. The documentation looks good, thanks!


> Web programming with Common Lisp is fun. PHP is just annoying if you
> think too much.

That PHP is annoying I can feel nearly every day... :-/
*hrmpf*


Andr�
-- 
From: Stefan Scholl
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <ir1g18xi7051.dlg@parsec.no-spoon.de>
On 2005-06-04 23:49:25, Andr� Thieme wrote:
> Stefan Scholl schrieb:
>> On 2005-06-04 02:39:25, Andr� Thieme wrote:
>>>Perhaps Alain explains me how I
>>>can keep a socket open and reuse it to get even more speed.
>> 
>> You could use TBNL <http://weitz.de/tbnl/>. Saves you some work.
>> Silly name and a 0.x version for years, but still a very good
>> library if you use mode_lisp.
> 
> I am about to install it. The documentation looks good, thanks!

Edi's documentation is always good.

Don't forget to try the test application. Modify it to get the
feeling for it. TBNL isn't a full scale framework, "just" a library
with solutions for common problems in web programming like sessions,
file upload, etc.


>> Web programming with Common Lisp is fun. PHP is just annoying if you
>> think too much.
> 
> That PHP is annoying I can feel nearly every day... :-/

Don't question the design decisions of PHP and don't think about the
consequences of the incompetence you find in PHP documentation
(books, newsgroups, etc.).


By the way: Common Lisp has some similar problems as PHP. Like the
sometimes inconsistent naming of functions, no different namespaces
for functions in the "core library", inconsistent order of
parameters, ...
From: Pascal Costanza
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <3gdc42Fbu6kuU1@individual.net>
Andr� Thieme wrote:
> Pascal Costanza schrieb:
> 
>> Bj�rn Lindberg wrote:
 >>>
>>> If you want Lisp to be faster, why don't you make the programs do 
>>> something.  The more you have them do, the faster Lisp will be compared
>>> to PHP.
>>
>> This can't be stressed strongly enough. "Real" programs typically 
>> don't spend most of their time in invocation overhead but in actually 
>> doing something. This is a big problem with such oversimplifying 
>> benchmarks in general.
> 
> Pascal, I am aware that my tests are not oriented on real-life situations.
> However, how should I collect information about a (for me) new technology?

Certainly not by measuring something that eventually doesn't matter. 
According to a private email exchange with Urs Hoelzle, one of the 
designers of the HotSpot Virtual Machine for Java, typical code spends 
ca. 20% in invocation overhead, so if method invocation is 20% slower - 
that's for example the case for invoking methods via interfaces instead 
of classes in Java - you will overall lose 5%. I don't expect these 
numbers to be drastically different in other languages / implementations.

> I think it wouldn't be good to write first 8000 lines business-code and
> then see if I have a use for it. For me it sounds natural to do the most
> simple tests in the beginning. And it simply is disappointing to see that
> Lisp was so much slower. Edis suggestions fixed that now. This means I
> can continue with more complex tests.

You could run tests with automatically generated non-sensical code that 
has a typical distribution of function size and code complexity. Then 
you can very quickly get an idea what the performance will look like in 
large applications.

> Perhaps Alain explains me how I
> can keep a socket open and reuse it to get even more speed.

Please ask yourself the question first whether this is going to matter 
for the application you plan to write. Otherwise, you are just wasting 
your time (and managers are very touchy in that regard ;).


Pascal

-- 
2nd European Lisp and Scheme Workshop
July 26 - Glasgow, Scotland - co-located with ECOOP 2005
http://lisp-ecoop05.bknr.net/
From: Alain Picard
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <87d5r1n1rw.fsf@memetrics.com>
Andr� Thieme <······························@justmail.de> writes:

> Perhaps Alain explains me how I
> can keep a socket open and reuse it to get even more speed.

I was holding off because I thought one of the real modlisp
guys might chime in, but here's how I understand it: you
have to

 * Write the header line "Keep-Socket" with a value  "1"
   in your response

 * send a "Content-Length" header, with the (correct) content
   length.

If you do this, then the modlisp.so code can reuse the socket
(it keeps a pool of them) open for the next request.

This is a much fairer test vs something like PHP which is,
by construction, memory resident with Apache and thus has 
no calling overhead.

But all that being said, I agree with others who have stated
that this simple test will not answer if "lisp is faster".
You only have to be able to force to code in PHP for a couple
of days to appreciate what a wonderful escape valve modlisp is.
[For those stuck behind apache].

On reasonable hardware (like what you get at Rackspace), you can
get apache+modlisp to give you 500 transactions per second.  Clearly
this is "fast enough"; eventually you'll run out of tests and have
to write code which does something real; if you then drop to 50
transactions per seconds, well, then this test becomes irrelevant.

Good luck.
From: André Thieme
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <d7tdsp$epo$1@ulric.tng.de>
Alain Picard schrieb:
> Andr� Thieme <······························@justmail.de> writes:
> 
> 
>>Perhaps Alain explains me how I
>>can keep a socket open and reuse it to get even more speed.
> 
> 
> I was holding off because I thought one of the real modlisp
> guys might chime in, but here's how I understand it: you
> have to
> 
>  * Write the header line "Keep-Socket" with a value  "1"
>    in your response
> 
>  * send a "Content-Length" header, with the (correct) content
>    length.
> 
> If you do this, then the modlisp.so code can reuse the socket
> (it keeps a pool of them) open for the next request.
> 
> This is a much fairer test vs something like PHP which is,
> by construction, memory resident with Apache and thus has 
> no calling overhead.

Ok, thanks, I will try to work something out in this direction!


> But all that being said, I agree with others who have stated
> that this simple test will not answer if "lisp is faster".

I got mod_lisp installed and the other day I had some time to make
a first test. It might have been premature of me to post in here
when only doing toy tests. I just had not much time and simply tried
the easiest things I could do within a few minutes.



 > You only have to be able to force to code in PHP for a couple
 > of days to appreciate what a wonderful escape valve modlisp is.
 > [For those stuck behind apache].

I have to code much in PHP and only had a few days with modlisp.
I can already say that it is a better feeling. For example having the
Lisp programming still running when the site was already delivered comes
in really handy, while in PHP the execution of the script ends with the
page beeing delivered.
With Lisp beeing able to produce on the server side something in the
time when no page is requested opens a new pool on possibilities!
Sweet :-)


Andr�
-- 
From: Pascal Bourguignon
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <8764wv5lww.fsf@thalassa.informatimago.com>
Andr� Thieme <······························@justmail.de> writes:

> Edi Weitz schrieb:
> Edi, it does not matter if I don't need to server more than 500 requests
> or not. If I want to tell some project managers in my company about Lisp
> it should better bring some speed advantages.

Like I programmed this web application in CL in 2 days, and he
programmed that equivalent web application in PHP in 20 days?

Remember for managers, one more server computer is but 1/8 or 1/4 of
man.month cost.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Litter box not here.
You must have moved it again.
I'll poop in the sink. 
From: Brandon J. Van Every
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <jz5oe.15046$w21.4507@newsread3.news.atl.earthlink.net>
Pascal Bourguignon wrote:

>Andr� Thieme <······························@justmail.de> writes:
>
>  
>
>>Edi Weitz schrieb:
>>Edi, it does not matter if I don't need to server more than 500 requests
>>or not. If I want to tell some project managers in my company about Lisp
>>it should better bring some speed advantages.
>>    
>>
>
>Like I programmed this web application in CL in 2 days, and he
>programmed that equivalent web application in PHP in 20 days?
>
>Remember for managers, one more server computer is but 1/8 or 1/4 of
>man.month cost.
>
>  
>
Is this speed of programming difference because you're an uber-guru 
programmer and the PHP guy isn't?  Or because it's so much inherently 
easier to write the stuff in Lisp?  I'd be wary of the former.  I've 
heard so many people in uber-techo-land tell me "how easy everything 
is," for anything from HLLs to MinGW builds, that I wanna puke.  The 
truth is, in many cases it's just techies who love technical grunge.  
This keeps them in a feedback loop for the learning curve, so their 
knowledge of truly excruciating technologies becomes very deep.  They 
become prolific at using their tools, and other people find them to be 
'brilliant', when really they're just 'bent' or 'wired funny'.  S&M has 
its adherants too!  Anyways, I'm just pointing out the possible 
problem.  I'll leave it to you to analyze where the advantage of 
you-with-Lisp vs. somoene-else-with-PHP really lies.

-- 
Cheers,                     www.indiegamedesign.com
Brandon Van Every           Seattle, WA

How I really feel about Ubuntu:
http://www.redlandsfortnightly.org/images/baker00.jpg
From: =?ISO-8859-15?Q?Andr=E9_Thieme?=
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <d7qpes$66a$1@ulric.tng.de>
Brandon J. Van Every schrieb:
> Pascal Bourguignon wrote:
> 
>> Andr� Thieme <······························@justmail.de> writes:
>>
>>  
>>
>>> Edi Weitz schrieb:
>>> Edi, it does not matter if I don't need to server more than 500 requests
>>> or not. If I want to tell some project managers in my company about Lisp
>>> it should better bring some speed advantages.
>>>   
>>
>>
>> Like I programmed this web application in CL in 2 days, and he
>> programmed that equivalent web application in PHP in 20 days?
>>
>> Remember for managers, one more server computer is but 1/8 or 1/4 of
>> man.month cost.
>>
>>  
>>
> Is this speed of programming difference because you're an uber-guru 
> programmer and the PHP guy isn't?  Or because it's so much inherently 
> easier to write the stuff in Lisp?  I'd be wary of the former.  I've 
> heard so many people in uber-techo-land tell me "how easy everything 
> is," for anything from HLLs to MinGW builds, that I wanna puke.  The 
> truth is, in many cases it's just techies who love technical grunge.  
> This keeps them in a feedback loop for the learning curve, so their 
> knowledge of truly excruciating technologies becomes very deep.  They 
> become prolific at using their tools, and other people find them to be 
> 'brilliant', when really they're just 'bent' or 'wired funny'.  S&M has 
> its adherants too!  Anyways, I'm just pointing out the possible 
> problem.  I'll leave it to you to analyze where the advantage of 
> you-with-Lisp vs. somoene-else-with-PHP really lies.

I mentioned this issue a few days ago. Kenny talked about his successful
project and he explained how much Lisp helped him. I for my part believe
him if he says that it was the language Lisp that was so important. On
the other hand I can understand that people stay sceptical. It would be
extremly hard (and expensive) to get a scientific proof that Lisp really
is 5% - 5000% "better" than other programming languages.
My intuition tells me it is this way. But I can't trust my intuition
always. In my intuition it is not good to write functions that are 400
or 1000 lines long (and then have fewer bugs than short functions).
In my intuition one could continue to accelerate over the bounds of
speed of light.
It would be overhasty to make an analog-conclusion that my intuition
must be wrong on Lisp because there are things on which my intuition is
wrong. Anyway, a proof we will probably never see.


Andr�
-- 
From: Pascal Bourguignon
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <8764wuakc6.fsf@thalassa.informatimago.com>
Andr� Thieme <······························@justmail.de> writes:
> I mentioned this issue a few days ago. Kenny talked about his successful
> project and he explained how much Lisp helped him. I for my part believe
> him if he says that it was the language Lisp that was so important. On
> the other hand I can understand that people stay sceptical. It would be
> extremly hard (and expensive) to get a scientific proof that Lisp really
> is 5% - 5000% "better" than other programming languages.
> My intuition tells me it is this way. But I can't trust my intuition
> always. In my intuition it is not good to write functions that are 400
> or 1000 lines long (and then have fewer bugs than short functions).
> In my intuition one could continue to accelerate over the bounds of
> speed of light.
> It would be overhasty to make an analog-conclusion that my intuition
> must be wrong on Lisp because there are things on which my intuition is
> wrong. Anyway, a proof we will probably never see.

Let's advance human cloning to at least be able to do scientific tests
in these matters:  take two clones and raise and educate them strictly
in the same environment, then fork them, teach java to the one and
lisp to the other and have them write a program against the same
specifications.  Do it like the Kaminoans, with 1e6 clones you should
get statistically significant results.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d? s++:++ a+ C+++ UL++++ P--- L+++ E+++ W++ N+++ o-- K- w--- 
O- M++ V PS PE++ Y++ PGP t+ 5+ X++ R !tv b+++ DI++++ D++ 
G e+++ h+ r-- z? 
------END GEEK CODE BLOCK------
From: Karl A. Krueger
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <d7r8ht$qn8$1@baldur.whoi.edu>
Pascal Bourguignon <···@informatimago.com> wrote:
> Let's advance human cloning to at least be able to do scientific tests
> in these matters:  take two clones and raise and educate them strictly
> in the same environment, then fork them, teach java to the one and
> lisp to the other and have them write a program against the same
> specifications.  Do it like the Kaminoans, with 1e6 clones you should
> get statistically significant results.

Could be much simpler.  Take an introductory computer-science class with
some programming content.  Split it in half, with half the students
learning Lisp and the other learning Java.  See which group complete
more projects and learn more by the end of the term.

Hey, wait, I was in one of those once.  (Well, it was Scheme and
Pascal.)  We in the Scheme group, as I recall, had somewhat more
completions on the final project ... and shorter code too.

-- 
Karl A. Krueger <········@example.edu> { s/example/whoi/ }
From: Kenny Tilton
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <Hbcoe.18102$IX4.4963@twister.nyc.rr.com>
Karl A. Krueger wrote:
> Pascal Bourguignon <···@informatimago.com> wrote:
> 
>>Let's advance human cloning to at least be able to do scientific tests
>>in these matters:  take two clones and raise and educate them strictly
>>in the same environment, then fork them, teach java to the one and
>>lisp to the other and have them write a program against the same
>>specifications.  Do it like the Kaminoans, with 1e6 clones you should
>>get statistically significant results.
> 
> 
> Could be much simpler. 

Could be much much simpler: killfile Andre the Giant Troll, as I am 
about to. Here is someone who spends hours posting to c.l.l and 
apparently no time learning CL. Yet he pontificates like an elder. And 
we take him seriously. He accuses lispniks of being delusional as to its 
power, based I gather on his profound ignorance of Lisp.

Maybe if we all do him the favor of ignoring him he will spend less time 
on c.l.l. and actually make his way to Chapter Two. OK, I am an optimist...

kenny

-- 
Cells? : http://www.common-lisp.net/project/cells/
Cello? : http://www.common-lisp.net/project/cello/
Cells-Gtk? : http://www.common-lisp.net/project/cells-gtk/
Why Lisp? http://lisp.tech.coop/RtL%20Highlight%20Film

"Doctor, I wrestled with reality for forty years, and I am happy to 
state that I finally won out over it." -- Elwood P. Dowd
From: Stefan Scholl
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <18sn4yva2954t.dlg@parsec.no-spoon.de>
On 2005-06-04 08:51:19, Kenny Tilton wrote:

> Maybe if we all do him the favor of ignoring him he will spend less time 
> on c.l.l. and actually make his way to Chapter Two. OK, I am an optimist...

Give it some time and he skips some chapters and goes right to
chapter eleven. :-)
From: Pascal Bourguignon
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <87oeam88cd.fsf@thalassa.informatimago.com>
Kenny Tilton <·······@nyc.rr.com> writes:
> Could be much much simpler: killfile Andre the Giant Troll, as I am
> about to. Here is someone who spends hours posting to c.l.l and
> apparently no time learning CL. Yet he pontificates like an elder. And
> we take him seriously. He accuses lispniks of being delusional as to
> its power, based I gather on his profound ignorance of Lisp.
>
> Maybe if we all do him the favor of ignoring him he will spend less
> time on c.l.l. and actually make his way to Chapter Two. OK, I am an
> optimist...

Let's state one last thing before killfilling.

Each lisp programmer can constat in practice the improvement in his
own efficiency, or if the output stays the same, in the improved ease
with which same results are obtained.  Better than big theories and
statistical experiments, just try it!

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

Nobody can fix the economy.  Nobody can be trusted with their finger
on the button.  Nobody's perfect.  VOTE FOR NOBODY.
From: André Thieme
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <d7t7lu$96f$2@ulric.tng.de>
Kenny Tilton schrieb:

> Could be much much simpler: killfile Andre the Giant Troll, as I am 
> about to. Here is someone who spends hours posting to c.l.l and 
> apparently no time learning CL. Yet he pontificates like an elder. And 
> we take him seriously. He accuses lispniks of being delusional as to its 
> power, based I gather on his profound ignorance of Lisp.
> 
> Maybe if we all do him the favor of ignoring him he will spend less time 
> on c.l.l. and actually make his way to Chapter Two. OK, I am an optimist...

Uh oh!
I see dark clouds coming!


Andr�
-- 
From: Pascal Bourguignon
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <87wtpa8ywe.fsf@thalassa.informatimago.com>
"Karl A. Krueger" <········@example.edu> writes:

> Pascal Bourguignon <···@informatimago.com> wrote:
>> Let's advance human cloning to at least be able to do scientific tests
>> in these matters:  take two clones and raise and educate them strictly
>> in the same environment, then fork them, teach java to the one and
>> lisp to the other and have them write a program against the same
>> specifications.  Do it like the Kaminoans, with 1e6 clones you should
>> get statistically significant results.
>
> Could be much simpler.  Take an introductory computer-science class with
> some programming content.  Split it in half, with half the students
> learning Lisp and the other learning Java.  See which group complete
> more projects and learn more by the end of the term.
>
> Hey, wait, I was in one of those once.  (Well, it was Scheme and
> Pascal.)  We in the Scheme group, as I recall, had somewhat more
> completions on the final project ... and shorter code too.

Ha but you can always said that all the intelligent one went to the
one half and the others to the other half...  And you cannot reproduce
anything, so it's not scientific.  With clones, if you fail an
experiment, you can always generate a new batch of identical clones
(identical to the first batch) and rerun the same educative routine,
or changing only one variable.  Imagine the experiments!


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

Nobody can fix the economy.  Nobody can be trusted with their finger
on the button.  Nobody's perfect.  VOTE FOR NOBODY.
From: Duane Rettig
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <44qcer2dw.fsf@franz.com>
Pascal Bourguignon <···@informatimago.com> writes:

> "Karl A. Krueger" <········@example.edu> writes:
> 
> > Pascal Bourguignon <···@informatimago.com> wrote:
> >> Let's advance human cloning to at least be able to do scientific tests
> >> in these matters:  take two clones and raise and educate them strictly
> >> in the same environment, then fork them, teach java to the one and
> >> lisp to the other and have them write a program against the same
> >> specifications.  Do it like the Kaminoans, with 1e6 clones you should
> >> get statistically significant results.
> >
> > Could be much simpler.  Take an introductory computer-science class with
> > some programming content.  Split it in half, with half the students
> > learning Lisp and the other learning Java.  See which group complete
> > more projects and learn more by the end of the term.
> >
> > Hey, wait, I was in one of those once.  (Well, it was Scheme and
> > Pascal.)  We in the Scheme group, as I recall, had somewhat more
> > completions on the final project ... and shorter code too.
> 
> Ha but you can always said that all the intelligent one went to the
> one half and the others to the other half...  And you cannot reproduce
> anything, so it's not scientific.  With clones, if you fail an
> experiment, you can always generate a new batch of identical clones
> (identical to the first batch) and rerun the same educative routine,
> or changing only one variable.  Imagine the experiments!

However, the goal should not be to get at the truth of the matter,
but instead to get to the truth that matters.  A riddle:

You come to a fork in the road.  You know that one fork leads to
Truthton, and one to Liarville; as you may suspect, residents
of Truthton cannot tell lies, and residents of Liarville cannot
say one word of truth.  But you don't know which fork goes to which
town; all you know is that these two forks dead-end into the two
towns.  You stop to ponder which road to take (presumably you want to
make your way to Truthton) and you then notice that someone is coming
up behind you, presumably going home to one of the towns.  How many
questions must you ask him in order to determine which way leads to
Truthton?  Does it matter whether you are able to determine if the
other traveller is telling the truth or not?

Back to the matter at hand: which group would you care to associate
yourself with; the group that calls itself smarter and which seems
to get more done, or the group that calls itself more popular and
seems to have more members?  And the real question is, does it matter
whether either group's claim is true or not?

-- 
Duane Rettig    ·····@franz.com    Franz Inc.  http://www.franz.com/
555 12th St., Suite 1450               http://www.555citycenter.com/
Oakland, Ca. 94607        Phone: (510) 452-2000; Fax: (510) 452-0182   
From: Pascal Bourguignon
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <87slzy896z.fsf@thalassa.informatimago.com>
Duane Rettig <·····@franz.com> writes:
> However, the goal should not be to get at the truth of the matter,
> but instead to get to the truth that matters.  A riddle:
>
> You come to a fork in the road.  You know that one fork leads to
> Truthton, and one to Liarville; as you may suspect, residents
> of Truthton cannot tell lies, and residents of Liarville cannot
> say one word of truth.  But you don't know which fork goes to which
> town; all you know is that these two forks dead-end into the two
> towns.  You stop to ponder which road to take (presumably you want to
> make your way to Truthton) and you then notice that someone is coming
> up behind you, presumably going home to one of the towns.  How many
> questions must you ask him in order to determine which way leads to
> Truthton?  Does it matter whether you are able to determine if the
> other traveller is telling the truth or not?

Usually, Truthtownians are vegetarians anr Liarvillians are canibals.
You need to ask only one question. (There are several solutions).


> Back to the matter at hand: which group would you care to associate
> yourself with; the group that calls itself smarter and which seems
> to get more done, or the group that calls itself more popular and
> seems to have more members?  And the real question is, does it matter
> whether either group's claim is true or not?

Lisp is more sexy, it has sexpies...

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

Nobody can fix the economy.  Nobody can be trusted with their finger
on the button.  Nobody's perfect.  VOTE FOR NOBODY.
From: Brandon J. Van Every
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <mqkoe.13776$M36.9105@newsread1.news.atl.earthlink.net>
Pascal Bourguignon wrote:

>Usually, Truthtownians are vegetarians anr Liarvillians are canibals.
>You need to ask only one question. (There are several solutions).
>  
>
I thought Truthownians were missionaries?

-- 
Cheers,                     www.indiegamedesign.com
Brandon Van Every           Seattle, WA

20% of the world is real.
80% is gobbledygook we make up inside our own heads.
From: Barry Jones
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <42a32073$0$6531$8f2e0ebb@news.shared-secrets.com>
Duane Rettig wrote:

>Pascal Bourguignon <···@informatimago.com> writes:
>
>  
>
>>"Karl A. Krueger" <········@example.edu> writes:
>>
>>    
>>
>>>Pascal Bourguignon <···@informatimago.com> wrote:
>>>      
>>>
>>>>Let's advance human cloning to at least be able to do scientific tests
>>>>in these matters:  take two clones and raise and educate them strictly
>>>>in the same environment, then fork them, teach java to the one and
>>>>lisp to the other and have them write a program against the same
>>>>specifications.  Do it like the Kaminoans, with 1e6 clones you should
>>>>get statistically significant results.
>>>>        
>>>>
>>>Could be much simpler.  Take an introductory computer-science class with
>>>some programming content.  Split it in half, with half the students
>>>learning Lisp and the other learning Java.  See which group complete
>>>more projects and learn more by the end of the term.
>>>
>>>Hey, wait, I was in one of those once.  (Well, it was Scheme and
>>>Pascal.)  We in the Scheme group, as I recall, had somewhat more
>>>completions on the final project ... and shorter code too.
>>>      
>>>
>>Ha but you can always said that all the intelligent one went to the
>>one half and the others to the other half...  And you cannot reproduce
>>anything, so it's not scientific.  With clones, if you fail an
>>experiment, you can always generate a new batch of identical clones
>>(identical to the first batch) and rerun the same educative routine,
>>or changing only one variable.  Imagine the experiments!
>>    
>>
>
>However, the goal should not be to get at the truth of the matter,
>but instead to get to the truth that matters.  A riddle:
>
>You come to a fork in the road.  You know that one fork leads to
>Truthton, and one to Liarville; as you may suspect, residents
>of Truthton cannot tell lies, and residents of Liarville cannot
>say one word of truth.  But you don't know which fork goes to which
>town; all you know is that these two forks dead-end into the two
>towns.  You stop to ponder which road to take (presumably you want to
>make your way to Truthton) and you then notice that someone is coming
>up behind you, presumably going home to one of the towns.  How many
>questions must you ask him in order to determine which way leads to
>Truthton?  Does it matter whether you are able to determine if the
>other traveller is telling the truth or not?
>  
>
Nfx gur avpr sryybj juvpu ebnq ur jvyy or gnxvat.

>Back to the matter at hand: which group would you care to associate
>yourself with; the group that calls itself smarter and which seems
>to get more done, or the group that calls itself more popular and
>seems to have more members?  And the real question is, does it matter
>whether either group's claim is true or not?
>  
>
Ask both groups whether they are smarter. Chances are the Java group 
will poll each member sequentially and produce a majority result. In the 
Lisp group, the first fellow will answer, "I know my opinion, but let me 
get my neighbor's opinion first, and then combine the results." The 
second person says exactly the same thing. Finally, the last person 
answers for herself, and that starts a return wave through the group, 
with the first person finally returning an answer.

Of course, afterwards, their memory was deallocated.

Barry
From: Christopher Browne
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <WQHoe.1045$_n2.129839@news20.bellglobal.com>
In an attempt to throw the authorities off his trail, Barry Jones <········@acm.org> transmitted:
> Ask both groups whether they are smarter. Chances are the Java group
> will poll each member sequentially and produce a majority result. In
> the Lisp group, the first fellow will answer, "I know my opinion, but
> let me get my neighbor's opinion first, and then combine the results."
> The second person says exactly the same thing. Finally, the last
> person answers for herself, and that starts a return wave through the
> group, with the first person finally returning an answer.

Won't the CL one halt repeatedly due to garbage collection?

:-)
-- 
"cbbrowne",·@","gmail.com"
http://cbbrowne.com/info/
If you eat a live  frog in the morning, nothing  worse will happen  to
either of you for the rest of the day.
From: Ulrich Hobelmann
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <3gh2u0Fc8m1uU2@individual.net>
Christopher Browne wrote:
> In an attempt to throw the authorities off his trail, Barry Jones <········@acm.org> transmitted:
> 
>>Ask both groups whether they are smarter. Chances are the Java group
>>will poll each member sequentially and produce a majority result. In
>>the Lisp group, the first fellow will answer, "I know my opinion, but
>>let me get my neighbor's opinion first, and then combine the results."
>>The second person says exactly the same thing. Finally, the last
>>person answers for herself, and that starts a return wave through the
>>group, with the first person finally returning an answer.
> 
> 
> Won't the CL one halt repeatedly due to garbage collection?
> 
> :-)

Well, if the process is a generational one, then collecting 
garbage determined as such is basically free.  The Java process, 
on the other hand, will try to reuse old garbage results, because 
it seems they can't get decent garbage collectors (yes, they 
actually write their code to reuse old objects to get more 
performance; creating lots of short-lived garbage is deprecated, 
even though with a good GC implementation it should be free).

-- 
Don't let school interfere with your education. -- Mark Twain
From: Pascal Bourguignon
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <87fyvw79wo.fsf@thalassa.informatimago.com>
Barry Jones <········@acm.org> writes:

>>How many
>>questions must you ask him in order to determine which way leads to
>>Truthton?  Does it matter whether you are able to determine if the
>>other traveller is telling the truth or not?
>>  
>>
> Nfx gur avpr sryybj juvpu ebnq ur jvyy or gnxvat.

He could be going to visit his cousin...

"Juvpu qverpgvba gb lbhe pvgl?"

Vs ur gryyf gur gehgu, ur'yy cbvag Gehgugbja, vs ur yvrf ur'yy cbvag
Gehgugbja gbb.

Nabgure cbffvoyr dhrfgvba bar bs zl sevraq'f gjvfgrq zvaq cebivqrq vf

"Jung jbhyq n pvgvmra bs gur bgure pvgl gryy zr vs V nfxrq uvz gb
cbvag zr Gehgugbja?", naq gura tb gur bgure jnl.


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

This is a signature virus.  Add me to your signature and help me to live
From: Duane Rettig
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <44qccv0cq.fsf@franz.com>
Pascal Bourguignon <···@informatimago.com> writes:

> Barry Jones <········@acm.org> writes:
> 
> >>How many
> >>questions must you ask him in order to determine which way leads to
> >>Truthton?  Does it matter whether you are able to determine if the
> >>other traveller is telling the truth or not?
> >>  
> >>
> > Nfx gur avpr sryybj juvpu ebnq ur jvyy or gnxvat.
> 
> He could be going to visit his cousin...
> 
> "Juvpu qverpgvba gb lbhe pvgl?"

Excellent.

> Vs ur gryyf gur gehgu, ur'yy cbvag Gehgugbja, vs ur yvrf ur'yy cbvag
> Gehgugbja gbb.
> 
> Nabgure cbffvoyr dhrfgvba bar bs zl sevraq'f gjvfgrq zvaq cebivqrq vf
> 
> "Jung jbhyq n pvgvmra bs gur bgure pvgl gryy zr vs V nfxrq uvz gb
> cbvag zr Gehgugbja?", naq gura tb gur bgure jnl.

Ah, the magic of boolean parity!

-- 
Duane Rettig    ·····@franz.com    Franz Inc.  http://www.franz.com/
555 12th St., Suite 1450               http://www.555citycenter.com/
Oakland, Ca. 94607        Phone: (510) 452-2000; Fax: (510) 452-0182   
From: Barry Jones
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <42a3b105$0$6535$8f2e0ebb@news.shared-secrets.com>
Pascal Bourguignon wrote:

>He could be going to visit his cousin...
>  
>
I took this phrase as a given: "presumably going home to one of the towns."

>"Juvpu qverpgvba gb lbhe pvgl?"
>  
>
Good, simple one!

>Vs ur gryyf gur gehgu, ur'yy cbvag Gehgugbja, vs ur yvrf ur'yy cbvag
>Gehgugbja gbb.
>
>Another possible question one of my friend's twisted mind provided is
>
>"Jung jbhyq n pvgvmra bs gur bgure pvgl gryy zr vs V nfxrq uvz gb
>cbvag zr Gehgugbja?", naq gura tb gur bgure jnl.
>  
>
This was my first solution. Good choice of friends!
-- 
Barry
From: Marcin 'Qrczak' Kowalczyk
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <87zmu3tzgx.fsf@qrnik.zagroda>
Barry Jones <········@acm.org> writes:

> Ask both groups whether they are smarter. Chances are the Java group
> will poll each member sequentially and produce a majority result.
> In the Lisp group, the first fellow will answer, "I know my opinion,
> but let me get my neighbor's opinion first, and then combine the
> results." The second person says exactly the same thing. Finally,
> the last person answers for herself, and that starts a return wave
> through the group, with the first person finally returning an
> answer.

This assumes that a non-tail recursion as deep as the data size
is considered acceptable in Lisp. I'm afraid it's not the case.

There seem to be various levels of acceptance of deep recursion
among programming styles natural to various languages:

0. Not accepted. This applies to languages like C, Java and Python.

1. Tail recursion only. I suppose Lisp is here. Particular
   implementations may be higher or lower though, so I'm not sure
   about the style imposed by the language as such.

2. Tail calls only, possibly between different functions. Most
   functional languages are here, even though in OCaml tail calls with
   a sufficiently large number of arguments (over 5) do consume stack
   (I forgot whether this applies to native code, byte code, or both).

3. Deep recursion works well: the stack size is not artificially
   limited. It's possible that Scheme is here because a standard
   implementation of call/cc which puts stack frames on the heap
   yields this property.

I recently improved the GC of my implementation of my language to not
scan the whole stack on each minor collection, because otherwise deep
non-tail recursion could make GC run in O(N^2) time. The language
promotes the 3rd level of acceptance of deep recursion. Stack frames
are not recycled by the GC - they are taken from a reallocatable array.

-- 
   __("<         Marcin Kowalczyk
   \__/       ······@knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/
From: Barry Jones
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <42a8fb1e$0$6523$8f2e0ebb@news.shared-secrets.com>
Marcin 'Qrczak' Kowalczyk wrote:

>Barry Jones <········@acm.org> writes:
>
>  
>
>>Ask both groups whether they are smarter. Chances are the Java group
>>will poll each member sequentially and produce a majority result.
>>In the Lisp group, the first fellow will answer, "I know my opinion,
>>but let me get my neighbor's opinion first, and then combine the
>>results." The second person says exactly the same thing. Finally,
>>the last person answers for herself, and that starts a return wave
>>through the group, with the first person finally returning an
>>answer.
>>    
>>
>
>This assumes that a non-tail recursion as deep as the data size
>is considered acceptable in Lisp. I'm afraid it's not the case.
>
>There seem to be various levels of acceptance of deep recursion
>among programming styles natural to various languages:
>
>0. Not accepted. This applies to languages like C, Java and Python.
>
>1. Tail recursion only. I suppose Lisp is here. Particular
>   implementations may be higher or lower though, so I'm not sure
>   about the style imposed by the language as such.
>
>2. Tail calls only, possibly between different functions. Most
>   functional languages are here, even though in OCaml tail calls with
>   a sufficiently large number of arguments (over 5) do consume stack
>   (I forgot whether this applies to native code, byte code, or both).
>
>3. Deep recursion works well: the stack size is not artificially
>   limited. It's possible that Scheme is here because a standard
>   implementation of call/cc which puts stack frames on the heap
>   yields this property.
>
>I recently improved the GC of my implementation of my language to not
>scan the whole stack on each minor collection, because otherwise deep
>non-tail recursion could make GC run in O(N^2) time. The language
>promotes the 3rd level of acceptance of deep recursion. Stack frames
>are not recycled by the GC - they are taken from a reallocatable array.
>  
>
That was helpful, thanks.
 
Is the model of processing a list by processing the car, then 
recursively processing the cdr generally acceptable only if the 
recursive calls don't have to return values? I think that implies tail 
recursion, right?

Do we generally expect a lisp implementation to optimize tail recursion? 
I'm using CLisp in windows for the next three weeks, then I'll be using 
MCL on a Mac. I'd guess that MCL is optimized.

What kind of GC is it? Generation copying?
-- 
Barry
From: Pascal Bourguignon
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <87br6ezvwh.fsf@thalassa.informatimago.com>
Barry Jones <········@acm.org> writes:
>  Is the model of processing a list by processing the car, then
> recursively processing the cdr generally acceptable only if the
> recursive calls don't have to return values? I think that implies tail
> recursion, right?

No, that's not the criteria.  As the name implies, the criteria is
that the recursive call be the last thing done in the function.  This
allow for a trivial derecursivation: instead of terminating the
function with a JSR;RTS, the compiler can replace it with a JMP.



> Do we generally expect a lisp implementation to optimize tail
> recursion?

I like it this way.


> I'm using CLisp in windows for the next three weeks, then

clisp does it:

[68]> (disassemble (compile (defun f (x &optional (r 1)) 
                         (if (<= x 1) r (f (1- x) (* x r))))))

Disassembly of function F
(CONST 0) = 1
1 required argument
1 optional argument
No rest parameter
No keyword parameters
16 byte-code instructions:
0     L0
0     (JMPIFBOUNDP 1 L5)
3     (CONST 0)                           ; 1
4     (STORE 1)
5     L5
5     (LOAD&PUSH 2)
6     (CONST&PUSH 0)                      ; 1
7     (CALLSR&JMPIF 1 49 L22)             ; <=
11    (LOAD&DEC&PUSH 2)
13    (LOAD&PUSH 3)
14    (LOAD&PUSH 3)
15    (CALLSR&PUSH 2 55)                  ; *
18    (JMPTAIL 2 5 L0)           ; <---------- See the JMP -----------
22    L22
22    (LOAD 1)
23    (SKIP&RET 3)
NIL


[69]> (disassemble (compile (defun f (x)
                         (if (<= x 1) 1 (* x (f (1- x)))))))

Disassembly of function F
(CONST 0) = 1
1 required argument
0 optional arguments
No rest parameter
No keyword parameters
12 byte-code instructions:
0     L0
0     (LOAD&PUSH 1)
1     (CONST&PUSH 0)                      ; 1
2     (CALLSR&JMPIF 1 49 L16)             ; <=
6     (LOAD&PUSH 1)
7     (LOAD&DEC&PUSH 2)
9     (JSR&PUSH L0)   ; <------- here the call is not tail so JSR -------
11    (CALLSR 2 55)                       ; *
14    (SKIP&RET 2)
16    L16
16    (CONST 0)                           ; 1
17    (SKIP&RET 2)
NIL
[70]> 


> I'll be using MCL on a Mac. I'd guess that MCL is optimized.
>
> What kind of GC is it? Generation copying?


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

In a World without Walls and Fences, 
who needs Windows and Gates?
From: Barry Jones
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <42a92f6a$0$6558$8f2e0ebb@news.shared-secrets.com>
Pascal Bourguignon wrote:

>Barry Jones <········@acm.org> writes:
>  
>
>> Is the model of processing a list by processing the car, then
>>recursively processing the cdr generally acceptable only if the
>>recursive calls don't have to return values? I think that implies tail
>>recursion, right?
>>    
>>
>
>No, that's not the criteria.  As the name implies, the criteria is
>that the recursive call be the last thing done in the function.  This
>allow for a trivial derecursivation: instead of terminating the
>function with a JSR;RTS, the compiler can replace it with a JMP.
>
>
>
>  
>
>>Do we generally expect a lisp implementation to optimize tail
>>recursion?
>>    
>>
>
>I like it this way.
>
>
>  
>
>>I'm using CLisp in windows for the next three weeks, then
>>    
>>
>
>clisp does it:
>
>[68]> (disassemble (compile (defun f (x &optional (r 1)) 
>                         (if (<= x 1) r (f (1- x) (* x r))))))
>
>Disassembly of function F
>(CONST 0) = 1
>1 required argument
>1 optional argument
>No rest parameter
>No keyword parameters
>16 byte-code instructions:
>0     L0
>0     (JMPIFBOUNDP 1 L5)
>3     (CONST 0)                           ; 1
>4     (STORE 1)
>5     L5
>5     (LOAD&PUSH 2)
>6     (CONST&PUSH 0)                      ; 1
>7     (CALLSR&JMPIF 1 49 L22)             ; <=
>11    (LOAD&DEC&PUSH 2)
>13    (LOAD&PUSH 3)
>14    (LOAD&PUSH 3)
>15    (CALLSR&PUSH 2 55)                  ; *
>18    (JMPTAIL 2 5 L0)           ; <---------- See the JMP -----------
>22    L22
>22    (LOAD 1)
>23    (SKIP&RET 3)
>NIL
>
>
>[69]> (disassemble (compile (defun f (x)
>                         (if (<= x 1) 1 (* x (f (1- x)))))))
>
>Disassembly of function F
>(CONST 0) = 1
>1 required argument
>0 optional arguments
>No rest parameter
>No keyword parameters
>12 byte-code instructions:
>0     L0
>0     (LOAD&PUSH 1)
>1     (CONST&PUSH 0)                      ; 1
>2     (CALLSR&JMPIF 1 49 L16)             ; <=
>6     (LOAD&PUSH 1)
>7     (LOAD&DEC&PUSH 2)
>9     (JSR&PUSH L0)   ; <------- here the call is not tail so JSR -------
>11    (CALLSR 2 55)                       ; *
>14    (SKIP&RET 2)
>16    L16
>16    (CONST 0)                           ; 1
>17    (SKIP&RET 2)
>NIL
>[70]> 
>  
>
Wonderful! Thank you.
-- 
Barry
From: Christopher C. Stacy
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <u64wu3ah3.fsf@news.dtpq.com>
Pascal Bourguignon <···@informatimago.com> writes:

> "Karl A. Krueger" <········@example.edu> writes:
> 
> > Pascal Bourguignon <···@informatimago.com> wrote:
> >> Let's advance human cloning to at least be able to do scientific tests
> >> in these matters:  take two clones and raise and educate them strictly
> >> in the same environment, then fork them, teach java to the one and
> >> lisp to the other and have them write a program against the same
> >> specifications.  Do it like the Kaminoans, with 1e6 clones you should
> >> get statistically significant results.
> >
> > Could be much simpler.  Take an introductory computer-science class with
> > some programming content.  Split it in half, with half the students
> > learning Lisp and the other learning Java.  See which group complete
> > more projects and learn more by the end of the term.
> >
> > Hey, wait, I was in one of those once.  (Well, it was Scheme and
> > Pascal.)  We in the Scheme group, as I recall, had somewhat more
> > completions on the final project ... and shorter code too.
> 
> Ha but you can always said that all the intelligent one went to the
> one half and the others to the other half...  And you cannot reproduce
> anything, so it's not scientific.

Sure you can!  The smart people always join the Lisp team....

:)
From: Hakon Alstadheim
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <4tfoe.1466$qE.370516@juliett.dax.net>
Karl A. Krueger wrote:
> Pascal Bourguignon <···@informatimago.com> wrote:
>>Let's advance human cloning to at least be able to do scientific tests
>>in these matters:  take two clones and raise and educate them strictly
>>in the same environment, then fork them, teach java to the one and
>>lisp to the other and have them write a program against the same
>>specifications.  Do it like the Kaminoans, with 1e6 clones you should
>>get statistically significant results.
> 
> Could be much simpler.  Take an introductory computer-science class with
> some programming content.  Split it in half, with half the students
> learning Lisp and the other learning Java.  See which group complete
> more projects and learn more by the end of the term.
> 
The proffessors, the quality of the tools and the teaching materials 
would make a difference. Maybe run the experiment for a few generations. 
  Keep the first batch in two separate ivory towers for 10 years, put 
them to work teaching the second batch, repeat until the rate of 
innovation reaches a steady state. Now, to figure out how to measure the 
rate of innovation. I think maybe Java would win on LOC or new API's. 
Maybe give each group its own country and measure happiness in the 
populations (by hormonal levels or whatever ) after say 200 years. Keep 
a third country as a control-group with no computers allowed.
From: Brandon J. Van Every
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <AUfoe.15240$w21.887@newsread3.news.atl.earthlink.net>
Hakon Alstadheim wrote:

> Maybe give each group its own country and measure happiness in the 
> populations (by hormonal levels or whatever ) after say 200 years. 
> Keep a third country as a control-group with no computers allowed.

Yeah, only fair maidens with elevated hormone levels allowed.  I wanna 
be in charge of that control group!  "But sir we don't know what 
computers are, we just run around naked all day long...."

-- 
Cheers,                     www.indiegamedesign.com
Brandon Van Every           Seattle, WA

20% of the world is real.
80% is gobbledygook we make up inside our own heads.
From: Matthias Buelow
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <86mzpt98gm.fsf@drjekyll.mkbuelow.net>
"Karl A. Krueger" <········@example.edu> writes:

>Could be much simpler.  Take an introductory computer-science class with
>some programming content.  Split it in half, with half the students
>learning Lisp and the other learning Java.  See which group complete
>more projects and learn more by the end of the term.

That doesn't work; most of them probably already know (some) Java, or
some similar language, while Lisp will be completely alien to them,
both in appearance aswell as in way of thinking. What you'll probably
get is a much lower yield in the Lisp part, especially because the
students in that group will be angry that they have to do that "weird
shit" instead of using the "cool Java".

mkb.
From: Thomas A. Russ
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <ymir7f5u92d.fsf@sevak.isi.edu>
"Karl A. Krueger" <········@example.edu> writes:
 
>Could be much simpler.  Take an introductory computer-science class with
>some programming content.  Split it in half, with half the students
>learning Lisp and the other learning Java.  See which group complete
>more projects and learn more by the end of the term.

The real problem is that the results could be influenced to a large
degree by the type of problems which are assigned.  If you choose
something that involves heavy use of the internet or graphics, you are
likely to get a boost from the Java libraries available for that
purpose.

If you instead choose projects heavy on symbolic reasoning, like doing
symbolic algrebra or calculus, the lisp group would be favored.

-- 
Thomas A. Russ,  USC/Information Sciences Institute
From: Ulrich Hobelmann
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <3h7g6rFetu5oU1@individual.net>
Thomas A. Russ wrote:
> The real problem is that the results could be influenced to a large
> degree by the type of problems which are assigned.  If you choose
> something that involves heavy use of the internet or graphics, you are
> likely to get a boost from the Java libraries available for that
> purpose.

Why?  I suspect, some big Scheme systems (PLT, Bigloo) have decent 
libraries for graphics or the internet, while for Java you often 
need external packages, too (is there finally a HTTP class in the 
standard distro? at least decent thread support seems to have made 
it into 1.5).  So it's not a language issue at all, just 
packaging.  If there are no packages, someone would have to 
support SDL/GTk bindings etc. for such a class.

> If you instead choose projects heavy on symbolic reasoning, like doing
> symbolic algrebra or calculus, the lisp group would be favored.

OTOH, if Java can't do symbolic algebra well, it's just a very, 
very bad "general purpose" programming language! (and lots of 
programming problems can be rephrased as symbolic algebra, 
especially in all compilation / translation)

-- 
Don't let school interfere with your education. -- Mark Twain
From: Michael Wildpaner
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <opbr68fm6m.fsf@rainbow.studorg.tuwien.ac.at>
Ulrich Hobelmann <···········@web.de> writes:
> Why?  I suspect, some big Scheme systems (PLT, Bigloo) have decent
> libraries for graphics or the internet, while for Java you often need
> external packages, too (is there finally a HTTP class in the standard
> distro? at least decent thread support seems to have made it into
> 1.5). [...]

You seem to have lost your way amongst some of the kitchen sinks
included in the Java runtime library ;-)

This particular sink, HTTP (Client) support, has been included since
the dawn of time (JDK1.0) as java.net.URLConnection.

And I am really interested in your definition of "decent" tread
support, as threading in the Sun JVM has been used in production code
since the same time. And the new java.util.concurrent has been around
as Doug Lea's util.concurrent Library since '98, and is based on
concurrency control mechanisms built into the language (thread-level
synchronization with "monitors").

Sheesh, making a Lisp convert defend Java ;-)

Mike

-- 
If you don't breathe, there is no air.          DI Michael Wildpaner
If you don't walk, there is no earth.                  Ph.D. Student
If you don't speak, there is no world.
    -- Navajo (Dineh) wisdom
From: Ulrich Hobelmann
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <3ha5udFg1mbkU1@individual.net>
Michael Wildpaner wrote:
> Ulrich Hobelmann <···········@web.de> writes:
> 
>>Why?  I suspect, some big Scheme systems (PLT, Bigloo) have decent
>>libraries for graphics or the internet, while for Java you often need
>>external packages, too (is there finally a HTTP class in the standard
>>distro? at least decent thread support seems to have made it into
>>1.5). [...]
> 
> 
> You seem to have lost your way amongst some of the kitchen sinks
> included in the Java runtime library ;-)
> 
> This particular sink, HTTP (Client) support, has been included since
> the dawn of time (JDK1.0) as java.net.URLConnection.

Hm, don't remember, but I remember missing some kind of internet 
protocol...

> And I am really interested in your definition of "decent" tread
> support, as threading in the Sun JVM has been used in production code
> since the same time. And the new java.util.concurrent has been around
> as Doug Lea's util.concurrent Library since '98, and is based on
> concurrency control mechanisms built into the language (thread-level
> synchronization with "monitors").

Okay, maybe Doug Lea's stuff was around, but I didn't know that, 
so threading was always kindof painful for me.  I'm not asking for 
much, but a threading system should at least allow me easy sending 
of messages (like Unix read/write/select), while in Java I have to 
use ugly foreign-thread-sets-public-variable-in-object instead... 
blech.  Also, there's no select, so I have to put everything in 
threads, that wouldn't need to be there.  Again, set variables to 
tell you're done, since you can't have one thread "collect" 
(select()) messages from multiple other threads...

-- 
Don't let school interfere with your education. -- Mark Twain
From: Pascal Bourguignon
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <87fyvz3t8f.fsf@thalassa.informatimago.com>
"Brandon J. Van Every" <·····················@mycompanyname.com> writes:
> Is this speed of programming difference because you're an uber-guru
> programmer and the PHP guy isn't?  Or because it's so much inherently
> easier to write the stuff in Lisp?  I'd be wary of the former.  I've
> heard so many people in uber-techo-land tell me "how easy everything
> is," for anything from HLLs to MinGW builds, that I wanna puke.  The
> truth is, in many cases it's just techies who love technical grunge.
> This keeps them in a feedback loop for the learning curve, so their
> knowledge of truly excruciating technologies becomes very deep.  They
> become prolific at using their tools, and other people find them to be
> brilliant', when really they're just 'bent' or 'wired funny'.  S&M has
> its adherants too!  Anyways, I'm just pointing out the possible
> problem.  I'll leave it to you to analyze where the advantage of
> you-with-Lisp vs. somoene-else-with-PHP really lies.

I bet no manager would mind hiring S&M adherants, if the whiping makes
them program faster.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d? s++:++ a+ C+++ UL++++ P--- L+++ E+++ W++ N+++ o-- K- w--- 
O- M++ V PS PE++ Y++ PGP t+ 5+ X++ R !tv b+++ DI++++ D++ 
G e+++ h+ r-- z? 
------END GEEK CODE BLOCK------
From: Alain Picard
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <87fyvzuj98.fsf@memetrics.com>
Andr� Thieme <······························@justmail.de> writes:

> What am I doing wrong?
> Oh, btw: the lisp file is compiled!

Did you take care to ensure that the mod_lisp keeps
the socket open and reuses it for each connection?
From: André Thieme
Subject: Re: How to make mod_lisp faster than php?
Date: 
Message-ID: <d7qqg5$6pq$1@ulric.tng.de>
Alain Picard schrieb:
> Andr� Thieme <······························@justmail.de> writes:
> 
> 
>>What am I doing wrong?
>>Oh, btw: the lisp file is compiled!
> 
> 
> Did you take care to ensure that the mod_lisp keeps
> the socket open and reuses it for each connection?

No, I didn't (at least I did not anything special).
I am now using Edis great tips:

(mp::startup-idle-and-top-level-loops)
(setf *print-pretty* nil)


Could you please tell me how to keep the socket open and how to reuse it?


Andr�
--