« first day (2203 days earlier)      last day (437 days later) » 

5:17 AM
@Adám Cheers. Is this issue tracker publicly accessible? I'm not finding anything relevant in Dyalog's GitHub organization.
 
@B.Wilson No, internal, but I'll update you here when there's a development.
 
Roger.
 
6:07 AM
⎕←⌈/⍬
Hrm. is the bot asleep?
 
⎕←'test'
Strange, it works here
 
Hrm. TryAPL displays as away here but present in that other chat.
 
6:22 AM
@TryAPL ⎕←'Wake up. You are being watched.'
 
6:36 AM
Negative indices into an array. Since Take and Drop both allow negative "indices", it seems natural that Index, Pick, and Bracket Indexing would allow the same.
Has this been explicitly rejected? Or is it an ongoing discussion?
 
7:00 AM
Hrm. So the prototype for 0↑A seems to come from ⊃A. E.g. (0⍴⊂0 0 0)≡0↑(1 2 3) (1 2).
I guess that's reasonable. There's really no algebraically sound answer for what a prototypical element of a nested array is.
 
7:14 AM
@B.Wilson Many times. What happens if ⎕IO←0?
@B.Wilson It isn't so much that, as what happens with F¨empty. We need some prototypical data to derive the corresponding result. E.g. {2↑¨2 2⍴⍵}¨0⍴⊂'a'1'b'
Surely, the result must be a 2-by-2 matrix of 2-element vectors, all but the top-right one being character, with that one being numeric.
 
@Adám I'd intuit that negative indices are unaffected by ⎕IO, since we want (¯1⌷A)≡¯1↑A, but I see your point.
 
7:32 AM
I'd make correcting for ⎕IO so much more involved.
 
@Adám Sure, but you could just as well derive that prototypical data from any other element of A.
 
@B.Wilson Let me guess, you actually just want the last element?
@B.Wilson What do you mean by "any other". There aren't any other, let alone any at all.
 
The prototype of 0↑(1 2 3)'abc' is numeric, not character. Just observing how chooses to generate a prototype.
 
Think of it as a progressive peeling away trailing elements, since length and shape goes from the front. The last element to disappear is the first one.
 
I definitely agree that it's a natural-feeling choice! However, AFAICT, there's no mathematical/mechanical reason to choose the first. It seems just as "mathematically consistent" to make (0⍴⊂' ')≡0↑(1 2 3)'abc'.
 
7:39 AM
I guess. Indeed, for "over-taking", the last element might make more sense,: 3↑1 'a'1 'a' ' '. But as would cycling: 4↑1 'a'1 'a' 0 ' '.
 
Exactly. The peeling analogy implicitly chooses a sequence of left-arguments. Certainly a common choice, but if there were a problem domain where you only cared about even-indexed elements, then the 2nd element might be a more natural prototype base in that case.
 
Even worse/more compelling:
      4↑3 2⍴'Name' 'Age' 'Ann' 31 'Bob' 27
┌────┬────┐
│Name│Age │
├────┼────┤
│Ann │31  │
├────┼────┤
│Bob │27  │
├────┼────┤
│    │    │
└────┴────┘
Surely, that bottom right corner should say 0
 
Ah! Yes! Massively more compelling.
 
 
1 hour later…
9:11 AM
Function definition contents in aplf file might be different from running definition in session (shown by ⎕VR), which might be different than the contents in the Editor, which need to be FIXed.
 
@B.Wilson What are you trying to say?
I mean, yes, it is true, but so?
 
Just me talking out loud, mostly, as I explore.
 
:-)
⎕VR (although you should get used to using ⎕ATX) should mostly correspond to what you see in the editor.
 
I can shut up if it's too spammy. Apologies.
↑Wifi temporarily cut out just before I sent that.
 
No, it is fine. I was just wondering if you were complaining about or asking something.
 
9:20 AM
@Adám Yeah as long as you've FIXed editor changes, they should be the same, right?
Cool! ⎕ATX looks really nice. I love how much tooling Dyalog has available for introspection.
 
@B.Wilson ⎕VR includes line numbers and s, and normalises formatting.
 
Yeah. It looks like 6*⎕ATX gives a vector of lines, even including comment lines and stuff in an apl* file external to the actual definition.
 
Compare:
      2⎕FIX'    foo ← {' '1.0e3 × ⍵  ⍵  ⍵}'
      62⎕ATX'foo'
┌───────────┬────────────────┐
│    foo ← {│1.0e3 × ⍵  ⍵  ⍵}│
└───────────┴────────────────┘
      ⎕NR'foo'
┌──────┬────────────────┐
│ foo←{│     1000×⍵ ⍵ ⍵}│
└──────┴────────────────┘
      ⎕VR'foo'
     ∇ foo←{
[1]        1000×⍵ ⍵ ⍵}
     ∇
 
Ah! I see what you mean. Is the extent of normalization limited to constant folding and whitespace munging?
 
Those are the only ones I can think of.
 
9:35 AM
Cheers.
 
9:57 AM
@B.Wilson Ooh, here's another one; important too:
      62⎕ATX'foo'
┌────────────────────┐
│foo←{⍵ ⍵} ⍝ COMMENT!│
└────────────────────┘
      ⎕NR'foo'
┌──────────┐
│ foo←{⍵ ⍵}│
└──────────┘
 
10:27 AM
Ah, okay. So Fixing a definition actually preserves "external" comment data. Looks like "internal" comments remain in ⎕NR as well.
 
right
 
11:03 AM
So does the code of a function get stored in some abstraction representation when fixing it? Or does the interpreter go though a full lex and parse on every execution?
Given the existence of ⎕NR normalization, I'd guess the former. Mainly I'm wondering what exactly "interpreter overhead" does and doesn't involve on each function call.
 
11:31 AM
@B.Wilson tokens
 
 
2 hours later…
1:13 PM
Once upon a time I wrote a nifty little snippet that inserted dashes into a string.
Say I have
a←'abcdefghij'
and want 'a-bcd-efg-ij'
That is: insert a dash at index 2, 6 and 10.
The row I've forgotten was something like this:
('---',a)[2,6,10,⍳⍴a]

Any ideas?
 
1:28 PM
not sure how you'd do that with bracket indexing but '-'@2 6 10 seems to work
⎕←'-'@2 6 10⊢a←'abcdefghij'
 
That replaces rather than inserts. And I'm sure I didn't user @ or tacks since it was on APL2.
 
@mappo Missing
      ('---',a)[⍋2,6,10,⍳⍴a]
a-bcde-fghi-j
 
YES, that's it! Thank you
Now, wasn't that nifty!
 
although, doesn't that require you to know how many dashes you want?
 
How can you not know if you have the indices where you want to put them?
 
1:37 PM
@SilasPoulson: correct! I think I used it to insert dashes into a random string to make a guid.
 
true. I was thinking about the more general case where you want to replace certain characters with a dash - say the vowels. Although you could count then and replicate the fill character
 
it was never a stand-alone function, just a line in a larger one
 
right, so you'd never need that. Just seemed potentially dangerous
 
1:59 PM
@Adám So a token list with folded constants and whatnot, as opposed to coalescing into an execution tree. Does this have to do with the fact that we don't know what kind of thing a name references until execution time, e.g. f←{2∘×g⍵} ⋄ g←⍣¯1 ⋄ f 2 ⋄ g←⊢ ⋄ f 2?
 
2:17 PM
@B.Wilson Yes, but not just names. Try executing 3(⍎'+4'[?2])5 a bunch of times!
 
what do you mean by folded constants?
 
2:29 PM
@Adám Execute. Yikes! Need to execute the code just to know how to parse the darn thing.
Though there's certainly some subset that can be parsed ahead of time, right? Just primitives, minus Execute, and constant literals might work?
 
@xpqz I believe otherwise unattributed entries go to Scholes, but someone else will know better than me
 
@SilasPoulson Stuff like 2×2 getting computed at parse time into 4 when possible. Not actually sure if the interpreter actually does this when FIXing definitions.
 
this would suggest that it doesn't
but it at least folds array literals
 
yes - as dzaima's shown token stream marks constant or simple constant followed by index into constant table
 
2:45 PM
@B.Wilson Yes, and it is even possible to determine what many names do. The "kind kolouring" of the dfns workspace, and also Co-dfns does this.
 
Ah, okay: dfns.dyalog.com/n_kk.htm. This fits right in with Bunda-Gerth.
 
3:02 PM
@RikedyP It's quite inspirational working through that level of mastery.
 
3:43 PM
Ouch. ]link.break caused dyalog to crash.
 
@B.Wilson interesting. you shouldn't have lost anything though. can you repro it by linking to the dir and breaking again?
 
@Adám Unfortunately, not able to reproduced. Have an aplcore, though.
 
Please zip it (as it compresses very well) and email it, with version info and short description of what happened (i.e. you broke a link), to support@dyalog.com
 
4:07 PM
Sure Thing.
 
⎕←'Thanks!'
@hyper-neutrino any clues why ↑?
 
am looking rn, I am assuming the config is just set incorrectly
it's weird though, I thought only VyxalBot was supposed to be confined to one room, IIRC APL Bot was always supposed to work in any room it's in
 
4:43 PM
Man. That's 3 bug reports today. Feel kind of bad for constantly badgering Vince.
 
You've not met him. He stays ice cool in the onslaught.
 
Haha! Solid guy for the job, then.
Anyway, off to bed for me. Thanks for another day of APL!
 
Hm, I can't start up the bot anymore. I suspect SE changed something in the login flow again
 
:-(
 
just to make sure, you haven't changed the login at all right?
 
4:50 PM
I didn't touch anything.
 
5:08 PM
well, I'll try to figure it out but unfortunately it might require rewriting half of the auth section :/ may just learn rust and steal NPSP's code
 
5:58 PM
@hyper-neutrino Don't feel bad, your bot lasted longer than any other has so far.
 
 
4 hours later…
10:09 PM
@xpqz You still working on your own array language impl?
 
10:56 PM
@RikedyP Yes…
 

« first day (2203 days earlier)      last day (437 days later) »