From: Jason Kantz
Subject: What was the first program you wrote in lisp?
Date: 
Message-ID: <wkisz1r1ii.fsf@kantz.com>
I'm interested b/c thinking back to where I started, I see how many
aha's I've had programming with lisp, and I'm sure there will be more.
I think it is interesting to notice that what seemed difficult in the
past is eventually understood and taken for granted.

Lurking newcomers to Lisp may also be interested in hearing about
first lisp programs.

My first bits of Lisp code were simple functions like my-reverse.  And
the first aha (which was more like a curious hmmmm) was when the guy I
was working with tested out my reverse function by applying it to my
source code.

So, what was the first program you wrote in lisp?

What Lisp did you use?  What did your program do?  What was
difficult/non-intuitive then that is obvious now?

From: Marco Antoniotti
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <y6cy97xzf4g.fsf@octagon.valis.nyu.edu>
Jason Kantz <··········@kantz.com> writes:

> I'm interested b/c thinking back to where I started, I see how many
> aha's I've had programming with lisp, and I'm sure there will be more.
> I think it is interesting to notice that what seemed difficult in the
> past is eventually understood and taken for granted.
> 
> Lurking newcomers to Lisp may also be interested in hearing about
> first lisp programs.
> 
> My first bits of Lisp code were simple functions like my-reverse.  And
> the first aha (which was more like a curious hmmmm) was when the guy I
> was working with tested out my reverse function by applying it to my
> source code.
> 
> So, what was the first program you wrote in lisp?
> 
> What Lisp did you use?  What did your program do?  What was
> difficult/non-intuitive then that is obvious now?


The first two serious programs I wrote were a skolemization and
normalization procedure for First Order Logic well formed forms.  The
second one was an implementation of the RETE descrimination data
structure (I remember we changes the English of OPS5 to Latin :) )  At
the time, the revelation that you did not need Lex/Yacc to deal with
these things was crucial.

The Lisp I used was VLisp, a French implementation which I believe led
to LeLisp later on.  That was 83/84.

Cheers

-- 
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group        tel. +1 - 212 - 998 3488
715 Broadway 10th Floor                 fax  +1 - 212 - 995 4122
New York, NY 10003, USA                 http://bioinformatics.cat.nyu.edu
                    "Hello New York! We'll do what we can!"
                           Bill Murray in `Ghostbusters'.
From: Kaz Kylheku
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <cf333042.0211131130.6887a861@posting.google.com>
Jason Kantz <··········@kantz.com> wrote in message news:<··············@kantz.com>...
> I'm interested b/c thinking back to where I started, I see how many
> aha's I've had programming with lisp, and I'm sure there will be more.
> I think it is interesting to notice that what seemed difficult in the
> past is eventually understood and taken for granted.
> 
> Lurking newcomers to Lisp may also be interested in hearing about
> first lisp programs.
> 
> My first bits of Lisp code were simple functions like my-reverse.  And
> the first aha (which was more like a curious hmmmm) was when the guy I
> was working with tested out my reverse function by applying it to my
> source code.
> 
> So, what was the first program you wrote in lisp?

I did some cartesian product type thing to get the hang of mapcar and
mapcan, and lots of other little experiments to learn about macros,
CLOS and so on.

Then I wrote a useful little mortgage calculator that I used when
buying an actual house. I put a macro interface on this thing and it
let you do very cool stuff, like define rules for extra payments,
payment and rate changes and so forth. You could write a Lisp
expression to say, effectively, that in the first four months of the
second year, you want to double up your payments, and then four years
later the interest rate jumps, etc. You could also choose your
compounding (monthly, semi-annually), various divisions: biweekely,
semi-monthly. I almost got to the point where I could define a
mortgage as an abstraction, and then do higher order computing on
that, like compare two to see which one is better, or when one
overtakes the other, etc.

Then I hacked up this: http://users.footprints.net/~kaz/mcvs.html

What is next? Who knows? Right now I'm making Lisp bindings for the
WxWindows library; maybe I will use this to create a GUI for the above
project. I'm trying to mirror the class structure of WxWindows in
CLOS, and even some of the macro-type things, like defining a message
map to route messages to methods. Every time I work on it, I make
solid, decent progress. But I just don't have a lot of time.

> What Lisp did you use?  What did your program do?  What was

I dabbled with GNU Common Lisp and then gave it up; it was good for a
complete beginner, but then I wanted to use sophisticated condition
handling and it was just not doing it; once you progress beyond a
certain level, ANSI compliance starts to matter. I use CLISP quite a
lot. But I experiment with others on an ongoing basis, proprietary and
otherwise.

> difficult/non-intuitive then that is obvious now?

Things like nested backquotes, and getting mixed up about which of two
similar meta-levels you are hacking at. ;)
From: Richard Krush
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <87wunhs1rv.fsf@olimp.localnet>
As other have mentioned, "program" is very vague, so I too will assume
"useful program." And with that distinction, right now, after
"learning" Common Lisp for a year, I'm in the process of writing my
first program which does something remotely useful. It's a clone of
UNIX "date" utility that accepts the strftime(3) time string format
(with some features lacking) and displays it in a X window.

I guess the most important thing I've learned during the process are
some tidbits of CL compilation theory. In particular the concept of
similarity (as defined in CLHS) and quirks of working with literal
objects.

Regards,
 Richard Krushelnitskiy

-- 
"I know not with what weapons World War III will be fought, but World War
IV will be fought with sticks and stones." -- Albert Einstein
From: vsync
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <87isz16x4o.fsf@piro.quadium.net>
Jason Kantz <··········@kantz.com> writes:

> So, what was the first program you wrote in lisp?

I'm pretty sure it was 5 varying implementations of Fibonacci
triangles.  Fibonacci is cool.

> What Lisp did you use?  What did your program do?  What was

I used CLISP.

-- 
vsync
http://quadium.net/
"Sometimes coding 9-5 in pairs and creating ten
AbstractFactoryContainerXYZYourMom objects each time there's a need
for a one line getter method just isn't the way to do it."
        -- http://books.slashdot.org/comments.pl?sid=44956&cid=4660540
From: Sandeep Koranne
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <Pine.LNX.4.44.0211131249370.1649-100000@IPIII.sochip>
Hi,
I have been using Lisp on-and-off for more than five years now and my exp. 
is as follows:

1) 1996 : Game of Tic-tac-toe : ply evaluation and min-max ; used CLISP

2) 1998 : symbolic simulation of VLSI circuits under zero gate delay, 
given a logic circuit like (F= (A&B) | C) where A, B and C are arbitrary 
polynomials compute F as a logic value; used CMUCL and Lispworks 
(Harlequin) on HP-UX

3) 1999-2001 : I have developed a (not so complete) VLSI design and test 
system using a S-expression based high level design language, works with
Garnet on CMUCL, CAPI on Lispworks, CLISP (text mode). Includes logic 
simulator, test mode editor, schematic generator, logic graph generator 
(using graphwiz)

4) 2001-current : Test Scheduling software for testing of big system 
chips. Developed on CMUCL and Lispworks, works on CLISP also. 
GUI is best seen on CAPI :)
link is : http://www.sochiptest.com

Aha moment : "everything is possible" just need to sit at the computer for 
a bit longer, Lisp is an extremely powerful language and writing one 
function at a time you dont know (i) when its morning (ii) when the job 
has been done.

Regards,
Sandeep
 
From: Jock Cooper
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <m3ptt9nkcn.fsf@jcooper02.sagepub.com>
Jason Kantz <··········@kantz.com> writes:

> I'm interested b/c thinking back to where I started, I see how many
> aha's I've had programming with lisp, and I'm sure there will be more.
> I think it is interesting to notice that what seemed difficult in the
> past is eventually understood and taken for granted.
> 
> Lurking newcomers to Lisp may also be interested in hearing about
> first lisp programs.
> 
> My first bits of Lisp code were simple functions like my-reverse.  And
> the first aha (which was more like a curious hmmmm) was when the guy I
> was working with tested out my reverse function by applying it to my
> source code.
> 
> So, what was the first program you wrote in lisp?

My first real program in lisp was about 19 months ago and it was a
stored procedure generator.  Given a list of tables it would go out
and query a SQL Server (from Linux to Win2k using FreeTDS) to get
columns/types, then build stored procedures for each table for select,
insert, delete, etc.  It was actually a rewrite of the same program I
had originally written in Perl (which was rather crufty).  

I then wrote a program that would do something similar, but instead of
writing stored procedures it would write Visual Basic class files for
database tables.  It understood the hierarchical structure of the
tables and would create the classes accordingly.  The VB objects knew
how to load themselves, and how to commit themselves and their
subordinates to the DB, etc.  It generated about 60k lines of code.
The actual VB code was take from template files.  The objects (and
SPs) were used by a VB app we were developing; whenever changes were
made to the database or to the VB object code I just regenerated the
SPs and classes.

Writing these two programs sold me on Lisp.  The resulting code was
compact (far more than perl or C) and readable, ran quickly and I was
able to write much more quickly than I could have in Perl or C.

Incidentally I was using CMU at the time.  Now I use CMU for development
and ACL 6.2 for deployment.   I have since then written a generic web based 
database editor, a web based report generator, and numerous data dedup/cleanup
and other utilities.
From: Espen Vestre
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <kwsmy5350c.fsf@merced.netfonds.no>
Jason Kantz <··········@kantz.com> writes:

> So, what was the first program you wrote in lisp?
> 
> What Lisp did you use?  What did your program do?  What was
> difficult/non-intuitive then that is obvious now?

The question is a bit too vague, since 'program' is so vague, but
if I rephrase it as "useful program", I think it must have been
a little program I wrote on an Xerox D-machine back in 1986.
The program was written in Interlisp of course, and it generated
postscript from screen shots (since we had no decent printer with
the D-machines). The D-machines were really buggy in standalone
mode (they were better with servers), so I only had tcp working on 
it for one single day. After that, I used kermit(!) to transfer
my postcriptified bitmaps to a mac which was connected to a LaserWriter...
-- 
  (espen)
From: Fred Gilham
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <u7vg306d4c.fsf@snapdragon.csl.sri.com>
> So, what was the first program you wrote in lisp?
> 
> What Lisp did you use?  What did your program do?  What was
> difficult/non-intuitive then that is obvious now?

I don't remember my first Lisp code, but my first serious code that I,
at least, actually used regularly was an interface allowing my Xerox
Dandelion running Interlisp to print to my Laserjet II.

I remember it being much easier than I expected.  I found some sample
code to print to Epsons and used that as a model.

It worked quite well, allowing me to do word-processing on the
Danelion.

-- 
Fred Gilham                                         ······@csl.sri.com
I'm skeptical about attempts to proclaim hell to people that don't
already have the taste of it in their mouths.  Hell as the ultimate
loss of relationship, of health, of even sanity, makes sense to
someone who already sees the beginnings of that process taking hold in
his own life.  Hell as an imaginary place that is like being sent to
your room for a long, long time, with the heat turned up really high,
doesn't make sense.
From: Pascal Costanza
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <3DD26D57.5050705@web.de>
Jason Kantz wrote:

> So, what was the first program you wrote in lisp?
> 
> What Lisp did you use?  What did your program do?  What was
> difficult/non-intuitive then that is obvious now?

I am currently writing my first "serious" program in Common Lisp. ;)

Before that I was involved in a project where we were doing 
transformation of Java class files at load time (kind of load-time 
aspect weaving), among other things. This is written in Java. 
(http://www.pascalcostanza.de/aspect-oriented_programming.html, in case 
you're interested.)

The hardest part was to understand the bit about programs = data. I have 
grasped it during that project. So you could rightfully say that my 
first "serious" Lisp program was written in Java, in the sense of 
Greenspun's tenth rule. ;)

When the equivalence of programs and data started to become natural and 
obvious to me, the progression to Common Lisp was the natural next step.


Pascal

-- 
Pascal Costanza               University of Bonn
···············@web.de        Institute of Computer Science III
http://www.pascalcostanza.de  R�merstr. 164, D-53117 Bonn (Germany)
From: Raymond Wiker
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <86fzu5v6g3.fsf@raw.grenland.fast.no>
Jason Kantz <··········@kantz.com> writes:

> So, what was the first program you wrote in lisp?
> 
> What Lisp did you use?  What did your program do?  What was
> difficult/non-intuitive then that is obvious now?

        My first lisp program was a set of emacs-lisp functions that I
used to file bug-reports in some company-proprietary development
tools. The first report filed was on the official bug-reporting tool,
which quite simply didn't work.

        The main thing I was unhappy about then was the use of
dynamic binding to pass values to emacs' mail subsystem.

-- 
Raymond Wiker                        Mail:  ·············@fast.no
Senior Software Engineer             Web:   http://www.fast.no/
Fast Search & Transfer ASA           Phone: +47 23 01 11 60
P.O. Box 1677 Vika                   Fax:   +47 35 54 87 99
NO-0120 Oslo, NORWAY                 Mob:   +47 48 01 11 60

Try FAST Search: http://alltheweb.com/
From: Thomas A. Russ
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <ymiu1ijag1x.fsf@sevak.isi.edu>
Jason Kantz <··········@kantz.com> writes:

> So, what was the first program you wrote in lisp?

1977: A symbolic differentiator.  It was the first programming
assignment of the second half of my introductory Computer Science
course.  This followed the heels of an Algol-60 assignment to write a
simple desktop calculator.

> What Lisp did you use?  What did your program do?

I think it was Delphi Lisp.
The program did symbolic differentiation, and later integration of
mathemtics formulae.

>  What was difficult/non-intuitive then that is obvious now?

Actually nothing comes to mind.  I found Lisp really easy to work with
from the start.  Of course this was also long before lexical scoping and
object oriented systems.

-- 
Thomas A. Russ,  USC/Information Sciences Institute          ···@isi.edu    
From: Barry Watson
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <3DD27CFA.FA93A433@uab.ericsson.se>
At uni we had to write an object oriented simulation of a nature reserve
in Scheme. I had an 8086 based laptop and no Scheme interpreter but I
did have a Lisp interpreter and a book on CL. Deadline Monday morning
and this was Friday night I and wasn't going to sleep in the labs.  I
managed to write a very basic (and I mean basic) object system in this
Lisp (not CL).  Basically, it just read a s record description of the
objects and spat out some scheme code. I then rewrote it in Scheme on
the computers in the lab. 

 This was after one week of Scheme lectures and I am still amazed at how
much I could do in Lisp with no formal training and only basic Scheme
knowledge. Name another language where I could have done that!
From: Kenny Tilton
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <3DD2934A.7040007@nyc.rr.com>
Jason Kantz wrote:
> So, what was the first program you wrote in lisp?

A program to work simple algebraic equations symbolically, the tricky 
bit being that it had to "show its work" in human bites, and at two 
speeds, normal and in baby steps. That was Microsoft (!) Logo, actually.

When we got MCL, my first chore was a new math editor.

> 
> What was
> difficult/non-intuitive then that is obvious now?
> 

Recursion under Logo, which did not have iteration.

With CL... no major problems having cut my teeth on Logo, just that CL 
offers so much that fluency (as in having all that stuff just flow from 
my fingertips without reaching for a CL text) takes a commensurately 
long time to develop.

It's like skiing: easy to learn, hard to master.

Some things it took me years to discover (in part because I work alone 
and did not always do cll heavily) was (1) special variables and (2) 
continuing from a backtrace after fixing offending code.

-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
""Well, I've wrestled with reality for thirty-five years, Doctor,
   and I'm happy to state I finally won out over it.""
                                                   Elwood P. Dowd
From: Christopher C. Stacy
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <uu1ilfhbv.fsf@dtpq.com>
A program that interacted with the mailer daemon to implement
third-class email delivery, needed because we were processing
the world's largest and most high-volume mailing lists.
(The mailing lists were SF-LOVERS, INFO-MICRO, and HUMAN-NETS.)
From: Paolo Amoroso
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <4d3TPU77SgzWC=rwZ4M+uYnquiRK@4ax.com>
On Wed, 13 Nov 2002 18:35:47 GMT, ······@dtpq.com (Christopher C. Stacy)
wrote:

> A program that interacted with the mailer daemon to implement
> third-class email delivery, needed because we were processing
> the world's largest and most high-volume mailing lists.
> (The mailing lists were SF-LOVERS, INFO-MICRO, and HUMAN-NETS.)

Which Lisp system did you use?


Paolo
-- 
EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
http://www.paoloamoroso.it/ency/README
From: Christopher C. Stacy
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <ubs4rsr5k.fsf@dtpq.com>
>>>>> On Thu, 14 Nov 2002 20:54:58 +0100, Paolo Amoroso ("Paolo") writes:

 Paolo> On Wed, 13 Nov 2002 18:35:47 GMT, ······@dtpq.com (Christopher C. Stacy)
 Paolo> wrote:

 >> A program that interacted with the mailer daemon to implement
 >> third-class email delivery, needed because we were processing
 >> the world's largest and most high-volume mailing lists.
 >> (The mailing lists were SF-LOVERS, INFO-MICRO, and HUMAN-NETS.)

 Paolo> Which Lisp system did you use?

MACLISP, of course!
From: Paul F. Dietz
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <br-cneCyva5FaE-gXTWcog@dls.net>
Jason Kantz wrote:

> So, what was the first program you wrote in lisp?
> 
> What Lisp did you use?  What did your program do?  What was
> difficult/non-intuitive then that is obvious now?

I don't remember what the program did, but I remember the
machine it ran on.

An IBM 7094.

Lisp with punch cards is not something I want to go back to.

	Paul
From: Petter Gustad
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <87of8t6vzh.fsf@filestore.home.gustad.com>
Jason Kantz <··········@kantz.com> writes:

> So, what was the first program you wrote in lisp?
> 
> What Lisp did you use?  What did your program do?  What was
> difficult/non-intuitive then that is obvious now?

A compiler for a sub-set of Pascal (HP-1000 code generation) for a
class assignment around 1985. I used Expertelligence Lisp for the
Apple Macintosh, a large investment for a poor student.

I remember the giggling feeling how simple and elegant Lisp was
compared to FORTRAN and Pascal/C.

Petter
-- 
________________________________________________________________________
Petter Gustad         8'h2B | ~8'h2B        http://www.gustad.com/petter
From: Bob Bechtel
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <3DD2DD2B.7080704@attbi.com>
An assignment in AI class, 1974.  Lisp 1.6 on a PDP-10.  Probably a game 
playing program (NIM?).  The first "aha!" came when I got the assignment 
back with "Don't write FORTRAN in Lisp" in big red letters across the 
top.  Well, actually, it came when I got with my compatriots and begged 
them to tell me what that meant, and they explained recursion.  Of 
course, my program ran vastly faster then theirs (in the days before 
tail recursion optimization...) and didn't blow the stack on larger 
problems.

In that same class, we did an assignment using microPlanner -- I got it 
to work, but didn't understand what was going on until a couple of years 
later.

bob bechtel


Jason Kantz wrote:
> I'm interested b/c thinking back to where I started, I see how many
> aha's I've had programming with lisp, and I'm sure there will be more.
> I think it is interesting to notice that what seemed difficult in the
> past is eventually understood and taken for granted.
> 
> Lurking newcomers to Lisp may also be interested in hearing about
> first lisp programs.
> 
> My first bits of Lisp code were simple functions like my-reverse.  And
> the first aha (which was more like a curious hmmmm) was when the guy I
> was working with tested out my reverse function by applying it to my
> source code.
> 
> So, what was the first program you wrote in lisp?
> 
> What Lisp did you use?  What did your program do?  What was
> difficult/non-intuitive then that is obvious now?
> 
From: Martti Halminen
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <3DD2CE00.10FC8DA@kolumbus.fi>
Jason Kantz wrote:

> So, what was the first program you wrote in lisp?
> 
> What Lisp did you use?  What did your program do?  What was
> difficult/non-intuitive then that is obvious now?

The first program outside the functional programming course where I
learned Lisp was some stability and main dimensions calculations for an
arctic oil drilling rig I was doing as a naval architectural course
assignment.

Maclisp on PDP-10/Tops-20, TECO-based Emacs as editor, about year 1984.
The biggest problem was that we didn't have access to a CRT terminal in
that building, so it was either walk to the next building every time I
wanted to change the program, or edit it with a DecWriter III (LA-120)
paper terminal.

--
From: Donald Fisk
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <3DD31AD9.1D46B7B5@enterprise.net>
Jason Kantz wrote:
> 
> I'm interested b/c thinking back to where I started, I see how many
> aha's I've had programming with lisp, and I'm sure there will be more.
> I think it is interesting to notice that what seemed difficult in the
> past is eventually understood and taken for granted.
> 
> Lurking newcomers to Lisp may also be interested in hearing about
> first lisp programs.
> 
> My first bits of Lisp code were simple functions like my-reverse.  And
> the first aha (which was more like a curious hmmmm) was when the guy I
> was working with tested out my reverse function by applying it to my
> source code.
> 
> So, what was the first program you wrote in lisp?

Here's one of mine, from January 1983.   I found a listing older
than this, of a structure editor I used for editing code inside
Lisp (to save me exiting Lisp and rerunning Cande) plus trace
macros, but this is shorter and I have to type it in.   I also
found listings of a semantic web program I wrote a few months
later.

It, or rather the dialect in which it's written, is of some historic
interest.

> What Lisp did you use? 

That's your starter for ten.

Another puzzle for ya:
Recently I felt so deeply ashamed for posting a simple
function with a bug in it that I stood in the corner of my
room for an hour.   This was the result of writing my code
while tired and then not testing it adequately.   So this
time I did test my code, and it works at least on the three
cases at the end.   I did not convert it, or write any
macros.   I ran it as it is, on my Linux box.   How?
Hint: why would anyone have a serious interest in
preserving this Lisp dialect?

CNF (01/05/83)
--------------
(DE NOSEMAPCAN (X F)
  (COND ((NULL X) NIL)
	(T (APPEND (FUNCALL F (CAR X))
		   (NOSEMAPCAN (CDR X) F)))))

(DF COMMENT (X) NIL)

(DE DELETEAND (X)
    (COND ((ATOM X) (LIST X))
	  ((EQ (CAR X) 'AND) (CDR X))
	  (T (LIST X))))

(DE LOGMUL1 (X)
    (CONS 'AND (MAPCAR (DELETEAND X) '(LAMBDA (P) (LIST 'OR P)))))
(COMMENT PUTS EXPR LIKE (OR (AND A B))
	 IN THE FORM (AND (OR A) (OR B)))

(DE LOGMUL2 (X Y)
    (CONS 'AND
	  (NOSEMAPCAN (DELETEAND X)
		  '(LAMBDA (P)
			   (MAPCAR (DELETEAND Y)
				   '(LAMBDA (Q) (LIST 'OR P Q)))))))
(COMMENT DISTRIBUTES 'OR OVER 'AND CLAUSES
	 EG (OR (AND A B) (AND C D))
	 BECOMES (AND (OR A C) (OR A D) (OR B C) (OR B D)))

(DE LOGPRODUCT (X)
    (COND ((NULL (CDR X)) (LOGMUL1 (CAR X)))
	  ((NULL (CDDR X)) (LOGMUL2 (CAR X) (CADR X)))
	  (T (CONS 'AND
		   (MAPCAR (CDR (LOGPRODUCT (CONS (LOGMUL2 (CAR X)
							   (CADR X))
						  (CDDR X))))
			   '(LAMBDA (P)
				    (CONS 'OR (APPEND (CDADR P)
						      (CDDR P)))))))))
(COMMENT DISTRIBUTES 'OR OVER > 1 'AND EXPRESSIONS
	 (GENERALIZATION OF LOGMUL2))

(DE MAKECNF (X)
  (COND ((ATOM X) (LIST 'AND (LIST 'OR X)))
	((EQ (CAR X)
	     'AND) (CONS 'AND
			 (NOSEMAPCAN (CDR X)
				 '(LAMBDA (P)
					  (CDR (MAKECNF P))))))
	((EQ (CAR X)
	     'OR) (CONS 'AND
			(MAPCAR (CDR (LOGPRODUCT (MAPCAR (CDR X)
							 'MAKECNF)))
				'(LAMBDA (P)
					 (CONS 'OR
					       (NOSEMAPCAN (CDR P)
						       'CDR))))))
	((EQ (CAR X)
	    'NOT) (LOGPRODUCT
		   (MAPCAR
		    (CDR (MAKECNF (CADR X)))
		    '(LAMBDA (P)
			     (CONS 'AND
				   (MAPCAR
				    (CDR P)
				    '(LAMBDA (Q)
					     (COND ((ATOM Q) (LIST 'NOT Q))
						   (T (CADR Q))))))))))))
(COMMENT PUTS ANY LOGICAL EXPRESSIONS CONTAINING 'AND 'OR OR 'NOT
	 INTO CONJUNCTIVE NORMAL FORM nb not necessarily the simplest
         expression)


(MAKECNF '(OR (AND A B) (AND C D)))

(MAKECNF '(NOT (AND A B)))

(makecnf '(not (or a (and c d))))

Le Hibou
-- 
Dalinian: Lisp. Java. Which one sounds sexier?
RevAaron: Definitely Lisp. Lisp conjures up images of hippy coders,
drugs,
sex, and rock & roll. Late nights at Berkeley, coding in Lisp fueled by
LSD.
Java evokes a vision of a stereotypical nerd, with no life or social
skills.
From: Donald Fisk
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <3DD3FE2F.3187656E@enterprise.net>
Timothy Moore wrote:
> 
> Donald Fisk <················@enterprise.net> writes:
> 
> > Jason Kantz wrote:
> >
> > > What Lisp did you use?
> >
> > That's your starter for ten.
> >
> > Another puzzle for ya:
> > Recently I felt so deeply ashamed for posting a simple
> > function with a bug in it that I stood in the corner of my
> > room for an hour.   This was the result of writing my code
> > while tired and then not testing it adequately.   So this
> > time I did test my code, and it works at least on the three
> > cases at the end.   I did not convert it, or write any
> > macros.   I ran it as it is, on my Linux box.   How?
> > Hint: why would anyone have a serious interest in
> > preserving this Lisp dialect?
> 
> Looks like Portable Standard Lisp. 

Is the right answer.

> The algebraic system Reduce is
> implemented in PSL.

Close, but no cigar.   I keep a Sheep, also written in PSL.
Sheep is used for symbolic calculations in General Relativity.
You can download it from here:
ftp://ftp.maths.qmw.ac.uk/pub/sheep/linux/

Le Hibou
-- 
Dalinian: Lisp. Java. Which one sounds sexier?
RevAaron: Definitely Lisp. Lisp conjures up images of hippy coders,
drugs,
sex, and rock & roll. Late nights at Berkeley, coding in Lisp fueled by
LSD.
Java evokes a vision of a stereotypical nerd, with no life or social
skills.
From: Pierpaolo BERNARDI
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <LkWA9.14427$Yw.618359@news2.tin.it>
"Jason Kantz" <··········@kantz.com> ha scritto nel messaggio ···················@kantz.com...

> So, what was the first program you wrote in lisp?

A program for finding solutions to the soma cube and similar puzzles.

> What Lisp did you use?  

Mulisp-83 (maybe it was mulisp-79, I'm not sure).

> What did your program do?

Found solutions, and displayed them graphically, either statically or
with animated exploding views.  Also included a 3D editor for editing 
shapes. All in 24x80 ascii-art graphic.   8-)

> What was difficult/non-intuitive then

It was difficult to grasp why most other programmers did not see the Light.

> that is obvious now?

Ah, no, that one is still a mistery.

P.
From: Tim Bradshaw
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <ey3r8dnazub.fsf@cley.com>
* Jason Kantz wrote:
> So, what was the first program you wrote in lisp?

> What Lisp did you use?  What did your program do?  What was
> difficult/non-intuitive then that is obvious now?

I think the first things I wrote were code to do graphics on my MS-DOS
box, shortly followed by a hairy but not-really-usable structure
editor.  Both of these were in MuLisp-86, and ran on MS-DOS (not
PC-DOS!). I also did some computer-algebra stuff at about the same
time, in Cambridge Lisp (or, really, in PSL which ran on top of it).

Slightly after this, I used to find CL's scope & extent rules very
difficult (having previously used lisps with dynamic scope).  Now I
find them completely obvious.

--tim
From: Thomas F. Burdick
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <xcv1y5mpjrf.fsf@tornado.OCF.Berkeley.EDU>
Jason Kantz <··········@kantz.com> writes:

> So, what was the first program you wrote in lisp?
> 
> What Lisp did you use?  What did your program do?

Whatever it was, it was in Emacs Lisp.  I *think* it was some sort of
tool to make my life easier when writing C++ -- code transformation of
some sort.

> What was difficult/non-intuitive then that is obvious now?

Writing lisp-y lisp.  Good god, there were SETQs everywhere.  And, in
true C fashion, if the function was written for side effect, it would
return nil instead of a potentially useful value.  I remember finding
this elisp file some time later, looking over it, cringing, and
tossing it.

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Larry Hunter
Subject: Re: What was the first program you wrote in lisp?
Date: 
Message-ID: <m3ptt6leo6.fsf@huge.uchsc.edu>
> So, what was the first program you wrote in lisp?
> What Lisp did you use?  What did your program do?  What was
> difficult/non-intuitive then that is obvious now?

Back in the day (1978 or thereabouts) I was actually taught lisp in my
first college programming class (CS 211, I think), by Larry Snyder at
Yale. There must have been various other assignments first, but the
first one I remember was a recursive solution to the eight-queens
problem.

This was on a PDP-20 running TOPS-20, but heck if I remember which
dialect we were using.  MACLISP maybe? 

Although I had been programming (basic, fortran, APL, PL-1) for more
than five years at that point, I had never really seen recursion
before, and remember struggling mightily with it. Seems obvious now.

Perhaps the first "serious" program was two years later in Alan
Perlis' compilers course. We wrote an entire compiler, from lexing to
code generation for a functional language he made up. The compiler was
written in lisp. By that point, I believe the T project was well
enough along that we wrote our code in T, but I could be mistaken on
that. I think the TAs were Norm Adams, Jonathan Rees and Steve Wood,
so that helped!

I'm now teaching lisp to a lab full of bioinformatics programmers, who
seem to enjoy it (well, the actual underlying research is fun, too).
Things that have been hard for them are:

 1. Finding the names for functions they know ought to exist, e.g.
    looked for "filter" and couldn't find "remove-if"

 2. Taking advantage of some neat lisp functions that don't have
    cognates in other languages, like displaced arrays.

 3. Debugging facilities. Knowing how to use optimize declarations
    properly. Figuring out profiling, backtraces, restarts, etc.

 4. Pathnames. They have a terrible time with trying to do fairly
    simple stuff with pathnames (trailing slash problem, non-intuitive
    merges, etc.)

By and large they are experience programmers, so mostly they are
quickly coming around to seeing the benefits of developing in lisp.

Larry

-- 

Lawrence Hunter, Ph.D.
Director, Center for Computational Pharmacology
Associate Professor of Pharmacology, PMB & Computer Science

phone  +1 303 315 1094           UCHSC, Campus Box C236    
fax    +1 303 315 1098           School of Medicine rm 2817b   
cell   +1 303 324 0355           4200 E. 9th Ave.                 
email: ············@uchsc.edu    Denver, CO 80262       
PGP key on public keyservers     http://compbio.uchsc.edu/hunter