HDTenEightyP/NetNews huggingface dataset:
From: bill@cambridge.apple.com (Bill St. Clair)
Newsgroups: comp.lang.lisp.mcl
Subject: Re: Multiple events
Date: 14 Sep 92 17:22:26 GMT
Full-Name: Bill St. Clair
Original-To: jipan@gmuvax2.gmu.edu (Jiqian Pan)
Original-Cc: info-mcl

>Hi, MCL Experts:
>
>Here are some funny things about other events when a WHILE function
>is called inside a method and in Listener.  Their code is:
>
>(defclass my-window (window) ()) 
>
>(setf foo (make-instance 'my-window))
>
>(defmethod view-key-event-handler ((foo my-window) char)
>           (print char))
>
>(setf *true* t)
>
>(while *true*
>        ()))
>
>(defmethod view-click-event-handler ((foo my-window) position)
>           (declare (ignore position))
>           (while *true*
>                  ()))
>
>When the function WHILE is called in Listener, the method 
>view-key-event-handler works, that is, I can see characters
>on Listener.  However, when WHILE is called inside the method
>view-click-event-handler, the method does not work.  I want 
>other events to be able to work when a loop function is called
>inside a method.  I am wondering whether I have missed something
>and there are other ways to do the function.  
>
>Thanks for your help.
>
>jipan@gmuvax2.gmu.edu

As I said in mail to INFO-MCL last week, event processing is locked out
while processing an event. In MCL 2.0 this is done by binding the
special variable ccl::*processing-events* to true. In 2.1, this will
be done differently. Hence, I suggest that you use the following macro
if you really must allow events while processing an event. You should
realize that though wrapping the loop inside your event handler with an
(allowing-events (loop ...)) will allow keyboard input to go to the Listener,
it won't evaluate any of those expressions until the event handler exits. MCL
does NOT (yet) have multiple processes.

------------------------------------------------------------------------

; allowing-events.lisp
;
; Macro to allow event processing from within an event handler.
; Usually, this is not the right thing to do: use EVAL-ENQUEUE instead.
; This code works for MCL 2.0. It will likely break in future versions.

(in-package :ccl)

(export 'allowing-events)

(defmacro allowing-events (&body body)
  `(let ((*processing-events* nil)
         (*interrupt-level* 0))
     ,@body))
Newsgroups: comp.lang.lisp.mcl
From: jona@ils.nwu.edu (Kemi Jona)
Subject: Launching app via appleevents
Organization: Institute for the Learning Sciences
Date: Thu, 10 Sep 1992 16:44:32 GMT

How does one launch an application via appleevents?  I looked at
create-oapp in the appleevents.lisp file, but that seems to take as a
target a process which is already running.  If there is another way to
launch an application that doesn't use appleevents I'd be happy to use that
to get it running, then start sending it appleevents later.

Thanks,


--Kemi

------------------------------------------------------------
Kemi Jona           jona@ils.nwu.edu             
Institute for the Learning Sciences, Northwestern University             
1890 Maple Ave., Rm. 328, Evanston, IL 60201                  
(708) 467-1969 or 491-3500     FAX: (708) 491-5258                

Newsgroups: comp.lang.lisp.mcl
From: wlim@gdstech.GRUMMAN.COM (Willie Lim)
Subject: SourceServer and MPW Projector Checkin/Checkout Dialog Boxes
Organization: Grumman Corporation, Bethpage, New York, USA.
Distribution: comp
Date: Mon, 14 Sep 1992 13:14:21 GMT

Is there a way to get SourceServer to invoke the original MPW
Projector Checkin/Checkout Dialog Boxes?  I prefer dialog boxes over
the current MCL SourceServer's equivalent (e.g. Checkin Active).



Willie
From: yost@adobe.com (David Yost)
Newsgroups: comp.lang.lisp.mcl
Subject: QF: Scheme under MCL
Date: 14 Sep 92 18:44:09 GMT
Organization: Adobe Systems Incorporated

Somewhere there is a Scheme that runs under MCL.
Could someone please tell me who did it and/or where to get it?
Thanks.

 --dave
Newsgroups: comp.lang.lisp
From: barbehen@demagog.cs.uiuc.edu (Michael Barbehenn)
Subject: Re: Selective compilation of reader macro forms...
Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL
Date: Tue, 8 Sep 1992 02:25:44 GMT

waander@cs.umd.edu (Bill Andersen) writes:

>  I have a reader macro which I want to do two different things depending on
>whether the form following the macro is being compiled, or is being
>entered interactively.  The best way to show this is with an example:
>
>I want to be able to compile a function referencing #$Foo
>without having to worry about an error if "Foo" is not in
>*table* during compilation.  I just want a call to 
>(lookup "Foo") compiled into the function.


Here's some code that has the flavor of what you are asking for:

(defun LOOKUP (name)
  (or (gethash name *table*)
      (error "Sorry, ~s is not in *table*" name)))

(defun READ-THING (stream char)
  `(lookup ',(read stream t nil t)))

(set-macro-character #\? #'read-thing)


Newsgroups: comp.lang.lisp
From: eskilb@dhhalden.no (Eskil Brun)
Subject: Re: Sun Common Lisp & Foreign functions
Keywords: foreign functions
Organization: Ostfold College
Date: Fri, 11 Sep 1992 19:56:00 GMT

Hi,

like barmar explains, this has to do with the Lucid scheduler.
it probably uses alarm(2) to generate SIGALRMs every *scheduling-quantum*.

i've been struggling with this myself for a while until i discovered
the wizard-function (undocumented and unsupported) SYS::WITH-SIGNAL-MASK.

e.g.:

(defparameter SIGALRM 14)
;;; doffen(bash)$ man 5 signal
;;; SIGALRM       14     A         alarm clock; see alarm(2)

(defparameter SIGALRM-MASK (expt 2 (1- SIGALRM)))

...
   ;; Mask away Lisp scheduler interrupts while executing the body of
   ;; this code. It is a kind of Lispm WITHOUT-INTERRUPTS, but bypasses
   ;; the scheduler logics altogether.
   (sys::with-signal-mask (logior SIGALRM-MASK (sys::get-signal-mask))
 ;;; Note that this doesn't work:
 ;;; > (sys::with-interrupts-deferred
 ;;;     (list (setq acceptsock
 ;;;       (std-c-library::accept sock acceptsockaddr sixteen))
 ;;;       (enlib:sys-errlist)))
 ;;; (-1 "Interrupted system call")
     (let* ((send-chunk-len 512)
            (str-len (length str))
...

Cheers,
Eyvind. (Not Eskil ;-)

+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
 Eyvind Ness                    Internet Email: Eyvind.Ness@HRP.No
 Research Scientist             Phone: +47 9 183100
 Control Room Systems Division  Fax: +47 9 187109
 OECD Halden Reactor Project    Snail Mail: P.O. Box 173, N-1751 Halden
 Norway
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
From: djasson@zion (Drew Asson)
Newsgroups: comp.lang.lisp
Subject: Interprocess comms using Allegro 4.1
Keywords: IPC, Allegro, socket, stream
Date: 10 Sep 92 17:10:35 GMT
Distribution: usa
Organization: The Great Beyond


This is a request for help to set up a unix-domain (socket file) server
in Allegro (4.1), that will accept 1 connection from a C code client.
The lisp side only need service one connection at a time (ergo no
fork needed), but I'd like it to stay resident and be able to accept
another connection when the last one is finished.

I've looked at the sample code in the ipc.cl file.  Setting up a lisp
client is no problem (just use open-network-stream), but I want a lisp
server.  So I started playing around w/ the function lisp-server-socket-daemon.
I thought I took out all I needed.  But it didn't work.

The first problem was that the ff call to listen didn't block!  In C, 
a call to listen will cause the calling process to block until someone
tries to connect to the socket.  In Allegro, the call to listen returned
immediately (it didn't fail, it just didn't block).  Then I decided that
the process-wait block was used to do that waiting until someone tried
to connect (using select).  I added that to my server code and the problem
was that the everything seemed to work ... i.e. the process waited until
a connection was tried, the select worked, but the process never woke up,
or returned from the process wait, until I hit return in the Lisp listener
window?  

Now, was there something I did wrong?  Has anyone else out there written
a server in Allegro?  To reiterate, all I need is a socket based stream
so that communication can be done between some C code and some Lisp code.
Writing a server and/or client in C is no problem, so I've implemented it
w/ a Lisp client and a C server, but this gets me into lots of problems.

Any ideas?

Thanks very much.

--
djasson@afterlife.ncsc.mil
US:
  Mr. Drew J. Asson
  9305 Sombersby Court
  Laurel, MD 20723

  (301) 317-1691 (h)
  (301) 688-0346 (w)
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.lang.lisp
Subject: Re: copy-array?
Date: 15 Sep 1992 17:13:11 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: telecaster.think.com

In article <19920915145558.5.SWM@SUMMER.SCRC.Symbolics.COM> SWM@stony-brook.scrc.symbolics.com (Scott McKay) writes:
>A "shame" is an understatement.  I think that, at the very least, this
>correction to MAKE-ARRAY should be proposed during the dpANS public
>review period.  

Please do so.

>		 (Note that I do not consider this a true correction of
>an error of omission, not simply an extension.)

If it's "not ... a ... correction", and "not ... an extension", what is
it?  Or was the first "do not" an error?

I'd consider this an extension.  Our charter was to clarify the language
as specified in CLtL, and add a condition system, iteration facility,
and OO system.  We didn't limit ourselves strictly to this, but we tried
not to go overboard.  I'm not saying that this particular feature is a bad
idea, but since it adds to the language as specified in CLtL, strictly
speaking it's an extension.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
Newsgroups: comp.lang.lisp
From: zxmsd01@mailserv.zdv.uni-tuebingen.de (Gunther Schadow)
Subject: Re: Franz Lisp lives!
Organization: Comp. Center (ZDV) U of Tuebingen, FRG
Date: Sat, 12 Sep 1992 23:18:19 GMT

In <17000@ucdavis.ucdavis.edu> mock@madrone.eecs.ucdavis.edu (Kenrick Mock) writes:

>>
>>Does it include a Lisp compiler that produces code that works on a
>>386 or SPARC?
>>
>>To go from zero Franz Lisps to two would be pretty amazing.
>>

>Nope, the PC-Lisp out there only includes an interpreter and not a
>compiler.
...
>You can ftp the zip file from ucdavis.ucdavis.edu in the /pub
>directory.  It's called pclisp30.zip, I believe.

Why do you talk about PC-LISP? I think that the decision between
AKCL, FranzLISP and PC-LISP is not too hard... kick off PC-LISP and
save $15 (you may of course send $15 to me :-).

couldn't resist...
-Gunther
--
-------------------------------------------------------------------------------
Gunther Schadow,	          e-mail: Gunther@mailserv.ZDV.Uni-Tuebingen.DE
Sudetenstrasse 25,	          Phone:  (49) 7071/37527
7400 Tuebingen, Germany.__________Stop__________Horn Please!__________O.K. TATA
Xref: sparky comp.lang.lisp:2418 news.answers:2881
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.lang.lisp
Subject: Re: Looking for Top Level / Kelly Murray
Date: 5 Sep 1992 04:50:26 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
Distribution: world
NNTP-Posting-Host: gandalf.think.com

In article <188nmuINN8k6@agate.berkeley.edu> konstan@cs.berkeley.edu (Joe Konstan) writes:
>Has anyone heard anything lately about Top Level, Inc. (a small Lisp
>vendor specializing in parallel lisps)?  I fear they've gone out of 
>business.  

I got a glossy page from them a few months ago, but haven't heard from them
since.  I asked our purchasing person to look into getting a demo copy of
TopCL; I don't know whether she ever called them, though.

>Also, were they represented at LUV '92?

Nope.


-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
From: sef@sef-pmax.slisp.cs.cmu.edu
Newsgroups: comp.lang.lisp
Subject: Re: CMUCL for A/UX
Date: 5 Sep 92 01:16:02 GMT
Article-I.D.: cs.Bu2zIu.1B0.1
Organization: School of Computer Science, Carnegie Mellon


    From: mbp@generali.harvard.edu (Mark B Palmerino)
    
    Has anyone gone through the trouble of getting CMUCL to work on a machine
    running A/UX (Apple's Unix)? I'm looking at that daunting task and am
    hoping that others have already paved the way.
    
Porting CMU CL to the Motorola 680x0 processor of the Macintosh would be a
big job, and probably not worth the trouble since (a) Apple already sells a
good Common Lisp for the Mac, (b) Apple's Common Lisp has been optimized
for the small memory size of most Macs, while CMU CL is big, (c) the
68K-based Macintoshes may not be with us for too many more years.  If you
just did a straightforward port, and didn't try to reorganize the system to
make it small, a Macintosh port would still take you several months full
time.  And that's if you're *very* good.

I don't know much about A/UX, but if it doesn't support mapping of
arbitrary files into memory and provide you with several widely separated
segments in virtual memory, that could be trouble as well.  Add several
more months in that case.

If you still want to go for this, let us know.  We'll give you what advice
we can.

-- Scott

===========================================================================
Scott E. Fahlman
CMU Common Lisp Project (fearless leader)
School of Computer Science
Carnegie Mellon University
5000 Forbes Avenue
Pittsburgh, PA 15213

Internet: sef+@cs.cmu.edu
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.lang.lisp
Subject: Re: copy-array?
Date: 14 Sep 1992 23:01:51 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: telecaster.think.com

In article <9209142212.AA24213@brownie.cs.wisc.edu> so@CS.WISC.EDU (Bryan S. So) writes:
>This is almost the first time I seriously use arrays
>in Common Lisp.  Now, how come there is no intrinsic
>function to make a copy of an array?

There was a proposal in X3J13 to extend some of the sequence functions to
work on multidimensional arrays, but it was voted down.  That would have
enabled COPY-SEQ to do what you want.

It's kind of a shame that a multidimensional array can't be used as the
:INITIAL-CONTENTS argument for MAKE-ARRAY, even when it matches the
dimensionality of the array being built.  Then you could do:

(make-array ... :initial-contents old-array)

>The only algorithm I have is to make a new array then
>assign the elements one by one.  Is there an easier/
>more efficient method to do this?

You can do it using displaced arrays and MAP-INTO:

(defun copy-array (old-array)
  (let* ((type (array-element-type old-array))
	 (size (array-total-size old-array))
	 (new-array (make-array (array-dimensions old-array)
			:element-type type))
	 (old-vector (make-array size :element-type type :displaced-to old-array))
	 (new-vector (make-array size :element-type type :displaced-to new-array)))
    (copy-into new-vector #'identity old-vector)
    new-array))

A possibly more efficient way to implement this is:

(defun copy-array (old-array)
  (let* ((type (array-element-type old-array))
	 (size (array-total-size old-array))
	 (old-vector (make-array size :element-type type :displaced-to old-array))
	 (new-vector (copy-seq old-vector)))
    (make-array (array-dimensions old-array) :element-type type
	:displaced-to new-vector)))

However, this has the misfeature that the resulting array is likely to be
more expensive to access, because it's displaced.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
From: konstan@cs.berkeley.edu (Joe Konstan)
Newsgroups: comp.lang.lisp
Subject: Looking for Top Level / Kelly Murray
Date: 4 Sep 1992 22:24:30 GMT
Organization: Picasso Research Group, UCB Computer Science Division
Distribution: world
NNTP-Posting-Host: elmer-fudd.cs.berkeley.edu

Has anyone heard anything lately about Top Level, Inc. (a small Lisp
vendor specializing in parallel lisps)?  I fear they've gone out of 
business.  

Also, were they represented at LUV '92?

Finally, if anyone knows how to get ahold of Kelly Murray, the founder
of Top Level, please let me know (or let him know I'd like to reach him).

Thanks.

Joe Konstan
konstan@cs.berkeley.edu
From: SWM@stony-brook.scrc.symbolics.com (Scott McKay)
Newsgroups: comp.lang.lisp
Subject: Re: copy-array?
Date: 15 Sep 92 18:31:41 GMT
Organization: LCS news/mail gateway
X-Unparseable-Date: Tue


    Date: Tue, 15 Sep 1992 13:13 EDT
    From: Barry Margolin <barmar@think.com>

    In article <19920915145558.5.SWM@SUMMER.SCRC.Symbolics.COM> SWM@stony-brook.scrc.symbolics.com (Scott McKay) writes:
    >A "shame" is an understatement.  I think that, at the very least, this
    >correction to MAKE-ARRAY should be proposed during the dpANS public
    >review period.  

    Please do so.

To whom to I send such correspondences?

    >		 (Note that I do not consider this a true correction of
    >an error of omission, not simply an extension.)

    If it's "not ... a ... correction", and "not ... an extension", what is
    it?  Or was the first "do not" an error?

    I'd consider this an extension.  Our charter was to clarify the language
    as specified in CLtL, and add a condition system, iteration facility,
    and OO system.  We didn't limit ourselves strictly to this, but we tried
    not to go overboard.  I'm not saying that this particular feature is a bad
    idea, but since it adds to the language as specified in CLtL, strictly
    speaking it's an extension.

Yes, strictly speaking, this is an extension.  But as I said, I consider
it an error of omission, and any correction of an error of omission must
by its nature be an extension "strictly speaking".

I'll submit a correction/request for extension.
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.lang.lisp
Subject: Re: Selective compilation of reader macro forms...
Date: 8 Sep 1992 03:10:42 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: gandalf.think.com

In article <60132@mimsy.umd.edu> waander@cs.umd.edu (Bill Andersen) writes:
>  I have a reader macro which I want to do two different things depending on
>whether the form following the macro is being compiled, or is being
>entered interactively.

If the reader macro is being defined in the same file as the uses that
should get this special treatment, the following should work:

(eval-when (compile)
  (defun read-macro-compile ...)
  (set-macro-character #\<char> #'read-macro-compile ...))

(defun read-macro-runtime ...)

(set-macro-character #\<char> #'read-macro-runtime ...)

If the above restriction doesn't apply, you could use a special variable:

(defvar *read-macro-being-compiled* nil)

(defun read-macro (...)
  (if *read-macro-being-compiled*
      ...))

(defun my-compile-file (&rest args)
  (let ((*read-macro-being-compiled* t))
    (apply #'compile-file args)))

(defun my-compile (*rest args)
  (let ((*read-macro-being-compiled* t))
    (apply #'compile args)))
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
From: raman@cs.cornell.edu (T. V. Raman)
Newsgroups: comp.lang.lisp
Subject: exported symbols, and packages:
Keywords: export symbol package
Date: 11 Sep 92 19:31:38 GMT
Organization: Cornell Univ. CS Dept, Ithaca NY 14853


Hi!

I would like the following point about symbols and packages clarified.

I find that when in the user package all symbols that are exported
from other packages are present in the user package as symbols. ie:

If I have a package *foo* that exports a  function #'foo  then if in
the user package there is a symbol 'foo presents which evaluates to
itself.  (find-symbol 'foo) returns

foo
:internal

Is this what is supposed to happen? If so why?  Why should the symbol
'foo be present in the user package in this way?

--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
Xref: sparky comp.lang.lisp:2412 comp.lang.lisp.franz:49 comp.unix.bsd:5552
From: mock@madrone.eecs.ucdavis.edu (Kenrick Mock)
Newsgroups: comp.lang.lisp,comp.lang.lisp.franz,comp.unix.bsd
Subject: Re: Franz Lisp lives!
Date: 11 Sep 92 20:33:49 GMT
Followup-To: comp.lang.lisp
Organization: U.C. Davis - Department of Electrical Engineering and Computer Science

>
>Does it include a Lisp compiler that produces code that works on a
>386 or SPARC?
>
>To go from zero Franz Lisps to two would be pretty amazing.
>

Nope, the PC-Lisp out there only includes an interpreter and not a
compiler.

A little more information, since some of you may be interested...
The PC-Lisp pack out there only contains the MS-DOS executable, not
the source code.  For the source, you have to send $15 to the author.
You can ftp the zip file from ucdavis.ucdavis.edu in the /pub
directory.  It's called pclisp30.zip, I believe.

KM

-- 
------------------------------------------------------------------------------
GEnie : K.MOCK     			Net : mock@madrone.eecs.ucdavis.edu
"Don't worry about the world ending today, it's already tomorrow in
 Australia..."  					      - CMS
Xref: sparky comp.lang.lisp:2421 comp.lang.clos:806 news.answers:2884
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.lang.lisp
Subject: Re: exported symbols, and packages:
Keywords: export symbol package
Date: 11 Sep 92 22:44:57 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: telecaster.think.com

In article <1992Sep11.193138.3277@cs.cornell.edu> raman@cs.cornell.edu (T. V. Raman) writes:
>I find that when in the user package all symbols that are exported
>from other packages are present in the user package as symbols. ie:

I don't think that's what is happening.

>If I have a package *foo* that exports a  function #'foo  then if in
>the user package there is a symbol 'foo presents which evaluates to
>itself.  (find-symbol 'foo) returns
>
>foo
>:internal

Try (find-symbol "FOO" '*foo*).  It should return something like:

*FOO*:FOO
:EXTERNAL

>Is this what is supposed to happen? If so why?  Why should the symbol
>'foo be present in the user package in this way?

When you typed the form (find-symbol 'foo), the reader interned the symbol
that you typed into the current package, creating a new symbol named "FOO"
in the USER package if necessary.  Try (eq 'foo 'foo:foo); I'll bet it
returns NIL.

Note that the first argument to FIND-SYMBOL and INTERN is required to be a
string, not a symbol.  If your implementation permits you to use a symbol
there, that's an extension.  Neither Symbolics Common Lisp nor CMU CL
permit it, but Lucid CL does.

-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.lang.lisp
Subject: Re: Sun Common Lisp & Foreign functions
Date: 10 Sep 1992 15:39:14 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: telecaster.think.com
Keywords: foreign functions

In article <1992Sep10.122629.8200@cs.joensuu.fi> prikala@cs.joensuu.fi ( Pasi Rikala) writes:
>My question is: What am I doing wrong? Why is sleep interrupted? 
>How can I tell lisp not to interrupt foreign functions when they 
>seem to be sleeping?

Sun CL (like most Lucid CL ports) has a built-in scheduler for its
multitasking facility.  Its timer is probably going off during the sleep.

Try calling the foreign function inside WITH-INTERRUPTIONS-INHIBITED.  I
haven't tried this, though.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar