> Begin forwarded message:
> 
> From: Louis de Forcrand <ol...@bluewin.ch>
> Subject: Re: [Bug-apl] ^C ATTENTION
> Date: 10 Oct 2015 02:03:22 CEST
> To: Juergen Sauermann <juergen.sauerm...@t-online.de>
> 
> Jürgen,
> 
> Sorry for the delay.
> 
> If I declare a LIFE function for finding the next generation in the game of 
> life:
> 
>     ∇
> [0]   λ←LIFE ⍵
> [1]   λ←⊃∨/1 ⍵∧3 4=+/+⌿¯1 0 1∘.⊖¯1 0 1⌽¨⊂⍵
>     ∇
> 
> and then call it on a matrix M:
> 
> LIFE ⍣≡ M
> 
> it should find the final state of M (if it exists!) after which it won’t 
> change anymore when fed into LIFE (right?).
> The problem is when it never reaches a “static” state, then it won’t stop 
> without intervention. This is where I’ve
> tried using ^C (pressing once, and pressing twice in a row), and neither 
> seemed to halt the process.
> I imagine the primitive to modify is ⍣?
> 
> PS: Gmane seems quite slow these days. Or is it on my side?
> 
> Best of luck,
> ⊣ Louis
> 
>> On 03 Oct 2015, at 12:21, Juergen Sauermann <juergen.sauerm...@t-online.de 
>> <mailto:juergen.sauerm...@t-online.de>> wrote:
>> 
>> Hi Louis,
>> 
>> could you  provide a concrete example?
>> 
>> Some remarks on ^C in GNU APL. There are two levels: a single ^C (called 
>> ATTENTION) and two ^C
>> within one second (called INTERRUPT).
>> 
>> ATTENTION is primarily checked by the runtime parser at the end of the line. 
>> This is to make
>> →N work nicely so that the interrupted line is finished before execution is 
>> stopped.
>> 
>> INTERRUPT is currently checked in printouts so that the display of long 
>> values can be aborted.
>> In general INTERUPT has a potential of leaving behind an inconsistent 
>> workspace and, if
>> checked to often, of performance impact. Therefore an example would be handy 
>> so that I
>> can see which (and where) an operation could be stopped in a reasonable way.
>> 
>> /// Jürgen
>> 
>> 
>> On 10/01/2015 10:26 PM, Louis de Forcrand wrote:
>>> I've noticed that CONTROL-C works quite well with 
>>> multiple-line functions, but not nearly as well with 
>>> programs that use ⍣ for example (one-liners).
>>> APL just seems to freeze, and with a little luck it 
>>> stops and prints ATTENTION, while at other times
>>> it just doesn't seem to stop at all.
>> 
> 

Reply via email to