Re: [Bug-apl] Non-bug: Help comparing solutions

2014-03-06 Thread Daniel H. Leidisch
Hello! First, thank you for the nice explanation in my absence. I couldn't have done it better. Let me just explain where I see things a little differently. Tobia Conforto writes: > Even the classic example of a fork (+/÷≡) is harder to read than its > functional version {(+/⍵)÷≡⍵} and it goes

Re: [Bug-apl] Non-bug: Help comparing solutions

2014-03-06 Thread Jay Foad
>> Even the classic example of a fork (+/÷≡) is harder to read than its >> functional version {(+/⍵)÷≡⍵} and it goes downhill from there with longer >> trains. But maybe it's just me being unfamiliar with the syntax. > > > Did you intend to use ⍴ instead of ≡ there? I can't see how {(+/⍵)÷≡⍵} could

Re: [Bug-apl] Non-bug: Help comparing solutions

2014-03-05 Thread Elias Mårtenson
On 6 March 2014 08:01, Tobia Conforto wrote: > On 5 March 2014 19:12, Daniel H. Leidisch wrote: > > > Jokes aside, while I'm all in favor of such extensions for tacit > > programming (composition, currying, hooks/forks/trains, as in NARS2000, > > NGN, newer versions of Dyalog, J), I think proper

Re: [Bug-apl] Non-bug: Help comparing solutions

2014-03-05 Thread Tobia Conforto
On 5 March 2014 19:12, Daniel H. Leidisch wrote: > Jokes aside, while I'm all in favor of such extensions for tacit > programming (composition, currying, hooks/forks/trains, as in NARS2000, > NGN, newer versions of Dyalog, J), I think proper lambdas are a much > more important and fundamental iss

Re: [Bug-apl] Non-bug: Help comparing solutions

2014-03-05 Thread Elias Mårtenson
On 5 March 2014 19:12, Daniel H. Leidisch wrote: I don't think that the support for tacit programming in modern APL > implementations counts as "pure SO APL". :) Then again, I'm not sure > what "SO" means, assuming the "S" stands for standard. > Oh, you don't know what SO means? It's the interna

Re: [Bug-apl] Non-bug: Help comparing solutions

2014-03-05 Thread Daniel H. Leidisch
Hello! Jay Foad writes: > I don't know how to do it in GNU APL. In Dyalog you can play silly > games with ∘ (function composition) and ⍨, e.g.: I don't think that the support for tacit programming in modern APL implementations counts as "pure SO APL". :) Then again, I'm not sure what "SO" means

Re: [Bug-apl] Non-bug: Help comparing solutions

2014-03-05 Thread Jay Foad
> Out of curiosity, do you have a good solution without the use of a lambda? > "pure SO APL" if you like. I don't know how to do it in GNU APL. In Dyalog you can play silly games with ∘ (function composition) and ⍨, e.g.: ⎕ML←1 ⍝ ↑ is mix and ↓ is split ↑(⌷⍨∘(⊂∘⍋))⍨¨↓X ⍝ N.B. ⍵[⍋⍵] ←→

Re: [Bug-apl] Non-bug: Help comparing solutions

2014-03-05 Thread Elias Mårtenson
On 5 March 2014 18:18, Jay Foad wrote: > > {⍵[⍋⍵]}⍤1 X > Nice. I feel stupid for not thinking of that. To me, it's clear that without the lambda functions, a lot of APL becomes unnecessarily cumbersome. Out of curiosity, do you have a good solution without the use of a lambda? "pure SO A

Re: [Bug-apl] Non-bug: Help comparing solutions

2014-03-05 Thread Jay Foad
On 5 March 2014 05:25, Elias Mårtenson wrote: > Referencing yesterday's discussion about ⍤, I realised that I can use it to > get the indexes like this: > > X > ┌→─┐ > ↓xz│ > │zx│ > │ab│ > │ba│ > └──┘ > ⍋⍤1 X > ┌→──┐ > ↓1 2│ > │2 1│ > │1 2│ > │2 1│ > └───┘ > > > However, I can't figure

Re: [Bug-apl] Non-bug: Help comparing solutions

2014-03-04 Thread Elias Mårtenson
Referencing yesterday's discussion about ⍤, I realised that I can use it to get the indexes like this: *X* ┌→─┐ ↓xz│ │zx│ │ab│ │ba│ └──┘ *⍋⍤1 X* ┌→──┐ ↓1 2│ │2 1│ │1 2│ │2 1│ └───┘ However, I can't figure out a good way to apply it to the original array. Really, what is th ebest solu