[Bug-apl] GNU APL on Mac

2014-03-21 Thread Peter Teeson
Hi folks: Attached is a small 12 page guide to help installing GNU APL on a Macintosh. Please review it and help to make it better by letting me know how. Thanks and respect…. Peter

Re: [Bug-apl] Segfault in assign_cellrefs

2014-03-21 Thread Juergen Sauermann
Hi, thanks, fixed in SVN 168. Now LENGTH ERROR is thrown instead. /// Jürgen On 03/21/2014 12:27 PM, Elias Mårtenson wrote: Sorry, it's not a segfault, it's an assertion error. I do, however, get on if I do the following: * X←1 2 2 1 2 2 2 1 2 2 2 2 1 2 2 2 2 2 1 3* * V←X ◊ (V/V)←

Re: [Bug-apl] Scan operator has strange behaviour

2014-03-21 Thread Elias Mårtenson
All right. I think I'm starting to understand the reasoning that went into the spec as written. Thank you for giving me the necessary pointers. Now, that leads me inevitably to the obvious followup question: Is there a way to run "my" version of this operator? Regards, Elias On 21 March 2014 21

Re: [Bug-apl] How to zero every other 1 in a sequence

2014-03-21 Thread Juergen Sauermann
Hi, extending Kacper's idea, you could also try: (X/X)←∈(⍴¨X⊂X)⍴¨⊂1 0 It is a bit longer but may be faster because it avoids \. /// Jürgen On 03/20/2014 08:08 PM, Kacper Gutowski wrote: On 2014-03-21 00:23:41, Elias Mårtenson wrote: One of my experiments was very short, and tantalisi

Re: [Bug-apl] Scan operator has strange behaviour

2014-03-21 Thread Jay Foad
On 21 March 2014 13:39, Elias Mårtenson wrote: > On 21 March 2014 19:55, Jay Foad wrote: >> Associativity matters because the last item of the result is 3>1>2, >> which means 3>(1>2). But your explanation would lead to (3>1)>2 as the >> last item. > > > You are right, but that can be addressed by

Re: [Bug-apl] Scan operator has strange behaviour

2014-03-21 Thread Elias Mårtenson
On 21 March 2014 19:55, Jay Foad wrote: > >\3 1 2 > 3 1 1 > > I think your explanation of scan would lead to the result 3 1 0. > > Associativity matters because the last item of the result is 3>1>2, > which means 3>(1>2). But your explanation would lead to (3>1)>2 as the > last item. > Yo

Re: [Bug-apl] Scan operator has strange behaviour

2014-03-21 Thread Jay Foad
On 21 March 2014 11:48, Elias Mårtenson wrote: > OK, I understand your explanation, and I have to say that the spec seems to > be a bit over-specified here. My (simplistic?) understanding of the > backslash operator was that it simply applied the given function on the > first two elements, add the

Re: [Bug-apl] Scan operator has strange behaviour

2014-03-21 Thread Elias Mårtenson
On 19 March 2014 22:25, Kacper Gutowski wrote: > On 2014-03-19 21:22:04, Elias Mårtenson wrote: > > This can't possibly be correct? > > But it is! > Let me just quote relevant excerpt of ISO 13751: > OK, I understand your explanation, and I have to say that the spec seems to be a bit over-specif

Re: [Bug-apl] Scan operator has strange behaviour

2014-03-21 Thread Elias Mårtenson
On 20 March 2014 11:31, Kacper Gutowski wrote: > On 2014-03-19 23:16:32, Elias Mårtenson wrote: > > I see. So the way I see it, I should actually use 2 OP/X instead? I > seems to > > actually do what I expected. > > It if does what you need then sure, but it's a very different thing > than scan:

Re: [Bug-apl] How to zero every other 1 in a sequence

2014-03-21 Thread Elias Mårtenson
Wow. That really works. Pretty neat! (it does cause the interpreter to crash if you feed it unexpected (non-boolean) data though, :-) ) Regards, Elias On 21 March 2014 03:08, Kacper Gutowski wrote: > On 2014-03-21 00:23:41, Elias Mårtenson wrote: > > One of my experiments was very short, and

Re: [Bug-apl] Segfault in assign_cellrefs

2014-03-21 Thread Elias Mårtenson
Sorry, it's not a segfault, it's an assertion error. I do, however, get on if I do the following: * X←1 2 2 1 2 2 2 1 2 2 2 2 1 2 2 2 2 2 1 3* * V←X ◊ (V/V)←∊≠\¨V⊂V* SEGMENTATION FAULT -- Sta

[Bug-apl] Segfault in assign_cellrefs

2014-03-21 Thread Elias Mårtenson
I was testing Kacpers solution to my problem in another thread, and I got a crash. Easily reproduced by typing in the following two commands: * V←1 2 2 1 2 2 2 1 2 2 2 2 1 2 2 2 2 2 1 3* * (V/V)←∊≠\¨V⊂V* The result is: ===