HDTenEightyP/NetNews huggingface dataset:
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.lang.lisp
Subject: Re: Improper lists
Date: 9 Jan 1993 19:41:40 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: gandalf.think.com

In article <19930108174830.1.WKF@DJINN.SCRC.Symbolics.COM> wkf@stony-brook.scrc.symbolics.com (William K. Foster) writes:
>This definition does not state whether an empty chain of conses is a
>list. An empty chain must be a list in order for nil to be a list.
>However, using the same reasoning, all atoms are lists, nil being a
>proper list and all other atoms being improper lists.

Given the definitions as they're currently written, you're correct: all
objects are lists (well, it *is* a "list processing" language :-).  I don't
think this was the original intent, though; I'm looking into getting the
definition of "dotted list" changed to require at least one cons (and refer
to this in the definition of "list").

Note also that there are two definitions of "list" in the glossary.  The
second definition is objects of type (OR CONS NULL), and atoms aren't lists
according to that.  The first definition describes the concept of lists,
while the second one describes the type list.  Since the first definition
is currently useless for discrimination, we may decide that any use of the
term for descrimination must intend the second definition.

>nth is defined to take a second argument which is a list.

This isn't a problem, even without the above clarifications.  The beginning
of the Conses chapter says:

  "Except as explicitly specified otherwise, any \term{standardized}
  \term{function} that takes a \term{parameter} that required to be a
  \term{list} should be prepared to signal an error \oftype{type-error} if
  the \term{value} received is a \term{dotted list}."

A problem with this is that it permits implementations to signal an error
when the argument is a dotted list, even if it doesn't need to access the
end of the list; for instance, (NTH '(A . B) 0) could signal an error (the
"should be prepared to signal" phrase allows an implementation to omit
checking, but it doesn't prevent checking).  Therefore, there's been a
proposal to change many of these functions to allow dotted list arguments.
In that case my clarifications would solve the problem of (NTH <atom> N)
being allowed.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
From: gustav@arp.anu.edu.au (Zdzislaw Meglicki)
Newsgroups: comp.lang.lisp
Subject: declaring CM pvars as classes
Date: 6 Jan 1993 09:25:59 GMT
Organization: Centre for Information Science Research, ANU, Canberra, Australia
Distribution: world
NNTP-Posting-Host: 150.203.20.14
Keywords: *Lisp, CLOS

I am trying to overload simple arithmetic operators such as +, *, etc
in order to make a certain set of procedures more universal. In particular
I have definitions such as:

(defmacro overload (name op)
  `(progn
     (overload-number-number ,name ,op)
     (overload-vector-vector ,name)
     (overload-vector-number ,name)
     (overload-number-vector ,name)))

where an example of the "overload-number-number" macro may be:

(defmacro overload-number-number (name op)
  `(defmethod ,name ((a1 number) (a2 number) &rest other-args)
     (reduce #',name other-args 
             :initial-value (,op a1 a2))))

This works fine with "number"s and "vector"s since CLOS recognises these
as classes. But I cannot do

(defmethod plus ((a1 pvar) (a2 pvar) &rest other-args)
	...)

since CM's "pvar" is not recognised by CLOS as a class. What might be the
best remedy to this problem? What would be the easiest way to define a
class "pvar"?


-- 
   Zdzislaw Gustav Meglicki, gustav@arp.anu.edu.au,
   Automated Reasoning Program - CISR, and Plasma Theory Group - RSPhysS,
   The Australian National University, G.P.O. Box 4, Canberra, A.C.T., 2601, 
   Australia, fax: (Australia)-6-249-0747, tel: (Australia)-6-249-0158
From: Emme@Tweety.intel.com (David Emme)
Newsgroups: comp.lang.lisp
Subject: Symbolics Concordia Question
Date: 11 Jan 93 23:03:16 GMT
Reply-To: demme@fa.intel.com
Organization: Az-Kal


  [Pardon me if this is a duplication; I tried posting it once before
   using another service, but I don't think it got out the door...]

I've written a Concordia document as a proposal for a software system.
The document has many records of type FUNCTION which document
functions that didn't exist at the time of the document's creation.

I'm now coding that software system, and updating my document as a
"programmer's guide", trying to make sure that the document and the
software stay in sync.  My problem comes when I try to m-X Update
Arglist.  Even though the function documented by the record now
exists, and both function and record are in the proper (same) package,
I continue to get the message

  <function-name> is not currently defined as a function,
  so no argument list is available

I am able to get around this by the following hassle [assume a
FUNCTION record called MODEL:FOO]:

  1. Rename FUNCTION record MODEL:FOO to MODEL:BAR
  2. Create a new FUNCTION record called MODEL:FOO
  3. Copy all fields of MODEL:BAR to MODEL:FOO
  4. Find all the links to the old record (now MODEL:BAR) and change
     them to point to the new record (MODEL:FOO)
  5. Kill the old record MODEL:BAR

What a pain!  I've got quite a few of these to do, and I would like to
think that there is an easier way to fix this "problem".  Suggestions?

Thanx,
-Dave

David Emme                  Intel Corp., CH2-23
demme@fa.intel.com          Knowledge Applications Lab.
(602) 554-3328              5000 W. Chandler Blvd., Chandler, AZ 85226
Newsgroups: comp.lang.lisp
From: fy@lucid.com (Frank Yellin)
Subject: Re: (SETF VALUES)
Organization: Lucid, Inc., Menlo Park, CA
Date: 6 Jan 93 15:55:42


In article <1993Jan6.213139.27999@kronos.arc.nasa.gov>
philpot@kepler.arc.nasa.gov (Andrew Philpot) writes: 

>   Is it possible to implement (SETF VALUES) in a Lisp which doesn't
>   already do this?

Always happy to help.

-- Frank Yellin
   fy@lucid.com

(define-setf-method values (&rest arguments &environment environment)
  (let (all-dummies all-values all-newvals all-setters all-getters)
    (dolist (place arguments)
      ;; look at each of the place arguments
      (multiple-value-bind (dummies values newvals setter getter)
          ;; get the setf method for each place argument
	  (get-setf-method-multiple-value place environment)
        ;; collect all the dummies, and the values to bind them to
	(push dummies all-dummies)   ; list of dummies for each place
	(push values all-values)     ; list of values for each place
	(push getter all-getters)    ; list of getters for each place
        ;; Collect the setters and the newvals variables.  This is
        ;; slightly complicated if (length newvals) isn't 1.  For example,
        ;; (setf (values a (values b c) d) ...) should always set c to 
        ;; 'nil, and (setf (values (values) b) ...) should just ignore the
        ;; first value passed.
	(cond ((null newvals)
	       ;; Will this ever happen?  A setf method expecting no newvals?
               ;; Create a gensym to gets its value, and ignore it
	       (let ((temp (gensym)))
		 (push temp all-newvals)
		 (push `(locally (declare (ignore ,temp)) ,setter) all-setters)))
	      ((null (cdr newvals))	; The most common case.
               ;; Just collect the setter and the single newval slot
	       (push (car newvals) all-newvals)
	       (push setter all-setters))
	      (t
               ;; The place argument expects multiple values.  Bind all but
               ;; the first one to nil in the setter.
	       (push (car newvals) all-newvals)		 
	       (push `(let ,(cdr newvals) ,setter) all-setters)))))
    ;; Return the five values
    (values (apply 'nconc (nreverse all-dummies))
	    (apply 'append (nreverse all-values))
	    (nreverse all-newvals)
	    `(values ,@(nreverse all-setters))
	    `(values ,@(nreverse all-getters)))))
From: goudal@labri.greco-prog.fr (Frederic GOUDAL)
Newsgroups: comp.lang.lisp
Subject: bibliography
Date: 6 Jan 93 16:31:16 GMT
Organization: Laboratoire Bordelais de Recherche en Informatique

Hello,

I'm looking for the exact references of some articles... but I only
have the name of the author and the partial title, but here is the list

Lieberman, a paper about reversible debugging
Habtrad, a paper about mulT vision
Wilson a paper about what he called "demoniac memories"

I want to know too if ther is any paper on lispEdit (from VMlisp).

Could you reply by e-mail please....

Thanks in advance.

Frederic Goudal.


-- 

goudal@geocub.greco-prog.fr          "Why can't we reach the sun?"
oral-mail : babbs			 Pink Floyd
From: berglas@cs.uq.oz.au (Anthony Berglas)
Newsgroups: comp.lang.lisp
Subject: Lisp Parsers
Date: 5 Jan 93 07:18:15 GMT
Reply-To: berglas@cs.uq.oz.au

I am trying to introduce Lisp to the UQ CS Dept, in which everybody
knows that real men use C++.  I will put on a demo of Garnet etc. shortly
but most important decisions are made on first impressions, and the
first impressions are the (())()()s.  God said that f(a, b); is easier
to read than (f a b), it requires less characters.

Seriously, (> (+ x 1) (* y 2)) is ugly, and it would be pretty easy
to add a parser to Lisp that could be used instead of the normal Reader.
(At least for demonstration purposes).  Such a parser would idealy be
table driven and dynamically extendible -- new macro, new grammar rule.

If anyone has heard of such a thing I would be interested to know.

Thanks,


--
Anthony Berglas
Rm 503, Computer Science, Uni of Qld
Ph 07 365 2812, Australia.
From: pkarp@ai.sri.com (Peter Karp)
Newsgroups: comp.lang.lisp
Subject: Code to DWIMify / detect misspelled words
Date: 6 Jan 93 18:42:36 GMT
Distribution: comp
Organization: SRI International, Menlo Park, CA

Does anyone have a piece of Lisp code lying around that computes an
edit distance between words to detect misspellings?  For example,
given the dictionary (apple orange kiwi) it could tell me that aplpe
is most probably a misspelling of apple.
Newsgroups: comp.lang.lisp
From: emcoop@bnr.ca (hume smith)
Subject: draft standard question
Organization: Bell-Northern Research, Ottawa, Canada
X-Poster: Emacs-NNTP-0.1
Date: Mon, 4 Jan 1993 17:35:13 GMT

now that the public review period is over, and considering that they wouldn't
take email notices anyway, what would now the best way to mention that there
are conflicts in the descriptions of atan and atanh?
--
Hume Smith                      Wenn ich des Tages nicht dreimal
hume.smith@acadiau.ca           mein Schaelchen Coffee trinken darf,
emcoop@bnr.ca                   so werd' ich ju zu meiner Qual
                                wie ein verdorrtes Ziegenbraetchen.

Newsgroups: comp.lang.lisp
From: emcoop@bnr.ca (hume smith)
Subject: Re: Re: Lisp Parsers
Organization: Bell-Northern Research, Ottawa, Canada
X-Poster: Emacs-NNTP-0.1
Date: Tue, 5 Jan 1993 17:39:59 GMT

> In article <11586@uqcspe.cs.uq.oz.au> berglas@cs.uq.oz.au (Anthony Berglas) writes:
> 
>    I am trying to introduce Lisp to the UQ CS Dept, in which everybody
>    knows that real men use C++.  I will put on a demo of Garnet etc. shortly
>    but most important decisions are made on first impressions, and the
>    first impressions are the (())()()s.  God said that f(a, b); is easier
>    to read than (f a b), it requires less characters.

then god has a strange way of counting.  f(a, b); is longer than (f a b) AND is a smaller
character set.

i've tried both C++ and Lisp, learning them roughly in parallel, and my humble
opinion is it's a hell of a lot easier to get things done in Lisp.
--
Hume Smith                      Wenn ich des Tages nicht dreimal
hume.smith@acadiau.ca           mein Schaelchen Coffee trinken darf,
emcoop@bnr.ca                   so werd' ich ju zu meiner Qual
                                wie ein verdorrtes Ziegenbraetchen.
From: gjc@paradigm.com
Newsgroups: comp.lang.lisp
Subject: Re: Lisp Interpreter source code?
Date: 7 Jan 93 17:10:02 GMT
Distribution: world
Organization: Paradigm Associates Inc, Cambridge MA

In article <6JAN199317343154@venus.tamu.edu>, tcf9033@venus.tamu.edu (FREY, TONY C) writes:
>  Is there source code available (free) for a lisp interpreter? I'd like to
> port one to OS/2 but have been unable to find source anywhere.  Any help
> would be appreciated. 
> 
> Tony Frey
> TCF9033@venus.tamu.edu

world.std.com has siod version 2.9 in its src/lisp directory
for anonymous ftp. 

I wrote it as a lisp interpreter using explicit control
and natural argument passing in C so that people could
understand it better.

Newsgroups: comp.lang.lisp
From: kessel@eos.arc.nasa.gov (Karen Kessel)
Subject: Interprocess communication w/Franz Lisp on SGI
Summary: Does franz lisp support any kind of comm. b/w two lisp processes?
Keywords: Silicon Graphics, Interprocess communication, Franz Lisp
Organization: NASA Ames Research Center
Distribution: usa
Date: Tue, 12 Jan 1993 20:43:40 GMT

Hi, I'd like to know if Franz lisp, for the Silicon Graphics
Indigo, supports any kind of interprocess communication between
two Lisp processes.  I realize that I can use the SGI's own IPC
with lisp foreign function calls, but I want to know if there
is anything inherent to allegro lisp that allows one to do this
through the lisp itself.
Thanks, 
Karen Kessel
kessel@eos.arc.nasa.gov

Newsgroups: comp.lang.lisp,comp.lang.visual
From: nharvey@probitas.cs.utas.edu.au (Nicole Harvey)
Subject: Assessing a language
Organization: University of Tasmania, Australia.
Date: Wed, 6 Jan 1993 01:59:52 GMT


hi,
   I am involved in assessing a language. Does anyone know of a standard
set of problems that I could use to judge the languages compabilities?
   Can anyone think of a problem that represents a real need in a language?
For example, we have tested it for the eight queens problem to show that 
it can do state space searches. We have also made sure it can generate the 
Fibonacci numbers. Can you think of any other well known problems?
   What things do you expect to be able to write relatively simply using any
language? I would like to here from people working in all areas. 

Nicole
nharvey@probitas.cs.utas.edu.au
From: wkf@stony-brook.scrc.symbolics.com (William K. Foster)
Newsgroups: comp.lang.lisp
Subject: Improper lists
Date: 8 Jan 93 17:56:54 GMT
Organization: LCS news/mail gateway
X-Unparseable-Date: Fri

I am trying to clarify what the ANSI spec says.

1list 2n.0 1. a chain of 2conses 0in which the 2car0 of each 2cons0 is an 2element
0of the 2list0, and the 2cdr0 of each cons is either the next link in the
chain or a terminating 2atom.0 See also 2proper list0, 2dotted list0, or
2circular list0. 2. the 2type 0that is the union of 1null 0and1 cons0.

This definition does not state whether an empty chain of2 conses0 is a
2list0. An empty chain must be a 2list 0in order for2 nil0 to be a2 list0.
However, using the same reasoning, all 2atoms0 are2 lists0, 2nil0 being a
2proper list 0and all other 2atoms0 being 2improper lists0.


1nth0 is defined to take a second argument which is a2 list0.

If the length of 3list 0is not greater then3 n0, then the result is1 nil0.

1length2 n0. (of a2 sequence0) the number of 2elements 0in the2 sequence0.

1element2 n0. 1. (of a2 list0) an 2object 0that is the 2car 0of one of the2 conses
0that comprise the2 list0.

Given these defintions the following should be true:

(nth 'foo 0)     => nil
(nth 17 23)      => nil
(nth '(a . b) 1) => nil


Conversely:

1nthcdr0 returns the3 n0th successive 2cdr 0of3 list0.

The functions 1car 0and 1cdr 0should signal 1type-error0 if they receive an
argument which is not a2 list0.

This would imply that 2atoms 0are not2 lists0. (as one would expect)

Therefore 1nthcdr0 signals 1type-error0 if 3n0 would go off the end of a
2dotted list0.

Since 1nth0 does handle 2dotted lists0 as stated above

(nth n dotted-list)  (car (nthcdr n dotted-list))

where n is greater than the number of elements in dotted-list.

Also in the definitions for 1first, second, .., tenth

0(fifth x)  (nth 4 x)

Given the definition of 1nth 0as interpreted here, this is only true when
x is a 2proper list0 or an 2improper list0 with more than 42 elements
Newsgroups: comp.lang.lisp
From: John Matthews <jm@vcd.hp.com>
Subject: Delegation library
X-Useragent: Nuntius v1.1a5
Date: Mon, 4 Jan 1993 23:26:08 GMT
Organization: Hewlett-Packard

Is there a library that would allow me to write code that
uses the prototype/delegation model of OOP? Preferably
it would co-exist with CLOS, but that is not necessary.

Also, how does one get access to discussions on 
prototyping/delegation issues? I would particularly
like to learn about good design heuristics and scenarious
where using delegation is simpler than using conventional
class-based inheritence.

Thanks,

John Matthews
Hewlett-Packard.
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.lang.lisp
Subject: Re: Lucid Lisp complains about this code fragment
Date: 5 Jan 1993 09:21:36 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: gandalf.think.com

In article <1iat18INNii@MINERVA.CIS.YALE.EDU> theodore-michael@yale.edu (Michael Theodore) writes:
>Any thoughts on how to correct this?
>For some reason, what follows is no problem on Vax Lisp, nor on Macintosh
>Common Lisp, but when run on Lucid Lisp gets a warning :
>;;Warning function tweak defined more than once 
>
>I wouldn't care if it weren't for the fact that warning is printed to the 
>screen repeatedly (about 50 times).
>
>(defun addNoiseToListOfNumbers (l)
>  (defun tweak (x)
>    (+
>     x
>     (- (* (random 1000) 0.0001) 0.05)))
>  (mapcar #'tweak l))

Some Lisp implementations don't deal very well with DEFUNs other than at
top level.

However, this code is pretty silly.  Every time you run it, TWEAK is
potentially redefined.  And since TWEAK contains no references to any
variables local to addNoseToListOfNumbers, there's no reason for it to be
defined inside that function.  Unless you redefine TWEAK in between calls
to addNoiseToListOfNumbers, it's exactly equivalent to:

(defun tweak (x)
  (+ x (- (* (random 1000) .0001) .05)))
(defun addNoiseToListOfNumbers (l)
  (mapcar #'tweak l))

It looks to me like someone naively translated that from Scheme.  In Common
Lisp, DEFUN always assigns the global function binding, while in Scheme a
DEFINE inside another DEFINE creates a local binding (in both languages,
the body of the function is executed in the local environment).  In Common
Lisp, if you don't want TWEAK to be in the global namespace, you should
write:

(defun add-noise-to-list-of-numbers (l)
  (flet ((tweak (x)
           (+ x
	      (- (* (random 1000) .0001) .05))))
    (mapcar #'tweak l)))
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
Newsgroups: comp.lang.lisp
From: olivier@everest.ee.umn.edu (Olivier Meirhaeghe)
Subject: HELP with Installing Akcl/Kcl on sun 4/70
Organization: University of Minnesota, Minneapolis, EE dept.
Date: Sat, 9 Jan 1993 00:32:31 GMT


	HI

	I am trying to install akcl here on our Suns , So i follow the
	compilation directive , change the values in the sun4.defs and
	launch the make. Apparently , at the very end of the "make" 
	()( probably when it tries to compile itself ..the start of the
	second pass ) , i get :


	make[2]: Nothing to be done for `all'.
(cd lsp; make all)

Unrecoverable error: Segmentation violation..
../xbin/if-exists: 25437 Abort - core dumped
cc  -DVOL=  -I/usr/local/akcl/o -temp=. -pipe -O -c   -I../h evalmacros.c
cpp: evalmacros.c: No such file or directory
Compilation failed
make[2]: *** [evalmacros.o] Error 2
make[1]: *** [all] Error 1
make: *** [all] Error 1


	Which comes from the fact that the newly generated "kcl" does not
	execute ( but exits with a segmentation violation )

	Does anybody have any idea or suggestion ? I have been trhough the
	makefile ten times..I dont know why this doesnot work

O

Newsgroups: comp.lang.lisp
From: converse@cs.uchicago.edu (timoshenko)
Subject: Re: macro question
Organization: University of Chicago Computer Science
	<CONVERSE.93Jan5225205@sloth.uchicago.edu>
	<DAVIS.93Jan6102702@passy.ilog.fr>
Date: Thu, 7 Jan 1993 06:15:30 GMT

>In article <CONVERSE.93Jan5225205@sloth.uchicago.edu>
converse@cs.uchicago.edu (timoshenko) writes:

>>I suppose you could do something like

>>(defmacro a (x y)
	 `(progn (defun ,x () (+ 2 2))
		 (defun ,y () (* 2 3))))
[..]
>>Why do you want to do this, though?  It's likely to be confusing, 

In article <DAVIS.93Jan6102702@passy.ilog.fr> davis@passy.ilog.fr (Harley Davis) writes:
>Your solution is correct, but I don't really understand why you don't
>like it.  If all functions "should" be defined by DEFUN, then you are
>severely limiting Lisp's potential for higher level syntactic
>abstractions based on macros.  For example, you would also have to be
>against DEFCLASS forms which define accessor functions since these
>function definitions aren't visible directly at the top level.

	Sure, you're right that DEFCLASS and DEFSTRUCT and the like
have the useful side-effect of defining new functions, but those have
the advantage that they are part of the language already.  And, in
fact, such side-effects _are_ confusing (though in DEFCLASS etc. the
confusion is probably worth it).  I remember a confused posting a long
time ago from someone working through an AI programming book (AIP2?)
who wanted to know where in the code MAKE-NODE and NODE-SLOT were
defined.  And the answer was (in a sense) "Nowhere." since they resulted
from a defstruct.  If you know the forms that have this sort of effect
you won't be similarly confused, but you should probably have a pretty
good reason before you use macros to create new ones.  And I wondered 
whether the original poster's problem really needed to extend the
language that far, or whether he was taking that approach because he
was confused about something else.

	--Tim Converse
--
-------------------------------------------------------------------------------
Tim Converse  U. of Chicago CS Dept.  converse@cs.uchicago.edu  (312) 702-8584
From: raman@cs.cornell.edu (T. V. Raman)
Newsgroups: comp.lang.lisp
Subject: Playing sparcaudio directly from lisp
Summary: A play function in lucid lisp?
Keywords: Lucid sparcaudio
Date: 7 Jan 93 21:02:17 GMT
Organization: Cornell Univ. CS Dept, Ithaca NY 14853


Hi!

I plan to start using sparc audio extensively inside a clos program,
(playing sound files)  and at present I am just calling the shell and
invoking the play program.

As I am also using the multitasking environment, (the playing of a
sound is a process)
things do slow down my clos application.

How much of a performance benefit will I get if I rewrite play in
lucid directly? I will avoid the overhead of starting a shell each
time,  but will this be offset by the fact that I will be reading the
data and writing it out to /dev/audio in lisp?

Finally if it would be worthwhile to write such a thing, how would one
write an efficient version in lisp?  I have never done buffered I/O in
lisp, and the play program written in C uses  buffered reads and
writes for efficiency.


Chancing my luck, has anyone written this already in lisp?
Thanks,

--Raman
-- 
   T. V. Raman <raman@cs.cornell.edu>Tel: (607)255-9202  R 272-3649
                       Office: 4116 Upson Hall,
Department of Computer Science, Cornell University Ithaca NY 14853-6201
                Res: 226 Bryant Avenue Ithaca NY 14850