« first day (2226 days earlier)      last day (443 days later) » 

1:24 AM
@SilasPoulson Thanks!
 
@Richard Maximum commutes with concatenation: (⌈/A,B)=(⌈/A)⌈⌈/B, and it's really convenient when your algebraic identities always hold, e.g (⌈/A)=(⌈/A,⍬)=(⌈/A)⌈⌈/⍬.
I'm just an APL newbie here, but in the small bits of code I've poked at, empty arrays form an essential part of the base case data structure that everything else operates over.
So, in my limited applications at least, I try hard to avoid conditional code, and empty-array sympathetic primitives is something I absolutely love about (modern?) APL.
Anyway. Hello, APL!
 
 
2 hours later…
3:24 AM
Yes empties are very nice for avoiding conditional logic
 
 
2 hours later…
5:22 AM
@B.Wilson Was always there.
 
LINK is pretty nice, I should've tried it earlier
My only issue with it so far is that for mysterious reasons sometimes when I edit functions after I've created them they lose their formatting
And on disc the source is as typed
 
@essielovett I suppose you cannot consistently repro?
 
No, I'll submit an issue if I can
 
5:39 AM
It might get better by itself with 19.0, when we start preserving source as typed by default.
 
5:57 AM
Updated my interpreter, I'll see if that resolves it. (It's already resolved a bunch of stuff, RIDE was fairly broken on my system previously)
 
6:35 AM
@essielovett Link really is nice, especially the bidirectional sync. That said, if you're using an external editor, you'll almost certainly hit some race conditions that cause changes to get randomly missed and/or the link to stop working.
I've looked into this a bit, but if you find anything, would you mind pinging me on the thread?
 
sure
 
 
1 hour later…
7:39 AM
@B.Wilson We're planning on having a background crawler that should detect things that the file system watcher missed.
 
8:34 AM
Richard did a great job on ⎕R :)
 
8:47 AM
@essielovett Yes. Every once in a while, I pull him aside just to tell him that.
 
 
2 hours later…
11:12 AM
@essielovett I like the variant allowing non-overlapping matches. Whilst you can do that with lookaheads, it's very nice to have it easily accessible. I've not seen that anywhere else.
 
That's only for ⎕S though.
 
 
3 hours later…
1:46 PM
Isn't the variant to enable non-overlapping matches in both ⎕S and ⎕R? Overlapping matches don't really make sense for ⎕R
 
2:15 PM
What's going on with 3=⎕NC'op'⊣op←{∘}?
 
it wants to build a train, just like 3=⎕NC'op'⊣op←+ or equivalently 3=⎕NC'op'⊣+
you'll have to separate out the statements - op←{∘} ⋄ 3=⎕NC'op'
 
Oops. Thanks. But yeah, why is op classified as a function?
 
any {}-enclosed thing that doesn't have ⍺⍺ ⍵⍵, nor ∇∇, will be a function
 
Rather, why isn't it a syntax error?
Entering bare dyadic operators at the top level is a syntax error. Heck +(∘)+ is also a syntax error, as is op←∘.
 
because Dyalog doesn't parse dfns before execution beyond finding the closing brace; even { ]( } isn't a syntax error before it's called
 
2:23 PM
Nifty. Dfns are so lovable.
 
@dzaima and it largely can't - consider {f} - is that a valid dfn? it might be if f is an array, but not if it's a function or operator. And the class of a variable can change over time
 
Well, my original question really is why are bare dyadic operators syntax errors when monadic ones aren't? E.g. op←⍨ does what you expect, but op←∘ is a syntax error.
 
Jan 3, 2021 at 11:35, by Adám
@dzaima That's what happens when design give way to bandages and duct-tape. My colleagues where rather surprised when I presented this:
 
@dzaima Oh boy. This thread is way more of a rabbit hole than I bargained for :P спаси́бо
 
:)
 
3:03 PM
@dzaima Hrm. Okay. So {} pretty much just act like string delimiters at the parsing stage? Would it be terribly off to say that they're weird strings, where free variables at execution time have lexical scope?
 
actually, {}s aren't even (necessarily) parsed ahead-of-time - 2+2 ⋄ { successfully evaluates 2+2 before it realizes that the curly brace is unmatched
@B.Wilson they're more a list of tokens; or, rather, APL code in general is a list tokens before execution, that's nothing special to dfns
 
Ah, right. I recall Adám mentioning that previously. Thanks for nudging my mental models around this stuff in a better direction.
This comment got me:
> The documentation team person currently has 535 open issues...
 
3:22 PM
@B.Wilson Meh, the Chief Architect has 1174 open issues.
Technically speaking, the braces are control structures, basically :Dfn and :EndDfn.
 
3:38 PM
So is there some particular limitation that's causing f←∘ to be an syntax error while f←⍨ isn't?
In dzaima's thread above, it seems like people agree that this is crazy, but if the mechanism is explained, I missed it.
 
@B.Wilson No, at least not that I know of. Especially given that f←{×⎕NC'⍺':⍺(⍺⍺∘⍵⍵)⍵ ⋄ (⍺⍺∘⍵⍵)⍵} works.
 
Jan 3, 2021 at 12:16, by Adám
@dzaima You are lucky, not having customers that (ab)use to stop execution!
 
But that doesn't cause the syntax error. It may be a justification for it, though.
 
Yeah, that just passes the buck. Why did it start like this?
 
there's certainly no reason that an APL couldn't support directly assigning dops - dzaima/APL does
 
3:46 PM
And if that was really the primary issue, I'd not be surprised if bare and ∘∘∘ were just special-cased.
@dzaima Just a manpower + low-demand issue or something, rather than technical hurdles, then?
 
NARS2000 does too.
 
@Adám Different topic, but how familiar are you with J's operator train syntax? Curious about your thoughts if you have any.
 
I'm somewhat familiar. I sometimes want such, but then again, it massively increases the amount of patterns to remember. Look how much hate the forky trains are seeing due to their added complexity. Now multiply that complexity by 40 or so…
 
Hrm... So monadic dfns used dyadicly silently eat their left argument?
 
4:01 PM
Yes.
 
yeah
(my internet connection to pc is absolutely dying for whatever reason)
 
Is there a neater way to do

:If cond
  :Trap 0
     ⍝ dangerous expression
  :Else
    doThis
  :EndTrap
:Else
  doThis
:EndIf
:Else -> :ElseIf cond2
 
@essielovett Not sure if it's better, but {cond: {0:: dangerous ⋄ doThis}⍬ ⋄ cond2: blah ⋄ otherwise} ?
Really, though, if I was reaching for this kind of code, I'd probably want to start zooming out to find some architecture that permits a more direct/simple/APLy solution.
@Adám @dzaima Hrm. I kind of feel silly for just discovering this. Is this a design decisions or something? Seems straightforward enough to detect monadic dfns and throw an error.
Though there might be some exciting abuse that I'm not seeing :)
 
4:22 PM
@B.Wilson Sometimes logic is inevitable :) It would be nice if APL had more lispy constructs thoguh
 
4:44 PM
@B.Wilson Discovering what?
 
@Adám That dfns can always be called dyadically and simply throw away the left operand if doesn't appear in the definition.
 
@B.Wilson Why error though when it could be useful? If you want an error at run time, it is trivial to detect a missing .
 
@Adám Same could be said for tradfns. To be clear, though, I'm not disagreeing with the design, just mildly surprised, and now wondering about potential uses.
 
@B.Wilson What do you mean about tradfns?
Note that dfns predate and so it was common to write {⍺} and {⍵} which would fail if it refused a left argument.
 
5:01 PM
@Adám It's not that important, really. I'd be more interested in example cases where one might want to eat left arguments, instead of simply not writing the left argument.
Off the top of my head, I can only think of contrived examples using Execute.
 
trains, as a J cap [: and BQN nothing ·
also, you may want indirect references to , something that occasionally is needed for ⍺⍺ in dops and requires a no-op ⋄ ⍺⍺
also, it gives dfns ⍤⊢ or ⍤⊣ for free.
 
In the docs Programming Reference Guide / Introduction / Operators, should the list at the beginning really have "an array or function to the right of a monadic operator." as item 5?
@Adám Beautiful. Mentioning trains made it click for me. Cheers.
 
@B.Wilson i think so, yes
 
Thank you for entertaining all my silly questions yet again.
I shall retire for the night.
 
you should work on qa for us!
 
5:21 PM
@Adám is there any particular reason tryapl blocks setting []DCT but not []ct ?
 
@SilasPoulson looks like i forgot to enable it when i allowed ⎕fr
@SilasPoulson allowed now
 
Thanks, thought might be due to you using dct within safe execute
 
Then it'll be localised
 
6:11 PM
Is :AndIf short-circuiting
 
yes
 
thanks
Weird that you can't do

:If
:AndIf
:OrIf
:AndIf
 
Why? It'd need a precedence to make sense.
 
I suppose it can't know where you want to put the conditional statement, after the the first or second AndIf
 
I don't follow.
 
6:21 PM
:If
:AndIf
⍝ statement

vs

:If
:AndIf
:OrIf
:AndIf
⍝ statement
How would write
             :If 'Linux'≡(⊃# ⎕WG'APLVersion')~'-64'
             :AndIf ~0∊⍴⎕CMD'which git'
             :OrIf 'Windows'≡(⊃# ⎕WG'APLVersion')~'-64'
             :AndIf ~0∊⍴⎕CMD'where git'
@Adám Depends what you mean. It wouldn't need a non RTL ordering
 
:If ~0∊⎕CMD' git',⍨⊃'which' 'where'⌽⍨'Windows'≡'-64'~⍨⊃# ⎕WG'APLVersion'
 
aha
fair enough :)
 

« first day (2226 days earlier)      last day (443 days later) »