From: Alan Manuel K. Gloria
Subject: Accessing the web via http in GCL
Date: 
Message-ID: <1139662059.113998.125000@g43g2000cwa.googlegroups.com>
I'm currently using GCL on a Windows XP box.  I've downloaded an SBCL
file that claims to be for Windows too, but I haven't figured out how
to install it yet.  (Yes, I know that *nix has about 3-4 free Lisp
implementations for each free Lisp implementation on Windows, the
problem is I either fight for Lisp or fight for *nix here, and I think
Lisp is better anyway.  And I know there are good commercial Lisps out
there but I'd rather go cheap and therefore free.)

I would like to know how I can access the web via the http protocol,
preferably using GCL.  I've googled and so far I've managed to catch
the "PORT" library in my googlenet:
http://clocc.sourceforge.net/dist/port.html

I'd like to know if anyone here has used GCL or PORT (or some other
socket/network/http library that I can run on GCL) and if they have any
tips (code? libraries? DOCUMENTATION?) on how I can access the web via
http.  I'm trying to build a webcrawler/robot to trawl the net for
pages.  I'd also like to know if anyone has used SBCL on Windows and
how I'm supposed to untar it on a Windows machine
(sbcl-0.9.9-x86-win32-binary.tar - {waa!}).  I've tried to search for a
CLisp distribution for Windows but haven't caught any yet (there appear
to be none).

Any secondary tips on using mod_lisp and running a Lisp server behind
an Apache one would be nice too.  From what I gather mod_lisp passes
"key\nvalue\n" pairs on a specified port on a specified computer
(possibly the localhost), but I haven't figured out yet what I'm
supposed to do on the Lisp end.

In any case, my current problem is to build a webcrawler, the webserver
is secondary.  I've done a bit of the code in Ruby already, and I still
can't shrug off my tendency to put parentheses before function names,
or nest an if statement in an expression.  Lisp definitely spoiled me
{waa!}.

I've been trying to convince some other people that Lisp is best for
our problems, and now they're feeding me rope, and as soon as I got GCL
up I started wondering, "how the hell am I supposed to write a
webcrawler if I can't find documentation on how to fetch pages off the
web?"

BTW I've programmed in a Lisp variant for quite some time (Skill, used
as an extension language by Cadence Design Systems, which sells EDA
tools), but I can't seem to kick the "begin-end" habit from my
imperative language days, so I apologize in advance if I inadvertently
put closing parenthesis on their own lines.

From: Timofei Shatrov
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <43ee48f5.19008093@news.readfreenews.net>
On 11 Feb 2006 04:47:39 -0800, "Alan Manuel K. Gloria"
<········@gmail.com> tried to confuse everyone with this message:

>I'm currently using GCL on a Windows XP box.  I've downloaded an SBCL
>file that claims to be for Windows too, but I haven't figured out how
>to install it yet.  (Yes, I know that *nix has about 3-4 free Lisp
>implementations for each free Lisp implementation on Windows, the
>problem is I either fight for Lisp or fight for *nix here, and I think
>Lisp is better anyway.  And I know there are good commercial Lisps out
>there but I'd rather go cheap and therefore free.)

You should try CLISP. It runs quite well on Windows, and PORT was
written by one of its authors.

-- 
|WAR HAS NEVER SOLVED ANYTHING|,----- Timofei Shatrov aka Grue---------.
|(except for ending slavery,  ||mail: grue at mail.ru ================ |
|   fascism and communism)    ||============= http://grue3.tripod.com  |
|...and Saddam's dictatorship |`----------------------------------[4*72]
From: Tim X
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <87u0b6httv.fsf@tiger.rapttech.com.au>
"Alan Manuel K. Gloria" <········@gmail.com> writes:

> I'm currently using GCL on a Windows XP box.  I've downloaded an SBCL
> file that claims to be for Windows too, but I haven't figured out how
> to install it yet.  (Yes, I know that *nix has about 3-4 free Lisp
> implementations for each free Lisp implementation on Windows, the
> problem is I either fight for Lisp or fight for *nix here, and I think
> Lisp is better anyway.  And I know there are good commercial Lisps out
> there but I'd rather go cheap and therefore free.)
> 
> I would like to know how I can access the web via the http protocol,
> preferably using GCL.  I've googled and so far I've managed to catch
> the "PORT" library in my googlenet:
> http://clocc.sourceforge.net/dist/port.html
> 
> I'd like to know if anyone here has used GCL or PORT (or some other
> socket/network/http library that I can run on GCL) and if they have any
> tips (code? libraries? DOCUMENTATION?) on how I can access the web via
> http.  I'm trying to build a webcrawler/robot to trawl the net for
> pages.  I'd also like to know if anyone has used SBCL on Windows and
> how I'm supposed to untar it on a Windows machine
> (sbcl-0.9.9-x86-win32-binary.tar - {waa!}).  I've tried to search for a
> CLisp distribution for Windows but haven't caught any yet (there appear
> to be none).
> 
> Any secondary tips on using mod_lisp and running a Lisp server behind
> an Apache one would be nice too.  From what I gather mod_lisp passes
> "key\nvalue\n" pairs on a specified port on a specified computer
> (possibly the localhost), but I haven't figured out yet what I'm
> supposed to do on the Lisp end.
> 
> In any case, my current problem is to build a webcrawler, the webserver
> is secondary.  I've done a bit of the code in Ruby already, and I still
> can't shrug off my tendency to put parentheses before function names,
> or nest an if statement in an expression.  Lisp definitely spoiled me
> {waa!}.
> 
> I've been trying to convince some other people that Lisp is best for
> our problems, and now they're feeding me rope, and as soon as I got GCL
> up I started wondering, "how the hell am I supposed to write a
> webcrawler if I can't find documentation on how to fetch pages off the
> web?"
> 
> BTW I've programmed in a Lisp variant for quite some time (Skill, used
> as an extension language by Cadence Design Systems, which sells EDA
> tools), but I can't seem to kick the "begin-end" habit from my
> imperative language days, so I apologize in advance if I inadvertently
> put closing parenthesis on their own lines.
> 

Have a look at portable aserve. I've used it with cmucl and it
contains basic httpd client routines which you can use to fetch pages
from the web. Its *very easy* to use, but I don't know if portable
aserve works with gcl.

Tim
-- 
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you 
really need to send mail, you should be able to work it out!
From: ········@gmail.com
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <1139700656.700105.7030@g43g2000cwa.googlegroups.com>
Alan Manuel K. Gloria wrote:
...

Tim X wrote:
>Have a look at portable aserve. I've used it with cmucl and it
>contains basic httpd client routines which you can use to fetch pages
>from the web. Its *very easy* to use, but I don't know if portable
>aserve works with gcl.

Yeah, aserver should work with clisp, just not multi-threaded. I think
what your looking to do is as easy as

(net.aserve.client:do-http-request url &key some-optional-stuff)

just install portableaserve then google "site:franz.com aserve"

Alan Manuel K. Gloria wrote:
> Any secondary tips on using mod_lisp and running a Lisp server behind
> an Apache one would be nice too.  From what I gather mod_lisp passes
> "key\nvalue\n" pairs on a specified port on a specified computer
> (possibly the localhost), but I haven't figured out yet what I'm
> supposed to do on the Lisp end.

this one should be easier for you to catch in your googlenet


http://groups.google.com/group/comp.lang.lisp/search?group=comp.lang.lisp&q=mod_lisp&qt_g=1&searchnow=Search+this+group

Nick
From: Alan Manuel K. Gloria
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <1139792483.317686.63030@g47g2000cwa.googlegroups.com>
Hmm, Clisp appears to need cygwin to run on windows (what? another
download? the other guys here are starting to want to strangle me
{waa!}).  I've come across some references to AllegroServe (equal?
AllegroServe aserve), but I didn't download it yet because it didn't
seem to support GCL (could have missed it though, I only noticed that
it supported CMUCL, CLISP, maybe SBCL, and a few other acronyms...).
Also, I'd prefer to keep Apache, and installing another full server
just to get at the http-GET parts feels like overkill.

My GCL installation is *weird*.  I type something like (help 'aref) and
I get an error about "Can't find node  Top?".  Wow.  Not to mention the
html documentation that comes with it - the functions are *not*
arranged in any logical sequence I've managed to get.  LOL.

Since quite a few people have mentioned aserve (in connection with
Clisp), I'll look at it, maybe see if I can download Cygwin and Clisp
and aserve (non-trivial operations on a dial-up)...

As is, there's a LOT fewer headaches hacking in Ruby.  I'm new to Ruby
and yet it's taken me less time to hack together some of the code I
need there (call/cc for nondeterministic foo, net/http for
webcrawling...).  Why is Lisp like this, it's such a great language, it
seems so frustrating to see it so crippled... {waa!}

Somebody please tell me I should persevere in Lisp in spite of the
hurdles because of the sheer technical power of Lisp.

As for mod_lisp, it seems there are a few frameworks available that
(can) use it: TBNL and UCW.  Hmm.  Need to figure out more on this.
Seems I really need a sockets library on both ends of my Lisp web app.
From: Edi Weitz
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <uy80gm4zh.fsf@agharta.de>
On 12 Feb 2006 17:01:23 -0800, "Alan Manuel K. Gloria" <········@gmail.com> wrote:

> Hmm, Clisp appears to need cygwin to run on windows

No.  Why do you think that?  There's a native Win32 binary on the
CLISP website.

-- 

European Common Lisp Meeting 2006: <http://weitz.de/eclm2006/>

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Alan Manuel K. Gloria
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <1139803277.020857.199840@z14g2000cwz.googlegroups.com>
Oh wow.  I can't seem to find a link to it on their website.  There's a
line there in the "Get CLISP" column:
Cygwin - Unix environment for Windows

...which makes me think that.

That's the only instance of "Windows" I've seen on their front page.
Assuming their front page is http://clisp.sourceforge.net or
http://clisp.cons.org or http://www.gnu.org/software/clisp/ (all of
which appear to be alike)
Do they have another website?  Or is the package installable without
Cygwin?

Anyway googlenetting has caught me the following link:
http://prdownloads.sourceforge.net/clisp/clisp-2.31-win32.zip

Anyway thanks.  I assumed that CLISP required Cygwin because the only
instance of "Windows" I could find on their official webpage
(http://clisp.cons.org) was in relation to Cygwin.

Cygwin is currently installing itself and like I said, on a dial-up,
it's not a trivial operation.

Thank you very much!
From: Alan Manuel K. Gloria
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <1139804462.353504.277570@z14g2000cwz.googlegroups.com>
Okay, the link I got above googlenetting doesn't appear to work.  For
anyone interested, you can get a Windows CLISP from Sourceforge
directly.  It doesn't say it on the CLISP website that you can get a
Windows binary.  {pif}
From: Timofei Shatrov
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <43f02f93.1981683@news.readfreenews.net>
On 12 Feb 2006 20:21:02 -0800, "Alan Manuel K. Gloria"
<········@gmail.com> tried to confuse everyone with this message:

>Okay, the link I got above googlenetting doesn't appear to work.  For
>anyone interested, you can get a Windows CLISP from Sourceforge
>directly.  It doesn't say it on the CLISP website that you can get a
>Windows binary.  {pif}
>

There are "Sources and binaries for various platforms" section, which
leads us to http://sourceforge.net/project/showfiles.php?group_id=1355,
where you can grab either clisp-2.38-win32.zip or
clisp-2.38-win32-with-readline-and-gettext.zip, which should work on
Windows without Cygwin.

-- 
|WAR HAS NEVER SOLVED ANYTHING|,----- Timofei Shatrov aka Grue---------.
|(except for ending slavery,  ||mail: grue at mail.ru ================ |
|   fascism and communism)    ||============= http://grue3.tripod.com  |
|...and Saddam's dictatorship |`----------------------------------[4*72]
From: Alan Manuel K. Gloria
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <1139817646.804854.174420@f14g2000cwb.googlegroups.com>
@Timofei
I'm really sorry, but I only looked at what was readily viewable on the
CLISP page.  I wasn't looking for CLisp in particular, you see.  I was
looking for *any* Common Lisp implementation.  I'm sorry I didn't look
more closely.  You see, below the "Sources and binaries for various
platforms" there were "Linux Packages" "*BSD Ports" "Fink - Unix
software for Mac" "Cygwin - Unix environment for Windows" and "Unix".
I assumed that those were the "various platforms" that were being
discussed, because they were under that header too.  Also, I looked at
the other sites *except* SourceForge - SourceForge has a *lot* of
graphics and over a dial-up they're a pain to load, so I instinctively
avoided it.  That's why I didn't know that CLisp was available as a
direct Windows port.  I hope you understand.

This is part of the reason why Common Lisp is getting on my nerves too.
 So many options, so little time to look at them carefully.  I'm sorry,
if I came across as trying to confuse everyone, I was just confused
because I was overwhelmed with the options.

Please accept my apologies.
From: Timofei Shatrov
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <43f06581.3976363@news.readfreenews.net>
On 13 Feb 2006 00:00:46 -0800, "Alan Manuel K. Gloria"
<········@gmail.com> tried to confuse everyone with this message:


>This is part of the reason why Common Lisp is getting on my nerves too.
> So many options, so little time to look at them carefully.  I'm sorry,
>if I came across as trying to confuse everyone, I was just confused
>because I was overwhelmed with the options.

It's my default attribution line. Your message was quite clear, and I
can understand why you missed the right link.

-- 
|WAR HAS NEVER SOLVED ANYTHING|,----- Timofei Shatrov aka Grue---------.
|(except for ending slavery,  ||mail: grue at mail.ru ================ |
|   fascism and communism)    ||============= http://grue3.tripod.com  |
|...and Saddam's dictatorship |`----------------------------------[4*72]
From: Stefan Scholl
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <0T2ts2teIfffNv8%stesch@parsec.no-spoon.de>
Timofei Shatrov <····@mail.ru> wrote:
> There are "Sources and binaries for various platforms" section, which
> leads us to http://sourceforge.net/project/showfiles.php?group_id=1355,
> where you can grab either clisp-2.38-win32.zip or
> clisp-2.38-win32-with-readline-and-gettext.zip, which should work on
> Windows without Cygwin.

And when you want to upgrade Lispbox 0.7 (uses GNU CLISP 2.37):
http://www.no-spoon.de/articles/2006/01/29/tip-for-users-of-lispbox-0-7-for-windows-upgrading-from-gnu-clisp-2-37-to-version-2-38

(Yeah, I should rethink the URLs ...)
From: Stefan Scholl
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <0T2ts0isIfbsNv8%stesch@parsec.no-spoon.de>
Edi Weitz <········@agharta.de> wrote:
> On 12 Feb 2006 17:01:23 -0800, "Alan Manuel K. Gloria" <········@gmail.com> wrote:
>> Hmm, Clisp appears to need cygwin to run on windows
> 
> No.  Why do you think that?  There's a native Win32 binary on the
> CLISP website.

On the Sourceforge download page. But no mirror in case SF is
down.
From: Joerg Hoehle
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <ud5hrnpvy.fsf@users.sourceforge.net>
Edi Weitz <········@agharta.de> writes:
> > Hmm, Clisp appears to need cygwin to run on windows
> No.  Why do you think that?  There's a native Win32 binary on the
> CLISP website.

And there's EXT:WITH-HTTP-INPUT in CLISP, which will do client HTTP
GET for you (or you peek at the code and change it to your needs).

Good luck,
	Jorg Hohle
Telekom/T-Systems Technology Center
From: Alan Manuel K. Gloria
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <1140088772.284822.268240@g47g2000cwa.googlegroups.com>
@Jorg:
Thanks for the tip!  I'm looking at that code right now.
From: Rob Thorpe
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <1139832990.549014.217640@z14g2000cwz.googlegroups.com>
Alan Manuel K. Gloria wrote:
> Hmm, Clisp appears to need cygwin to run on windows (what? another
> download? the other guys here are starting to want to strangle me
> {waa!}).  I've come across some references to AllegroServe (equal?
> AllegroServe aserve), but I didn't download it yet because it didn't
> seem to support GCL (could have missed it though, I only noticed that
> it supported CMUCL, CLISP, maybe SBCL, and a few other acronyms...).
> Also, I'd prefer to keep Apache, and installing another full server
> just to get at the http-GET parts feels like overkill.
>
> My GCL installation is *weird*.  I type something like (help 'aref) and
> I get an error about "Can't find node  Top?".  Wow.  Not to mention the
> html documentation that comes with it - the functions are *not*
> arranged in any logical sequence I've managed to get.  LOL.

I is probably searching for a GNU Info file that you haven't got
installed.
Probably a problem with the gcl installation scripts.

But, you've done a lot better than me.  How did you install GCL on
windows?
I've never been able to even find instructions for this.

> Since quite a few people have mentioned aserve (in connection with
> Clisp), I'll look at it, maybe see if I can download Cygwin and Clisp
> and aserve (non-trivial operations on a dial-up)...
>
> As is, there's a LOT fewer headaches hacking in Ruby.  I'm new to Ruby
> and yet it's taken me less time to hack together some of the code I
> need there (call/cc for nondeterministic foo, net/http for
> webcrawling...).  Why is Lisp like this, it's such a great language, it
> seems so frustrating to see it so crippled... {waa!}
>
> Somebody please tell me I should persevere in Lisp in spite of the
> hurdles because of the sheer technical power of Lisp.

I have given up trying to use CL on Windows.  It seems
difficult/impossible to get a fully function implementation you can do
something useful with.
From: Edi Weitz
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <uy80fcu6c.fsf@agharta.de>
On 13 Feb 2006 04:16:30 -0800, "Rob Thorpe" <·············@antenova.com> wrote:

> I have given up trying to use CL on Windows.  It seems
> difficult/impossible to get a fully function implementation you can
> do something useful with.

Nonsense.  At least LispWorks, AllegroCL, CLISP, and Corman Lisp work
fine on Windows.  A Win32 version of SBCL is also in the works and
making good progress.

-- 

European Common Lisp Meeting 2006: <http://weitz.de/eclm2006/>

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Alan Manuel K. Gloria
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <1139837897.467729.251620@g14g2000cwa.googlegroups.com>
@Timofei:
Ah okay, I understand.  I'm new here so I didn't know that, and assumed
you were specifically targeting me.  Sorry!

@Rob:
I went to the GCL homepage www.gnu.org/software/gcl/gcl.html and
clicked "latest release".  Then go to binaries/stable.  There's a bunch
of files there.  I took the latest one:
gcl_2.6.6.mingw32_ansi_japi_20050210.exe
I assumed that "w32" meant it was a win32 version and it appears I'm
right (it's running after all).  Installation was simply
double-clicking the exe.  However if you look at the date, it seems
rather oldish.  I've also gotten an error of the form "defgeneric
doesn't support :method yet" on a file I downloaded off the net
(htout.lisp I think).

I sort of agree, trying to get a free CL implementation running on
Win32 has been sort of a head-bashing experience so far for me.

@Edi:
I think Rob means free versions.  As for Clisp, I didn't know that
CLisp was available for Win32 (it takes a little digging to find it,
apparently), so I can only assume that Rob doesn't either.

Gosh, I currently have 3 CL's here (GCL, SBCL, CLisp) and I haven't
even started seriously searching for some sort of network/socket/http
libraries!  Add to that the fact that I never studied networks, so if I
need to hack on the low-level socket, I need to study even more...
{waa!}
From: Rob Thorpe
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <1139853194.324346.18760@g44g2000cwa.googlegroups.com>
Edi Weitz wrote:
> On 13 Feb 2006 04:16:30 -0800, "Rob Thorpe" <·············@antenova.com> wrote:
>
> > I have given up trying to use CL on Windows.  It seems
> > difficult/impossible to get a fully function implementation you can
> > do something useful with.
>
> Nonsense.  At least LispWorks, AllegroCL, CLISP, and Corman Lisp work
> fine on Windows.  A Win32 version of SBCL is also in the works and
> making good progress.

I didn't make myself clear, I was referring to free versions.
I know about CLISP, that's what I use on Windows, and I know about the
w32 SBCL but it's not really ready yet.
From: karsten
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <1140120456.566301.282260@g43g2000cwa.googlegroups.com>
You are still not totally clear. Do you mean free as in free beer or in
free speech (http://www.gnu.org/philosophy/free-sw.html)?

Both Allegro and LispWorks have excellent trial/personal editions that
have some limitations (heap/session time) but are very usefull. I used
the Allegro Trial editions for several years and never had a problem.
Corman is also free for personal use if you use the console and not the
IDE.

See
- http://www.franz.com/downloads/
- http://www.lispworks.com/downloads/index.html or
- http://www.cormanlisp.com/download.html

Regarding free as in libre i'd recommend lispbox (Emacs, Slime, Clisp),
see
http://common-lisp.org/pcl/windows/lispbox-0.7-clisp-2.37.zip
since using clisp with the console can be quite a pain for the
beginner.

salud2 

Karsten
From: Peter Seibel
Subject: Re: Accessing the web via http in GCL
Date: 
Message-ID: <m2u0az2bpz.fsf@gigamonkeys.com>
"karsten" <·············@gmail.com> writes:

> You are still not totally clear. Do you mean free as in free beer or in
> free speech (http://www.gnu.org/philosophy/free-sw.html)?
>
> Both Allegro and LispWorks have excellent trial/personal editions that
> have some limitations (heap/session time) but are very usefull. I used
> the Allegro Trial editions for several years and never had a problem.
> Corman is also free for personal use if you use the console and not the
> IDE.
>
> See
> - http://www.franz.com/downloads/
> - http://www.lispworks.com/downloads/index.html or
> - http://www.cormanlisp.com/download.html
>
> Regarding free as in libre i'd recommend lispbox (Emacs, Slime, Clisp),
> see
> http://common-lisp.org/pcl/windows/lispbox-0.7-clisp-2.37.zip
> since using clisp with the console can be quite a pain for the
> beginner.

Note, that's just the download URL. For the web page that actually
explains a bit about what Lispbox is and has links for download other
versions, check out:

  <http://www.gigamonkeys.com/lispbox/>

-Peter

-- 
Peter Seibel           * ·····@gigamonkeys.com
Gigamonkeys Consulting * http://www.gigamonkeys.com/
Practical Common Lisp  * http://www.gigamonkeys.com/book/