« first day (1248 days earlier)      last day (1392 days later) » 

@Bubbler +←1'ed
 
 
5 hours later…
7:10 AM
Btw, I once came across algorithm X, and thought "there must be lots of puzzle-solving-style challenges where using X is very golfy and efficient"...
 
7:33 AM
@code_report Because I was hoping someone would comment it ;) in seriousness, now that you've said I definitely should have
 
@RichardPark Which formula did you use again?
 
@Adám I showed the flat solutions from the paper
 
@RichardPark (Might be useful to put here for other readers.) But isn't that the point then, that you want to stay flat?
 
I will paste it in a second
@Adám Not especially since APL thinking is more about finding solutions and being able to express things (quickly/clearly)
 
OK, fair enough. Btw, ∊⍳¨ works too :-)
 
7:44 AM
@Adám Although it also was not a code golf webinar so shortest isn't necessarily the point (but @code_report's solution was clearer)
 
What was the exact task btw?
 
@Adám I probably should have mentioned that old APL's didn't have nested (or maybe I did at one point but didn't relate it clearly to this solution
Miota2←{
     i←(+/⍵)⍴1
     i[1++\¯1↓⍵]←1-¯1↓⍵
     +\i
 }
Miota3←{
     i←(+/⍵)⍴1
     +\(1-¯1↓⍵)@(1++\¯1↓⍵)⊢i
 }
Miota←{∊⍳¨⍵}
@Adám Someone commented on YT that they were disappointed in the video, but I can't tell if it was just the format (definitely the pacing I think?) or the content - they seem to be commenting on the format / pacing but I think if they felt strongly enough to comment it can't be just that?
 
(Flat but cheating: {(,⍳⍤0⊢⍵)~0})
 
Hm:
      a←30?100
      ]runtime -c Miota⊢a Miota2⊢a Miota3⊢a Miota4⊢a Miota5⊢a

  Miota⊢a  → 5.1E¯6 |    0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  Miota2⊢a → 1.4E¯5 | +165% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  Miota3⊢a → 1.3E¯5 | +155% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  Miota4⊢a → 1.7E¯5 | +228% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  Miota5⊢a → 1.0E¯5 | +104% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
 
 
7:53 AM
@DyalogAPL You're supposed to compute fanciful flat algorithms faster than simple nested ones.
 
@Adám In an email I have a follow-up comment "And the MyIota function could be written much clearer, so the point of showing this and all the confused talk seems pointless." but on YT he's accidentally edited it and it just says "A" - but I think this is fair and I might move the sequels to BAA? Keep Dyalog ones for more Dyalog-specific guides and stuff?
 
@RichardPark I'd keep the series at Dyalog, now that you have started it there. It is a tough subject, and I don't think the talk was confused.
It doesn't matter that the solution was suboptimal. The subject was the thinking part.
 
@Adám Thanks alright that's cool - tbf it doesn't look like he's replied to any other videos and other people seemed to enjoy the chat
 
@RichardPark Yes, others expressed looking forward to upcoming instalments. Don't disappoint them by moving. The two crowds are not the same, despite cross-advertising.
Not every webinar is for everyone.
 
@Adám Well that's the other thing I wondered if the live feedback format of zoom would have been better for this topic, as it tends to trigger conversations - but you're right now I've started should keep going this way
@Adám Still need to return to the "fast APL" topic at some point
@Adám This is also trye
 
8:04 AM
The commenter in question has been doing APL for many decades, so he doesn't need an intro to "APL thinking". Fun fact: my father introduced him to and taught him APL.
 
@Adám Oh wow the APL world is rather small
@Adám I'm wondering if it's worth pasting chat logs (I've saved the last few) into the comments and/or descriptions of the webinar YT videos?
 
@RichardPark I thought that was done automatically.
 
@Adám I've never heard of that
 
@RichardPark Maybe speak to Jason about it.
 
@Adám He's off today, but yeah will do. Also he was very good and quick about the dyalog.tv / chat stuff
 
RGS
9:06 AM
@RichardPark from a newbie POV, who I would think is the target audience for a "thinking in APL" webinar series, things like the list you showed are what is of most value, the shape then value, values then shape, ..., Heuristics. But better than showing the list and talking about it is going over (simple) problems and solving them with those key points in mind
Like you did with MIota
 
@Adám Since my implementations of ⍳ and × yesterday failed to garner a reaction from you, I have no choice but to double down and show of something you might find a bit more interesting.
 
RGS
But more of those!
 
sub prefix:<+/>(*@a) { [+] @a }
say +/ ⍳5
# 10
 
@ab5tract Wait, is that all the code needed?
 
No, in the natural Raku it would just be: [+] ^5
 
9:10 AM
Ah, you're just transpiling.
 
Well, I'm defining "named subroutines with funny semantics" as we call our operators in Rakue
the built-ins are nothing special, the user has the same syntax. So I'm just creating a named routine that dispatches to our local Raku equivalent
 
:-D
 
Fun fact: I had to use 0...^5 to get a List out of my definition. This is because ^5 is a Range which will stay lazy until put into a sink context
 
9:28 AM
@RGS That is the intention for the next part of the series :)
 
RGS
9:45 AM
@RichardPark awesome! Looking forward to it
 
 
2 hours later…
11:29 AM
CMQ: What would be a good name for the APL package manager?
 
ngn
@Adám APM obviously, "a package manager" :)
 
@ngn i second this
 
11:46 AM
@ngn I thought there was a project called APM?
 
But it is hard to search for, and there's no obvious domain name to take either.
Maybe APLPM pronounced "apple-pomme" :-)
 
ngn
@Adám looks like part of a canadian url :)
 
@Adám grapl? apl-get? getapl? papl? schmapl! APL-SchmAPL
 
@RichardPark Yeah, GetAPL is on my list.
 
@Adám How about GrabAPL?
 
11:54 AM
@RichardPark That's good. Will you suggest it or shall I include it on my (second) list?
 
@Adám both
 
ngn
@RichardPark apl-shmapl - lol :)
@Adám do you have to call it something? why not refer to it as dyalog --install or whatever the command is gonna be
 
APL-Pacman?
Or APLbox
 
12:18 PM
@ngn Good point. But it has to live somewhere, a website, etc. Though frankly, APT doesn't even have its own website…
 
ngn
@Adám you can't call it apt, pacman, etc. unless you want to cause confusion. those are already popular.
 
Right, but APM works. The current working name is Pakkman, which I really don't like.
 
ngn
@Adám "pak" might have unintended connotations in britain
 
@ngn ?
 
ngn
@Adám pakistani
 
12:24 PM
Maybe that's why they added another k. Looks like a package manager for K.
 
ngn
@Adám there's no such thing, the k community hates sharing :)
 
@ngn Sure, but it still looks like it.
 
ngn
true
 
12:47 PM
A random word having "apl" as substring: staple
 
That's not bad either.
 
Also found "maple" or "sapling", but they're names of a product or service
 
1:08 PM
@Bubbler Quite like APLbox actually
 
1:25 PM
@Marshall per this, is ''' a single-quote character literal?
 
@dzaima Yes. The tokenization rules say the same.
 
@Marshall ah. thought i read it but didn't ¯\_(ツ)_/¯
 
RGS
@Bubbler there's quite some words with the sequence "appl" and a well-chosen word could allow for a nice pun...
In hindsight, those would make for easy-to-get-wrong websites
Unless the websites only took the "APL" portion of the word...
 
should a one-line representation of 2‿2⥊↕4 be 2‿2⥊⟨1,2,3,4⟩, 2‿2⥊1‿2‿3‿4, >⟨⟨1,2⟩,⟨3,4⟩⟩ or >⟨1‿2,3‿4⟩? (or some mix of those?)
 
@RGS also -able → -APL like Packable → PackAPL
 
1:40 PM
 
@dzaima I would probably use >⟨1‿2,3‿4⟩. And I could still add square brackets so it's [1‿2,3‿4].
 
@Marshall that's what i was leaning towards too
 
I guess now's a good time to talk about my thoughts on function headers. I think multiple headers should be allowed, separated with ; probably, and they should pattern-match. So you could define an ambivalent function with {𝕊𝕩:𝕩 ; 𝕨𝕊𝕩:𝕨}.
Those would also be the headers used if a function has two cases but no headers, so {𝕩;𝕨} would also work matching ngn/apl.
 
@Marshall huh, never knew ngn/apl allowed that
 
I don't know what the extent of pattern matching should be, but it should at least allow matching constants and destructuring. You could make a switch statement with {𝕊0:case0 ; 𝕊1:case1 ; …}. Cases probably just checked in order unless I decide that there's some rigorous kind of "specificity" ordering that can be used.
 
1:53 PM
@Marshall So ; is the highest level divider, then ?
 
@Adám Yes, although ; isn't allowed outside of functions of course.
 
right
And : is only used to mark headers?
 
@Adám Yes!
 
Nice.
 
@Marshall personally i'd lean towards disallowing headers with overlap at definition-time, though i can see much benefit allowing it
but checking in order probably makes the most sense if it's allowed
 
1:57 PM
Regarding the switch statement, we could say that if the header only has a (syntactic) value and no function, that's the argument and it matches the monadic case only. That gives {0:case0 ; 1:case1 ; …}. Doesn't look risky but need to be cautious.
 
RGS
@Adám packAPLe? Or just packapl? But I like this one
 
@dzaima I would definitely want to be able to pull out special cases like {𝕊0:1 ; 𝕊𝕩:𝕩×𝕊𝕩-1}. The compiler already has a case like that for GenF64 where I'm currently using a guard.
 
RGS
@Bubbler I didn't get it :/
 
Could even write {𝕊0:1 ; 𝕩×𝕊𝕩-1}.
 
@Marshall that i'm more okay with - it's an explicit "everything else". i guess it doesn't make much sense allowing that but not with a 𝕊𝕩: header though
 
2:05 PM
@dzaima Why not? That's what no header means in the normal case (it also allows 𝕨; I'm assuming we don't care here).
 
@Marshall my brain is saying that no header should be different to the full catch-all header, which is the thing not making sense
probably just go with the in-order checking
 
@dzaima How should it be different? My thinking would be that no header means no requirements.
 
@Marshall {𝕊0:1 ; 𝕩×𝕊𝕩-1} signals "it's an if-else", whereas {𝕊0:1 ; 𝕊𝕩:𝕩×𝕊𝕩-1} signals "uh oh overlapping headers". as i said, just ignore my weirdness
@Marshall the extent of pattern matching is the main reason i haven't went ahead with an implementation. It wildly changes how the implementation goes if all it allows is a single monadic and dyadic case plus destructuring arrays, to if it's pattern matchy enough to replace all need of conditionals
(and then there's the question of removing syntactic type erasure - {(F 𝕊) x: … ; (f 𝕊) x: …} to separate the given type of the operand..)
@dzaima (with the side-effect of not allowing a single header for both types (unless you do, in which case ¯\_(ツ)_/¯ (which would probably be somewhat incompatible with other parts of pattern matching)))
 
2:24 PM
@dzaima Oh, related to that, it would also be nice to have a way to mark a left argument as optional, since you might want to pattern match on the right argument only.
 
@Marshall right, and that doesn't have a nice expression equivalent
 
@dzaima I guess you could say that writing 𝕨 makes it optional by convention, and giving it a name makes it non-optional.
 
@Marshall that'd be an approach, though it'd block destructing it, and lose the benefit of it being easily referenceable in nested functions
 
? isn't used so you could also allow one to indicate an optional left argument like ⟨a,b⟩?𝕊c. But then a and b are nothings when it's called monadically, and I liked that only 𝕨 could be nothing.
 
(right, destructuring a non-existent thing doesn't make much sense)
(and referencing it in nested functions would mean exponentially growing number of possible states of variable existedness, if going with an implementation that separates the cases compile-time)
so going with 𝕨 seems for optional seems like a pretty reasonable thing
 
2:33 PM
@dzaima Agreed, nothings crossing scopes would be really bad.
I guess 𝕨 and 𝕩 (etc.) should be bound even if explicit names are given? It's convenient, and maybe makes it clearer that those names always exist in the directly enclosing scope only.
 
@Marshall that'd make the headers an extension, not an entirely different function definition method, huh.
 
 
1 hour later…
RGS
3:38 PM
@Adám "APL picker"?
 
Or APL Packer. But Morten points out that it isn't packaging APL itself, it is a package manager for APL code.
 
this might be a little confusing.. time to change the REPL indicator?
 
3:49 PM
@dzaima I've been wondering for a while why you used > and not simply indent or at least a character that APL doesn't have, like $, or can't begin with, like :
 
@Adám i started with it, and never changed it. ¯\_(ツ)_/¯
(by started with it, i mean it's in the first commit, albeit commented out)
 
4:12 PM
another thing i thought about - BQNs dictionary extension - you could have an empty key represent the default, so ⟨:2⟩ would be a dictionary of all 2s (useful for a dictionary alternative of ). An empty value could mean nothing, making the ⟨:⟩ for an empty dictionary completely normal
 
 
2 hours later…
5:49 PM
by the way guys I won't be able to come in again until ~Monday (2020-06-29)
"guys" = @Adám & @RGS & everyone else
 
6:13 PM
@matt No prob. I myself is gone from in a short time and until Sunday morning UTC.
 
:)
 
RGS
@matt And tomorrow is my bday so I won't be around as much :) (I hope :p)
 
6:32 PM
Added header syntax to the grammar in the BQN spec. Will do the less formal documentation later, once I'm convinced I know what I'm doing.
 
6:44 PM
@RGS happy early bday!
@marshall I liked the "bacon" pun thing in the readme
 
@matt I have this feeling BQN will be really popular on the internet for some reason. No idea why.
 
@Marshall you never know
:)
 
@matt By the way, we've already titled one of the informal APL Orchard meetups "Cooking BQN".
 
love that!
my mom's friend has a dog named Marshall, wonder if he knows APL
 
@matt Very likely I'd say.
 
ngn
6:54 PM
@matt but dogs generally prefer bacon over apples
 
@ngn BQN is based on APL so I mean...
 
@Marshall more weird decisions about headers - is 𝕊 (2+2): allowed? How about x 𝕊 x: for the case when the args are equal?
 
7:39 PM
I doubt there exists such a thing as a BQN Orchard?
(oh and I'm literally eating an apple right now)
 
@matt no, otherwise i doubt all the discussion would be here. (also, bacon orchard? :p)
 
@dzaima yeah a bacon orchard sounds so [bleeping] weird
 
@dzaima (i'm leaning towards no to the first, as you couldn't create non-constants there anyway, except random, which would be just.. weird)
 
replied to yourself? hm
 
@matt i do that like a lot
 
7:47 PM
hm
@matt
 
i see now
@matt testing testing 1 2 3 testing
IT WORKED YAY
 
@dzaima First is allowed; second is grammatical but banned by the scoping rules.
 
@Marshall how about 𝕊 (2+x), which would be equivalent to x←2+⁼𝕩?
 
@dzaima No, the idea with arbitrary constants is just that you can compute whatever value to match you want, in case it's hard to express as a pure literal.
The destructuring part will just go through strands and things. I guess until you can express high-rank arrays < and > will also destructure.
 
8:02 PM
finishes apple
 
 
4 hours later…
11:54 PM
so this isn't a 24-hr orchard then
 
It kind of dies when it gets late in Europe.
 

« first day (1248 days earlier)      last day (1392 days later) »