From: Donna A. Lilly
Subject: prototyping in LISP vs Java
Date: 
Message-ID: <6kf89e$ed4$1@pale-rider.INS.CWRU.Edu>
Hi All,

I am working in the ai area and I was (naturally) thinking of using lisp to
prototype some machine learning algorithms.  Later the code has to run in
the jdk environment (Java).  However, it is now apparent that some
coworkers think they need to argue that all code should be developed in
java and that using lisp is sort of non-team oriented behavior.  I argue
(mildly so far) that the speed that a proficient lisp programmer can
prototype common ai algorithms (e.g. a*) is significantly faster and with
less code than a proficient java programmer could do in java - both
starting from scratch.

What do you think?  

Best,

-- 
        Donna Lilly
        Cleveland, OH

From: Stig Hemmer
Subject: Re: prototyping in LISP vs Java
Date: 
Message-ID: <ekvlnrorbsj.fsf@verden.pvv.ntnu.no>
Perhaps Kawa might be an compromise idea?

Kawa is an implementation of Scheme, a rather minimalist Lisp dialect.

It compiles to JVM byte code and the resulting .class files are
useable from Java classes and vice versa.

I have never used it personally, but I thought I should mention the
possibility.  Ask in comp.lang.scheme for more details.

Stig Hemmer.
From: David Bakhash
Subject: Re: prototyping in LISP vs Java
Date: 
Message-ID: <cxjbtskpwt8.fsf@hawk.bu.edu>
Stig Hemmer <····@pvv.ntnu.no> writes:

> Perhaps Kawa might be an compromise idea?
> 
> Kawa is an implementation of Scheme, a rather minimalist Lisp dialect.

I've used Kawa, and it's pretty neat, though I remember reading that
it does no optimization.  this is not a good thing.  But I might be
wrong, or that information may no longer be true.

Plus, Java has changed a lot recently, and I don't know if Kawa has
kept up with the latest advancements, and byte-code modifications.

I prefer CL, as Donna probably does, but sometimes, you've just gotta
work with the gang.  I mean, don't ever expect them to debug your Lisp 
code if they can't read it.  Anyway, at least it's not C++ :-)

dave
From: Per Bothner
Subject: Re: prototyping in LISP vs Java
Date: 
Message-ID: <6kitq3$88e$1@rtl.cygnus.com>
In article <···············@hawk.bu.edu>, David Bakhash  <·····@bu.edu> wrote:
>Stig Hemmer <····@pvv.ntnu.no> writes:
>I've used Kawa, and it's pretty neat, though I remember reading that
>it does no optimization.  this is not a good thing.  But I might be
>wrong, or that information may no longer be true.

Kawa does some optimizations, and improved optimizations will be
implemented as time permits.  However, it does not do as fancy
code re-writing as many other Scheme or Lisp implementations, and
writing such optimizations is not as high on the to-do list as
other features.  Still, the people using Kawa seem to be reasonably
satisfied with the performance:  The only serious performace compaints
I got were due to a bug in the input-port implementation, now fixed.

>Plus, Java has changed a lot recently, and I don't know if Kawa has
>kept up with the latest advancements, and byte-code modifications.

The JVM has not changed since JDK 1.0, and neither have the byte-codes.
The main changes have been the rapidly growing Java libraries - which
of course you can access from Kawa's Foreign Function Interface.
-- 
	--Per Bothner
Cygnus Solutions     ·······@cygnus.com     http://www.cygnus.com/~bothner
From: Bruce Tobin
Subject: Re: prototyping in LISP vs Java
Date: 
Message-ID: <356B3D38.CE039CA7@infinet.com>
Donna A. Lilly wrote:

> Hi All,
>
> I am working in the ai area and I was (naturally) thinking of using lisp to
> prototype some machine learning algorithms.  Later the code has to run in
> the jdk environment (Java).  However, it is now apparent that some
> coworkers think they need to argue that all code should be developed in
> java and that using lisp is sort of non-team oriented behavior.  I argue
> (mildly so far) that the speed that a proficient lisp programmer can
> prototype common ai algorithms (e.g. a*) is significantly faster and with
> less code than a proficient java programmer could do in java - both
> starting from scratch.

For some example code that illustrates this point see

 http://www.infinet.com/~btobin/perf.html
From: Scott L. Burson
Subject: Re: prototyping in LISP vs Java
Date: 
Message-ID: <356B6D95.31DFF4F5@zeta-sqoft.com>
Donna A. Lilly wrote:
> 
> I am working in the ai area and I was (naturally) thinking of using lisp to
> prototype some machine learning algorithms.  Later the code has to run in
> the jdk environment (Java).  However, it is now apparent that some
> coworkers think they need to argue that all code should be developed in
> java and that using lisp is sort of non-team oriented behavior.  I argue
> (mildly so far) that the speed that a proficient lisp programmer can
> prototype common ai algorithms (e.g. a*) is significantly faster and with
> less code than a proficient java programmer could do in java - both
> starting from scratch.

I agree, but I don't think the difference is huge.

My recommendation, under the circumstances, is to go ahead and do it in
Java -- though if you prefer, you could probably get away with making
very small prototypes of the core algorithms in Lisp and then
translating them to Java.

I think Lisp is great and I would prefer using it too, but it's
important to have standards on a team project.  As someone else pointed
out, at least they're not asking you to use C++!

-- Scott

				  * * * * *

To use the email address, remove all occurrences of the letter "q".
From: Robert John Andersen
Subject: Re: prototyping in LISP vs Java
Date: 
Message-ID: <356C243A.38993B6B@anderware.com>
Donna A. Lilly wrote:

> Hi All,
>
> I am working in the ai area and I was (naturally) thinking of using lisp to
> prototype some machine learning algorithms.  Later the code has to run in
> the jdk environment (Java).  However, it is now apparent that some
> coworkers think they need to argue that all code should be developed in
> java and that using lisp is sort of non-team oriented behavior.

Tell them to stuff that attitude.  The appropriate response should be
thatwhatever helps you to develop faster, more efficiently, better quality, etc

should be used.  As you've stated above the final implementation has to be
Java, that doesn't mean that you have to start with that language.  I say
use Lisp/Scheme/Smalltalk/whatever that gives you the ability of incremental
compiles.  You'll get those algorithms developed/debugged faster using those
than you will in Java.  You could also do this without them knowing, start
coding up in small chunks.  When one is done, convert it, then continue the
process.

> I argue (mildly so far) that the speed that a proficient lisp programmer can
> prototype common ai algorithms (e.g. a*) is significantly faster and with
> less code than a proficient java programmer could do in java - both
> starting from scratch.

This is true, mostly because you have to recompile a Java file whereas Lisp
or Smalltalk you only have to recompile the a procedure or method.  So much
time is wasted in Java having to recompile those files and as the files get
bigger it takes longer to compile, obviously.  I really get irritated at the
time
wasted compiling in Java.

Now, with all that said if you don't know Lisp/Scheme/Smalltalk/whatever
it would probably take you longer to do this.  However, if you foresee yourself

doing work like this in the future, I would suggest that you learn one of the
above languages.  What you can learn from these other languages will benefit
you in your Java work.  But once you learn these be warned that you might be
dissappointed in Java after that :))  But as someone else has mentioned that
someone else has mentioned, "At least its not C++".
From: Espen Vestre
Subject: Re: prototyping in LISP vs Java
Date: 
Message-ID: <w6ra1foiui.fsf@gromit.nextel.no>
Robert John Andersen <········@anderware.com> writes:

> Now, with all that said if you don't know Lisp/Scheme/Smalltalk/whatever
> it would probably take you longer to do this.  However, if you foresee yourself
> 
> doing work like this in the future, I would suggest that you learn one of the
> above languages.  What you can learn from these other languages will benefit
> you in your Java work.  But once you learn these be warned that you might be
> dissappointed in Java after that :))  But as someone else has mentioned that
> someone else has mentioned, "At least its not C++".

I'm just working on some programs which make essential use of the
following Common Lisp (+MOP) features:

- the meta-object protocol: not very heavy, but run-time class-generation
  with ensure-class is essential.

- those new classes are generated with heavy use of mixing existing
  classes with multiple inheritance

- high availability is ensured through patch loading without stopping
  the program

To you guys out there who know both Java and Lisp: Isn't it almost
impossible to port to Java if you make that much use of the power
of Lisp? (and what about other differences - like the strong typing
of Java?)

(no, I'm _not_ porting to Java, I think I'll make people happy
 with the lisp versions :-), I'm just curious!  One of these days
 I'll have to learn Java to replace my prejudices with hard facts,
 I guess...)

--

  regards,
    Espen Vestre
From: Rainer Joswig
Subject: Re: prototyping in LISP vs Java
Date: 
Message-ID: <n2c3uund.fsf@lise.lavielle.com>
Robert John Andersen <········@anderware.com> writes:

> Tell them to stuff that attitude.  The appropriate response should be
> thatwhatever helps you to develop faster, more efficiently, better quality, etc

Hmm, if the final product has to be Java, I would stay in Java.
If it is a big project which would benefit from
prototyping, then Lisp **might** be an option.
Maybe you are also in the position to develop code
in Lisp and let it be recoded in Java.


> should be used.  As you've stated above the final implementation has to be
> Java, that doesn't mean that you have to start with that language.  I say
> use Lisp/Scheme/Smalltalk/whatever that gives you the ability of incremental
> compiles.  You'll get those algorithms developed/debugged faster using those
> than you will in Java.  You could also do this without them knowing, start
> coding up in small chunks.  When one is done, convert it, then continue the
> process.

There might be some Java systems with incremental development
cycles:

- Supersede
- Simplicity (http://www.datarepresentations.com/)

I have not used these systems myself, so I cannot speak about
their usability in projects.

Greetings,

Rainer Joswig
From: Hartmann Schaffer
Subject: Re: prototyping in LISP vs Java
Date: 
Message-ID: <356C5BA1.3BCD8512@netcom.ca>
Rainer Joswig wrote:
> 
> Robert John Andersen <········@anderware.com> writes:
> 
> > Tell them to stuff that attitude.  The appropriate response should be
> > thatwhatever helps you to develop faster, more efficiently, better quality, etc
> 
> Hmm, if the final product has to be Java, I would stay in Java.

Does the final product have to be written in Jave or is it enough for it
to run on the JVM?

> ...

-- 

Hartmann Schaffer
Guelph, Ontario, Canada
········@netcom.ca (hs)
From: David Bakhash
Subject: Re: prototyping in LISP vs Java
Date: 
Message-ID: <cxjpvgvrdpp.fsf@hawk.bu.edu>
What frank said

:-)

dave