From: Khookie
Subject: Hunchentoot for production use and more questions...
Date: 
Message-ID: <1184659319.997306.207510@g12g2000prg.googlegroups.com>
Hi

I'm very new to Lisp - I'm learning it at the moment since it looks to
be a very powerful language, based on a cursory scan through Practical
Common Lisp & On Lisp.  I'm looking to evaluate it vs. Python for a
website I'm developing in the not too distant future.

I just setup SBCL on Windows and downloaded all 13 or so asdf packages
for Hunchentoot.  I've got the default page up and running.

I also redefined the default handler function to output other stuff,
but nothing terribly interesting.

Looking to get hunchentoot-test working for something slightly more
interesting tonight.

Now that context has been established, I was hoping if anyone is so
kind to answer my hopefully "not too dumb" questions.

1. I've never seen this way of developing websites.  What I mean is
that it looks like the whole website with multiple pages can be
represented in one lisp file if you want.

I'm usually used to files in directory structures, with each file
representing a page on the website (e.g. php, asp, etc.).  Is there a
way to make it so that Hunchentoot can look at a folder structure,
evaluate lisp files and return other files like images as is - like
Apache, etc... or am I asking too much?  Or maybe, am I missing some
paradigm shift in website development here?

2. Is Hunchentoot ready for production use?

3. Is SBCL 1.0.6 Windows really that bad?  Does anyone out there
develop on the same environment?

I was originally using clisp but I need database access, and clsql
seems to be the only lisp package that does that... and it needs uffi,
which isn't supported by clisp.

(btw, if my creation ever goes to production in Lisp, I'll definitely
use a Linux box... so no Windows jokes plz... I need it for other dev
stuff)

4. Are there any good alternative lisp based web servers worthy of my
consideration?

Thanks in advance to all Lispers out there.

Chris

From: Zach Beane
Subject: Re: Hunchentoot for production use and more questions...
Date: 
Message-ID: <m3r6n76yv1.fsf@unnamed.xach.com>
Khookie <··········@gmail.com> writes:

> 2. Is Hunchentoot ready for production use?

This means different things to different people. Hunchentoot is ready
for production use for me. What does it mean to you?

My site, www.wigflip.com, is powered by Hunchentoot's predecessor
TBNL. It has created about 100,000 graphics on the fly so far this
month.

Zach
From: Khookie
Subject: Re: Hunchentoot for production use and more questions...
Date: 
Message-ID: <1184679554.855455.92650@g37g2000prf.googlegroups.com>
On Jul 17, 9:41 pm, Zach Beane <····@xach.com> wrote:
> Khookie <··········@gmail.com> writes:
> > 2. Is Hunchentoot ready for production use?
>
> This means different things to different people. Hunchentoot is ready
> for production use for me. What does it mean to you?
>
> My site,www.wigflip.com, is powered by Hunchentoot's predecessor
> TBNL. It has created about 100,000 graphics on the fly so far this
> month.
>
> Zach

Hi Zach

Thanks for that.  Seems promising... does it crash?  Do you need to
reboot every so often?

I'm just a bit worried about how reliable it is.

Chris
From: Zach Beane
Subject: Re: Hunchentoot for production use and more questions...
Date: 
Message-ID: <m3myxv6snw.fsf@unnamed.xach.com>
Khookie <··········@gmail.com> writes:

> Thanks for that.  Seems promising... does it crash?  Do you need to
> reboot every so often?
>
> I'm just a bit worried about how reliable it is.

No crashes, no reboots. It's pretty reliable for my combination of
software & hardware.

The community of Hunchentoot users on the mailing list is also very
helpful and seems to be growing.

Zach
From: Pascal Bourguignon
Subject: Re: Hunchentoot for production use and more questions...
Date: 
Message-ID: <873aznmmpm.fsf@thalassa.lan.informatimago.com>
Khookie <··········@gmail.com> writes:
> 1. I've never seen this way of developing websites.  What I mean is
> that it looks like the whole website with multiple pages can be
> represented in one lisp file if you want.

The mindframe to use is that of a normal application, using HTML for
the user interface.

Don't think "multiple pages", but "multiple windows" or dialogs.


> I'm usually used to files in directory structures, with each file
> representing a page on the website (e.g. php, asp, etc.).  Is there a
> way to make it so that Hunchentoot can look at a folder structure,
> evaluate lisp files and return other files like images as is - like
> Apache, etc... or am I asking too much?  Or maybe, am I missing some
> paradigm shift in website development here?

I don't know hunchentoot, but I'd bet it's possible to make it get
static pages from files.  If not, it should be trivial to implement,
even for you since you've already redefined a default handler.


> 2. Is Hunchentoot ready for production use?
>
> 3. Is SBCL 1.0.6 Windows really that bad?  Does anyone out there
> develop on the same environment?
>
> I was originally using clisp but I need database access, and clsql
> seems to be the only lisp package that does that... and it needs uffi,
> which isn't supported by clisp.

But CFFI supports clisp, and provide a UFFI compatibility layer.
I use clsql in clisp without any problem.

#+clisp (asdf-load :cffi)
#+clisp (asdf-load :cffi-uffi-compat)
#-clisp (asdf-load :uffi)
(asdf-load :md5)
(asdf-install :clsql)
(asdf-load :clsql-mysql :no-load-source t)
#+(or clisp cmu) (asdf-load :clsql-postgresql-socket :no-load-source t)
#-(or clisp cmu) (asdf-load :clsql-postgresql-socket)


> (btw, if my creation ever goes to production in Lisp, I'll definitely
> use a Linux box... so no Windows jokes plz... I need it for other dev
> stuff)

Good.  Both scbl and clisp run on both.  Perhaps using them on cygwin
would ease the go-between both OS.  (clisp on cygwin is more like clisp
on linux than clisp on win32).


> 4. Are there any good alternative lisp based web servers worthy of my
> consideration?

http://www.cliki.net/web


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

NOTE: The most fundamental particles in this product are held
together by a "gluing" force about which little is currently known
and whose adhesive power can therefore not be permanently
guaranteed.
From: Khookie
Subject: Re: Hunchentoot for production use and more questions...
Date: 
Message-ID: <1184681000.377996.306360@x35g2000prf.googlegroups.com>
On Jul 17, 6:57 pm, Pascal Bourguignon <····@informatimago.com> wrote:
> Khookie <··········@gmail.com> writes:
> > 1. I've never seen this way of developing websites.  What I mean is
> > that it looks like the whole website with multiple pages can be
> > represented in one lisp file if you want.
>
> The mindframe to use is that of a normal application, using HTML for
> the user interface.
>
> Don't think "multiple pages", but "multiple windows" or dialogs.
>
> > I'm usually used to files in directory structures, with each file
> > representing a page on the website (e.g. php, asp, etc.).  Is there a
> > way to make it so that Hunchentoot can look at a folder structure,
> > evaluate lisp files and return other files like images as is - like
> > Apache, etc... or am I asking too much?  Or maybe, am I missing some
> > paradigm shift in website development here?
>
> I don't know hunchentoot, but I'd bet it's possible to make it get
> static pages from files.  If not, it should be trivial to implement,
> even for you since you've already redefined a default handler.
>
> > 2. Is Hunchentoot ready for production use?
>
> > 3. Is SBCL 1.0.6 Windows really that bad?  Does anyone out there
> > develop on the same environment?
>
> > I was originally using clisp but I need database access, and clsql
> > seems to be the only lisp package that does that... and it needs uffi,
> > which isn't supported by clisp.
>
> But CFFI supports clisp, and provide a UFFI compatibility layer.
> I use clsql in clisp without any problem.
>
> #+clisp (asdf-load :cffi)
> #+clisp (asdf-load :cffi-uffi-compat)
> #-clisp (asdf-load :uffi)
> (asdf-load :md5)
> (asdf-install :clsql)
> (asdf-load :clsql-mysql :no-load-source t)
> #+(or clisp cmu) (asdf-load :clsql-postgresql-socket :no-load-source t)
> #-(or clisp cmu) (asdf-load :clsql-postgresql-socket)
>
> > (btw, if my creation ever goes to production in Lisp, I'll definitely
> > use a Linux box... so no Windows jokes plz... I need it for other dev
> > stuff)
>
> Good.  Both scbl and clisp run on both.  Perhaps using them on cygwin
> would ease the go-between both OS.  (clisp on cygwin is more like clisp
> on linux than clisp on win32).
>
> > 4. Are there any good alternative lisp based web servers worthy of my
> > consideration?
>
> http://www.cliki.net/web
>
> --
> __Pascal Bourguignon__                    http://www.informatimago.com/
>
> NOTE: The most fundamental particles in this product are held
> together by a "gluing" force about which little is currently known
> and whose adhesive power can therefore not be permanently
> guaranteed.

Hi Pascal

Thank for your answers... especially the one about thinking about the
website as a single application.

Cheers

Chris
From: Edi Weitz
Subject: Re: Hunchentoot for production use and more questions...
Date: 
Message-ID: <ulkdf13jm.fsf@agharta.de>
On Tue, 17 Jul 2007 01:01:59 -0700, Khookie <··········@gmail.com> wrote:

> I'm usually used to files in directory structures, with each file
> representing a page on the website (e.g. php, asp, etc.).  Is there
> a way to make it so that Hunchentoot can look at a folder structure,
> evaluate lisp files and return other files like images as is - like
> Apache, etc...

That's not "like Apache", that's like most people use Apache.  Apache
is a web server and can be set up in many different ways.  You can for
example have one module handle all URLs if you want.  Likewise,
Hunchentoot is a web server and can be set up in many different
ways.

For a way of using Hunchentoot that's more similar to how most people
use PHP or ASP see for example this:

  http://common-lisp.net/pipermail/tbnl-devel/2007-May/001324.html

HTH,
Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Rafal Strzalinski
Subject: Re: Hunchentoot for production use and more questions...
Date: 
Message-ID: <1184787879.411241.184230@i13g2000prf.googlegroups.com>
On 17 Lip, 10:01, Khookie <··········@gmail.com> wrote:

> 1. I've never seen this way of developing websites.  What I mean is
> that it looks like the whole website with multiple pages can be
> represented in one lisp file if you want.
>
> I'm usually used to files in directory structures, with each file
> representing a page on the website (e.g. php, asp, etc.).  Is there a
> way to make it so that Hunchentoot can look at a folder structure,
> evaluate lisp files and return other files like images as is - like
> Apache, etc... or am I asking too much?  Or maybe, am I missing some
> paradigm shift in website development here?

No, it's not new. Hunchentoot has simliar API to J2EE servlets.
Servlets are ~10 years old :-)

If You're looking for paradigm shift google for "front controller"
design pattern and
MVC pattern.

> 4. Are there any good alternative lisp based web servers worthy of my
> consideration?

You may also check araneida and venerable cl-http.

--
Cheers,
Rafal Strzalinski
http://nablaone.net
From: mac
Subject: Re: Hunchentoot for production use and more questions...
Date: 
Message-ID: <1184790742.807304.39260@i38g2000prf.googlegroups.com>
> I'm usually used to files in directory structures, with each file
> representing a page on the website (e.g. php, asp, etc.).  Is there a
> way to make it so that Hunchentoot can look at a folder structure,
> evaluate lisp files and return other files like images as is - like
> Apache, etc... or am I asking too much?

There're a lot of alternatives here:

http://www.cliki.net/web

cl-emb, html-template, lsp, etc

> Or maybe, am I missing some
> paradigm shift in website development here?

I'd say yes. If you are a one man shop and are not working with a
graphics/html/css designer, you probably don't want to use any html
template system.

You mentioned that you're reading PCL. I think Peter has demonstrated
that CL-FOO (html in sexp) is much more nicer to work with than plain
HTML. You can find other similar libraries like CL-WHO in the above
link.

Of course, if you have already invested $$$ in tools like dreamweaver
then it might be a different story. You need to figure out which path
will save you most time.

For most lispers sexp + macro is the ultimate secret weapon to getting
things done faster than anyone else.

> 3. Is SBCL 1.0.6 Windows really that bad?  Does anyone out there
> develop on the same environment?
>
> I was originally using clisp but I need database access, and clsql
> seems to be the only lisp package that does that... and it needs uffi,
> which isn't supported by clisp.
>
> (btw, if my creation ever goes to production in Lisp, I'll definitely
> use a Linux box... so no Windows jokes plz... I need it for other dev
> stuff)

When I started out I was also trying to setup a development
environment in windows and plan to migrate stuff to production (linux)
later.

This turns out to be a big time waster.

Hunchentoot (or whatever web server that you pick) is just part of the
story. Like you mentioned, you also need cl-sql. And by tonight you'll
find a dozen of cool libraries from cliki that you want to use.

Here's a partial list of stuff that I find useful in web projects

  (#:arnesi
   #:cl-fad
   #:cl-interpol
   #:cl-pdf
   #:cl-smtp
   #:cl-typesetting
   #:cl-who
   #:drakma
   #:elephant
   #:hunchentoot
   #:iterate
   #:json
   #:kmrcl
   #:net-telent-date
   #:rfc2388
   #:s-xml
   #:lsp
   #:split-sequence
   #:ironclad)

Now the fun begins - you need to visit every project's homepage and
devel mailing list and find out how to set it up in windows + your
lisp. And then you also need to do the same in linux + your production
lisp.

That'll take a while before you can write a single line of code :)

And truth to be told, most of the library hackers use linux/macosx. So
90% of the time it's very straight forward to get it working in linux.

Just get a spare computer to run linux. Or if you are on the go a lot
like myself, get vmware server (free) and install linux on it (memory
upgrade is cheap nowadays).

> 4. Are there any good alternative lisp based web servers worthy of my
> consideration?

Yes, again, check the cliki link. But I can tell you that hunchentoot
probably has the most active user base and since you're starting out,
you might find it a lot easier to get help from its mailing list than
other web frameworks.

HTH,
-- Mac
From: Chris Khoo
Subject: Re: Hunchentoot for production use and more questions...
Date: 
Message-ID: <13a5b9bohedfnb7@corp.supernews.com>
Wow thanks mac, this post should be framed up for web dev lisp newbs :-)

Thanks again!

Chris

"mac" <········@gmail.com> wrote in message 
····························@i38g2000prf.googlegroups.com...
>> I'm usually used to files in directory structures, with each file
>> representing a page on the website (e.g. php, asp, etc.).  Is there a
>> way to make it so that Hunchentoot can look at a folder structure,
>> evaluate lisp files and return other files like images as is - like
>> Apache, etc... or am I asking too much?
>
> There're a lot of alternatives here:
>
> http://www.cliki.net/web
>
> cl-emb, html-template, lsp, etc
>
>> Or maybe, am I missing some
>> paradigm shift in website development here?
>
> I'd say yes. If you are a one man shop and are not working with a
> graphics/html/css designer, you probably don't want to use any html
> template system.
>
> You mentioned that you're reading PCL. I think Peter has demonstrated
> that CL-FOO (html in sexp) is much more nicer to work with than plain
> HTML. You can find other similar libraries like CL-WHO in the above
> link.
>
> Of course, if you have already invested $$$ in tools like dreamweaver
> then it might be a different story. You need to figure out which path
> will save you most time.
>
> For most lispers sexp + macro is the ultimate secret weapon to getting
> things done faster than anyone else.
>
>> 3. Is SBCL 1.0.6 Windows really that bad?  Does anyone out there
>> develop on the same environment?
>>
>> I was originally using clisp but I need database access, and clsql
>> seems to be the only lisp package that does that... and it needs uffi,
>> which isn't supported by clisp.
>>
>> (btw, if my creation ever goes to production in Lisp, I'll definitely
>> use a Linux box... so no Windows jokes plz... I need it for other dev
>> stuff)
>
> When I started out I was also trying to setup a development
> environment in windows and plan to migrate stuff to production (linux)
> later.
>
> This turns out to be a big time waster.
>
> Hunchentoot (or whatever web server that you pick) is just part of the
> story. Like you mentioned, you also need cl-sql. And by tonight you'll
> find a dozen of cool libraries from cliki that you want to use.
>
> Here's a partial list of stuff that I find useful in web projects
>
>  (#:arnesi
>   #:cl-fad
>   #:cl-interpol
>   #:cl-pdf
>   #:cl-smtp
>   #:cl-typesetting
>   #:cl-who
>   #:drakma
>   #:elephant
>   #:hunchentoot
>   #:iterate
>   #:json
>   #:kmrcl
>   #:net-telent-date
>   #:rfc2388
>   #:s-xml
>   #:lsp
>   #:split-sequence
>   #:ironclad)
>
> Now the fun begins - you need to visit every project's homepage and
> devel mailing list and find out how to set it up in windows + your
> lisp. And then you also need to do the same in linux + your production
> lisp.
>
> That'll take a while before you can write a single line of code :)
>
> And truth to be told, most of the library hackers use linux/macosx. So
> 90% of the time it's very straight forward to get it working in linux.
>
> Just get a spare computer to run linux. Or if you are on the go a lot
> like myself, get vmware server (free) and install linux on it (memory
> upgrade is cheap nowadays).
>
>> 4. Are there any good alternative lisp based web servers worthy of my
>> consideration?
>
> Yes, again, check the cliki link. But I can tell you that hunchentoot
> probably has the most active user base and since you're starting out,
> you might find it a lot easier to get help from its mailing list than
> other web frameworks.
>
> HTH,
> -- Mac
> 
From: Rafal Strzalinski
Subject: Re: Hunchentoot for production use and more questions...
Date: 
Message-ID: <1185133659.777217.288610@k79g2000hse.googlegroups.com>
Hi,

> Now the fun begins - you need to visit every project's homepage and
> devel mailing list and find out how to set it up in windows + your
> lisp. And then you also need to do the same in linux + your production
> lisp.
>
> That'll take a while before you can write a single line of code :)

I've go the same problem, so I wrote a script (http://nablaone.net/
repo/hg/dino/).
Now, I run on my linux box:
$. /dino prepare
$ ./clark -launch
and got running latest hunchentoot and latest slime on latest sbcl :-)


--
Cheer,
Rafal Strzalinski
http://nablaone.net/
From: rsynnott
Subject: Re: Hunchentoot for production use and more questions...
Date: 
Message-ID: <1184944148.512525.280480@n60g2000hse.googlegroups.com>
Khookie wrote:
> Hi
>
> I'm very new to Lisp - I'm learning it at the moment since it looks to
> be a very powerful language, based on a cursory scan through Practical
> Common Lisp & On Lisp.  I'm looking to evaluate it vs. Python for a
> website I'm developing in the not too distant future.
>
> I just setup SBCL on Windows and downloaded all 13 or so asdf packages
> for Hunchentoot.  I've got the default page up and running.
>
> I also redefined the default handler function to output other stuff,
> but nothing terribly interesting.
>
> Looking to get hunchentoot-test working for something slightly more
> interesting tonight.
>
> Now that context has been established, I was hoping if anyone is so
> kind to answer my hopefully "not too dumb" questions.
>
> 1. I've never seen this way of developing websites.  What I mean is
> that it looks like the whole website with multiple pages can be
> represented in one lisp file if you want.
>
> I'm usually used to files in directory structures, with each file
> representing a page on the website (e.g. php, asp, etc.).  Is there a
> way to make it so that Hunchentoot can look at a folder structure,
> evaluate lisp files and return other files like images as is - like
> Apache, etc... or am I asking too much?  Or maybe, am I missing some
> paradigm shift in website development here?

I imagine you could if you wanted to, but I can't really see the
incentive. Not having a direct mapping between URLs and files isn't
particularly unusual, by the way; Ruby on Rails and many Python and
Java frameworks do the same thing.
>
> 2. Is Hunchentoot ready for production use?
>

In my opinion, yes; I've run a couple of sites which had mild usage
(~1000 users per day) on it without trouble.

> 3. Is SBCL 1.0.6 Windows really that bad?  Does anyone out there
> develop on the same environment?
>

It doesn't handle threading well (or possibly at all). You certainly
shouldn't use it to host a real website, but you can probably get away
with using it for development. You could use a Linux VM instead, of
course; I believe there are now a few free for personal use VM
environments for Windows.

> I was originally using clisp but I need database access, and clsql
> seems to be the only lisp package that does that... and it needs uffi,
> which isn't supported by clisp.
>

Hunchentoot also doesn't work on clisp, as far as I remember.


> (btw, if my creation ever goes to production in Lisp, I'll definitely
> use a Linux box... so no Windows jokes plz... I need it for other dev
> stuff)
>
> 4. Are there any good alternative lisp based web servers worthy of my
> consideration?

There are a few, but I've never used any of them, so can't really say
what's good and not-good. There are also FASTCGI interface libraries
for Lisp, which might be another approach to look at (especially if
you do decide to use clisp, which isn't keen on multitasking, I
believe).
>
> Thanks in advance to all Lispers out there.
>
> Chris