Talk:Scalar function: Difference between revisions

Jump to navigation Jump to search
(2 intermediate revisions by 2 users not shown)
Line 6: Line 6:
* As far as I'm aware, no dialect implements Depth as used (J has "Level At", which has some similarities but doesn't work this way). It's okay to have speculative notes but this should be indicated.
* As far as I'm aware, no dialect implements Depth as used (J has "Level At", which has some similarities but doesn't work this way). It's okay to have speculative notes but this should be indicated.
::I've added "works in". If I understand correctly, J's L: was recently redefined to work like this.
::I've added "works in". If I understand correctly, J's L: was recently redefined to work like this.
:::It doesn't work in dzaima/APL, either on tio or my local copy (a newer version). dzaima doesn't have Depth or right operand binding. J's [https://code.jsoftware.com/wiki/Vocabulary/lcapco Level At] can make a function apply to simple arrays but not simple scalars, and I can't find any evidence of it being recently redefined (please don't put hearsay on the wiki!). Also J doesn't have pervasive scalar functions. The way to make a function act like a scalar function in J is just to apply it with rank 0. That's one reason it would make sense to move this to a different article on pervasion.
:::It doesn't work in dzaima/APL, either on tio or my local copy (a newer version). dzaima doesn't have Depth or right operand binding. J's [https://code.jsoftware.com/wiki/Vocabulary/lcapco Level At] can make a function apply to simple arrays but not simple scalars, and I can't find any evidence of it being recently redefined (please don't put hearsay on the wiki!). Also J doesn't have pervasive scalar functions. The way to make a function act like a scalar function in J is just to apply it with rank 0. That's one reason it would make sense to move this to a different article on pervasion. --[[User:Marshall|Marshall]] ([[User talk:Marshall|talk]]) 08:05, 1 April 2020 (UTC)
::::I just tried the latest version of dzaima/APL, and while you're right that it doesn't support right operand binding, Depth works fine (it was added a month ago):
::::<source lang=apl>> NonScalarFn←{⍵:'t' ⋄ 'f'}
{⍵ : 't' ⋄ 'f'}
> (NonScalarFn⍥0) (0 1) 1 (⊂1 0)
┌──┬─┬───┐
│ff│f│⊂ff│
└──┴─┴───┘</source>Ah, so J needs <source lang=j inline>"0 L:0</source> to behave like <source lang=apl inline>⍥0</source> in APL.
:::::Looks like dzaima only has monadic Depth. I was trying it with a dyadic function. I've added a note. --[[User:Marshall|Marshall]] ([[User talk:Marshall|talk]]) 09:03, 1 April 2020 (UTC)
* The section is placed right at the top, before the very useful list of scalar functions. It's a more advanced topic, and less often used than the rest of the information (true, experienced APLers know which functions are scalar, but the APL wiki shouldn't assume that level of experience), in addition to being only tangentially related to the topic. It should be placed at the end of the article, and would probably make more sense in a dedicated page on pervasive application.
* The section is placed right at the top, before the very useful list of scalar functions. It's a more advanced topic, and less often used than the rest of the information (true, experienced APLers know which functions are scalar, but the APL wiki shouldn't assume that level of experience), in addition to being only tangentially related to the topic. It should be placed at the end of the article, and would probably make more sense in a dedicated page on pervasive application.
::Moved down.
::Moved down.
* It only applies to nested APLs, and this isn't noted.
* It only applies to nested APLs, and this isn't noted.
::Added.
::Added.

Navigation menu