From: Igor Carron
Subject: baby steps to switching from Fortran to LISP.
Date: 
Message-ID: <b882b855.0208182119.6cc109b9@posting.google.com>
Howdy:

I started out learning BASIC a long time ago and this eventually got
me into engineering and science. For many years, I have relied on
Fortran because this was the only language used in my field.
Particularly, scientific computing still relies on the highly
optimized libraries such as Lapack and such. I have recently used
matlab and was astounded at how far I could go and found myself
several having to stop to think of more complex problems. This is a
good thing in that I have gotten to build pretty complex solutions
that I would have only dreamed of in fortran. After reading Paul
Graham's book (on LISP) and Peter Norvig's PAIP, I feel that the
matrix being a first class object is probably not enough to get me to
a higher level of abstraction. With matlab, I am nowadays pretty much
struggling because I do not feel like I have access to the equivalent
of closures and other features displayed by LISP. Another issue I have
come to dread is the inherent slowness of matlab.

I believe I can get to a higher level of abstraction, efficiency and
speed using LISP but I am tortured by two facts:

- I want to use a lisp on win XP: it's ok so far in that I am not
dealing with large problems (franz,lispworks, corman lisp are either
limited in the size of their computations or are slow). It looks like
CMUCL could do the trick which means I am going to have to partition
my laptop so I can boot using linux.

and/or 

- I would like to use the C or fortran Lapack library so I can expect
very rapid computations in those areas of my code that would need it.
I understand that some people might say that it is not important and
that LISP might go as fast as C but my feeling is that I will never
code subroutines in LISP with the maturity of Lapack.

Which gets me to the following questions:

- am I the only one facing these issues ?
- is there a detailed step by step explanation on how to use lapack
libraries (C or fortran) with any lisp (irrespective of a switch to
linux) ?

Let me take an example, I understand that franz lisp has an ffi
capability, how do I physically use, say, svd.f
(http://www.netlib.org/sfmm/svd.f )
in a small lisp program. How do I pass variable to it. Do I need a
compiler ? which one ? watson (openwatson.org), cygwin ? can somebody
help out in showing me a step by step instruction on how to do this
(with clisp, corman lisp, franz ?):

- download svd.f from netlib at http://www.netlib.org/sfmm/svd.f
- download compiler f77 from openwatcom.org
- install compiler
- compile svd.f :    f77 svd.f
- install CLISP
-....

Thank you in advance,

Igor.

From: Michael A. Koerber
Subject: Re: baby steps to switching from Fortran to LISP.
Date: 
Message-ID: <3D60E032.1020603@ll.mit.edu>
Look at http://matlisp.sourceforge.net/
and http://sourceforge.net/projects/matlisp/

If you decide to use the code, get the current CVS version,
don't download ver 1.0b.  The CVS version is solid.

mike
From: Igor Carron
Subject: Re: baby steps to switching from Fortran to LISP.
Date: 
Message-ID: <b882b855.0208191831.31c8b808@posting.google.com>
"Michael A. Koerber" <···@ll.mit.edu> wrote in message news:<················@ll.mit.edu>...
> Look at http://matlisp.sourceforge.net/
> and http://sourceforge.net/projects/matlisp/
> 
> If you decide to use the code, get the current CVS version,
> don't download ver 1.0b.  The CVS version is solid.
> 
> mike


I am looking for baby steps, how do I get matlisp from the CVS ? I
know this is not a LISP issue, but I just don't know how to proceed
further since the matlisp for win on source returns a "page not
found".

Thanks in advance,

Igor.
From: Michael A. Koerber
Subject: Re: baby steps to switching from Fortran to LISP.
Date: 
Message-ID: <3D62273B.5040701@ll.mit.edu>
1.  To get Matlisp from CVS goto to

     http://sourceforge.net/projects/matlisp/

     and follow the "CVS" link.  Read and execute the instructions
     found their.

mak
-- 
**************************************************
Dr Michael A. Koerber    	Micro$oft Free Zone
MIT/Lincoln Laboratory	 	
From: Thomas F. Burdick
Subject: Re: baby steps to switching from Fortran to LISP.
Date: 
Message-ID: <xcvofbyg0fl.fsf@hurricane.OCF.Berkeley.EDU>
·············@yahoo.com (Igor Carron) writes:

> Howdy:
> 
> I started out learning BASIC a long time ago and this eventually got
> me into engineering and science. For many years, I have relied on
> Fortran because this was the only language used in my field.
> Particularly, scientific computing still relies on the highly
> optimized libraries such as Lapack and such. I have recently used
> matlab and was astounded at how far I could go and found myself
> several having to stop to think of more complex problems. This is a
> good thing in that I have gotten to build pretty complex solutions
> that I would have only dreamed of in fortran. After reading Paul
> Graham's book (on LISP) and Peter Norvig's PAIP, I feel that the
> matrix being a first class object is probably not enough to get me to
> a higher level of abstraction. With matlab, I am nowadays pretty much
> struggling because I do not feel like I have access to the equivalent
> of closures and other features displayed by LISP. Another issue I have
> come to dread is the inherent slowness of matlab.

That's one disadvantage to learning Lisp -- once you start to
appreciate its features, it's hard to go back :)

> I believe I can get to a higher level of abstraction, efficiency and
> speed using LISP but I am tortured by two facts:

The high levels of abstraction are wonderful when dealing with
scientific problems.  There are all sorts of potential ways to
optimize these high-level programs; one of my favorites is AFAIK
unique to Lisp: it's pretty easy to write special-purpose optimizers
that will transform high-level portions of your program into low-level
implementations.  Essentially, you can get rid of most of the
data-structure-walking that can be statically determined at compile
time.  And because you can write these optimizers yourself, they can
have the sort of very special-purpose, domain-specific knowledge you
won't find in compilers for any language.

> - I want to use a lisp on win XP: it's ok so far in that I am not
> dealing with large problems (franz,lispworks, corman lisp are either
> limited in the size of their computations or are slow). It looks like
> CMUCL could do the trick which means I am going to have to partition
> my laptop so I can boot using linux.

Yeah, if you want a Lisp system for Windows that's appropriate for
scientific computing, you need to pay for it.  It's only by the grace
of CMU (and subsequent volunteer maintainers) that there's a free
option on Unix.

> and/or 
> 
> - I would like to use the C or fortran Lapack library so I can expect
> very rapid computations in those areas of my code that would need it.
> I understand that some people might say that it is not important and
> that LISP might go as fast as C but my feeling is that I will never
> code subroutines in LISP with the maturity of Lapack.

No one's going to doubt the wisdom of this.  The Fortran community has
poured tremendous numbers of man-years into good numerical libraries,
and no one wants to repeat the effort.

> - install CLISP

I'm not sure if you're aware, but CLISP is the name of a GPL,
bytecode-compiled Common Lisp implementation.  If you meant "Common
Lisp", the abbreviation is "CL".

If you're willing to pay, or suffer at first with trial-edition
limitations, I'd say get Allegro CL and Matlisp.  Otherwise, you can
install Linux, CMUCL, Emacs, ILISP (a package for Emacs<->Lisp
interaction), and Matlisp.  If you go the Linux+CMUCL route, unless
you're already comfortable with another distribution, check out Debian
-- it's got packages for everything you need except Matlisp.

> Thank you in advance,

No problem.  Welcome!

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Rahul Jain
Subject: Re: baby steps to switching from Fortran to LISP.
Date: 
Message-ID: <87ptwevfky.fsf@photino.localnet>
···@hurricane.OCF.Berkeley.EDU (Thomas F. Burdick) writes:

> It's only by the grace of CMU (and subsequent volunteer maintainers)
> that there's a free option on Unix.

Don't forget the US DoD, which paid CMU to make CMUCL (IIUC). :)

-- 
-> -/                        - Rahul Jain -                        \- <-
-> -\  http://linux.rice.edu/~rahul -=-  ············@techie.com   /- <-
-> -X "Structure is nothing if it is all you got. Skeletons spook  X- <-
-> -/  people if [they] try to walk around on their own. I really  \- <-
-> -\  wonder why XML does not." -- Erik Naggum, comp.lang.lisp    /- <-
|--|--------|--------------|----|-------------|------|---------|-----|-|
   (c)1996-2002, All rights reserved. Disclaimer available upon request.
From: Igor Carron
Subject: Re: baby steps to switching from Fortran to LISP.
Date: 
Message-ID: <b882b855.0208192021.5df81c6a@posting.google.com>
Rahul Jain <·····@rice.edu> wrote in message news:<··············@photino.localnet>...
> ···@hurricane.OCF.Berkeley.EDU (Thomas F. Burdick) writes:
> 
> > It's only by the grace of CMU (and subsequent volunteer maintainers)
> > that there's a free option on Unix.
> 
> Don't forget the US DoD, which paid CMU to make CMUCL (IIUC). :)

So you're saying that as a US taxpayer, I have already paid for this :-) ?

Igor.
From: Rahul Jain
Subject: Re: baby steps to switching from Fortran to LISP.
Date: 
Message-ID: <877kimuehv.fsf@photino.localnet>
·············@yahoo.com (Igor Carron) writes:

> Rahul Jain <·····@rice.edu> wrote in message news:<··············@photino.localnet>...
> > ···@hurricane.OCF.Berkeley.EDU (Thomas F. Burdick) writes:
> > 
> > > It's only by the grace of CMU (and subsequent volunteer maintainers)
> > > that there's a free option on Unix.
> > 
> > Don't forget the US DoD, which paid CMU to make CMUCL (IIUC). :)
> 
> So you're saying that as a US taxpayer, I have already paid for this :-) ?

Yep. And thank the DoD for organizing such a wonderful project. (I
guess we pay them plenty already to demonstrate our gratitude, tho ;)

-- 
-> -/                        - Rahul Jain -                        \- <-
-> -\  http://linux.rice.edu/~rahul -=-  ············@techie.com   /- <-
-> -X "Structure is nothing if it is all you got. Skeletons spook  X- <-
-> -/  people if [they] try to walk around on their own. I really  \- <-
-> -\  wonder why XML does not." -- Erik Naggum, comp.lang.lisp    /- <-
|--|--------|--------------|----|-------------|------|---------|-----|-|
   (c)1996-2002, All rights reserved. Disclaimer available upon request.
From: Igor Carron
Subject: Re: baby steps to switching from Fortran to LISP.
Date: 
Message-ID: <b882b855.0208192038.3c8a2bec@posting.google.com>
···@hurricane.OCF.Berkeley.EDU (Thomas F. Burdick) wrote in message news:<···············@hurricane.OCF.Berkeley.EDU>...
> ·············@yahoo.com (Igor Carron) writes:
> 
> > Howdy:
> > 
> > I started out learning BASIC a long time ago and this eventually got
> > me into engineering and science. For many years, I have relied on
> > Fortran because this was the only language used in my field.
> > Particularly, scientific computing still relies on the highly
> > optimized libraries such as Lapack and such. I have recently used
> > matlab and was astounded at how far I could go and found myself
> > several having to stop to think of more complex problems. This is a
> > good thing in that I have gotten to build pretty complex solutions
> > that I would have only dreamed of in fortran. After reading Paul
> > Graham's book (on LISP) and Peter Norvig's PAIP, I feel that the
> > matrix being a first class object is probably not enough to get me to
> > a higher level of abstraction. With matlab, I am nowadays pretty much
> > struggling because I do not feel like I have access to the equivalent
> > of closures and other features displayed by LISP. Another issue I have
> > come to dread is the inherent slowness of matlab.
> 
> That's one disadvantage to learning Lisp -- once you start to
> appreciate its features, it's hard to go back :)

I have noticed :)

> 
> > I believe I can get to a higher level of abstraction, efficiency and
> > speed using LISP but I am tortured by two facts:
> 
> The high levels of abstraction are wonderful when dealing with
> scientific problems.  There are all sorts of potential ways to
> optimize these high-level programs; one of my favorites is AFAIK
> unique to Lisp: it's pretty easy to write special-purpose optimizers
> that will transform high-level portions of your program into low-level
> implementations.  Essentially, you can get rid of most of the
> data-structure-walking that can be statically determined at compile
> time.  And because you can write these optimizers yourself, they can
> have the sort of very special-purpose, domain-specific knowledge you
> won't find in compilers for any language.
> 

Ok.

> > - I want to use a lisp on win XP: it's ok so far in that I am not
> > dealing with large problems (franz,lispworks, corman lisp are either
> > limited in the size of their computations or are slow). It looks like
> > CMUCL could do the trick which means I am going to have to partition
> > my laptop so I can boot using linux.
> 
> Yeah, if you want a Lisp system for Windows that's appropriate for
> scientific computing, you need to pay for it.  It's only by the grace
> of CMU (and subsequent volunteer maintainers) that there's a free
> option on Unix.
> 
> > and/or 
> > 
> > - I would like to use the C or fortran Lapack library so I can expect
> > very rapid computations in those areas of my code that would need it.
> > I understand that some people might say that it is not important and
> > that LISP might go as fast as C but my feeling is that I will never
> > code subroutines in LISP with the maturity of Lapack.
> 
> No one's going to doubt the wisdom of this.  The Fortran community has
> poured tremendous numbers of man-years into good numerical libraries,
> and no one wants to repeat the effort.
> 
> > - install CLISP
> 
> I'm not sure if you're aware, but CLISP is the name of a GPL,
> bytecode-compiled Common Lisp implementation.  If you meant "Common
> Lisp", the abbreviation is "CL".


No I meant CLISP which is free for windows platform.

> 
> If you're willing to pay, or suffer at first with trial-edition
> limitations, I'd say get Allegro CL and Matlisp.  Otherwise, you can
> install Linux, CMUCL, Emacs, ILISP (a package for Emacs<->Lisp
> interaction), and Matlisp.  If you go the Linux+CMUCL route, unless
> you're already comfortable with another distribution, check out Debian
> -- it's got packages for everything you need except Matlisp.


Thanks for the pointer in case I go for Linux.

Two points:
- I was thinking CLISP and use some type of ffi to connect to a bunch
of fortran libraries.
- I think eventually I am OK with paying franz some money, but as
shown in a previous post, the win version of matlisp, even when used
with Franz has to be retrieved from the CVS, and at that point, I am
thinking it is becoming painful to retrieve this thing now -one file
at a time-, how bad is it going to get afterwards ? hence my baby step
question...


Thanks,

Igor.
From: Raymond Toy
Subject: Re: baby steps to switching from Fortran to LISP.
Date: 
Message-ID: <4nptwdtzbe.fsf@rtp.ericsson.se>
>>>>> "Igor" == Igor Carron <·············@yahoo.com> writes:

    Igor> - I think eventually I am OK with paying franz some money, but as
    Igor> shown in a previous post, the win version of matlisp, even when used
    Igor> with Franz has to be retrieved from the CVS, and at that point, I am
    Igor> thinking it is becoming painful to retrieve this thing now -one file
    Igor> at a time-, how bad is it going to get afterwards ? hence my baby step

Well, you're not supposed to get one file at a time---you're supposed
to get a copy of cvs for your machine and do a cvs update to get all
of matlisp automatically.

Unfortunately, I do not have access to Allegro on any system[1], so I
can not help with getting this running on Windows.  I have heard it
does work, however.

I will try to make a new release of the source code so you can
download it in one tarball.  Or if you don't want to wait, I can send
you a copy.


Ray


Footnotes: 
[1]  Well, I have the free version, but I don't think its heap is
large enough to hold matlisp.
From: Aleksandr Skobelev
Subject: Re: baby steps to switching from Fortran to LISP.
Date: 
Message-ID: <m365y54qrr.fsf@list.ru>
·············@yahoo.com (Igor Carron) writes:


[...]

> - I think eventually I am OK with paying franz some money, but as
> shown in a previous post, the win version of matlisp, even when used
> with Franz has to be retrieved from the CVS, and at that point, I am
> thinking it is becoming painful to retrieve this thing now -one file
> at a time-, how bad is it going to get afterwards ? hence my baby step
> question...

To get MATLISP under Linux I did:
cvs ····················@cvs.matlisp.sourceforge.net:/cvsroot/matlisp \
login 
(Just typed <ENTER> when pasword prompt appeared)
And then:
cvs -z3 ····················@cvs.matlisp.sourceforge.net:/cvsroot/matlisp\
co matlisp

So you need a CVS client for windows. I believe, you can either find one
in Cygwin or get  WinCvs from www.wincvs.org.
From: Paolo Amoroso
Subject: Re: baby steps to switching from Fortran to LISP.
Date: 
Message-ID: <th9mPQTeWRiTKBBdxV1Tq=ltuKcJ@4ax.com>
On 19 Aug 2002 21:38:42 -0700, ·············@yahoo.com (Igor Carron) wrote:

> - I think eventually I am OK with paying franz some money, but as
> shown in a previous post, the win version of matlisp, even when used
> with Franz has to be retrieved from the CVS, and at that point, I am
> thinking it is becoming painful to retrieve this thing now -one file
> at a time-, how bad is it going to get afterwards ? hence my baby step

Once you have A CVS client (there are for Windows too) properly configured,
all you have to do to get the latest and greatest sources is to issue the
following commands at the prompt (the following is for Unix clients;
Windows client may rely on a GUI):

  cvs login ; hit RETURN when prompted for password
  cvs update


Paolo
-- 
EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
http://www.paoloamoroso.it/ency/README
From: Paolo Amoroso
Subject: Re: baby steps to switching from Fortran to LISP.
Date: 
Message-ID: <kEtiPcGUWFygk8jnAblW+euh+U9X@4ax.com>
On 18 Aug 2002 22:19:19 -0700, ·············@yahoo.com (Igor Carron) wrote:

> I started out learning BASIC a long time ago and this eventually got
> me into engineering and science. For many years, I have relied on
> Fortran because this was the only language used in my field.
[...]
> I believe I can get to a higher level of abstraction, efficiency and
> speed using LISP but I am tortured by two facts:
[...]
> - I would like to use the C or fortran Lapack library so I can expect

You may have a look at the Fortran to Lisp translator maintained as part of
CLOCC (Common Lisp Open Code Collection):

  http://clocc.sourceforge.net


Paolo
-- 
EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
http://www.paoloamoroso.it/ency/README
From: Raymond Toy
Subject: Re: baby steps to switching from Fortran to LISP.
Date: 
Message-ID: <4nk7mlryzv.fsf@rtp.ericsson.se>
>>>>> "Paolo" == Paolo Amoroso <·······@mclink.it> writes:

    Paolo> On 18 Aug 2002 22:19:19 -0700, ·············@yahoo.com (Igor Carron) wrote:
    >> I started out learning BASIC a long time ago and this eventually got
    >> me into engineering and science. For many years, I have relied on
    >> Fortran because this was the only language used in my field.
    Paolo> [...]
    >> I believe I can get to a higher level of abstraction, efficiency and
    >> speed using LISP but I am tortured by two facts:
    Paolo> [...]
    >> - I would like to use the C or fortran Lapack library so I can expect

    Paolo> You may have a look at the Fortran to Lisp translator maintained as part of
    Paolo> CLOCC (Common Lisp Open Code Collection):

    Paolo>   http://clocc.sourceforge.net

While I have not tried to convert any Lapack routine from Fortran to
Lisp, I suspect it would work but the performance would be
significantly worse than the Fortran version.

Ray