[Openmcl-devel] Problem with the (:y nn) command

Ron Garret ron at flownet.com
Thu Apr 29 08:56:59 PDT 2021


[Re-adding the group]

Oh, sorry, that’s just a synonym for LAMBDA.  It’s part of my standard library.

https://github.com/rongarret/ergolib

FN is easier to type and more easily parseable by newbies.  But if you don’t feel like using that just replace FN with LAMBDA.

rg

On Apr 29, 2021, at 8:42 AM, barthes <barthes at utc.fr> wrote:

> Thanks Ron for the macro and the explanations.
> 
> Silly question: What is fn in your macro (2 lines before the end)?
> 
> Best
> J.Paul
> 
> 
>> Début du message réexpédié :
>> 
>> De: Ron Garret <ron at flownet.com>
>> Objet: Rép : [Openmcl-devel] Problem with the (:y nn) command
>> Date: 29 avril 2021 à 17:13:41 UTC+2
>> À: barthes <barthes at utc.fr>
>> Cc: Openmcl-devel at clozure.com
>> 
>> If you are spawning processes in the GUI it is better to use gui:background-process-run-function rather than the regular process-run-function.
>> 
>> Here is a macro that I use to spawn processes.  It automatically dispatches to the correct function depending on the environment it’s running in, and also has a workaround for a small bug in the gui code:
>> 
>> (defmacro spawn (&rest body)
>>  (let ((name (mcond (stringp (car body)) (pop body)
>>                     (eq (car body) :name) (progn (pop body) (pop body))
>>                     t '(symbol-name (gensym "SPAWNED-TASK"))))
>>        (namevar (gensym "NAME"))
>>        (prf (or #+EASYGUI 'gui:background-process-run-function 'process-run-function)))
>>    `(let ((,namevar ,name))
>>       (prog1
>>           (,prf (list :name (princ-to-string ,namevar)) #+LISPWORKS nil (fn () , at body))
>>         #+EASYGUI (sleep 0.1) ; Workaround for race condition in gui:background-process-run-function
>>         ))))
>> 
>> On Apr 29, 2021, at 4:40 AM, barthes <barthes at utc.fr> wrote:
>> 
>>> Hi
>>> 
>>> I am trying to reproduce the example found in the Clozure documentation:
>>> 
>>> <Capture d’écran 2021-04-29 à 13.30.35.png>
>>> 
>>> 
>>> When executing this line a Clozure window appears:
>>> 
>>> <Capture d’écran 2021-04-29 à 13.30.03.png>
>>> 
>>> but I have no way of regaining control, i.e. nothing happens.
>>> 
>>> What should I do?
>>> 
>>> Is there a way to get rid of this window?
>>> 
>>> The MacOS on my machine is Mojave 10.14.6
>>> 
>>> 
>>> Thanks
>>> 
>>> J.Paul Barthès
>>> _______________________________________________
>>> Openmcl-devel mailing list
>>> Openmcl-devel at clozure.com
>>> https://antispam.utc.fr/proxy/2/YmFydGhlc0B1dGMuZnI%3D/lists.clozure.com/mailman/listinfo/openmcl-devel
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20210429/91913d04/attachment.htm>


More information about the Openmcl-devel mailing list