different opinion from comp.lang.lisp

For the Compleat Fan
Locked
HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

different opinion from comp.lang.lisp

Post by HPW »

Thread: LISP implementation in windows with graphics capabilities?

Hans-Peter Wickern writes:

> There is a windows lisp called newlisp there: http://www.nuevatec.com/newlisp/
>
> It is not a full blown commonlisp, but lightweight and has some nice features.

Answer from Joe Marshall (jrm@ccs.neu.edu):

It's *very* quirky. Single namespace, dynamically scoped, lists that start with the symbol 'lambda are functions, format taken from C, no arrays or hash tables, a truly bizarre mechanism for objects (it modifies the source code to achieve local state!), no cons cells, NIL != '(), no packages.



My viewpoint as always: Use the right tool to get the job done. :-)
Last edited by HPW on Fri Aug 13, 2004 8:14 am, edited 1 time in total.
Hans-Peter

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Thanks Hans-Peter for bringing this up, I read these kind of comments sometimes on the comp.lang.lisp new groups. But I keep away from it to avoid flame wars.

But I also want to give users of newLISP the possibiity to defend their tool. So here comes a longer post on the topic of newLISP and other LISPs:

For some: if it's not Common Lisp or Scheme it must be bad. They should study the history of LISP. Before Common Lisp came along LISP was flourishing in many different implementations and feeding on many different concepts in Computer Science.

Common Lisp came along to create a standard by committee, a kitchen sink of features and concepts, liked and used by some and critiqued by others. Here a qote from [Brooks and Gabriel 1984, 'A Critique of Common Lisp']:

Every decision of the committee can be locally rationalized as the right thing. We believe that the sum of these decisions, however, has produced something greater than its parts; an unwieldy, overweight beast, with significant costs (especially on other than micro-codable personal Lisp engines) in compiler size and speed, in runtime performance, in programmer overhead needed to produce efficient programs, and in intellectual overload for a programmer wishing to be a proficient COMMON LISP programmer.

Scheme was an intent to simplify things again, making a LISP based on fewer concepts. But Scheme didn't deliver on a programming language practical to use in everyday life, although a good tool to teach programming language concepts. The book [Abelson and Sussman 1990,'Structure and Interpretation of Computer Programs]' is one of my favourite books on the subject.

Today LISP is a niche language, newLISP is an intent to bring LISP back into the mainstream again, a practical programming language for solving real problems and a new focus on its roots: symbols, lists, lambda expressions. Make it easy to programmers coming from other languages to learn LISP, but give them the original abstractional power of LISP and a mix of built in primitives for todays computer programs. Like Scheme newLISP can be used to teach programming concepts and it is easier to learn and use doing this.

But now to comments posted on the comp.lang.lisp users group:

> It's *very* quirky
You will get used to it pretty quick and find out its clean and logical ;-)

> single name space
Yes! that lets you treat variable symbols, function symbols and lambda function symbols alike. No special, different operators needed to treat different kinds of symbols, makes for an easier to learn/understand/programmable LISP.

> dynamically scoped
Yes, but also has contexts: namespaces which are separated lexically from each other. So you have it both.

> format from 'C'
Yes, because thats what everybody knows how to use. This world is a multi programming language world, we don't want to learn a new 'format' statement in every language. It also makes for a more compact implementation, leveraging what is already implemented in other programming languages.

> no arrays or hashtables
An efficient symbol implementation as in newLISP lets you simulate both. If the underlying structure is an array or hashtable is an implementation detail. Real arrays also have disadvantages like: memory waste in sparse populated arrays, arrays have to be orthogonal (i.e. all rows or columns of same length), etc..

> modifies source code to achieve state
Yes, data and program expressed by the same pradigm is a virtue of LISP not a disadvantage, and carried through in newLISP; for that reason newLISP is especially well suited for AI applications or applications generating code. It also lets you go back and forth between XML/SXML and newLISP, because the statics list in a newLISP Lambda expression is really an association list that can be translated into an attribute list in XML.

> no cons cells?
The concept of a 'cons cell' is about details of early LISP implementations (CPU registers, etc). newLISP also has a basic cell structure which can be linked to a list but has no concept of a dotted pair. When have you last seen a dotted pair used in a real world program? newLISP has 'cons' but it works differently, still it is a 'cons': the most basic LISP primitive from which higher order list-buildng primitives can be built, like 'append'. See the chapter on Pure Lisp in the newLISP Users Manual. Outside of Computer Science classes 'cons' is rarely used today (in newLISP).

> Nil not '()
There is a chapter on this in the newLISP Users Manual. Here a quote from
[Gabriel and Steele 1993, 'The Evolution of Lisp']:

"Almost since the beginning, Lisp has used the symbol 'nil' as the distunguished object that indicates the end of a list (and which is therefore itself the empty list); this same object also serves as the 'false' value returned by predicates. McCartthy has commented that these decisions where made "rather lightheartedly" and "later proved unfortunate". "

I agree wholeheartedly, therefore: Nil Not '()

> no packages?
Not true! see packages for SMTP, POP3, MySQL and ODBC in the newLISP distribution, FTP will be in the next release. These are programming modules separated in a lexically isolated namespaces/scopes (package).

To sum it up: newLISP implements rich functionality with fewer theoretical language concepts than other LISPs.

But what really counts is Hans Peter's quote:

"Use the right tool to get the job done."

Lutz
Last edited by Lutz on Tue Oct 14, 2003 2:20 am, edited 2 times in total.

eddier
Posts: 289
Joined: Mon Oct 07, 2002 2:48 pm
Location: Blue Mountain College, MS US

Post by eddier »

You can't please everyone!

I use newlisp because I started writing programs after the first hour I had downloaded it. Yes I kept the manual up, but I was writting REAL programs that I use. I chose newlisp because everything is a list and I don't have to choose between 50 other data structures, hashes, arrays, records, etc. When there is only one data structure, everything is easier.

I've tried common lisp, Dr. scheme, xlisp, pclisp, and some others. I never thought about writing programs to manage our web site, make html tables and graphs for institutional research, do statistics on surveys, and generate LaTeX documents and LaTeX graphs using eepic with those other languages.

I was using Python for a while until regular expressions were added to newLisp. Now newLisp is the tool I grab first for nearly all of my projects.

I think you are doing a GREAT job with newLisp Lutz!

Eddie

Locked