« first day (1479 days earlier)      last day (1176 days later) » 

9:00 AM
@Bubbler @rak1507 Done.
 
9:51 AM
I just implemented partition in KAP (I had completely missed that one, and I was writing some code that used it and I got an error. Silly me)
Is there anyone that has a few minutes to spare and would be willing to just try using ⊂ in some different contexts to see if I did it correctly? I'm not sure my testcases have enough coverage.
I've updated the web version for ease of testing.
 
@EliasMårtenson What definition of X⊂Y are you aiming for? APL2? Old Dyalog? New Dyalog?
 
APL2.
Basically Dyalog's behaviour (with ML=2)
 
OK. (Though that is one very strange definition.)
@EliasMårtenson 0 0 1 1 1⊂"Hello" fails. Should give ,⊂"llo"
 
I mean, I'm not married to a given definition. I thought they were all mosstly the same. The ISO spec doesn't actually include it (the document seems to be in error, as it includes the monadic version of ⊂ where the dyadic form should be), so my implementation i sbased on reverse-engineered GNU APL.
 
@EliasMårtenson Oh they are very fundamentally different. See apl.wiki/Partition vs apl.wiki/Partitioned_Enclose.
 
10:03 AM
@Adám Thank you. Exactly the feedback I was hoping for. I've added your example as a testcase.
 
@EliasMårtenson NP.Let me know when to try again.
 
Yeah, that's why I was saying ML=2. I believe ⊆ is called ⊂ in that case.
Doesn't ML=2 make it behave like GNU APL in this respect?
@Adám Thank you for the testcase. I fixed the problem. It was in exactly the section of the code that I was the most concerned with.
 
10:19 AM
@EliasMårtenson No, in ⎕ML≤2, is Dyalog's Partitioned Enclose and is APL2's Partition. In ⎕ML=3, both and are APL2's Partition.
 
Oh I see.
I'm using ⊂ for APL2 partition. I will later implement ⊆ to be the same as Dyalog's ⊂.
 
@EliasMårtenson Oh dear, that'll be so confusing.
Why not use for Dyalog's and for APL2 to at least agree with one such scheme?
Or even better, leave out both definitions and instead use a more sensible definition, like partition lengths or "Group"?
 
@Adám I kinda agree, but I really want ⊂ to be like GNU APL. That leaves me with ⊆ to do something interesting with.
Now, until an hour ago I didn't even know about Dyalog's special version of ⊂. Are you saying it's not very useful?
 
@EliasMårtenson Both of them have downsides. Dyalog's cannot omit items, and APL2's cannot insert empty segments. Also, APL2's left argument is very odd. Neither is able to "group items, e.g. 1 1 2 1 2⊂'ABCDE' giving 'ABD' 'CE'
@EliasMårtenson Recommended reading: apl.wiki/Partition_representations and BQN's group.
 
10:37 AM
@Adám OK, I'l stop referring to APL2 here then because that sounds just weird. GNU APL returns "AB" "CD" "E", which seems reasonable.
 
@EliasMårtenson Maybe I shouldn't have used the symbol in my example. Do you not find it strange that 1 1 2 1 2 and 1 1 3 1 2 and 1 1 2 2 3 and 7 3 6 2 5 are quivalent?
 
@Adám Not really, no. Perhaps that's because I'm used to that definition.
 
(Hm, I just noticed that Dyalog's can easily be extended to allow omitting items. A ¯1 in the left argument could mean "skip".)
 
Hmm... Interesting. I could easily add that as well.
 
@EliasMårtenson What do you mean? APL2's can already skip items.
 
10:43 AM
Sorry, I was thinking of reordering
Basically being able to partition "ABC" into "AB" "BC"
 
How would that work? Whence the duplicated item?
@EliasMårtenson That's not a partitioning.
 
@Adám True. I was just thinking of uses for negative values. I'm not even sure how useful that would be.
 
Imo, one should use / (Replicate) first for that.
 
@EliasMårtenson in agreement with Adám: oh god no
@EliasMårtenson imo the "start new partition on positive delta" is stupid. I don't think much would be lost if you started a new partition on any difference
 
10:59 AM
@dzaima That's a fair argument and I don't have any real preference either way. I'm not sure I've ever taken advantage of the "change in the positive direction only" definition.
 
@dzaima (recent)
 
11:20 AM
@EliasMårtenson and @xpqz Would you be interested in doing APL consultancy work for a large Swedish medtech company who currently has about 6 APL programmers already in the team. They accept remote work, but require APLers that know Swedish.
 
Flattered that you'd think I'd be good enough to do this for real.
 
Ven
o/
 
Ven
11:45 AM
Trying to use @ but to apply to an axis or the other
i.e. x@1⊢2 2⍴⍳4 is fine, but how to change the other axis?
I guess I could pass it a function
 
@Adám I'm flattered that you think I'm skilled enough to be able to help out. :-)
 
Ven
OK, that's a start...
thinking about that oXYoX... but maybe there's a simpler way to mirror
 
12:01 PM
@Ven You can either use before and after or combine with ⍤k
@Ven Welcome back. Long time, no see.
 
Ven
@Adám Thanks :). It has.
well, I thought about using but I wasn't sure how to intersperse
 
@Ven Use to move the axis you want to index on so that it is the leading axis.
 
Ven
ah, that's what you meant. Yes, that's what I ended up doing.
 
@Ven E.g. ⋄ ⍉'x'@2⍉3 4⍴⎕A
 
@Adám
┌→───┐
↓AxCD│
│ExGH│
│IxKL│
└────┘
 
12:03 PM
Same as ⋄ 'x'@2⍤1⊢3 4⍴⎕A
 
 @Adám
┌→───┐
↓AxCD│
│ExGH│
│IxKL│
└────┘
 
Ven
That line is the one I'd like to change ⎕←w@p⊢⌽w@p⊢⊖w@p⊢⌽w@p⊢m@(≢w)⊢⍉m@(≢w)⊢x
 
@xpqz @EliasMårtenson Flatter aside ;-) are you interested? I'm sure they'd pay for upgrading your APL skills if necessary.
@Ven You can begin by removing all s, I think.
 
Ven
@Adám I need to change a few to ` `s, no?
 
@Ven Spaces? No, why?
 
Ven
12:05 PM
i.e. @p⊢m@
 
@Ven Oh, that one needs to stay.
 
Ven
it needs to stay in m@(≢w)⊢x too
⎕←w@p⌽w@p⊖w@p⌽w@p⊢m@(≢w)⍉m@(≢w)⊢x is fine :)
 
@Ven True.
I was too quick in saying "all".
 
Ven
⎕←{p←2/¨⍳≢⍵⋄m←⍵,1↓⌽⍵⋄m←⍵,1↓⌽⍵⋄⍵@p⌽⍵@p⊖⍵@p⌽⍵@p⊢m@(≢⍵)⍉m@(≢⍵)⊢' '⍴⍨2⍴1-⍨2×⍨≢⍵}'overflow'
 
@Adám emailed you, but fun as it sounds, it doesn't quite fit in with current life/work reality
 
12:11 PM
@xpqz Sorry, I didn't see the email until now.
 
Ven
mh, I don't remember how to use the bot it seems
{p←2/¨⍳≢⍵⋄m←⍵,1↓⌽⍵⋄m←⍵,1↓⌽⍵⋄⍵@p⌽⍵@p⊖⍵@p⌽⍵@p⊢m@(≢⍵)⍉m@(≢⍵)⊢' '⍴⍨2⍴1-⍨2×⍨≢⍵}'overflow'
 
⋄{p←2/¨⍳≢⍵⋄m←⍵,1↓⌽⍵⋄m←⍵,1↓⌽⍵⋄⍵@p⌽⍵@p⊖⍵@p⌽⍵@p⊢m@(≢⍵)⍉m@(≢⍵)⊢' '⍴⍨2⍴1-⍨2×⍨≢⍵}'overflow'
 
Nice
 
Ven
ah, thanks
OK, now to find the TIO header again :).
 
12:15 PM
@Ven This?
 
Ven
@Adám thanks!
oh, could I use dyalog extended's "over" for what I want?
The q r → r q r part would be what I want, I think
 
@Ven Wait, what are q and r?
 
Ven
where q would be , and r would be ⍵@p
 
@Ven That's talking about Depth.
 
Ven
ah, mh.
then I'm unsure.
maybe something like J's `?
 
12:27 PM
<kritixilithos> maybe you want to do something with ⍣ ? like perform @-substitution and rotate/flip some constant number of times
 
Ven
that's been suggested earlier, but I don't know how to have the rotate/flip apply inbetween
and I'm thinking maybe generate a quarter of it and mirroring the rest would be easier
Maybe there's a shorter way to mirror than ⍵,1↓⌽⍵ too
 
@EliasMårtenson Just got confirmed that they are willing to provide additional training if necessary.
 
Ven
mh, tryapl lost its examples?
 
@Ven Uh, no. What do you mean?
 
@Adám Damn it. You're putting me in a difficult situation. It's definitely something I would want to do, but I don't think it's practical. My current job is a full-time job, and I'm currently paid rather well by Swedish standards, so I wouldn't be able to quit.
 
Ven
12:35 PM
@Adám When I hover something in the primer I don't see examples anymore
 
@Ven Oh, just click.
 
That means that I wouldn't be able to allocate enough time for this job.
 
Ven
Ah!
 
<kritixilithos> @ven (⌽∘⍉⍵@p)⍣4(⍉m@(≢⍵))⍣2
<kritixilithos> as a first step
 
Ven
Thanks, will take a look
Down to 53, (⌽∘⍉⍵@(2/¨⍳≢⍵))⍣4(⍉(⍵,1↓⌽⍵)@(≢⍵))⍣2⊢' '⍴⍨2⍴1-⍨2×⍨≢⍵, now I should probably try to make it wholly tacit
 
12:48 PM
@EliasMårtenson "it is a well compensated role". If you are interested in finding out more, I'll email you an email address to contact for a concrete offer.
 
1:04 PM
@Ven It's generally very hard to make tacit functions with @
 
@Razetime Only if the right operand cannot be computed from the right argument.
 
I'd love to see an example
 
Ven
@Razetime I know, I know
 
1:50 PM
how do you get the values out of a json object you get from doing ⎕JSON?
aha, ⍎ works, knew something like that worked
 
@rak1507 for dynamic values, yeah. For constant values, just obj.key works
 
yeah, I knew about that, but need a dynamic value
 
@Adám Thanks. I'll let you know shortly.
 
2:33 PM
@Adám what's the incantation I have to type (in ride) in order to edit a new namespace script?
 
rtfm
 
3:29 PM
@Marshall Recently did a google search of "⍳" it was very cool
 
Announcement: 2021 round of APL Problem Solving Competition has begun. Referral awards offered.
7
 
@RikedyP What got me was when I looked for "APL transpose" and found the BQN docs above the fold (but APL Wiki's higher up).
 
@Marshall What do you think of apl.wiki/Timeline_of_array_languages?
 
@Adám The overlapping categories are probably pretty confusing. The idea of the timeline for influential languages is that it's more of an overview, so it should stay separate.
 
@Marshall Feel free to edit mercilessly.
 
3:45 PM
@Marshall what a time to be alive
 
@Adám wow no really?!! :P
 
@RikedyP But we'll know we've reached the real pinnacle of history when every search term only returns BQN docs. Soon!
2
 
BQN isn't mentioned in the timeline of array languages page.
 
@EliasMårtenson The table right now is just the one from Timeline of APL dialects. See discussion.
 
4:07 PM
Ouch. I just found a case where KAP is terribly slow, and I need to find out a way to deal with it. Doing ,/foo where foo is a long list (50000 elements in my case) of rather long strings.
(well, not that long, a few tens of characters)
As the reduction works its way through the list, there is a ridiculous number of allocations and reallocations of strings, and since strings in KAP are represented by lists of boxed 64-bit integers, there is a crazy amount of object allocation/deallocation happening.
 
@EliasMårtenson ,/ is special-cased in dzaima/APL fwiw. With immutable arrays that's like the only sane thing to do
 
@dzaima Yeah, I tried that, and replacing the , with a function made it much slower in Dyalog. But it's still nothing compared with the slowness of KAP here. I need a specialised string array to handle these cases. But... specialised arrays are clumsy and requires a lot of ugly special-cased code.
 
(and BQN has the built-in for Raze, which is APL's ⊃,/ for vectors of vectors, but also does cool things with higher rank arrays)
@EliasMårtenson shouldn't ,/ on a vector of strings be about as slow as ,/ on a vector of vectors of numbers then too?
 
∊ does the same thing for vectors of vectors
 
@dzaima (it's over a third of the whole / impl)
@EliasMårtenson A special-cased ,/ would only need to allocate one array/object
 
4:32 PM
@EliasMårtenson also somewhat sufficient for many cases (and reasonably simple to implement) would be to cache ASCII character instances, and then you'd only need to transfer pointers around
 
4:42 PM
@dzaima Hey it's me
 
lol
 
5:06 PM
some more BQN fan art, this time to advertise my animating tool :P
I'm still waiting for a BQN port that runs natively on the front of UFOs
ironically, I did the transposing in jq, because I forgot that BQN has multiline strings
CMP: although it is domain-specific, would you consider jq to be an array programming language?
 
@Wezl Wait how do I stop myself from pressing play every time it gets to the end?
 
@Wezl A few folks at work did most of last year's Advent of Code in jq.
 
@Wezl doesn't look like one to me
 
@Wezl Is it all right to put this link and the previous ones in commentary/fanart on the BQN site? I guess I have to ask since I can't really do it without reproducing them.
 
https://ermineii.github.io/paste/#07ZhLbuMwDIavInTVAAV4hmwM/Cujm26qQBco0gFmk@MPqYdFSZbtboJMKsFxYPK3HuRHR87ni1maq5q9Li4yVbM2exfn2blz64aWWRuNrR/6vOKezWzMpeN2Xzxh1cd3rSBZngyfJFQrQOyVD5KkGYY9NzlXApq6LQZCx0@GcHldS7SKGIM4/laLgqpMBPDlTkCdmFdTqWAqlTlxXykXSWbtNFExZAgS614vWWYmtuR5fJ5iKK11G41e3gZqd0aNfAgK1lrUINM1JWstajwPRs0Am6ixm1ErVSuoMWlmmkzJWouakGY0awO1R0WNYgQ0aw1qTFoQFrA1rEFWYR1MwVEDGzuDqsStoQ3pqsCtoS3ApnEbtD0obbTkV@FW0yawRaXGraZNpiEqLwS6uInLy2oua94QhxSdJq4GLvGmiBvA/ffAiWCXN57OEdw8Skdpuw3afh1t4T3ikXHzT8zB21PwRpE39mwChwQcNoFDAg47wIUNIxNHx4ibBnHPQlz4p8TaXeQQkMMOcgjIYR@5sNW70WDu1zHH87X2CHMQ5rDLHI4zJ@
 
5:16 PM
@Wezl Mind doing same for one or both of the static ones? 0, ...
...1.
 
my case for jq:
it has arrays, but these are more like APL's boxes. the core of jq works on streams.
while map(filter) has to be manually called on arrays, a filter, like a function, auto-maps (it doesn't *exactly* have scalar extension, but the filter . + 1 will increment everything in the stream). It is functional, without even re-assignment, and it supports "operators" because user-defined functions/filters can take other filters as arguments.
@Marshall 0
@Marshall 1
 
5:31 PM
@Wezl no scalar extension disqualifies it in my mind
 
it still kind of does have it
 
can you link to codeberg.org/wezl instead of github?
 
@Wezl Got it.
 
thanks
 
5:59 PM
twitter.com/SPIDERCLlMB/status/1327111382928482304?s=20 somehow I don't think this tweet is related to BQN the programming language
 
6:18 PM
@rak1507 Never said it was.
But the gesture depicted is the official hand signal of the BQN programming language, in case anyone's wondering.
(you don't have to wink)
 
lol
 
6:57 PM
@dzaima Yes, and it is.
But strings is already a special-cased array of unicode codepoints. The problem is that once they are cocnatenated together, they lose that special status.
I just added an optimisation that preserves that for strings and the test case dropped from 12 seconds to less than 4.
But it's only special-cased for concatenation. If I were to, say, reverse it, the result will be a generic array with boxed values and it'll be just as slow again.
I need to come up with a more generic scheme.
 
@EliasMårtenson in dzaima/BQN I made a temporary mutable array class which allows copying in subarrays & stuff. Though that doesn't work for reverse, as it needs to be able to copy sequential data to be fast
 
7:52 PM
cmc: find a way of outputting the nth term of the sequence 4 10 4 9 19 39 79 159 319 639... without having a single number in your code (or any cheats to get a number like ≢'abc')
the 0th term is 1 if you want to use ⎕IO←0
 
what is this sequence?
 
that's part of the fun!
 
oeis.org/… has results, but no results when it starts with 10 or 4 10
 
I mean, if I could ignore the first 4 numbers then I see a pattern :D
 
also "cheats to get a number" you need to get a number somehow, so what makes a way a cheating way?
 
7:58 PM
sort of subjective, but something where some code can be trivially replaced by a number
 

« first day (1479 days earlier)      last day (1176 days later) »