From: Kellom{ki Pertti
Subject: How to show off Lisp in a couple of lectures?
Date: 
Message-ID: <xfzk8uo0wmh.fsf@kuovi.cs.tut.fi>
As the local Lisp enthusiast, I (somewhat reluctantly) agreed to give
a couple lectures on Lisp in a course on artificial intelligence. The
course will be given by a colleague of mine next fall. 

Initially I was not very happy about reinforcing the Lisp-AI link,
especially since my Lisp programs tend to do very non-AI
things. However, the flip side is that our students get a mostly C++
based education, and I see this as an opportunity to demonstrate a
different approach to computing to a small bunch of talented and
well motivated students.

My question is, how to pull this thing off. The students should be
well versed in programming in general, so I hope to be able to proceed
quite rapidly. My initial plan is to focus on some specific
application and show what advantages on can gain by doing it in
Lisp. The current candidate is a small object system, but any
suggestions are very welcome. The lecturer is planning to give a small
programming assignment, and I think the best plan would be to extend
or modify something that has been discussed in class.

-- 
Pertti Kellom\"aki, Tampere Univ. of Technology, Software Systems Lab

From: Howard R. Stearns
Subject: Re: How to show off Lisp in a couple of lectures?
Date: 
Message-ID: <37304E52.2C1CF444@elwood.com>
This may not be "AI" on its face, but then, neither is building an
object system...

If you're not afraid to throw the students into the deep end, consider
something like the following:

 Set them up with a Lisp system in which CL-HTTP is already set up and
running. Allow each student to create their own "active pages", "dynamic
html", "agents" or whatever buzzwords you want.  There are several ways
to add more structure, and/or a more AI bent:

 1. Let students cooperate on setting up an "address book" application
on the server.  What kinds of classes are needed?  How can one control
formatting?  Can there be different kinds of "entries".  Can the classes
that define "entry definitions", "formatting", etc., themeselves be
"entries" in the book?  This introduces dynamic OO, reflection,
metaobjects, etc., in a very practical way.

2. Extend this by allowing "entries" to have "active" behavior --
programs which learn about other entries on the same or different
servers.  The restriction is that they learn about other entries, but
not modify them.  Summaries of result are presented as yet another kind
of "entry."  Maybe each student is required to place an entry
representing themselves in each other person's address book (so they can
see what they each came up with), and then let them write programs to
learn about other entries on the same or different servers.

3. Extend this by developing a model a general model for what protocols
these agents might use, and allow the agents code to be developed
cooperatively by clients on different machines.  In other words, lift
the restriction that the agents don't modify things on other machines.

-----
Anyway, one meta-level sugestion: Don't "teach" Lisp.  Give them an
assignment, show them Lisp code, explain the rules of evaluation in 20
minutes or so if you have to, but don't explicitly teach syntax,
cons/car, etc. in the abstract.  It won't achieve your goals.


-----

Kellom{ki Pertti wrote:
> 
> As the local Lisp enthusiast, I (somewhat reluctantly) agreed to give
> a couple lectures on Lisp in a course on artificial intelligence. The
> course will be given by a colleague of mine next fall.
> 
> Initially I was not very happy about reinforcing the Lisp-AI link,
> especially since my Lisp programs tend to do very non-AI
> things. However, the flip side is that our students get a mostly C++
> based education, and I see this as an opportunity to demonstrate a
> different approach to computing to a small bunch of talented and
> well motivated students.
> 
> My question is, how to pull this thing off. The students should be
> well versed in programming in general, so I hope to be able to proceed
> quite rapidly. My initial plan is to focus on some specific
> application and show what advantages on can gain by doing it in
> Lisp. The current candidate is a small object system, but any
> suggestions are very welcome. The lecturer is planning to give a small
> programming assignment, and I think the best plan would be to extend
> or modify something that has been discussed in class.
> 
> --
> Pertti Kellom\"aki, Tampere Univ. of Technology, Software Systems Lab
From: Thomas A. Russ
Subject: Re: How to show off Lisp in a couple of lectures?
Date: 
Message-ID: <ymilnf3legl.fsf@sevak.isi.edu>
I'll tell you what we had in my initial programming class.  The semester
was split, with 1/2 the term spent on Algol and the other 1/2 spent on
Lisp.  [Obviously this was quite some time ago -- 1977].

The last assignment we had in Algol was to build a simple command line
calculator that had variables and + - * / in it.

The first assignment in Lisp was to do symbolic differentiation:

    (differentiate '(^ x 2))  =>  (* 2 x)
    (differentiate '(^ x 3))  =>  (* 3 (^ x 2))

This assignment is a nice motivational introduction to Lisp because it
shows off the power of the uniform syntax and the ability to easily
manipulate that syntax using basic language constructs.  It also gives a
clear demonstration of the power of a symbolic processing language
(versus purely numeric).

You could extend this to integration as well.

Finally, for extra credit, you could challenge someone to write the
differentiation code in C++, using standard C++ notation.  If even that
proves to easy for them (not likely), you could add the need to evaluate
the resulting expression after binding variables.

-- 
Thomas A. Russ,  USC/Information Sciences Institute          ···@isi.edu    
From: ·····@my-dejanews.com
Subject: Re: How to show off Lisp in a couple of lectures?
Date: 
Message-ID: <7gptp4$rfg$1@nnrp1.dejanews.com>
Have you seen any of Sussman's papers showing off higher order functions?

He has a couple of wonderful examples that show how to apply Richardson
acceleration to a series of sums that approximate an integral.  The
accelerated series converges to a good approximation extremely quickly.

What makes it a good example of non AI lisp is that it is very math intensive,
and shows the advantages of having first-class functions and dynamic typing.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own