teaching and learning with LISP/Scheme

130 views
Skip to first unread message

Matthias Felleisen

unread,
Jun 6, 2000, 3:00:00 AM6/6/00
to

Dear LISPers -

I accidentally stumbled across the thread on learning and teaching with LISP
and would like to send a global reply with a new thread, from a completely
different perspective.

A few years back my research team and I decided that if we didn't do anything
soon, all of our freshmen would start with the opinion that VB and C++ (and
possibly Java) were it, and that learning to program means to learn more and
more library hacks and tools and stuff -- but not thinking about programs, the
elegance of programming, and the beauty of the discipline.

To counter this trend, we decided to start the TeachScheme! project. The goal
is to develop and deploy a Scheme-based curriculum into as many high schools
as we can. We first developed the software:

MzScheme + MrEd -- a Scheme dialect and a fully portable graphical run-time
environment that we can use for full-fledged programming and scripting
(shell,
ActiveX, databases, XML, you name it)

DrScheme -- a programming environment that has a tower of languages so that
it can take care of beginners and full-fledged programmers

Then we developed a curriculum that emphasizes systematic design, interaction,
exploration, testing, etc., from the bery beginning, something that no other
language
model supports in the same manner.

Our own evaluations suggest that students who go thru this and then C++ or Java
are much better OO programmers, and they definitely prefer the ease of
programming
in Scheme (after a year).

We have trained some 80 or 90 teachers in three years, and many love the
experience.

If we don't want the bad stuff to grow over and cover up the good stuff in CS,
we need
to spread the word -- and do so aggressivley. Otherwise we all end up
programming
XML in Python or stuff like that. (Can you imagine anything easier than

(write-x-expression-as-xml (do-your-stuff-in-lisp (read-xml-as-x-expression
port)))

?)


See

http://www.cs.rice.edu/CS/PLT/Teaching/

and spread the word.

-- Matthias Felleisen

qt...@my-deja.com

unread,
Jun 7, 2000, 3:00:00 AM6/7/00
to
In article <393D4239...@rice.edu>,

Matthias Felleisen <matt...@rice.edu> wrote:
>we decided to start the TeachScheme! project.
The goal
> is to develop and deploy a Scheme-based curriculum

<rant>
I have long been puzzled as to why so many people think that Scheme is a
good language for the neophyte programmer. For the newcomer, Scheme code
is sparse and cryptic. Sure, it is simple and elegant ... in the same
way that Maxwell's equations of electrodynamics are.

Extreme simplicity does not mean *easy*. Easy is when the naive reader
can understand the basics without much effort. This means that the
syntax should be self-explanatory as much as reasonably practical. I
would nominate Eiffel and Python as good examples.

I'm going on about this because I just re-read Ableson and Sussman last
week and I kept thinking how much I pitied the poor students
who have that opaque, jumbled mess as their introduction to programming.
It seems that a lot of people in the field are downright hostile to the
beginner's need for *training wheels*.
</rant>

Tom


Sent via Deja.com http://www.deja.com/
Before you buy.

Friedrich Dominicus

unread,
Jun 7, 2000, 3:00:00 AM6/7/00
to
qt...@my-deja.com writes:
>
> Extreme simplicity does not mean *easy*. Easy is when the naive reader
> can understand the basics without much effort. This means that the
> syntax should be self-explanatory as much as reasonably practical. I
> would nominate Eiffel and Python as good examples.


what is the only special thing one have to learn in Scheme it's IMHO
just prefix notation but knowing that why should


(+ 1 2 3 4 5)

more unclear than
1 + 2 + 3 + 4 + 5

And why should (not tested, just writen down from memory)

(define (calculate-sum a-list-of-ints)
(if (null? a-list-of-ints)
0
(+ (first a-list-of-ints) (calculate-sum (rest
a-list-of-ints)))))

I can easily run that with

(calculate-sum '(1 2 3))

be more clearly as

class CALCULATE_SUM

creation
make

feature
a_list_of_ints: LINKED_LIST[INTEGER];
make is
do

!!a_list_of_ints.make;
a_list_of_ints.extend(1);
a_list_of_ints.extend(2);
a_list_of_ints.extend(3);
io.put_string("sum of ";
io.put_sring(a_list_of_ints.out);
io.put_string(" = ");
io.put_integer(calculate_sum(a_list_of_ints));
io.new_line;
end;

calculate_sum (a_list: LINKED_LIST[INTEGER]): INTEGER;
do
from a_list.start;
until a_list.off;
loop
Result := Result + a_list.item;
a_list.forth;
end;
end;
end;

I'm an Eiffel-programmer for quite a while now, but I prefer Scheme
here anyway. Eiffel is a wonderful language if it comes really to
implement classes, but it's tedious to interface with the OS, which is
much simpler with Scheme espcecially SCSH. It's extremly verbose and I
can hardly expect beginners knowing alle the details of the Syntax, if
it comes to string-handling SCSH is too superior, etc etc.

Just one Eiffel compiler can handle some sort of higher order
functions and so you often end up with using inheritance for all kind
of things which just work in Scheme. Just try to add one to all the
elements of a Datastructure in a List in Eifel and do the same in Scheme.

Sure one can learn Eiffel because it's quite verbose. But I do suggest
to anyone which really start with programming at least having a look
at Scheme, or even start with it. If one uses DrScheme that immediate
feedback is so helpful that one hardly miss Eiffel ;-)




>
> I'm going on about this because I just re-read Ableson and Sussman last
> week and I kept thinking how much I pitied the poor students
> who have that opaque, jumbled mess as their introduction to programming.
> It seems that a lot of people in the field are downright hostile to the
> beginner's need for *training wheels*.
> </rant>

On can argue about that book and it seems that either one like that
book of reject it. Now I'm a bit in the middle. I found it well
written but the examples are not as I would teach them. Anyway if you
don't have to learn Scheme by just reading that book, on should put it
on ones bookshelf just because it covers different kinds of
programming and areas and this is very well done.

So I suggest that book, but not as a book for beginners. With some
more background of programming it's more useful.

Regards
Friedrich

Frode Vatvedt Fjeld

unread,
Jun 7, 2000, 3:00:00 AM6/7/00
to
Friedrich Dominicus <Friedrich...@inka.de> writes:

> And why should (not tested, just writen down from memory)
>
> (define (calculate-sum a-list-of-ints)
> (if (null? a-list-of-ints)
> 0
> (+ (first a-list-of-ints) (calculate-sum (rest
> a-list-of-ints)))))

Since coming to terms with LOOP, I have to say I find this CL version
somewhat nicer.. (although I'm not quite sure whether it's a good
thing to use for introductory teaching):

(defun calculate-sum (list-of-ints)
(loop for i in list-of-ints summing i))

--
Frode Vatvedt Fjeld

Friedrich Dominicus

unread,
Jun 7, 2000, 3:00:00 AM6/7/00
to
Frode Vatvedt Fjeld <fro...@acm.org> writes:

> Since coming to terms with LOOP, I have to say I find this CL version
> somewhat nicer.. (although I'm not quite sure whether it's a good
> thing to use for introductory teaching):
>
> (defun calculate-sum (list-of-ints)
> (loop for i in list-of-ints summing i))

I agree, but he was talking about Scheme and so I used Scheme, and do
in Scheme is not as powerful as it is in Common Lisp. So probably I
would prefer you solutions in Common Lisp.

Regards
Friedrich

Frode Vatvedt Fjeld

unread,
Jun 7, 2000, 3:00:00 AM6/7/00
to
Friedrich Dominicus <Friedrich...@inka.de> writes:

Yes, I think what I really intended with my posting was to raise the
question of which solution (CL or scheme) is more approprate for
teaching programming. It seems to me that the above LOOP form would be
much easier to present to someone new to programming and make them
feel they "understand" it. However, if you take the trouble to teach
someone the scheme-ish version, they will somehow have learnt more
(including some bad habits..). One could of course macroexpand the
LOOP and show the students, but that's not really the way to go, I
guess :-)

So I guess this is the same old question of which abstraction level is
the better starting point for teaching programming.

--
Frode Vatvedt Fjeld

Matthias Felleisen

unread,
Jun 7, 2000, 3:00:00 AM6/7/00
to
qt...@my-deja.com wrote:

> Extreme simplicity does not mean *easy*.

You are absolutely 100% totally correct!!!!

>
>
> I'm going on about this because I just re-read Ableson and Sussman last
> week and I kept thinking how much I pitied the poor students
> who have that opaque, jumbled mess as their introduction to programming.
> It seems that a lot of people in the field are downright hostile to the
> beginner's need for *training wheels*.

That's even better.

But you're rant just shows that you shoot before you read.
See my posting on how many training wheels we build and
read some of the stuff that's out on our Web site.

Abelson and Sussman revolutionized curriuclar efforts. We
now know that the first course doesn't have to spend 90%
on the synatx of various constructs (or the stupidities of lambda
w/o true lexical scope note: Python!) but can spend 90% on
ideas. The problem with A&S -- they spend the time on
deep mathematical ideas w/ little or nothing on how to create
programs.

We fixed that. We have training wheels for
- syntax
- run-time
- program design (we call these program design recipes)


-- Matthias

Friedrich Dominicus

unread,
Jun 7, 2000, 3:00:00 AM6/7/00
to
>
> So I guess this is the same old question of which abstraction level is
> the better starting point for teaching programming.

I agree. And I do not know the answer, and even if I would other
surely would disagree. So you can't discuss that IMO. All have
advantages and disadvantags. I would suggest the following.

- Scheme is quite nice for beginning because with very few knowledge
of programming you got encouraging results
- I would prefer Common Lisp for nearly everything beyond (exceptions
are e.g SCSH for Shell-Programming and anyway DrScheme and MitScheme
at least are quite extended Schemes.

I would prefer starting with language in which I can concentrate on
the program at hand so this disqualifies IMO C, Assembler, Pascal and
all the like. In all of this languages I normally have to deal with
memory allocation, stupid counting and not forgetting that there you
have to put a '\0' at end indicator on an char*. Don't forget to
handle the return codes etc etc. All pieces by themselves annoying
together ...

I would think that someone started with a Lisp-ish language will
hardly understand why he/she should care about such a stuff. Now if
you come from the other side (C) they hardly see that.


Anyway I guess it's quite difficult to thing that other solutions
might be better than from where you were starting. My first exposure
to Eiffel resulted in the question: "why not C++" now this question is
answered yet. The question now is "what would happened if I had
started with Lisp".

I do not know the anwer

Regards
Friedrich

Joe Marshall

unread,
Jun 7, 2000, 3:00:00 AM6/7/00
to
qt...@my-deja.com writes:

> <rant>
> I have long been puzzled as to why so many people think that Scheme is a
> good language for the neophyte programmer.

> For the newcomer, Scheme code is sparse and cryptic.

When I was a newcomer, I found Scheme code to be neither sparse nor
cryptic.

> Extreme simplicity does not mean *easy*. Easy is when the naive reader
> can understand the basics without much effort. This means that the
> syntax should be self-explanatory as much as reasonably practical.

I disagree. The syntax is essentially unimportant (and a distraction
in languages with a `rich' syntax). The *semantics* should be simple
and self-explanatory as possible. This is where Scheme has the edge.

There are only a handful of special forms in scheme, and *every other*
construct is a simple function call.

> I'm going on about this because I just re-read Ableson and Sussman last
> week and I kept thinking how much I pitied the poor students
> who have that opaque, jumbled mess as their introduction to programming.

`Opaque, jumbled mess' didn't come to mind when I read it. I've found
extremely few computer-oriented books that even approach the clarity
of writing in S&ICP.

> It seems that a lot of people in the field are downright hostile to the
> beginner's need for *training wheels*.

I like to think that I'm not, but I'm certain we disagree on what
constitutes training wheels and what constitutes a crutch.

Marius Vollmer

unread,
Jun 7, 2000, 3:00:00 AM6/7/00
to
Friedrich Dominicus <Friedrich...@inka.de> writes:

> - Scheme is quite nice for beginning because with very few knowledge
> of programming you got encouraging results
> - I would prefer Common Lisp for nearly everything beyond (exceptions
> are e.g SCSH for Shell-Programming and anyway DrScheme and MitScheme
> at least are quite extended Schemes.

Hmm, what about this:

- Only teach Common Lisp because it is more of a real-world language
than Scheme but is not harder to learn for beginners. It might even
be easier because it is richer.

- Then, as an advanced exercise, implement Scheme in Common Lisp.
This explains the ideas behind Scheme, is a non-trivial (but still
quite simple) application of Common Lisp, and in general shows the
power of Lisp.

In my view, Scheme is good at being implemented over and over again,
while Common Lisp is good at being used.

Janos Blazi

unread,
Jun 8, 2000, 3:00:00 AM6/8/00
to
> Yes, I think what I really intended with my posting was to raise the
> question of which solution (CL or scheme) is more approprate for
> teaching programming.

I think many people prefer Scheme to Cl for teaching purposes, because it
was made for teaching, so it was designed with teaching in mind. Alas, this
does not imply that it is really better for teaching. I think (I am not sure
thoug) that Scheme was designed at a time when there was no Lisp standard.

I would prefer Cl for several reasons. But there is one point in my eyes
that is in favour of Scheme: There are completely free Scheme
implementations that provide GUI toolkits and there is not a single free Cl
implementation as far as I know.

Janos Blazi


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----

vsync

unread,
Jun 8, 2000, 3:00:00 AM6/8/00
to
"Janos Blazi" <jbl...@vipsurf.de> writes:

> I would prefer Cl for several reasons. But there is one point in my eyes
> that is in favour of Scheme: There are completely free Scheme
> implementations that provide GUI toolkits and there is not a single free Cl
> implementation as far as I know.

CLISP is GPLed, and CMUCL is like public domain or something, I think.

--
vsync
http://quadium.net/ - last updated Thu Jun 8 00:50:06 MDT 2000
Orjner.

Rudolf Schlatte

unread,
Jun 8, 2000, 3:00:00 AM6/8/00
to
vsync <vs...@quadium.net> writes:

> "Janos Blazi" <jbl...@vipsurf.de> writes:
>
> > I would prefer Cl for several reasons. But there is one point in my eyes
> > that is in favour of Scheme: There are completely free Scheme
> > implementations that provide GUI toolkits and there is not a single free Cl
> > implementation as far as I know.
>
> CLISP is GPLed, and CMUCL is like public domain or something, I think.

Perhaps Janos meant "free with GUI toolkit", but this is changing. I
just played with the new version of Espen Johnsens GTK+ bindings, and
they look promising (read: I got it to work on Solaris and Linux, and
read in simple interface definitions made with the Glade GUI builder).

Further pointers to this and other toolkits are at Dan's CLiki site:
http://ww.telent.net/cliki/Graphics%20Toolkit

Rudi

Janos Blazi

unread,
Jun 8, 2000, 3:00:00 AM6/8/00
to
vsync <vs...@quadium.net> schrieb in im Newsbeitrag:
871z28x...@quadium.net...

> "Janos Blazi" <jbl...@vipsurf.de> writes:
>
> > I would prefer Cl for several reasons. But there is one point in my eyes
> > that is in favour of Scheme: There are completely free Scheme
> > implementations that provide GUI toolkits and there is not a single free
Cl
> > implementation as far as I know.
>
> CLISP is GPLed, and CMUCL is like public domain or something, I think.

I am ashamed but i do not know what GPL means (acronyms seem to abound these
days...). And CMUCL does not run on NT. I do not think that the CL community
cann afford to ignore people who for one reason or the other prefer NT to
Debian.

CL does not have a standard library either, though of course those who
seriously use CL have built their own "standard libraries" over the years.

J.B.

Janos Blazi

unread,
Jun 8, 2000, 3:00:00 AM6/8/00
to

Joe Marshall <jmar...@alum.mit.edu> schrieb in im Newsbeitrag:
itvl6y...@alum.mit.edu...

> qt...@my-deja.com writes:
>
> `Opaque, jumbled mess' didn't come to mind when I read it. I've found
> extremely few computer-oriented books that even approach the clarity
> of writing in S&ICP.

May I ask you a question: When you were first reading SICP: were you an
absolute beginner? If you were an absolute beginner and still enjoyed that
book then you are very gifted.
I have had substantial teaching experience and I very much doubt that
beginners will have much fun with SICP. Maybe if they have an excellent
instructor who can smooth out the rough edges...

But it seems to be a very, very fine book for those among us who have had
learnt basic computer science already. Additionally substantial mathematical
maturity is needed.

J.B.

Joe Marshall

unread,
Jun 8, 2000, 3:00:00 AM6/8/00
to
"Janos Blazi" <jbl...@netsurf.de> writes:

> Joe Marshall <jmar...@alum.mit.edu> schrieb in im Newsbeitrag:
> itvl6y...@alum.mit.edu...
> > qt...@my-deja.com writes:
> >
> > `Opaque, jumbled mess' didn't come to mind when I read it. I've found
> > extremely few computer-oriented books that even approach the clarity
> > of writing in S&ICP.
>
> May I ask you a question: When you were first reading SICP: were you an
> absolute beginner? If you were an absolute beginner and still enjoyed that
> book then you are very gifted.

Well, I had taken a introductory computer course at Harvard a couple
of years prior, so I wasn't a complete beginner.

> I have had substantial teaching experience and I very much doubt that
> beginners will have much fun with SICP. Maybe if they have an excellent
> instructor who can smooth out the rough edges...

I guess having Abelson teaching it helped as well.

Daniel Barlow

unread,
Jun 8, 2000, 3:00:00 AM6/8/00
to
"Janos Blazi" <jbl...@netsurf.de> writes:

> I am ashamed but i do not know what GPL means (acronyms seem to abound these
> days...). And CMUCL does not run on NT. I do not think that the CL community
> cann afford to ignore people who for one reason or the other prefer NT to
> Debian.

Do you have access to the World Wide Web? If you can get access to
the Web, you can use one of the many fine search engines such as Google
to answer these questions very easily.

For example, searching in Google for "GPL" returns "GNU General Public
License - GNU Project - Free Software Foundation (FSF)" as the first
match. Searching for "CLISP Common Lisp" returns the CLISP web site -
which also has the no doubt welcome news that it also runs on NT.
Searching for "NT Common Lisp" returns a page at elwoodcorp.com
listing many Common Lisp implementations, at least several of which
are free and run on NT.

Internet access is much easier to come by these days than it was even
ten years ago. It's made my life a whole lot easier. I thoroughly
recommend it.


-dan

--
http://ww.telent.net/cliki/ - CLiki: CL/Unix free software link farm

Chris Double

unread,
Jun 9, 2000, 3:00:00 AM6/9/00
to
"Janos Blazi" <jbl...@netsurf.de> writes:

> I am ashamed but i do not know what GPL means (acronyms seem to
> abound these days...).

You can find out what it is by going to http://www.google.com, keying
in 'GPL' in the search area and hitting 'I am feeling lucky'. Or just
do a normal search and you'll get more hits than you can handle
describing what it is.

> And CMUCL does not run on NT. I do not think that the CL community
> cann afford to ignore people who for one reason or the other prefer
> NT to Debian.

There are a number of CL systems that run on NT. I'm pretty sure this
shows that NT isn't being ignored. For example (but not limited to):

Lispworks - http://www.xanalys.com
Allegro CL - http://www.franz.com
Corman Lisp - http://www.corman.net
CLISP - http://clisp.cons.org

> CL does not have a standard library either, though of course those who
> seriously use CL have built their own "standard libraries" over the
> years.

What is your definition of standard library? CL has quite a large
standard library compared to some language standards.

Chris.
--
http://www.double.co.nz/dylan

Paolo Amoroso

unread,
Jun 9, 2000, 3:00:00 AM6/9/00
to
On Thu, 8 Jun 2000 19:02:26 +0200, "Janos Blazi" <jbl...@netsurf.de> wrote:

> I have had substantial teaching experience and I very much doubt that
> beginners will have much fun with SICP. Maybe if they have an excellent
> instructor who can smooth out the rough edges...

Well, it would certainly help if students at least _read_ the book, and
maybe even experimented with an actual Scheme system and did some of the
exercises. My experience suggests that this approach is not popular among
my fellow students.

I am a computer science student at the University of Milan, Italy. I have
been in touch with hundreds of students who attended courses in which SICP
was used as a textbook. Believe it or not, few of them actually _read_ the
book. Several students rely on their own notes, and some even on a
bootlegged Italian translation.

I also watched several examination sessions related to the above courses.
One time a student expressed his surprise for not passing the examination.
It turned out that he had done 0--zero--SICP exercises.


Paolo
--
EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
http://cvs2.cons.org:8000/cmucl/doc/EncyCMUCLopedia/

Janos Blazi

unread,
Jun 9, 2000, 3:00:00 AM6/9/00
to
> > I am ashamed but i do not know what GPL means (acronyms seem to
> > abound these days...).
>
> You can find out what it is by going to http://www.google.com, keying
> in 'GPL' in the search area and hitting 'I am feeling lucky'.

Thx.

> > And CMUCL does not run on NT. I do not think that the CL community
> > cann afford to ignore people who for one reason or the other prefer
> > NT to Debian.
>
> There are a number of CL systems that run on NT. I'm pretty sure this
> shows that NT isn't being ignored. For example (but not limited to):


I know these systems, actually I have "played" with all of them. One of
them, CLISP, I even love.
The problem is you cannot read the whole thread and I cannot repeat
everything I told again and again. But let me try: The implementation should
have the following properties:

* it should be completely free
* it should impose no restriction upon you what so ever; especially it
should not
terminate after 12,2339 hours and it should support all memory you have;
* it shoud work with Linux and with NT
* it should support some GUI toolkit (I hope I am using the right
expression),
like CLIM (whatever that may be, I have not tried it yet) or Tk or
whaever
else
* it should have a GUI user interface

> > CL does not have a standard library either, though of course those who
> > seriously use CL have built their own "standard libraries" over the
> > years.
>
> What is your definition of standard library? CL has quite a large
> standard library compared to some language standards.

Well, all those fancy things you can do with Python so easily, like chopping
a string into pieces, parse floating point numbers, handling comfortably the
file system, etc.
I surmise that if simply the experts in this newsgroup put together the
'little routines' the have written over the years, hardly a single line of
new code would have to be written, everything does already exist in one form
or the other, accessibility being the only problem and some common
philosophy is necessary too.
Never mind if you are not sure if your routines do their job perfectly,
never mind if they are reentrant etc.
The strange thing is that CL is much, much better suited for most of these
things than most other languages and still there is no standard library.

Janos Blazi

unread,
Jun 9, 2000, 3:00:00 AM6/9/00
to

Daniel Barlow <d...@telent.net> schrieb in im Newsbeitrag:
87itvjz...@tninkpad.telent.net...

> "Janos Blazi" <jbl...@netsurf.de> writes:
>
> > I am ashamed but i do not know what GPL means (acronyms seem to abound
these
> > days...). And CMUCL does not run on NT. I do not think that the CL

community
> > cann afford to ignore people who for one reason or the other prefer NT
to
> > Debian.
>
> Do you have access to the World Wide Web? If you can get access to
> the Web, you can use one of the many fine search engines such as Google
> to answer these questions very easily.
>
> For example, searching in Google for "GPL" returns "GNU General Public
> License - GNU Project - Free Software Foundation (FSF)" as the first
> match. Searching for "CLISP Common Lisp" returns the CLISP web site -
> which also has the no doubt welcome news that it also runs on NT.
> Searching for "NT Common Lisp" returns a page at elwoodcorp.com
> listing many Common Lisp implementations, at least several of which
> are free and run on NT.
>
> Internet access is much easier to come by these days than it was even
> ten years ago. It's made my life a whole lot easier. I thoroughly
> recommend it.

Thank you very much for your advice. So friendly of you. Thank you for your
kindness.
The problem is my ISP charges extra for WWW and for FTP so I only use USENET
(and there they charge 5 marks a month for every newsgroup I use (and ten
marks if I post as well)).
My access to the computer I am using at the moment is limited as well, as
the other family which lives in this room has litlle children and they cry
when I switch my computer on.

Janos Blazi
Janos Blazi

Janos Blazi

unread,
Jun 9, 2000, 3:00:00 AM6/9/00
to
> Well, it would certainly help if students at least _read_ the book, and
> maybe even experimented with an actual Scheme system and did some of the
> exercises. My experience suggests that this approach is not popular among
> my fellow students.

In school (I teach at a grammar school) it is well known that our pupils
cannot read. Sometimes I tell them "now I will not explain this, please read
the book and do the problems". Especially the weaker pupils are completely
unable to do this (even if the book is written in their mother tongue). Then
their responses will be between despereate and impertinent ("you are paid to
explain it").

So please tell me: Are the students who are expected to read SICP beginners
in their first year or more advanced students (in their senior years). As I
think it may be a phantastic text for more advanced students.
For beginners it is a failure. I can prove this: "Simply Scheme" was
written to enable the students *after* reading "Simply Scheme" and doing the
problems in "Simply Scheme" to go on to SICP.

>
> I am a computer science student at the University of Milan, Italy. I have
> been in touch with hundreds of students who attended courses in which SICP
> was used as a textbook. Believe it or not, few of them actually _read_ the
> book. Several students rely on their own notes, and some even on a
> bootlegged Italian translation.

I am not surprised. On the one hand the teaching of English seems to be
extremely ambitious (only English is used) but on the other hand the pupils
cannot read even simple texts. When I sometimes give them a problem from an
English book (like Anton: Calculus) they sometimes tell me that they will
never need English "later".


>
> I also watched several examination sessions related to the above courses.
> One time a student expressed his surprise for not passing the examination.
> It turned out that he had done 0--zero--SICP exercises.

I think we are more advanced here in Germany: Here all those students would
pass their examinations.

J.B.

Paolo Amoroso

unread,
Jun 9, 2000, 3:00:00 AM6/9/00
to
On Thu, 8 Jun 2000 13:20:00 +0200, "Janos Blazi" <jbl...@vipsurf.de> wrote:

> I think many people prefer Scheme to Cl for teaching purposes, because it
> was made for teaching, so it was designed with teaching in mind. Alas, this

Why do you think Scheme was made for teaching? The paper "The Evolution of
Lisp" by Gabriel and Steele:

ftp://ftp.cs.indiana.edu/pub/scheme-repository/doc/pubs/Evolution-of-Lisp.ps.gz

tells a different story.

Tim Howe

unread,
Jun 9, 2000, 3:00:00 AM6/9/00
to
Chris Double <ch...@double.co.nz> writes:

> > Well, all those fancy things you can do with Python so easily, like
> > chopping a string into pieces, parse floating point numbers,

^^^^^^^^^^^^^^^^^^^^^^^^^^^^


> > handling comfortably the file system, etc.
>

> All these things are available in the CL standard library as far as
> I'm aware.

Wasn't there just a thread talking about that very thing and how it's
bad that it's not part of the language?

--
Tim Howe
* I won't speak for Sun if they promise not to speak for me. *

Janos Blazi

unread,
Jun 9, 2000, 3:00:00 AM6/9/00
to
> Why do you think Scheme was made for teaching? The paper "The Evolution of
> Lisp" by Gabriel and Steele:
>
>
ftp://ftp.cs.indiana.edu/pub/scheme-repository/doc/pubs/Evolution-of-Lisp.ps
.gz
>
> tells a different story.

thx, I have now read section 2.8, it is interesting. From what I read it is
not clear, which rôle teaching considerations played.

Chris Double

unread,
Jun 10, 2000, 3:00:00 AM6/10/00
to
"Janos Blazi" <jbl...@netsurf.de> writes:

> I know these systems, actually I have "played" with all of them. One
> of them, CLISP, I even love. The problem is you cannot read the
> whole thread and I cannot repeat everything I told again and again.

I did read the whole thread. I don't want to get into a discussion of
whether systems should be free or not. I was just answering your
comment that NT was being ignored whereas I believe it was not as a
number of CL systems are available for NT. Both free and commercial.

> > What is your definition of standard library? CL has quite a large
> > standard library compared to some language standards.
>

> Well, all those fancy things you can do with Python so easily, like
> chopping a string into pieces, parse floating point numbers,

> handling comfortably the file system, etc.

All these things are available in the CL standard library as far as
I'm aware.

> I surmise that if simply the experts in this newsgroup put together


> the 'little routines' the have written over the years, hardly a
> single line of new code would have to be written, everything does
> already exist in one form or the other, accessibility being the only
> problem and some common philosophy is necessary too.

Many people are providing access to their source code under various
licenses. See:

http://clocc.sourceforge.net
http://series.sourceforge.net
http://gwl.sourceforge.net
http://allegroserve.sourceforge.net
http://lsp.sourceforge.net
http://sourceforge.net/project/?group_id=6352

> The strange thing is that CL is much, much better suited for most of
> these things than most other languages and still there is no
> standard library.

There is a standard library. It is defined in the ANSI CL
standard. What you seem to be saying is there are few third party
libraries. As far as I know though, there are many third party
libraries, not just the ones listed above. Maybe not as many as Python
or Perl, but still more exist than your comments seem to say.

Chris.
--
http://www.double.co.nz/dylan

Chris Double

unread,
Jun 10, 2000, 3:00:00 AM6/10/00
to
Tim Howe <vs...@central.sun.com> writes:

> Chris Double <ch...@double.co.nz> writes:
>
> > > [...snip stuff - including reference to parsing floats...]


> >
> > All these things are available in the CL standard library as far as
> > I'm aware.
>

> Wasn't there just a thread talking about that very thing and how it's
> bad that it's not part of the language?

I was referring more to the other things mentioned than the float
specifically. It is possible to read floats to a string using the CL
standard library read-from-string:

(type-of (read-from-string "1.42"))
=> SINGLE-FLOAT
4

It has a few gotchas though which may make it less than desirable for
some purposes. The thread you mention covers them I think along with
alternatives to reading floats.

Chris.
--
http://www.double.co.nz/dylan

Paolo Amoroso

unread,
Jun 10, 2000, 3:00:00 AM6/10/00
to
On Fri, 9 Jun 2000 15:07:59 +0200, "Janos Blazi" <jbl...@netsurf.de> wrote:

> So please tell me: Are the students who are expected to read SICP beginners
> in their first year or more advanced students (in their senior years). As I

Both beginners (i.e. first year) and students who are about to graduate
(i.e. third/fourth year).

Paolo Amoroso

unread,
Jun 10, 2000, 3:00:00 AM6/10/00
to
On Fri, 9 Jun 2000 14:41:34 +0200, "Janos Blazi" <jbl...@netsurf.de> wrote:

> I surmise that if simply the experts in this newsgroup put together the
> 'little routines' the have written over the years, hardly a single line of

Have a look at CLOCC (Common Lisp Open Code Collection):

http://clocc.sourceforge.net/

Paolo Amoroso

unread,
Jun 10, 2000, 3:00:00 AM6/10/00
to
On 10 Jun 2000 02:02:09 +1200, Chris Double <ch...@double.co.nz> wrote:

> http://lsp.sourceforge.net

The LSP site has just moved to:

http://lsp.everest.com/

Jeff Dalton

unread,
Jun 13, 2000, 3:00:00 AM6/13/00
to
Paolo Amoroso <amo...@mclink.it> writes:

> One time a student expressed his surprise for not passing the examination.
> It turned out that he had done 0--zero--SICP exercises.

I am not really surprised. They can probably get away with it in
other subjects, and people have a tendency to do only what's
explicitly and actually required. (If part of their grade was
based on the exercises, they probably would have done them.)

When I was teaching Common Lisp to people from industry, they did the
exercises, but it was very difficult to get anyone to experiment with
the functions and other constructs first. I eventually just added
execises that gave them a series of expressions to type in (they
were also supposed to work out what result they expected first).

-- j

Jeff Dalton

unread,
Jun 13, 2000, 3:00:00 AM6/13/00
to

gmc...@my-deja.com

unread,
Jun 14, 2000, 3:00:00 AM6/14/00
to
In article <87itvlu...@frown.inka.de>,
Friedrich Dominicus <Friedrich...@inka.de> wrote:
> qt...@my-deja.com writes:
> >
[snip]
>
> what is the only special thing one have to learn in Scheme it's IMHO
> just prefix notation but knowing that why should
>
> (+ 1 2 3 4 5)
>
> more unclear than
> 1 + 2 + 3 + 4 + 5
>
> And why should (not tested, just writen down from memory)
>
> (define (calculate-sum a-list-of-ints)
> (if (null? a-list-of-ints)
> 0
> (+ (first a-list-of-ints) (calculate-sum (rest
> a-list-of-ints)))))
>
> I can easily run that with
>
> (calculate-sum '(1 2 3))
>
> be more clearly as
>
> class CALCULATE_SUM
>
> creation
> make
>
> feature
> a_list_of_ints: LINKED_LIST[INTEGER];
> make is
> do
>
> !!a_list_of_ints.make;
> a_list_of_ints.extend(1);
> a_list_of_ints.extend(2);
> a_list_of_ints.extend(3);
> io.put_string("sum of ";
> io.put_sring(a_list_of_ints.out);
> io.put_string(" = ");
> io.put_integer(calculate_sum(a_list_of_ints));
> io.new_line;
> end;
>
> calculate_sum (a_list: LINKED_LIST[INTEGER]): INTEGER;
> do
> from a_list.start;
> until a_list.off;
> loop
> Result := Result + a_list.item;
> a_list.forth;
> end;
> end;
> end;
>
> I'm an Eiffel-programmer for quite a while now,
[snip]

> Regards
> Friedrich
>

Friedrich, your point is well taken, but there's no need to make your
Eiffel example more verbose than necessary. It already has bad enough a
rep that way as it is :-)

For example, one can use a manifest array to initialize the linked
list, much as you did with the Scheme code. One can use string
concatenation to reduce the number print statements. And Eiffel also
supports recursion, eliminating the need for the loop in the sum
function. (In SmallEiffel a linked list is another collection, accessed
by an index, so one still has to pass around an index. Or you could
slice up the list as it gets passed down, but in the real world that
would probably be unacceptable overhead.

Then one also has to remember that the make feature is there to
compensate for the lack of an interpretive environment. So my version,
with a function that applies to all COLLECTION classes and a
contractual clause thrown in, looks like:

class CALC
creation make

feature
a_list_of_ints: LINKED_LIST[INTEGER];
make is
do
!!a_list_of_ints.from_collection ( <<1, 2, 3>> )
io.put_string("sum of " + a_list_of_ints.out + " = ")
io.put_string (calculate_sum(a_list_of_ints,
a_list_of_ints.lower).to_string + "%N%N")
end;

calculate_sum (a_list: COLLECTION[INTEGER]; index: INTEGER): INTEGER
is
require a_list /= Void
a_list.is_valid (index)
do
if index = a_list.upper then
Result := a_list.item(index)
else
Result := a_list.item(index) +
calculate_sum (a_list, index + 1);
end
end
end


Sent via Deja.com http://www.deja.com/
Before you buy.

Friedrich Dominicus

unread,
Jun 15, 2000, 3:00:00 AM6/15/00
to
gmc...@my-deja.com writes:

>
> class CALC
> creation make
>
> feature
> a_list_of_ints: LINKED_LIST[INTEGER];
> make is
> do
> !!a_list_of_ints.from_collection ( <<1, 2, 3>> )
> io.put_string("sum of " + a_list_of_ints.out + " = ")
> io.put_string (calculate_sum(a_list_of_ints,
> a_list_of_ints.lower).to_string + "%N%N")
> end;
>
> calculate_sum (a_list: COLLECTION[INTEGER]; index: INTEGER): INTEGER
> is
> require a_list /= Void
> a_list.is_valid (index)
> do
> if index = a_list.upper then
> Result := a_list.item(index)
> else
> Result := a_list.item(index) +
> calculate_sum (a_list, index + 1);
> end
> end

I guess out of 100 Eiffel programmers you'll hardly find more then two
which would solve this recursivly. And the question persists why
should the Eiffel solution better readable than the Common Lisp
solution. Anyway our solutions are compiler specific. In my solution
you are out of luck with using start, forth etc, in yours the creation
of the list, and the + for concatenating Strings. But anyway this is
drifting away from the points I wanted to show. That I can't see why
one or the other solution should be more easy to read.

Regards
Friedrich

Janos Blazi

unread,
Jun 18, 2000, 3:00:00 AM6/18/00
to
> [...]

> (If part of their grade was
> based on the exercises, they probably would have done them.)

In Germany the would probably copy the solutions. This occured very often
when I studied math in the seventies and the were doing it in the library
where everybody, even the professor could see it.

fab

unread,
Jun 19, 2000, 3:00:00 AM6/19/00
to

> - Scheme is quite nice for beginning because with very few knowledge
> of programming you got encouraging results
> - I would prefer Common Lisp for nearly everything beyond (exceptions
> are e.g SCSH for Shell-Programming and anyway DrScheme and MitScheme
> at least are quite extended Schemes.
I would be glad to learn common-lisp, it seems more complete than scheme


> I would prefer starting with language in which I can concentrate on
> the program at hand so this disqualifies IMO C, Assembler, Pascal and
> all the like.
I agree with this, it's very useful to focus on algorithm, and don't
spend 100 lines of code to translate it.

> In all of this languages I normally have to deal with
> memory allocation,
There I disagree, it's a main feature of programming
when you read Abelson & Sussman you see how it's important
to understand pointers and memory allocation. What about set-car!
set-cdr! without pointers. What about the danger of the growing
memory allocated by "cons" and not handled by the garbage collector
(while they are still in use). I think pointers, allocation memory
and even Assembler, are an unavoidable road to programming

> stupid counting and not forgetting that there you
> have to put a '\0' at end indicator on an char*. Don't forget to
> handle the return codes etc etc. All pieces by themselves annoying
> together ...
I agree with the more "tricky" than "pure" concepts of C and its boring
traits.
Hey what is the problem with the "return" feature of C ???
This is indispensable !?!

> I would think that someone started with a Lisp-ish language will
> hardly understand why he/she should care about such a stuff. Now if
> you come from the other side (C) they hardly see that.
If I understand well, a C-programmer hardly "see" the power of lisp
and a lisp-programmer why it is worthwhile ?

If a lisp-programmer go into C-programming, and he is open-minded, he
may appreciate the close-to-computer way of programming, and the
easy-to-read syntax of long programs
(even if I love scheme I still think it's difficult to read)

If a C-programmer go into scheme, he may have a problem, completely
different way of programming, strong subtilities such as toplevel
definitions, local environnement, functionnal programming
I should advice the other way.

> Anyway I guess it's quite difficult to thing that other solutions
> might be better than from where you were starting. My first exposure
> to Eiffel resulted in the question: "why not C++" now this question is
> answered yet. The question now is "what would happened if I had
> started with Lisp".
What is the difference between Eiffel and C++ (this is a newbie-question) ?


I beg your pardon for my possible english mistakes
Regards
Fabien

Marco Antoniotti

unread,
Jun 19, 2000, 3:00:00 AM6/19/00
to

"fab" <fvi...@wanadoo.fr> writes:

> > - Scheme is quite nice for beginning because with very few knowledge
> > of programming you got encouraging results
> > - I would prefer Common Lisp for nearly everything beyond (exceptions
> > are e.g SCSH for Shell-Programming and anyway DrScheme and MitScheme
> > at least are quite extended Schemes.
> I would be glad to learn common-lisp, it seems more complete than
> scheme

Sure is.

> > In all of this languages I normally have to deal with
> > memory allocation,
> There I disagree, it's a main feature of programming
> when you read Abelson & Sussman you see how it's important
> to understand pointers and memory allocation. What about set-car!
> set-cdr! without pointers. What about the danger of the growing
> memory allocated by "cons" and not handled by the garbage collector
> (while they are still in use). I think pointers, allocation memory
> and even Assembler, are an unavoidable road to programming

Sure, but a good GC goes a long way in helping you.

...

> If a lisp-programmer go into C-programming, and he is open-minded, he
> may appreciate the close-to-computer way of programming, and the
> easy-to-read syntax of long programs
> (even if I love scheme I still think it's difficult to read)

a - Common Lisp is "easier" to read than Scheme because it has many
more visual clues (keywords being one - Scheme *does not have
keywords*! Not in RxRS, not in Scheme)

b - You got to be kidding! :)

> If a C-programmer go into scheme, he may have a problem, completely
> different way of programming, strong subtilities such as toplevel
> definitions, local environnement, functionnal programming
> I should advice the other way.

You mean that Lisp languages have more functionality to be taken into
account, don't you?

Cheers

--
Marco Antoniotti ===========================================

gmc...@my-deja.com

unread,
Jun 19, 2000, 3:00:00 AM6/19/00
to
[snip]

The document http://www.elj.com/cppcv3/ is primarily a critique of C++,
but it compares C++ to Eiffel as well as Java. If you just want to skim
the document, you can search for the word "Eiffel" on a chapter's Web
page.

> What is the difference between Eiffel and C++ (this is a newbie-
question) ?
>
> I beg your pardon for my possible english mistakes
> Regards
> Fabien
>
>

ge...@elj.com

unread,
Jun 19, 2000, 3:00:00 AM6/19/00
to
-- cc to comp.lang.eiffel for information purposes

In article <8ikj70$j05$1...@wanadoo.fr>,
"fab" <fvi...@wanadoo.fr> wrote:

[..]

> What is the difference between Eiffel and C++ (this is a newbie-
> question) ?

Even though it is 11 years old, this comparison is still worth a
look:

Eiffel vs C++ : One language designer's view
http://www.elj.com/eiffel/bm/eiffelvscpp89/

C++ has since implemented exceptions and multiple inheritance.

A more recent article that appeared in the C++ Report last year:

Eiffel for Native Speakers of C++
http://www.elj.com/eiffel/cpp/cpp-report-pd/

Another couple of documents worth looking at include:

C++?? Critique (version 3)
http://www.elj.com/cppcv3/

Eiffel to C++ terminology mapping
http://www.elj.com/eiffel/lj/eiffel-cpp-map/

Most think that the in built support of Design by Contract as
implemented in Eiffel is the single defining point for the
language:

http://www.elj.com/#design_by_contract

Paul Johnson describes how one might implement DbC in C++ in
this paper:

The Eiffel Contract for C++ Programmers
http://www.elj.com/eiffel/cpp/eiffel-contract/


Geoff

-- ge...@elj.com
-- http://www.elj.com/elj-daily.cgi

[..]

Nils Goesche

unread,
Jun 19, 2000, 3:00:00 AM6/19/00
to
"Janos Blazi" <jbl...@netsurf.de> writes:

> > [...]
> > (If part of their grade was
> > based on the exercises, they probably would have done them.)
>
> In Germany the would probably copy the solutions. This occured very
> often when I studied math in the seventies and the were doing it in
> the library where everybody, even the professor could see it.

They do. But when I studied mathematics in Germany (in the 90ies) I
was a so called `Tutor' (kind of a teaching assistant) who had, aside
from teaching, to correct other (younger) student's homework. When I
saw that one solution was copied from somebody else, I gave both of
them zero score, no matter how loud they complained, and I wasn't the
only one doing that. That helped, because without at least 40% score
in their homework assignments, they weren't even allowed to attend the
final test.

Times change :-)
--
Nils Goesche
Ask not for whom the <CONTROL-G> tolls.

fab

unread,
Jun 20, 2000, 3:00:00 AM6/20/00
to
>
> > If a lisp-programmer go into C-programming, and he is open-minded, he
> > may appreciate the close-to-computer way of programming, and the
> > easy-to-read syntax of long programs
> > (even if I love scheme I still think it's difficult to read)
>
> a - Common Lisp is "easier" to read than Scheme because it has many
> more visual clues (keywords being one - Scheme *does not have
> keywords*! Not in RxRS, not in Scheme)
>

> b - You got to be kidding! :)
>

am I ? :-)

> > If a C-programmer go into scheme, he may have a problem, completely
> > different way of programming, strong subtilities such as toplevel
> > definitions, local environnement, functionnal programming
> > I should advice the other way.
>
> You mean that Lisp languages have more functionality to be taken into
> account, don't you?
>

It's much more subtle than C when you go in advanced understanding,
And you can do more powerful work.
C is efficent, clean, and fast, that's what I think
C++ is complicated as far as I know. I'm going to work to learn
it, cause it's impossible to avoid it if you're going on modern programming
such as Java. And I don't want to begin with Java.

Scheme (lisp?) can have a control of his own code this is much farther than
the macro possibility of c c++. Whatever you think, c++ will always remain
a freezed language, not evolutive, whereas scheme is. Aren't the last
features
of Mzcheme including good object-programming-style tools ???

But, in fact, a C programmer "can" go into scheme if he is amazed by its
possibility, I'm just afraid he won't be amazed at all by the syntax ;-)

However Scheme as a main drawback, I would like to know if lisp as the
same, it's about using OS resources (sound, graphism, input/output, IRQ
hardware drivers, etc...)
It's not like visual c++ or java,
does somebody have an advice on that ?

Saluti
Grazie per la tua rispondi

Marco Antoniotti

unread,
Jun 20, 2000, 3:00:00 AM6/20/00
to

"fab" <fvi...@wanadoo.fr> writes:

> >
> > > If a lisp-programmer go into C-programming, and he is open-minded, he
> > > may appreciate the close-to-computer way of programming, and the
> > > easy-to-read syntax of long programs
> > > (even if I love scheme I still think it's difficult to read)
> >
> > a - Common Lisp is "easier" to read than Scheme because it has many
> > more visual clues (keywords being one - Scheme *does not have
> > keywords*! Not in RxRS, not in Scheme)
> >
>
> > b - You got to be kidding! :)
> >
> am I ? :-)

Have you ever tried to read the code in "Numerical Recepies in C"? :)

>
> > > If a C-programmer go into scheme, he may have a problem, completely
> > > different way of programming, strong subtilities such as toplevel
> > > definitions, local environnement, functionnal programming
> > > I should advice the other way.
> >
> > You mean that Lisp languages have more functionality to be taken into
> > account, don't you?
> >
> It's much more subtle than C when you go in advanced understanding,
> And you can do more powerful work.
> C is efficent, clean, and fast, that's what I think

So is Common Lisp.

> C++ is complicated as far as I know. I'm going to work to learn
> it, cause it's impossible to avoid it if you're going on modern programming
> such as Java. And I don't want to begin with Java.

That is a wise thing to do. Although I would not discard Java as a
starting point.


> Scheme (lisp?) can have a control of his own code this is much farther than
> the macro possibility of c c++. Whatever you think, c++ will always remain
> a freezed language, not evolutive, whereas scheme is. Aren't the last
> features
> of Mzcheme including good object-programming-style tools ???

Not necessarily. They are not in RxRS: you get another Scheme and you
are doomed to re-invent the wheel. If you want the real thing pick up
a Common Lisp implementation.

> But, in fact, a C programmer "can" go into scheme if he is amazed by its
> possibility, I'm just afraid he won't be amazed at all by the syntax ;-)
>
> However Scheme as a main drawback, I would like to know if lisp as the
> same, it's about using OS resources (sound, graphism, input/output, IRQ
> hardware drivers, etc...)
> It's not like visual c++ or java,
> does somebody have an advice on that ?

The answer is not clear cut. I must say that I am doing some serious
studying of the two major commercial implementations on the PC
platform and I am quite amazed at the complexity they both managed to
pack in. Most of the things you mention are just a foreign function
call away.

> Saluti
> Grazie per la tua rispondi

Prego! :)

--
Marco Antoniotti ===========================================

Erik Naggum

unread,
Jun 20, 2000, 3:00:00 AM6/20/00
to
* "fab" <fvi...@wanadoo.fr>

| C is efficent, clean, and fast, that's what I think

C was "efficient" on a PDP-11. It is inefficient on everything
created ever since that CPU design was abandoned. On modern
processors, C is actually anti-efficient due to a number of
relationships between processor, memory, and the outside world.

C is not clean -- the language has _many_ gotchas and traps, and
although its semantics are _simple_ in some sense, it is not any
cleaner than the assembly-language design it is based on.

C is not fast -- it is instead microoptimizable, so it looks as if
you control the speed of your code, but instead of generating fast
code for problem-solving, the compiler generates no excess machine
code relative to _your_ code. This is the same "fast" as assembler,
where you would have to be lobotomized beyond recognition to believe
that instructions counts equated speed.



| C++ is complicated as far as I know. I'm going to work to learn it,
| cause it's impossible to avoid it if you're going on modern
| programming such as Java. And I don't want to begin with Java.

Of the two languages, I think you should begin with Java, and get
yourself Bruce Eckel: Thinking in Java. It is in its second
edition, but I don't know whether you're likely to find that version
on bookshelves, yet. You can find it on the net: www.BruceEckel.com.

| Scheme (lisp?) can have a control of his own code this is much
| farther than the macro possibility of c c++. Whatever you think,
| c++ will always remain a freezed language, not evolutive, whereas
| scheme is. Aren't the last features of Mzcheme including good
| object-programming-style tools ???

I'd like to visit your planet once. It sounds like it's the inverse
of earth, and the earth sucks, so it just might be a nice place.

Scheme and Common Lisp are two languages so different you are better
off believing they have nothing in common except the parentheses.
Scheme is frozen solid. C++ has had an _amazing_ evolution of the
past few years -- so much in fact that it is impossible to program
in the _language_ -- you always program some particular _compiler_.
The same is true of Scheme, which is useless without extensions,
which are all incredibly ugly compared to the language itself.

| But, in fact, a C programmer "can" go into scheme if he is amazed by its
| possibility, I'm just afraid he won't be amazed at all by the syntax ;-)

He is a wise man who speaks for himself on such mattes.

| However Scheme as a main drawback, I would like to know if lisp as
| the same, it's about using OS resources (sound, graphism,
| input/output, IRQ hardware drivers, etc...) It's not like visual
| c++ or java, does somebody have an advice on that ?

It is generally a good idea not to reinvent wheels. Therefore, a
good programmer sees little or no prestige in which language is used
as long as it is the best for the purposes at hand. Common Lisp is
far superior to any other language in one particular area: It is the
best programming language for humans to express themselves in.
Other languages may be more suitable to device drives than humans,
and in some cases the needs of the machine may outweigh that of the
human, but is getting more and more rare.

#:Erik
--
If this is not what you expected, please alter your expectations.

fab

unread,
Jun 22, 2000, 3:00:00 AM6/22/00
to

"Erik Naggum" <er...@naggum.no> wrote in message
news:31705085...@naggum.no...

> * "fab" <fvi...@wanadoo.fr>
> | C is efficent, clean, and fast, that's what I think
>
> C was "efficient" on a PDP-11. It is inefficient on everything
> created ever since that CPU design was abandoned. On modern
> processors, C is actually anti-efficient due to a number of
> relationships between processor, memory, and the outside world.
>
> C is not clean -- the language has _many_ gotchas and traps, and
> although its semantics are _simple_ in some sense, it is not any
> cleaner than the assembly-language design it is based on.
>
> C is not fast -- it is instead microoptimizable, so it looks as if
> you control the speed of your code, but instead of generating fast
> code for problem-solving, the compiler generates no excess machine
> code relative to _your_ code. This is the same "fast" as assembler,
> where you would have to be lobotomized beyond recognition to believe
> that instructions counts equated speed.

It was a lack of information, I've had, actually.
I understand why C is let down nowadays.

> | C++ is complicated as far as I know. I'm going to work to learn it,
> | cause it's impossible to avoid it if you're going on modern
> | programming such as Java. And I don't want to begin with Java.
>
> Of the two languages, I think you should begin with Java, and get
> yourself Bruce Eckel: Thinking in Java. It is in its second
> edition, but I don't know whether you're likely to find that version
> on bookshelves, yet. You can find it on the net: www.BruceEckel.com.

I will consider it, so. It seems to be a beautiful language, as many people
say.
The only thing I would like to know:
I 've heard Java is an interpret-like (is it the correct word in english)
language, whereas C++ is a compiler.
Is the information correct? Does the fact that Java is an interpret
slow its speed. I only care about that because I would try to make
fast sound applications.
The other point is I have the Microsoft DirectX book which has
only C++ DirectSound integration, and libraries

> | Scheme (lisp?) can have a control of his own code this is much
> | farther than the macro possibility of c c++. Whatever you think,
> | c++ will always remain a freezed language, not evolutive, whereas
> | scheme is. Aren't the last features of Mzcheme including good
> | object-programming-style tools ???
>
> I'd like to visit your planet once. It sounds like it's the inverse
> of earth, and the earth sucks, so it just might be a nice place.

I'm just a amateur programmer who:
1) is slowly starting program-making again after 5 years completely out of
the
"world" of programming
2) I learnt programming in a french college on a
third year graduate: where I learnt: algorithm, assembler, unix OS,and C
(a little c++)
all on unix-sun OS. Nothing about windows-programming.
So as I was far from computer work realities 5 years ago, it seems
understandable
that I appear shifted now.

> Scheme and Common Lisp are two languages so different you are better
> off believing they have nothing in common except the parentheses.
> Scheme is frozen solid. C++ has had an _amazing_ evolution of the
> past few years -- so much in fact that it is impossible to program
> in the _language_ -- you always program some particular _compiler_.
> The same is true of Scheme, which is useless without extensions,
> which are all incredibly ugly compared to the language itself.

Ok I understand (I think), I don't know Lisp, and didn't think it was so
different
from Scheme. When I was talking about C++, it's only because I thought (I
used to learn it a little)
it as a heavy semantic conventions which you cannot modify, for your own
needs, even if you can use it of course.
There are no languages where you cannot do what you want(except a few
things), the important points are the pleasure
of programming, the efficiency, and maybe the possibility to use a language
which can develop what you think, to go farther.
It seems I am still on my planet :-) , I just mean sometimes a language can
give you ideas of programming you wouldn't have had
with another one.
But this last point is in some particular situations and it's not important

> | But, in fact, a C programmer "can" go into scheme if he is amazed by its
> | possibility, I'm just afraid he won't be amazed at all by the syntax ;-)
>
> He is a wise man who speaks for himself on such mattes.

Yes it's true I cannot make a generalization of what I think, but
I went into C after scheme

>
> | However Scheme as a main drawback, I would like to know if lisp as
> | the same, it's about using OS resources (sound, graphism,
> | input/output, IRQ hardware drivers, etc...) It's not like visual
> | c++ or java, does somebody have an advice on that ?
>
> It is generally a good idea not to reinvent wheels. Therefore, a
> good programmer sees little or no prestige in which language is used
> as long as it is the best for the purposes at hand. Common Lisp is
> far superior to any other language in one particular area: It is the
> best programming language for humans to express themselves in.
> Other languages may be more suitable to device drives than humans,
> and in some cases the needs of the machine may outweigh that of the
> human, but is getting more and more rare.

Yes the language has to be suited to the purpose at hand, it's the main
point, and that's
because there are so many.
When you talk about "best programming language to express oneself" it's
what I meant above

regards
Fabien


> If this is not what you expected, please alter your expectations.

It was a very good explanation

fab

unread,
Jun 22, 2000, 3:00:00 AM6/22/00
to

> Have you ever tried to read the code in "Numerical Recepies in C"? :)
No in fact, i only know that there used to be a challenge on making
shortest(and the most unreadable) program in C :-)
Maybe these "recepies"(I didn't find the word in my English->French
Dictionary)
are unreadable source, and as they must be serious, it's a problem.


> The answer is not clear cut. I must say that I am doing some serious
> studying of the two major commercial implementations on the PC
> platform and I am quite amazed at the complexity they both managed to
> pack in. Most of the things you mention are just a foreign function
> call away.

Which commercial implementations are you talking about?
lisp ones?

> --
> Marco Antoniotti ===========================================
I must be humble as I found you're name accidentally in the CMU project ;-)
Does it work on Windows OS ?

Johan Kullstam

unread,
Jun 22, 2000, 3:00:00 AM6/22/00
to
"fab" <fvi...@wanadoo.fr> writes:

> > Have you ever tried to read the code in "Numerical Recepies in C"? :)
> No in fact, i only know that there used to be a challenge on making
> shortest(and the most unreadable) program in C :-)
> Maybe these "recepies"(I didn't find the word in my English->French
> Dictionary)
> are unreadable source, and as they must be serious, it's a problem.

it's basically a more-or-less mechanical translation of fortran code
into C (ala an f2c type filter). the fortran is looks reasonable
(nevermind that the algorithm implementations are often broken), but
the C is truely hideous to behold.

--
johan kullstam l72t00052

vsync

unread,
Jun 22, 2000, 3:00:00 AM6/22/00
to
"fab" <fvi...@wanadoo.fr> writes:

> I 've heard Java is an interpret-like (is it the correct word in english)
> language, whereas C++ is a compiler.
> Is the information correct? Does the fact that Java is an interpret
> slow its speed. I only care about that because I would try to make
> fast sound applications.

Whether Java is interpreted or not is not specified. All that matters
is that Java code runs in a "virtual machine", or environment common
across all platforms. It used to always be interpreted, but there are
JIT (just-in-time) compilers. The HotSpot engine should speed it up
further. In addition, certain compilers let you compile Java straight
to native code, but that is generally a Bad Idea.

Lisp is quite similar in this regard. Lisp used to always be
interpreted, and Lisp systems are still often called "interpreters".
Depending on the implementation, though, Lisp can be transparently
compiled to machine code. For certain applications it can (allegedly
at least) be faster than C.

> I'm just a amateur programmer who:
> 1) is slowly starting program-making again after 5 years completely out of
> the
> "world" of programming

Lisp and Java are both great languages for that. Java is fairly easy
to get the syntax of; it's quite similar to C. Java's extremely
strict object orientation threw me for a loop when I was first
learning it, though, and it can take some time to understand the API
structure.

Lisp is also quite large, but I was able to learn it quite quickly. I
think it's somewhat better arranged than Java, in that you don't need
to know the whole API to do anything. Also, it's a lot easier to
experiment with different concepts in Lisp, and so one can learn
faster.

I used Paul Graham's "ANSI Common Lisp" and Winston and Horn's "LISP:
3rd Edition" and picked up the language in a month or two, while it's
taken me years to get truly comfortable with Java. Also, my
subjective attitude toward Lisp is that there's a lot of great stuff
which I could spend my whole life learning. Java may get more and
more libraries, but it's basically just more of the same.

Either way, good luck. They're both good languages, and I suspect
you'll have a lot of fun.

--
vsync
http://quadium.net/ - last updated Mon Jun 19 12:44:00 MDT 2000
Orjner.

Pierre R. Mai

unread,
Jun 22, 2000, 3:00:00 AM6/22/00
to
vsync <vs...@quadium.net> writes:

> Whether Java is interpreted or not is not specified. All that matters
> is that Java code runs in a "virtual machine", or environment common
> across all platforms. It used to always be interpreted, but there are
> JIT (just-in-time) compilers. The HotSpot engine should speed it up
> further. In addition, certain compilers let you compile Java straight
> to native code, but that is generally a Bad Idea.

I can't actually see why compiling to native code would be a bad idea,
given that we have been doing this for 50 years. Unless the use of a
virtual machine buys you something you _actually_ need, why use it, if
you can avoid it?

In fact I'd claim that it's usually a bad idea to compile to byte
codes, given that you usually need neither the security nor the
run-time portability features of the JVM.

> Lisp is quite similar in this regard. Lisp used to always be
> interpreted, and Lisp systems are still often called "interpreters".
> Depending on the implementation, though, Lisp can be transparently
> compiled to machine code. For certain applications it can (allegedly
> at least) be faster than C.

Well, Lisp has been compiled at least since Lisp 1.5 which was
ca. 1962. And I know of no CL implementation which doesn't sport at
least a byte-code compiler, with most compiling to native code, either
directly or via some intermediary language (most often C).

Which just goes to show that first impressions can last for a very
long time in the computer business... ;)

Regs, Pierre.

--
Pierre Mai <pm...@acm.org> PGP and GPG keys at your nearest Keyserver
"One smaller motivation which, in part, stems from altruism is Microsoft-
bashing." [Microsoft memo, see http://www.opensource.org/halloween1.html]

Hartmann Schaffer

unread,
Jun 22, 2000, 3:00:00 AM6/22/00
to
In article <8766r1p...@quadium.net>,
vsync <vs...@quadium.net> writes:
> ...

> across all platforms. It used to always be interpreted, but there are
> JIT (just-in-time) compilers. The HotSpot engine should speed it up

i strongly suspect that jit will help only if the code gets executed
often, otherwise the compilation overhead should be no less than
interpreting the jvm code

> further. In addition, certain compilers let you compile Java straight
> to native code, but that is generally a Bad Idea.

why? it's probably a bad idea if you want to run some code over a web
browser, but otherwise what is wrong with running machine code
(provided it abides by the jvm specs)?

> ...

--

Hartmann Schaffer


vsync

unread,
Jun 22, 2000, 3:00:00 AM6/22/00
to
h...@inferno.nirvananet (Hartmann Schaffer) writes:

> > further. In addition, certain compilers let you compile Java straight
> > to native code, but that is generally a Bad Idea.
>
> why? it's probably a bad idea if you want to run some code over a web
> browser, but otherwise what is wrong with running machine code
> (provided it abides by the jvm specs)?

I was talking about compiling actual applications straight to machine
code for distribution. And it's bad because I _know_ companies would
write and publish programs which would work perfectly well on any OS,
except that they decided to compile it straight to x86.

Espen Vestre

unread,
Jun 23, 2000, 3:00:00 AM6/23/00
to
h...@inferno.nirvananet (Hartmann Schaffer) writes:

> it's probably a bad idea if you want to run some code over a web
> browser

why? Macintosh Common Lisp compiles even 'one-liners' typed from
the lisp listener to native code, and has doing so since its memory
usage was only a tenth of your average web browsers java component.
--
(espen)

Paolo Amoroso

unread,
Jun 23, 2000, 3:00:00 AM6/23/00
to
On 22 Jun 2000 22:25:27 +0200, pm...@acm.org (Pierre R. Mai) wrote:

> Well, Lisp has been compiled at least since Lisp 1.5 which was
> ca. 1962. And I know of no CL implementation which doesn't sport at

Was it native code or bytecode compilation (or possibly something
different)? For which architecture? IBM 704?

Marco Antoniotti

unread,
Jun 23, 2000, 3:00:00 AM6/23/00
to

"fab" <fvi...@wanadoo.fr> writes:

> > Have you ever tried to read the code in "Numerical Recepies in C"? :)
> No in fact, i only know that there used to be a challenge on making
> shortest(and the most unreadable) program in C :-)

You are referring to the "Obfuscated C Context" I have seen a
beautiful program which looked like a circle of '-' and '_' (plus some
ancillary code) which computed PI. :)

No. I am not talking about that. That is an extremization which can
be easily cooked up in Lisp as well.

I am talking about C code that does not follow the (e.g.) GNU Coding
Standards. The NRC code is such an example.

> Maybe these "recepies"(I didn't find the word in my English->French
> Dictionary)
> are unreadable source, and as they must be serious, it's a problem.
>

It's "recipes" sorry. :) Una "ricetta" in Italiano :)

> > The answer is not clear cut. I must say that I am doing some serious
> > studying of the two major commercial implementations on the PC
> > platform and I am quite amazed at the complexity they both managed to
> > pack in. Most of the things you mention are just a foreign function
> > call away.
> Which commercial implementations are you talking about?
> lisp ones?

Yes. Check out the ALU page for pointers http://www.alu.org

Janos Blazi

unread,
Jun 23, 2000, 3:00:00 AM6/23/00
to

Nils Goesche <car...@t-online.de> schrieb in im Newsbeitrag:
87zoohv...@darkstar.cartan...

I was a tutor too (in the seventies) but I restricted myself to judge
whether the solutions were correct and did not try to educate the students
in my group.

Marc Spitzer

unread,
Jun 23, 2000, 3:00:00 AM6/23/00
to

vsync

unread,
Jun 23, 2000, 3:00:00 AM6/23/00
to
pm...@acm.org (Pierre R. Mai) writes:

> I can't actually see why compiling to native code would be a bad idea,
> given that we have been doing this for 50 years. Unless the use of a
> virtual machine buys you something you _actually_ need, why use it, if
> you can avoid it?
>
> In fact I'd claim that it's usually a bad idea to compile to byte
> codes, given that you usually need neither the security nor the
> run-time portability features of the JVM.

Cut to the web pages Pierre would like to see:

Yay, here is our 31337 k00l Java applet. Please note that it has
been compiled to native code, and as such will only work on x86.
Under Windows. With the proper browser.

If you run a different OS, you are out of luck. If you use a
different processor, you are out of luck. If you use Windows/x86, you
are out of luck, because the "31337 k00l Java applet" is really a
trojan which just ate your system. Congratulations, we're back to
CraptiveX.

And don't tell me, "compile directly to native code just for
applications you'll run only on your box", because it's patently
obvious from looking at the rest of the Web that most people releasing
software are idiots.

Plus with newer JVMs they actually compile and optimize the code one
actually uses the most, which I would argue is a much better
approach. Not much you can do to precompiled binaries, after all, and
in the words of the immortal Knuth: "premature optimization is the
root of all evil".

Rob Warnock

unread,
Jun 24, 2000, 3:00:00 AM6/24/00
to
Pierre R. Mai <pm...@acm.org> wrote:
+---------------

| I can't actually see why compiling to native code would be a bad idea,
| given that we have been doing this for 50 years. Unless the use of a
| virtual machine buys you something you _actually_ need, why use it, if
| you can avoid it?
+---------------

Well, for one thing, these days primary-I-cached CPU cycles are now a *LOT*
cheaper than secondary cache misses, so if by byte-coding (or "tree-coding")
with relatively high-level VM functions one can get the *size* of the program
way down, one should be able to speed up the runtime significantly!

Whereas open-coding a whole bunch of primitives into native code only seems
to me to be an invitation to code bloat, and hence cache-thrashing...


-Rob

-----
Rob Warnock, 41L-955 rp...@sgi.com
Applied Networking http://reality.sgi.com/rpw3/
Silicon Graphics, Inc. Phone: 650-933-1673
1600 Amphitheatre Pkwy. PP-ASEL-IA
Mountain View, CA 94043

Tim Bradshaw

unread,
Jun 24, 2000, 3:00:00 AM6/24/00
to
* vsync wrote:

> Cut to the web pages Pierre would like to see:

> Yay, here is our 31337 k00l Java applet. Please note that it has
> been compiled to native code, and as such will only work on x86.
> Under Windows. With the proper browser.

Whereas what we get now is

Yay, here is our 31337 k00l Java applet. Please note that even
though it is byte-compiled, we made lots of windows-specific
assumptions, so it will only work on x86. Under Windows. With
the proper browser.

I mean, seriously, how many web pages do you look at which just don't
work properly on netscape/unix. The problem of java portability is
just in the noise compared to all the crap designed by losers who only
check it on one browser (over an ethernet to the server, as well).

--tim

Christopher J. Vogt

unread,
Jun 24, 2000, 3:00:00 AM6/24/00