Re: [Bug-apl] Extension proposal: ⍵⍵ to access outer lambda

2014-07-20 Thread Elias Mårtenson
Point taken, and I have no intention to fight for this one right now. :-) Just to answer your question: ⍵⍵⍵ would refer to the outer-outer lambda, which ⍵⍵ would raise an error. The same goes for ⍶, ⍹ and χ. I'd say it's hard to argue for any other variant. That said, the workaround by assigning

Re: [Bug-apl] Extension proposal: ⍵⍵ to access outer lambda

2014-07-20 Thread Juergen Sauermann
Hi, maybe not that bad but there are complications. First of all: non-standard. Secondly some users have already indicated that we would also need ⍺⍺⍺/⍵⍵⍵, /, and so forth. But what if some outer lambdas dont have an ⍺? would eg. ⍺⍺⍺ be undefined then or would become ⍺⍺⍺ instead

Re: [Bug-apl] Extension proposal: ⍵⍵ to access outer lambda

2014-07-10 Thread Elias Mårtenson
On 10 July 2014 08:03, Kacper Gutowski wrote: I think the main problem isn't the length of variable's name but the > fact that regular variable is neither lexically scoped nor localized. > This is exactly my concern. > Using ⍵⍵ might be confusing for Dyalog users where ⍺⍺ and ⍵⍵ are used > as

Re: [Bug-apl] Extension proposal: ⍵⍵ to access outer lambda

2014-07-10 Thread Elias Mårtenson
I know, but it's much more ugly than my proposal, don't you think? Regards, Elias On 9 July 2014 22:06, Juergen Sauermann wrote: > Hi Elias, > > that would be very easy to implement: > > > > * { ⍵ + { ⍵ × OUTER_OMEGA } 10 ⊣ OUTER_OMEGA←⍵ } 100 1100 * > /// Jürgen > > > > On 07/09/2014 10

Re: [Bug-apl] Extension proposal: ⍵⍵ to access outer lambda

2014-07-10 Thread Jay Foad
Note that this would conflict with the use of ⍺⍺ and ⍵⍵ in NARS2000 and Dyalog, where they refer to the operands of a defined operator. With three levels of nested lambdas would you also want to be able to use ⍵⍵⍵ in the innermost one, to refer to the value of ⍵ in the outermost one, and so on? J

Re: [Bug-apl] Extension proposal: ⍵⍵ to access outer lambda

2014-07-10 Thread Elias Mårtenson
On 9 July 2014 18:08, Jay Foad wrote: Note that this would conflict with the use of ⍺⍺ and ⍵⍵ in NARS2000 > and Dyalog, where they refer to the operands of a defined operator. > Yes, but those are called ⍹ and ⍶ on GNU APL, which makes more sense. > With three levels of nested lambdas would yo

Re: [Bug-apl] Extension proposal: ⍵⍵ to access outer lambda

2014-07-09 Thread Elias Mårtenson
I know, and that what I ended up doing. No having to do that at all is, however, nicer of course. But, I agree it's not a *necessary* feature. Regards, Elias On 9 July 2014 22:14, Juergen Sauermann wrote: > Hi, > > actually - no. I called it OUTER_OMEGA to make clear what it does. > Maybe yo

Re: [Bug-apl] Extension proposal: ⍵⍵ to access outer lambda

2014-07-09 Thread Kacper Gutowski
On 2014-07-09 16:14:32, Juergen Sauermann wrote: > Hi, > > actually - no. I called it OUTER_OMEGA to make clear what it does. > Maybe you like > >   { ⍵ + {⍵×WW} 10 ⊣ WW←⍵ } 100 > 1100 > > imore? I think the main problem isn't the length of variable's name but the fact that regular variable

Re: [Bug-apl] Extension proposal: ⍵⍵ to access outer lambda

2014-07-09 Thread Juergen Sauermann
Hi, actually - no. I called it OUTER_OMEGA to make clear what it does. Maybe you like * { ⍵ + {⍵×WW} 10 ⊣ WW←⍵ } 100 1100 * imore? On 07/09/2014 04:08 PM, Elias Mårtenson wrote: I know, but it's much more ugly than my proposal, don't you think? Regards, Elias On 9 July 2014 22:06, Jue

Re: [Bug-apl] Extension proposal: ⍵⍵ to access outer lambda

2014-07-09 Thread Juergen Sauermann
Hi Elias, that would be very easy to implement: * { ⍵ + { ⍵ × OUTER_OMEGA } 10 ⊣ OUTER_OMEGA←⍵ } 100 1100 * /// Jürgen On 07/09/2014 10:53 AM, Elias Mårtenson wrote: It would be nice to be able to access the values of ⍵ and ⍺ (and I suppose χ) from the outer lambda from a nested lambda.

[Bug-apl] Extension proposal: ⍵⍵ to access outer lambda

2014-07-09 Thread Elias Mårtenson
It would be nice to be able to access the values of ⍵ and ⍺ (and I suppose χ) from the outer lambda from a nested lambda. I.e, I'd like to following to return the value 1100: * { ⍵ + {⍵×⍵⍵} 10 } 100* In other words, the ⍵⍵ in the inner lambda would refer to the value 100 (i.e. the value of