HDTenEightyP/NetNews huggingface dataset:
From: hmadorf@eso.org
Newsgroups: comp.lang.lisp.mcl
Subject: Starlisp simulator
Date: 20 Aug 92 14:35:18 GMT
Original-To: info-mcl@cambridge.apple.com

Hi MCL 2.0 fans,

today I downloaded the *Lisp simulator (simulating a connection
machine Lisp in software) from the MCL 2.0 CD ROM and tried to 
compile it with MCL 2.0f. 

A few weeks ago I had done the same under MCL 2.0b1p3 and
found it fairly straighforward and the code ran fine.

This time around, I ran into horrible package problems. Could anyone
truly familiar with the package system and the changes from 
MCL 2.0b1p3 to MCL 2.0f please try to do it. May be the
rrequired changes are minor, may be not. I would appreciate a quick 
solution.

Hans-Martin Adorf
ST-ECF/ESO
Garching, FRG
Newsgroups: comp.lang.lisp.mcl
From: poeck@informatik.uni-wuerzburg.de (karsten poeck)
Subject: Re: simple vector
Followup-To: comp.lang.lisp.mcl
Organization: university of wuerzburg
Date: Fri, 21 Aug 1992 12:32:36 GMT

In article <9208191110.AA03726@area.shpcsl.sharp.co.jp>,
ueda@shpcsl.sharp.co.jp (UEDA masaya) wrote:
> 
> Dear MCLers:
> 
> I got confused about simple vector.
> 
> I'm using MCL 2.0 final. I can make a simple vector of which
> :element-type is 'integer and can refer it's elements by svref.
> 
> --------------------
> ? (setq foo (make-array 10 :element-type 'integer :initial-element 0
>                         :adjustable nil :fill-pointer nil :displaced-to nil))
> #(0 0 0 0 0 0 0 0 0 0)
> ? (svref foo 0)
> 0
> ?
> --------------------
> 
> But when I make a vector of which :element-type is fixnum, referrence
> by svref causes an error as follows.
> 
> --------------------
> ? (setq bar (make-array 10 :element-type 'fixnum :initial-element 0
>                         :adjustable nil :fill-pointer nil :displaced-to nil))
> #(0 0 0 0 0 0 0 0 0 0)
> ? (svref bar 0)
> > Error: value #<VECTOR 10 type (SIGNED-BYTE 32), simple> is not of the expected type SIMPLE-VECTOR.
> > While executing: CCL::TOPLEVEL-EVAL
> > Type Command-. to abort.
> See the RestartsI menu item for further choices.
> 1 > 
> Aborted
> ?
> --------------------
> 
> Why make-array returns simple vector when :element-type is 'integer
> and dose not return simple vector when :element-type is 'fixnum? I
> feel it queer because fixnum is a subtype of integer, but Sun4 Allegro
> Common Lisp causes same error...
> 
> And MCL says me that bar is array and vector and simple-array, but not
> simple-vecotor.
> 
> --------------------
> ? (typep bar 'array)
> T
> ? (typep bar 'vector)
> T
> ? (typep bar 'simple-array)
> T
> ? (typep bar 'simple-vector)
> NIL
> ?
> --------------------
> 
> I referred CLtL2 but I can not understand these results well. Any
> suggestions are welcome.
> 
> --- Thanks ---
> Masaya UEDA
> Information System R&D Center, SHARP Co.
> 2613-1 Ichinomoto, Tenri, Nara 632, JAPAN

I am also quite surprised by the array construction routines

For example


(time
 (type-of (make-array 200 :element-type '(unsigned-byte *))))
--> (SIMPLE-VECTOR 200), 1320 bytes of memory allocated

and 

(time
 (type-of (make-array 200 :element-type '(unsigned-byte 8))))

(TYPE-OF (MAKE-ARRAY 200 :ELEMENT-TYPE '(UNSIGNED-BYTE 8)))

--> (SIMPLE-ARRAY (UNSIGNED-BYTE 8) (200)); 240 bytes of memory allocated

Karsten Poeck
From: george@hsvaic.boeing.com (George Williams)
Newsgroups: comp.lang.lisp.mcl
Subject: Re: LISP FFI to C
Date: 21 Aug 92 12:23:05 GMT
       "LISP FFI to C" (Aug 20, 11: 37pm)
X-Mailer: Mail User's Shell (7.2.3 5/22/91)
Original-To: info-mcl@cambridge.apple.com
Original-Cc: cfry@MIT.EDU (Christopher Fry), moon@cambridge.apple.com (David A. Moon),
        Bruce Lester <72110.1107@CompuServe.COM>, kgrant@us.oracle.com,
        york@lucid.com, jonl@lucid.com, swm@scrc.symbolics.com,
        rwk@crl.dec.com

> > Feel free to forward this message to other vendors or mailing lists if you 
> > wish.
> Done to Lucid and Symbolics. Don't have an address for Franz. or Harlequin
> so anyone who does, please forward this. 

Done to Franz and Harlequin.

George Williams            BCS Huntsville Artificial Intelligence Center
Boeing Computer Services   Internet: george@hsvaic.boeing.com
POBox 240002, M/S JY-58    UUCP: ...!uw-beaver!bcsaic!hsvaic!george
Huntsville AL 35824-6402   Phone: 205+464-4968 FAX: 205+464-4930
From: jbk@world.std.com (Jeffrey B Kane)
Newsgroups: comp.lang.lisp.mcl
Subject: Re: using Sequence-dialog-items
Date: 13 Aug 92 13:19:04 GMT
Original-To: info-mcl@cambridge.apple.com

Luke,
  Thanks for the example code.  I wonder why the palette uses
sequence-dilog-its
instead of the more useful table-dialog-item class?  It seems that although
there is more efficient storage in this class, there is very little underlying
support to figure out what was selected from a simple list (which I assumed
was the purpose of specializing it).
    Jeffrey
From: ueda@shpcsl.sharp.co.jp (UEDA masaya)
Newsgroups: comp.lang.lisp.mcl
Subject: simple vector
Date: 19 Aug 92 11:10:15 GMT
Return-Path: <ueda@shpcsl.sharp.co.jp>
Original-To: info-mcl%cambridge.apple.com@kddlab.kddlabs.co.jp

Dear MCLers:

I got confused about simple vector.

I'm using MCL 2.0 final. I can make a simple vector of which
:element-type is 'integer and can refer it's elements by svref.

--------------------
? (setq foo (make-array 10 :element-type 'integer :initial-element 0
                        :adjustable nil :fill-pointer nil :displaced-to nil))
#(0 0 0 0 0 0 0 0 0 0)
? (svref foo 0)
0
?
--------------------

But when I make a vector of which :element-type is fixnum, referrence
by svref causes an error as follows.

--------------------
? (setq bar (make-array 10 :element-type 'fixnum :initial-element 0
                        :adjustable nil :fill-pointer nil :displaced-to nil))
#(0 0 0 0 0 0 0 0 0 0)
? (svref bar 0)
> Error: value #<VECTOR 10 type (SIGNED-BYTE 32), simple> is not of the expected type SIMPLE-VECTOR.
> While executing: CCL::TOPLEVEL-EVAL
> Type Command-. to abort.
See the RestartsI menu item for further choices.
1 > 
Aborted
?
--------------------

Why make-array returns simple vector when :element-type is 'integer
and dose not return simple vector when :element-type is 'fixnum? I
feel it queer because fixnum is a subtype of integer, but Sun4 Allegro
Common Lisp causes same error...

And MCL says me that bar is array and vector and simple-array, but not
simple-vecotor.

--------------------
? (typep bar 'array)
T
? (typep bar 'vector)
T
? (typep bar 'simple-array)
T
? (typep bar 'simple-vector)
NIL
?
--------------------

I referred CLtL2 but I can not understand these results well. Any
suggestions are welcome.

--- Thanks ---
Masaya UEDA
Information System R&D Center, SHARP Co.
2613-1 Ichinomoto, Tenri, Nara 632, JAPAN
From: straz@cambridge.apple.com (Steve Strassmann)
Newsgroups: comp.lang.lisp.mcl
Subject: Re: Interfacing to I/O boards
Date: 13 Aug 92 17:15:57 GMT
Full-Name: Steve Strassmann
Original-To: John Doleac <jd05@gte.com>
Original-Cc: info-mcl


>Straz told you about Guillaume Cartier's package.
>I have a few more comments.
>

Well, since Bill told you about some more things, 
I have a few more comments.

It may not be too closely related, but another system
for real-time process control in MCL is available on the CD-ROM
and by ftp, called "hyperlisp". It was written at the MIT
Media Lab to control MIDI synthesizers during live music
performances, and has many interesting control structures
for time-sensitive lisp execution. check it out!
 
 - steve
From: markt@dgp.toronto.edu ("Mark A. Tapia")
Newsgroups: comp.lang.lisp.mcl
Subject: Re:  BUG:  Second sequence doesn't scroll
Date: 17 Aug 92 23:22:25 GMT
Original-To: lynch@ils.nwu.edu
Original-Cc: info-mcl@cambridge.apple.com


Rich lynch@ils.nwu.edu writes that there is a bug in MCL2 when
two distinct views within the same window both contain a subview
that is a sequence-dialog-item. The scroll bars only work for the
first view added and not for the second.

I noticed that the code works properly when the two tables are contained
within the same view.  The following works correctly:
(make-instance 'dialog
  :window-title "Try the far right scroll bar."
  :view-subviews
  (list
   (setq table1 (make-instance 'sequence-dialog-item
                  :view-size #@(30 60)
                  :view-position #@(4 4)
                  :table-hscrollp nil
                  :table-sequence '(1 2 3 4 5 6)))
   (setq table2 (make-instance 'sequence-dialog-item
                  :view-size #@(30 60)
                  :view-position #@(50 4)
                  :table-hscrollp nil
                  :table-sequence '(1 2 3 4 5 6)))))
From: bill@cambridge.apple.com (Bill St. Clair)
Newsgroups: comp.lang.lisp.mcl
Subject: wanted, code using popUpMenuCDEFProc
Date: 17 Aug 92 21:47:52 GMT
Full-Name: Bill St. Clair
Original-To: info-mcl

Due to a cockpit error on my part, the first time I sent this
message it had the subject below. I apologize.

>Date: Mon, 17 Aug 1992 15:16:17 -0500
>To: info-mcl
>From: bill@cambridge.apple.com (Bill St. Clair)
>Subject: Re: Lunch Monday?
>
>I seem to recall someone telling me that they had reimplemented
>MCL's pop up menus using the new System 7 popUpMenuCDEFProc.
>If you are that person, and are willing to donate your code,
>please send it to me. Steve Mitchell needs the popUpMenuCDEFProc's
>ability to change the menu fonts.
>
>-----
>Bill St. Clair
>bill@cambridge.apple.com
From: bill@cambridge.apple.com (Bill St. Clair)
Newsgroups: comp.lang.lisp.mcl
Subject: Re: Apply
Date: 12 Aug 92 18:52:59 GMT
Full-Name: Bill St. Clair
Original-To: owens@cs.uchicago.edu
Original-Cc: info-mcl

>From: owens@cs.uchicago.edu
>Date: Wed, 12 Aug 92 11:59:16 CDT
>To: bill@cambridge.apple.com
>Subject: Re: Apply
>Newsgroups: comp.lang.lisp.mcl
>Organization: Dept of Computer Science, The Univ of Chicago
>Cc: 
>
>In article <9208121537.AA03113@cambridge.apple.com> you write:
>
>>[...]
>>
>>(defun make-menu-items (items)
>>  (let (menu-items)
>>    (dolist (item items)
>>      (push (make-instance ...
>>              :attached-function
>>              #'(lambda (window)
>>                  (declare (ignore window))
>>                  (print item)))
>>            menu-items)
>>      ...)))
>>
>
>
>Bill, I almost posted this exact code fragment, but then I thought of
>the buggy code that Rao posted the other day, and I couldn't remember
>whether dolist was guaranteed to create a fresh binding for each
>iteration.  Does your code create an :attached-function that, for each
>of the menu items, prints the value taken on by ITEM during the last
>iteration of the DOLIST?

As pointed out by Kim Barrett and Bob Cassells, my code is wrong.
You need to create a fresh binding or use a mapping function.
From: yi@ecn.purdue.edu (Juneho Yi)
Newsgroups: comp.lang.lisp.mcl
Subject: Please remove me from the mailing list.
Date: 17 Aug 92 20:52:33 GMT
Original-To: info-mcl@cambridge.apple.com

Thank you.
-- yi
From: moon (David A. Moon)
Newsgroups: comp.lang.lisp.mcl
Subject: Re:  LISP FFI to C
Date: 21 Aug 92 15:17:41 GMT
Full-Name: David Moon
Original-To: cfry@MIT.EDU (Christopher Fry)
Original-Cc: Bruce Lester <72110.1107@CompuServe.COM>, info-mcl@cambridge.apple.com,
        kgrant@us.oracle.com, york@lucid.com, jonl@lucid.com,
        swm@scrc.symbolics.com, rwk@crl.dec.com

One could also get some ideas from page 249 of the proceedings of the 1992 ACM 
Conference on Lisp and Functional Programming.
From: joswig@informatik.uni-hamburg.de
Newsgroups: comp.lang.lisp.mcl
Subject: Re: CLIM-MCL(final)
Date: 14 Aug 92 17:00:37 GMT
Original-To: info-mcl@cambridge.apple.com

>There is a fully functional demo version of CLIM 1.0 (binaries)
>on the MCL 2.0 CD-ROM - maybe this will be helpful in the interim.

Sadly ;-) this is a true demo version and not fully functional.
These guys want to sell CLIM. Macros like DEFINE-APPLICATION-FRAME
or DEFINE-PRESENTATION-METHOD are not working.


Rainer Joswig

Email: joswig@informatik.uni-hamburg.de
From: bill@cambridge.apple.com (Bill St. Clair)
Newsgroups: comp.lang.lisp.mcl
Subject: Re: MOP in MCL 2.0
Date: 17 Aug 92 21:30:26 GMT
Full-Name: Bill St. Clair
Original-To: moore@cs.utah.edu (Tim Moore)
Original-Cc: info-mcl

>I understand that the MOP as defined in AMOP isn't complete in MCL
>2.0. How much MOP is there? Are there plans to implement the full MOP
>in the near future?

MCL 2.0 includes only a small number of introspective MOP functions.
They are documented in the new reference (shipping with MCL 2.0 final
and updates) and in the file:

/pub/mcl2/docs/introspective-mop.txt

on the anonymous FTP server at cambridge.apple.com.

We are not currectly planning to do a complete MOP in the near
future. There are only so many of us here to work on MCL and
since people have not been beating down our door asking for the
MOP (though the people who DO ask for it tend to shout), its
place in our priority list makes it unlikely to happen very soon.

I probably WILL do SLOT-VALUE-USING-CLASS in the near future.
I already have a cheap implementation that slows down all SLOT-VALUE
calls and isn't called by DEFCLASS generated accessor functions. Ask and
I'll send it (or post it if demand is great).
From: djskrien@COLBY.EDU (Dale Skrien)
Newsgroups: comp.lang.lisp.mcl
Subject: opening files from the Finder
Date: 13 Aug 92 11:38:19 GMT
Original-To: info-mcl@cambridge.apple.com


        I have created a stand-alone application using MCL 2.0 final. 
Using the code supplied with the Binhex sample application, I figured out
how to use the function finder-parameters so that when the user
double-clicks on a file created by my app, the finder automatically starts
up my app and calls my function load-clicked-files, which loads the
clicked-on file (I want my app to _load_ the file, which contains lisp
code, rather than _display_ the contents of a file in a new fred window). 
This all works fine.
        However, if my app is already running and the user double-clicks on
one of its files in the Finder, a new fred window is created and the
contents of the clicked-on file are displayed in it.  This is not what I
want.  When the user double-clicks on a file owned by my app, I would
_like_ for my function load-clicked-files to be executed, just as occurs
during startup.
        Can someone tell me how to do this?
        By the way, this problem only seems to occur under System 7 (on a
Mac IIcx or Quadra).  When I run my app under System 6.0.8 (on a Mac IIcx)
and then double-click on a file in the Finder, I get a message saying you
have to open the file from within the application.  If this message occured
all the time, then I would have no problem.  So an alternate solution to my
problem would be getting this message to always appear when this situation
occurs.
        Thanks.

Dale J. Skrien   	       	       	       	       	djskrien@colby.edu
Dept. of Mathematics & Computer Science 	       	207-872-3256
Colby College, Waterville  ME  04901
From: cartier@math.uqam.ca (Guillaume Cartier)
Newsgroups: comp.lang.lisp.mcl
Subject: Unlimited Undos
Date: 14 Aug 92 16:28:43 GMT
Original-To: info-mcl@cambridge.apple.com (Macintosh Common Lisp)

The reference manual seems to be implying on page 495
that by default MCL supports unlimited undos unless
specified otherwise by *fred-history-length*.

This is exactly what I want, unlimited undos.

Unfortunately, *fred-history-length* starts with a value
of 20 and I would like a cleaner way of specifying unlimited
undos than setting *fred-history-length* to a huge value.

Any advise?
Thanks.

*********************************************************************
* Guillaume Cartier                 (514) 844-5294 (maison)         *
* L.A.C.I.M.                        (514) 987-4290 (bureau)         *
* Universite du Quebec a Montreal   (514) 987-8477 (telecopieur)    *
* Montreal, Quebec, Canada          cartier@math.uqam.ca (internet) *
*********************************************************************
From: bill@cambridge.apple.com (Bill St. Clair)
Newsgroups: comp.lang.lisp.mcl
Subject: Re: record pattern
Date: 17 Aug 92 21:16:54 GMT
Full-Name: Bill St. Clair
Original-To: Karsten Poeck <poeck@informatik.uni-wuerzburg.de>
Original-Cc: info-mcl

>to info-mcl@cambridge.apple.com
>cc poeck@informatik.uni-wurzburg.de
>
>I am a little bit confused by the different definitions of the record
>type
>pattern in records.lisp being
>
>(defrecord pattern 
>  (variant ((w0 integer)
>            (w1 integer)
>            (w2 integer)
>            (w3 integer))
>           ((b0 byte)
>            (b1 byte)
>            (b2 byte)
>            (b3 byte)
>            (b4 byte)
>            (b5 byte)
>            (b6 byte)
>            (b7 byte))
>           ((bytes (array byte 8)))
>           ((array (array :unsigned-byte 8)))))
>
>which is fine for use because we have used the b0 , bn variant in our
>program
>but which is commented
>and the version in 
>
>interfaces:quickdraw.lisp which is
>
>(defrecord (Pattern :handle) (array (array :unsigned-byte 8)))
>
>which definition of pattern is the best one? Is it safe to replace the
>definition in quickdraw by the one in records

The old definition is now considered obsolete. The one in
"ccl:interfaces;quickdraw.lisp" conforms to the definition in Inside Macintosh.
You can safely install the old definition in your world in one of two ways:

1) Put the old record definition in your code somewhere
   (ensuring that it is evaluated before any uses of it are compiled).

2) Replace the definition in "ccl:interfaces;quickdraw.lisp" and evaluate
   the form (reindex-interfaces).
From: gordon@robots.oxford.ac.uk (Gordon Buxton)
Newsgroups: comp.lang.lisp
Subject: Re: run-program in kcl
Keywords: run-program, common lisp, kcl, load.
Date: 14 Aug 92 09:49:39 GMT
Organization: Robotics Research Group, Engineering Science Dept, Oxford, UK.

In article <16fpq4INN848@early-bird.think.com> barmar@think.com (Barry Margolin) writes:
>In article <1992Aug13.194657.6098@cs.albany.edu> saxena@cs.albany.edu (Tushar Saxena) writes:
>>There is a function in common lisp called RUN-PROGRAM in Sun Common Lisp.
>
>This isn't a Common Lisp function, it's a Lucid extension.
>
>>First of all, has anyone ever heard of it? Secondly, what does this
>>function do? 
>
>It runs a normal Unix program, as if you'd executed it from the shell.  It
>can optionally connect the input and/or output streams of the program to
>Lisp streams.  It's fully documented in the Working Beyond the Lisp
>Environment section of the Advanced User's Guide chapter of the manual.
>
>>	      And lastly, what is its counterpart in kcl. I know for sure
>>that my version of kcl does not support it.
>
>There probably isn't a direct counterpart in KCL, since KCL doesn't provide
>many extensions to CL.  The closest thing is probably calling the Unix
>execlp(3) function.
>
>barmar@think.com          {uunet,harvard}!think!barmar


There is a sort-of similar function in kcl called 'system'.  I don't
think it is as good as the run-program in lucid, but it might be what
you need ... eg:

>(system "ls")
beef           factory        filesys.lsp    plan           user.o
cd.o           features       filesys.o      user.lsp       work-elements
0

>(help 'system)
-----------------------------------------------------------------------------
SYSTEM                                                             [Function]

Args: (string)
KCL specific: Executes a Shell command as if STRING is an input to the Shell.
Not all versions of KCL support this function.
-----------------------------------------------------------------------------

It works for me on akcl 1.605 for Unix and the current beta release
akcl for dos.

Gordon.
From: yeh@cs.purdue.EDU (Wei Jen Yeh)
Newsgroups: comp.lang.lisp
Subject: portable O(1) strlen
Keywords: strlen, format, AKCL
Date: 13 Aug 92 07:23:45 GMT
Organization: Department of Computer Science, Purdue University

Hello,
  I just found a bug in my program caused by thinking that
	(array-dimension (format NIL "1234") 0) = 4.
Strange thing is that the answer is correct if I call string-downcase
on the value that format returns.  I can understand why they behave so.
But are there some related rules on this matter? I checked Cltl I, but could
not find discussions on strlen in the string section.  A quick solution that
I'm using now is to (1) scan the array, (2) coerce it to list then call
length, or (3) write a C function.  Solution (1) doesn't seem safe, since
I cannot be sure that the strings will be padded with some fixed chars.
(2) is O(n), and (3) is not portable.

So, is there a portable O(1) STRLEN?

Thanks.
Wei Jen Yeh                      yeh@cs.purdue.edu
                                 Department of Computer Science
                                 Purdue University
                                 West Lafayette, Indiana
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.lang.lisp
Subject: Re: floating point precision
Date: 14 Aug 1992 07:37:53 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: gandalf.think.com

In article <1992Aug13.213615.28011@cs.yale.edu> yip-ken@CS.YALE.EDU (ken yip) writes:
>How can one specify the floating point precision of a numerical 
>routine?

All the mathematical functions in CL are generic, and will operate on any
floating point types, returning results of the same type (if multiple
arguments of different types are provided, it will coerce them all to the
largest one).  So, if you want to see the result of performing the
computation in double-float, provide double floats as the initial input.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
Newsgroups: comp.lang.lisp
From: raman@cs.cornell.edu (T. V. Raman)
Subject: Re: Weird lucid behaviour: calling macros inside files at top level
Keywords: macros, automatic defstructs
Organization: Cornell Univ. CS Dept, Ithaca NY 14853
Date: Wed, 12 Aug 1992 12:34:49 GMT

barmar@think.com (Barry Margolin) writes:

>In article <1992Aug11.203152.26760@cs.cornell.edu> raman@cs.cornell.edu (T. V. Raman) writes:
>>I have a macro that expands into a defstruct. The defstruct is of type
>>list, and the field names are obtained from a list. 

>It would help if you posted the code.  It's hard to get a precise
>understanding of what you're doing from the above description.

>I suspect your problem is that you aren't assigning the list to the
>variable at compile time (i.e. with (EVAL-WHEN (COMPILE) ...)), or you're
>side effecting a constant.

I suspect that the reason is the above. I have never used eval-when
and in my code I simply have

(defvar *list-of-dimensions* ...)

and some calls at top level in the file that push items on to this
list using
(push item *list-of-dimensions*)

So I guess there is something about evaluating things at compile-time
that I never learnt about. 

Could you summarize for me what eval-when does and where and how it is
normally used?

Thanks,

--Raman


p.S. If you feel that replying to this on the net would be of little
else to everyone else, I would appreciate it if you could reply to  me
by email


>-- 
>Barry Margolin
>System Manager, Thinking Machines Corp.

>barmar@think.com          {uunet,harvard}!think!barmar
-- 
   T. V. Raman <raman@cs.cornell.edu>Tel: (607)255-7421 R 272-2435
		       Office: 5162 Upson Hall,
Department of Computer Science, Cornell University Ithaca NY 14853-6201
		Res: 226 Bryant Avenue Ithaca NY 14850