« first day (1254 days earlier)      last day (1401 days later) » 
00:00 - 21:0021:00 - 00:00

9:04 PM
Debugging Question: I have something of the form {...}⍣{...⍺}⊢... in which all pieces work along. But together, I get a Value Error pointing at the poor ⍺ in the second expression...
Can't figure out what that could possibly mean. I can't even print the ⍺ with {⎕←⍺ ⋄ ...⍺} because then I just get a value error when I try and print
If I use ⍵ instead, I get a different error elsewhere which still doesn't make sense... But is that better?
 
@AviF.S. should always give an to the right operand, so the error pointer is probably somehow wrong
 
@dzaima Ah, okay!
@dzaima Wait, no. It's not. With some other hacks which I don't understand elsewhere, the same exact code runs with ⍵ instead of ⍺
But as soon as I put the ⍺ back, I get a value error again
It's very weird because for a bunch of simpler, easier examples, ⍺ on the right works just fine...
But there's something about the monster on the right which seems to be screwing it up...
 
how about adding ⎕← for the output of the left operand dfn?
 
The other question about the monster on the right is starting to make me doubt the sanity of my interpreter. The one error I get after changing ⍺→⍵ is 'LENGTH ERROR: Boolean singleton value required'
Pointing at the following expression: 0<...
If I replace ... with 1 so I have: 0<1
 
@Gazeld Welcome. Interested in APL?
 
9:12 PM
It all works fine
To recap:
Doesn't work: {0<... : ... ⋄ ...}⍣{...⍺}⊢...
Does work: {0<1 : ... ⋄ ...}⍣{...⍵}⊢...
 
@AviF.S. Sounds like the left operand is returning a non-scalar. Maybe you have a 1-element vector?
 
@Adám It's the result of dyadic ⌷
 
@AviF.S. that's probably from something like {0<1 2:1 ⋄ 2}0
 
@AviF.S. Not enough info to determine. Maybe insert ⎕←⎕SE.Dyalog.Utils.repObj ⍵ somewhere?
 
Doesn't {0=≡⍵} mean it's a singleton?
 
9:15 PM
@AviF.S. Yes.
 
Hmm... well that's what it is:
0<⍵⌷v: ...
@dzaima You mean what I tried earlier, or something else I'm not understanding?
 
Gotta go. Keep posting details and I'll have a look tomorrow.
 
@AviF.S. "Can't figure out what that could possibly mean. I can't even print the ⍺ with {⎕←⍺ ⋄ ...⍺} because then I just get a value error when I try and print"
 
@AviF.S. in the left operand (i.e. {… ⋄ ⎕←whatever}⍣{…⍺})
 
@Adám Good night, @Adám!
@dzaima Whoops, sorry... I do still confuse left & right a lot...
 
9:17 PM
@AviF.S. also try {⎕←≡⍵⋄⍵}0<…, it should only output 0s
 
@dzaima I did see it :) Sorry was busy experimenting with it
@dzaima My the things you come up with! That's a brilliant way to debug... Never would have occurred to me in a million years to do things that way
Super elegant
AKA the {⎕←check debugging condition ⍵ ⋄ ⍵}
To get info while not screwing anything up!
 
@AviF.S. not super elegant (i wanted a train but it'd probably be way worse), but :)
 
@dzaima Disagree, very much! Waaaay cleaner than a train :)
{} are way easier to detect and remove than more parentheses
Plus, I don't think you can do {⎕←cond ⍵⋄⍵} anywhere as cleanly with a train
@dzaima Anyway, you guys were right; I got a 1 somehow
But it doesn't make any sense, because if I replace ⍵ with what it actually is and just run ≡omega⌷v
I get 0
How can ≡{⍵⌷v}omega be different from ≡omega⌷v?
Nevermind, it's not the case that they're different as I just tested them
@dzaima Mind walking me through why it's spitting out a 1, then?
 
@AviF.S. …x⌷y…a←b←⍬ outside and …(a⊢←x)⌷b⊢←y…
and then play around with a and b
 
@dzaima Sorry, I'm rather lost
 
9:29 PM
@AviF.S. wherever you had the malfunctioning , add a⊢← to its argument and b⊢← to its right to be able to view what exactly were its arguments
 
@dzaima Goodness gracious, the debugging prowess you have...
 
(i guess a simpler way would be to use {a⊢←⍺ ⋄ b⊢←⍵ ⋄ ⍺⌷⍵} instead of )
 
@dzaima ⍤ ⍥ ⍤ ⍥ ⍤ ⍥ ⍤
 
(possibly a good alternative to all of this would be to save the left operand dfn to a variable and make it multiline in )ed so the Dyalog debugger would open on it)
 
@dzaima Thanks a million!!! SOOOOOOOOO helpful!!!
@dzaima Super, duper silly me... you're absolutely right
@dzaima But so what this highlighted, that I'd misunderstood, is that {⍵} on the right wasn't picking the value I thought it was...
{⍵}⍣{}⊢const
I'd assumed the ⍵ was picking up on const...
 
9:33 PM
@AviF.S. it should, at least in the first iteration
 
@dzaima Hmm, then I really better look at it with multiline
But what about {⍺} on the right?
We never figured out why I had to replace it with ⍵ to get rid of the Value Error
 
@AviF.S. do you have any other names in that dfn than that could give a value error?
 
@dzaima Nope, and again, when I replace ⍺→⍵ it goes away
...
 
@AviF.S. does the value error have any extended message?
 
...
I'm so ashamed I want to just disappear...
 
9:38 PM
@AviF.S. wrote a instead of ?
 
My shift key only works in one spot, so very often I press it but it doesn't register, and if I don't notice...
 
¯\_(ツ)_/¯
 
In that whole debugging mess, can you spot it?
{{⎕←≡⍵ ⋄ ⍵}0<⍵{a⊢←⍺ ⋄ b⊢←⍵ ⋄ ⍺⌷⍵}v:⍵-(l,←⍵⌷v),1 ⋄ ⍵-0 1}*{⎕←⍺ ⋄ 0=⊃⍺}⊢6 5
I had * instead of ⍣. Of course in this font it's obvious, but...
 
@AviF.S. syntax coloring also helps
 
I was avoiding sharing the whole thing since I thought it'd be cheating since it's for the competition thing. But from now on I'm starting off by doing that so I don't waste your guys' time :(
@dzaima But they're both dyadic
@dzaima In mine, they're the same color
I also have /\ be the same color as +-, though...
 
9:42 PM
@AviF.S. mine is exactly like paste in the dark theme (RIDE)
 
So I might've screwed with it
@dzaima Hmm, then I changed it at some point, somehow
 
(mine is a custom theme based on one of the given ones)
 
I'm trying to base mine on Atom's OneDark. So that's mine, ⍣ blends in though. I guess this is as good a place as any to advertise though!
If anyone would like it, or would like to help improve it/make it even more OneDark-y, please do let me know!
 
@AviF.S. i think separate colors for functions, monadic ops and dyadic ops is very important
 
@dzaima I think you may very well be right! Well if any one else likes this/the OneDark theme, would love help. I hate working on it; super indecisive and can never pick a color
 
9:52 PM
also my BQN color scheme, based on Marshall's
 
@dzaima One more question: Obviously with do⍣until⊢me syntax, do is executed once after until has already been satisfied. This begs the question: What to do if the whole doing logic breaks down as soon as until is met?
Any clever workarounds, or is it necessary to just obfuscate it by adding yet another condition in do, despite it already being noted in until?
 
@AviF.S. do isn't executed ever after until gives 1. What does happen, though, is that until isn't called before the first execution of do (as there must be 2 arguments given to until)
@AviF.S. {until:⍵ ⋄ ∇do}0
 
@dzaima Aww shucks...
 
@dzaima (i absolutely hate ⍣f for that last reason)
 
@dzaima Okay if I fix up Scan now?
 
9:58 PM
@Marshall i'll be honest, i thought there was no scan in BQN for a bit.. go ahead, don't know your intentions anyways
 
@dzaima Just trying to get the compiler to a usable speed, really. None of the changes after Pick did that much, and Scan might be a bottleneck. Also pretty easy to write.
 
(your intentions as in what is the correct behavior of `)
 
@dzaima I did want to use Prefix instead of Scan for a while, but decided that it's too inconvenient to use and hard to optimize reliably.
@dzaima Linear-time, works on elements (not cells) along columns in increasing index order. It's actually really easy to implement.
 
@Adám thank you, but no, I was just jumping from another chatroom by curiosity... :)
 
@dzaima Thanks a mill @dzaima. Truly. All your help has been invaluable!
@dzaima Hahahaha, too funny! Thanks
:54831106 You really have an eye for this stuff!!
I'd have just thought it stopped working...
 
10:09 PM
@Marshall Easier than I expected, and brings a test compile from 13.5s to 10.5s. Not bad.
 
@AviF.S. i somehow managed to get used to the fact that message ids are 8 digits long from all the replying to self
 
@AviF.S. Interesting! I responded before you removed it, so it tagged you but didn't link
 
@Marshall it'd still think ¨ would be a big big bottleneck, unless it's not used at all
 
@dzaima Well, I'm still impressed
 
@AviF.S. interestingly, in the transcript it's shown as a number. Keeps the behavior of the live chat knowing about deleted messages but the transcript - not
 
10:11 PM
Also can't believe you, and evidently @Marshall have the patience to be responding to yourselves all the time! Someone ought to make a user script to do it. It drives me absolutely BERSERK to do it, personally. I don't unless it absolutely makes no sense without
 
@AviF.S. i have thought about making a userscript, but haven't bothered to yet
 
@dzaima Please let us know if/when you do!
@dzaima Neat! You're right!
 
@AviF.S. middle click arrow, ctrl+2/ctrl+pagedown (depending on what's closer to my hands), ctrl+l, end, shift+ctrl+left, ctrl+c, ctrl+1/ctrl+pageup, ctrl+v
 
@dzaima ⍤⍥⍤ ⍥ ⍤⍥⍤
 
(first 2 steps could be merged to shift+middleclick arrow, but i don't use it due to previous muscle memory)
 
10:15 PM
@dzaima You people use the browser like it's ViM ⍥
 
@AviF.S. i mean, what's faster is faster
(i don't really use vim either)
 
@dzaima Haha, that was a complement!
I wish I was that handy with the browser. Didn't realize there were even shortcuts for such things. I'm on Mac and I've never encountered such a thing
 
@AviF.S. this is like the only case where i consistently use a bunch of shortcuts. But yeah, knowing about them is extremely useful (ctrl+number to switch tabs is awesome and i have it configured to work everywhere)
@ab5tract looks extremely pretty, but that seems to be about it. don't see anything about hinting either, and that's pretty much the only thing i need fontforge for..
@Marshall updating ¨ should be pretty easy, considering it has to do individual looping at the end anyways
(i would really love to be able to have a macro for a type-agnostic ¨, but alas, currently still stuck with java)
@dzaima (an acceptable alternative is waiting for valhalla and potentially some @Inline hack)
 
10:45 PM
@dzaima Working out the loops for leading axis agreement is a pain. Probably easier than doing a proper multidimensional take/overtake though. I guess I'll give it a shot.
 
@Marshall shouldn't this just work? (initially i just wanted to post the last 2 lines - that's an extreme case of wanting to have single lines for equal thing alignment but also long)
 
@dzaima That should be right. I guess I was conflating it with Rank some, but Rank's harder because you have to do the two loops and then pull out cells.
 
@Marshall yeah, there's a reason i hadn't implemented APLs in dzaima/APL
(mostly unrelated, i wonder how far could an impl go with separating array data from the array objects - it could make things like dyadic / O(1), prefixes O(n), getting a cell O(1) etc)
 
I do need to figure out what to do about Each on non-arrays though. Reference boxes beforehand, but dzaima applies directly, which I hadn't thought of. And the third option is to error if no arguments are arrays, which I think would be the obvious thing to do if there was only monadic Each but is weird given than array function-each non-array is kind of needed.
 
@Marshall i think it's a thing to learn to live with that non-arrays may be boxed unnededly. (and the dzaima/APL/BQN thing is a bug!)
 
10:57 PM
@dzaima I think J does this pretty often now. It doesn't sound hard from an implementation perspective, but there's potentially a big issue if a user makes a big array and decides to keep only a small part of it.
 
@Marshall yeah. a gc would be handy, but that's probably being hopeful
@dzaima example
 
@dzaima Not sure what this is showing. It must be missing an Each at least, right?
 
@Marshall right, it's missing an ¨ but the behavior is the same
 
@dzaima Oh wow. Definitely missed that it did that on any scalar, simple or otherwise.
 
apparently so did i when implementing it
(with dzaima/APLs ᑈᐵ i pretty much never needed any scalar extension of ¨ anyway)
 
11:07 PM
Looks like that's also why trying to use the native monadic Each was breaking things. Except it's still breaking things, but only in the compiler and not in the tests...
 
@Marshall oh, monadic case has the same problem.....
(probably special-cased because otherwise ⊢¨1 gave ⊂1 which is not nice)
(pushed the changes to ¨)
 
@dzaima Yes, but this is after I dropped the line that tested for it. Now the tests passed but the compiler is telling me it can't get a prototype.
 
@Marshall ¨ itself shouldn't ever be touching any prototypes
(it will however delete prototype information if executed on an empty array)
 
Found it: (≠𝕩)↑≠¨∘⊔ (replacing (≠𝕩)↑/⁼ since cover-Indices doesn't invert) is no good.
And we are now up to a scorching 26 B/s output.
 
11:44 PM
@Marshall also no more need of increased stack size
 
35s to compile all the current tests, 25s if I rely on native ⍋⍒∧∨ even though I don't have TAO tests yet.
I think I'll turn in the scan code, stop working on primitives for tonight, and see if I can set up automated tests.
Also in theory I should be able to generate and run dzaima/BQN bytecode entirely within BQN?
 
@Marshall yeah, though that needs to be updated (i.e. it doesn't actually work anymore) due to headers making everything confusing
fun fact: IsArray is called 728756 times trough the compilation of b←3⋄⊢d←(b×b)-4×2×1⋄((-b)+√d)÷2×2
 
@dzaima It's like a little kid going around the room and pointing at every single thing, asking "is that an array?"
 
:D
 
00:00 - 21:0021:00 - 00:00

« first day (1254 days earlier)      last day (1401 days later) »