[Bug-apl] Bug when assigning variable to result of function call on self

2014-02-19 Thread Elias Mårtenson
As I mentioned previously, I've been playing around with Game of Life, and I wrote my own. When I try to put this code in a loop, I get array corruption, and subsequently a crash (as I mentioned earlier) when I try to )SAVE the workspace. Here is the code. I start by creating a 5×5 field and initi

Re: [Bug-apl] Bug when assigning variable to result of function call on self

2014-02-19 Thread Elias Mårtenson
Oops, I realise that I forgot to include the definition of disploop. Here it is: ∇N disploop S →(N=0)/0 next: S←next S disp ← '.#'[1+S] ⎕DL ÷4 N←N-1 →next ∇ Regards, Elias On 20 February 2014 01:01, Elias Mårtenson wrote: > As I mentioned previously, I've been playing around with Game of Lif

[Bug-apl] Calling a function and assigning result corrupts result

2014-02-19 Thread Elias Mårtenson
This one is hard to explain, so I was about to attach a workspace that reproduces the error. However... As I tried to do a )SAVE to save the workspace, the interpreter crashed and of course I was editing functions directly in the workspace so they weren't saved. I'll rewrite it so I can show you.

Re: [Bug-apl] Lambda functions are not loaded from a workspace

2014-02-19 Thread Juergen Sauermann
Hi, thanks, fixed in SVN 134. /// Jürgen On 02/19/2014 08:04 AM, Elias Mårtenson wrote: When loading a workspace that was previously saved using the )SAVE command, any functions defined using name←{...} are not loaded. The functions are there, as they can be seen in the XML file, but they

Re: [Bug-apl] Short pause of program

2014-02-19 Thread Elias Mårtenson
Oh, I missed that one. Actually, I've been rebuilding the thing without watching the video. :-) Regards, Elias On 19 February 2014 22:17, Jay Foad wrote: > On 19 February 2014 14:05, Elias Mårtenson wrote: > > I've reached the point where I have been able to reproduce the famous > Dyalog > >

[Bug-apl] Duplicate on laminate with axis

2014-02-19 Thread Daniel H. Leidisch
Hello! Using duplicate on laminate with axis results in a syntax error: ,[0.5]⍨'foo' SYNTAX ERROR ,[0.5]⍨'foo' ^ ^ Unless I'm mistaken, it should yield the same result as 'foo',[0.5]'foo'. (Works in NARS2000 and Dyalog.) I'm at r133. Regards, Daniel

Re: [Bug-apl] Short pause of program

2014-02-19 Thread Jay Foad
On 19 February 2014 14:05, Elias Mårtenson wrote: > I've reached the point where I have been able to reproduce the famous Dyalog > video where a guy builds a game of life and lets it animate by updating a > watched variable, with one exception: > > I need a way to sleep for a short while (less tha

[Bug-apl] Short pause of program

2014-02-19 Thread Elias Mårtenson
I've reached the point where I have been able to reproduce the famous Dyalog video where a guy builds a game of life and lets it animate by updating a watched variable, with one exception: I need a way to sleep for a short while (less than a second). Is there any facility in GNU APL that would let

Re: [Bug-apl] How to get SEV_ERASED event?

2014-02-19 Thread Elias Mårtenson
Thank you. Now it all works correctly, and the window is closed automatically when the symbol is erased. Regards, Elias On 19 February 2014 21:09, Juergen Sauermann wrote: > Hi, > > A←1 2 3 > ⎕EX 'A' > > /// Jürgen > > > > On 02/19/2014 10:15 AM, Elias Mårtenson wrote: > >> I have a hard time t

Re: [Bug-apl] How to get SEV_ERASED event?

2014-02-19 Thread Juergen Sauermann
Hi, A←1 2 3 ⎕EX 'A' /// Jürgen On 02/19/2014 10:15 AM, Elias Mårtenson wrote: I have a hard time testing the Emacs mode's treatment of SEV_ERASE, as I can't seem to get such event. Nothing I tried (including calling )ERASE on it) causes this to happen. When is this event sent? Regards, El

Re: [Bug-apl] Novice question regarding APL

2014-02-19 Thread Juergen Sauermann
Hi Thomas, you can use ⎕INP like this: TEXT←⎕INP 'END-OF-TEXT' ⍝ the subsequent lines until 'END-OF-TEXT' 1 1 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 0 0 0 1 0 0 0 0 0 0 1 0 'END-OF-TEXT' MATRIX←⊃⍎¨TEXT /// Jürgen On 02/19/2014 07:28 AM, baruc...@gmx.com wrote: Hi Jürgen, I can now so

[Bug-apl] How to get SEV_ERASED event?

2014-02-19 Thread Elias Mårtenson
I have a hard time testing the Emacs mode's treatment of SEV_ERASE, as I can't seem to get such event. Nothing I tried (including calling )ERASE on it) causes this to happen. When is this event sent? Regards, Elias