Message-ID: <7397@brl-tgr.ARPA>
Date: Wed, 16-Jan-85 08:52:12 EST
Article-I.D.: brl-tgr.7397
Posted: Wed Jan 16 08:52:12 1985
Date-Received: Mon, 21-Jan-85 03:13:18 EST
Sender: news@brl-tgr.ARPA
Organization: Ballistic Research Lab
Lines: 233
Fellow CP/Mers - As several people have recently expressed interest in XLISP
by David Betz, here is some XLISP news passed along to me by my colleague,
Brint Cooper:
--------------------------------------------------------------------------
From seismo!harvard!godot!mit-eddie!genrad!decvax!ittvax!sii!drd
Article 89 of net.lang.lisp:
I am posting this for David Betz who
does not have a direct news connection.
==========================================================================
XLISP USERS
This document briefly describes my version 1.2 of XLISP. It has nothing
in common with the previously released version 1.2 other than that it is
a descendant of my original version 1.1. It will be available shortly from
the PC-SIG, SIG/M and PC-BLUE user groups. It will be distributed in
source form with machine readable documentation. Please don't ask to have
the sources distributed on usenet. The entire distribution is over 200K
bytes!
David Betz
...!decvax!sii!has70!betz
==========================================================================
XLISP: An Experimental Object Oriented Language
Version 1.2
October 11, 1984
by
David Betz
114 Davenport Ave.
Manchester, NH 03103
(603) 625-4691 (home)
(603) 623-3330 (work)
XLISP is an experimental programming language combining some
of the features of LISP with an object oriented extension
capability. It was implemented to allow experimentation
with object oriented programming on small computers. There
are currently implementations running on the PDP-11 under
RSX-11, RT-11, and UNIX V7, on the VAX-11 under VAX/VMS and
Berkeley VAX/UNIX, on the Z-80 under CP/M-80, on the Z8000
under UNIX V7, and on the 8088/8086 under CP/M-86 or MS-DOS.
A version is currently being developed for the 68000 under
CP/M-68K. It is completely written in the programming
language 'C' and is easily extended with user written
built-in functions and classes. It is available in source
form free of charge to non-commercial users. Prospective
commercial users should contact the author for permission to
use XLISP.
Version 1.2 of XLISP differs from version 1.1 in several
ways. It supports many more Lisp functions. Also, many
version 1.1 functions have been renamed and/or changed
slightly to follow traditional Lisp usage. One of the most
frequently reported problems in version 1.1 resulted from
many functions being named after their equivilent functions
in the C language. This turned out to be confusing for
people who were trying to learn XLISP using traditional LISP
texts as references. Version 1.2 renames these functions to
be compatible with more traditional dialects of LISP.
A recommended text for learning LISP programming is the book
"LISP" by Winston and Horn and published by Addison Wesley.
The first edition of this book is based on MacLisp and the
second edition is based on Common Lisp. Future versions of
XLISP will migrate towards compatiblility with Common Lisp.
Page 2
XLISP version 1.2 functions:
Evaluator functions
(eval ) EVALUATE AN XLISP EXPRESSION
(apply ) APPLY A FUNCTION TO A LIST OF ARGUMENTS
(funcall ...) CALL A FUNCTION WITH ARGUMENTS
(quote ) RETURN AN EXPRESSION UNEVALUATED
Symbol functions
(set ) SET THE VALUE OF A SYMBOL
(setq ) SET THE VALUE OF A SYMBOL
(defun ...) DEFINE A FUNCTION WITH EVALUATED ARGS
(ndefun ...) DEFINE A FUNCTION WITH UNEVALUATED ARGS
(gensym ) GENERATE A SYMBOL
(intern ) INTERN A SYMBOL ON THE OBLIST
(get ) GET THE VALUE OF A PROPERTY
(putprop ) PUT A PROPERTY ONTO A PROPERTY LIST
(remprop ) REMOVE A PROPERTY
List functions
(car ) RETURN THE CAR OF A LIST NODE
(cdr ) RETURN THE CDR OF A LIST NODE
(caar ) == (car (car ))
(cadr ) == (car (cdr ))
(cdar ) == (cdr (car ))
(cddr ) == (cdr (cdr ))
(cons ) CONSTRUCT A NEW LIST NODE
(list ...) CREATE A LIST OF VALUES
(append ...) APPEND LISTS
(reverse ) REVERSE A LIST
(last ) RETURN THE LAST LIST NODE OF A LIST
(member ) FIND AN EXPRESSION IN A LIST
(memq ) FIND AN EXPRESSION IN A LIST
(assoc ) FIND AN EXPRESSION IN AN ASSOCIATION LIST
(assq ) FIND AN EXPRESSION IN AN ASSOCIATION LIST
(length ) FIND THE LENGTH OF A LIST
(nth ) RETURN THE NTH ELEMENT OF A LIST
(nthcdr ) RETURN THE NTH CDR OF A LIST
(mapcar ...) APPLY FUNCTION TO SUCCESSIVE CARS
(maplist ...) APPLY FUNCTION TO SUCCESSIVE CDRS
(subst ) SUBSTITUTE ONE EXPRESSION FOR ANOTHER
(sublis ) SUBSTITUTE USING AN ASSOCIATION LIST
Destructive list functions
(rplaca ) REPLACE THE CAR OF A LIST NODE
(rplacd ) REPLACE THE CDR OF A LIST NODE
(nconc ...) DESTRUCTIVELY CONCATENATE LISTS
(delete ) DELETE OCCURANCES OF AN EXPRESSION FROM A LIST
(delq ) DELETE OCCURANCES OF AN EXPRESSION FROM A LIST
Page 3
Predicate functions
(atom ) IS THIS AN ATOM?
(symbolp ) IS THIS A SYMBOL?
(numberp ) IS THIS A NUMBER?
(null ) IS THIS AN EMPTY LIST?
(not ) IS THIS FALSE?
(listp ) IS THIS A LIST?
(consp ) IS THIS A NON-EMPTY LIST?
(boundp ) IS THIS A BOUND SYMBOL?
(eq ) ARE THE EXPRESSIONS IDENTICAL?
(equal ) ARE THE EXPRESSIONS EQUAL?
Control functions
(cond ...) EVALUATE CONDITIONALLY
(let (...) ...) BIND SYMBOLS AND EVALUATE EXPRESSIONS
(and ...) THE LOGICAL AND OF A LIST OF EXPRESSIONS
(or ...) THE LOGICAL OR OF A LIST OF EXPRESSIONS
(if []) EXECUTE EXPRESSIONS CONDITIONALLY
(progn ...) EXECUTE EXPRESSIONS SEQUENTIALLY
(while ...) ITERATE WHILE AN EXPRESSION IS TRUE
(repeat ...) ITERATE USING A REPEAT COUNT
Arithmetic functions
(+ ...) ADD A LIST OF NUMBERS
(- ...) SUBTRACT A LIST OF NUMBERS
(* ...) MULTIPLY A LIST OF NUMBERS
(/ ...) DIVIDE A LIST OF NUMBERS
(1+ ) ADD ONE TO A NUMBER
(1- ) SUBTRACT ONE FROM A NUMBER
(rem ...) REMAINDER OF A LIST OF NUMBERS
(minus ) NEGATE A NUMBER
(min ...) THE SMALLEST OF A LIST OF NUMBERS
(max ...) THE LARGEST OF A LIST OF NUMBERS
(abs ) THE ABSOLUTE VALUE OF A NUMBER
Bitwise boolean functions
(& ...) THE BITWISE AND OF A LIST OF NUMBERS
(| ) THE BITWISE NOT OF A NUMBER
Relational functions
(< ) TEST FOR LESS THAN
(<= ) TEST FOR LESS THAN OR EQUAL TO
(= ) TEST FOR EQUAL TO
(/= ) TEST FOR NOT EQUAL TO
(>= ) TEST FOR GREATER THAN OR EQUAL TO
(> ) TEST FOR GREATER THAN
Page 4
String functions
(strcat ...) CONCATENATE STRINGS
(strlen ) COMPUTE THE LENGTH OF A STRING
(substr []) EXTRACT A SUBSTRING
(ascii ) NUMERIC VALUE OF CHARACTER
(chr ) CHARACTER EQUIVALENT OF ASCII VALUE
(atoi ) CONVERT AN ASCII STRING TO AN INTEGER
(itoa ) CONVERT AN INTEGER TO AN ASCII STRING
I/O functions
(read [