« first day (1405 days earlier)      last day (92 days later) » 

3:22 AM
I'll miss having Marshall to give talks at Dyalog20. :(
When is BQN'20? jk.
 
3:34 AM
<moon-child> he'll just have to win the competition
 
 
1 hour later…
4:43 AM
Same here, his talks are always very interesting
 
 
2 hours later…
7:09 AM
@Marshall I don't see that:
 
@Adám believe it or not, but that is monospace (my test usually is to select from mid-line to the same X position in the next line and see the marker cross)
(or do you mean the part?)
 
Yeah.
 
ah, that makes more sense
 
 
4 hours later…
10:51 AM
@rak1507 It was tradeoff between making the intro tab short, snappy and to the point, and giving someone info without them having to look for it - it turns out that ` is not universal. You can see we explain the language bar in the Help tab tryapl.org?tab=help and the explanation is a bit involved
 
Yeah, that makes sense
 
 
2 hours later…
12:37 PM
cmc: find a 4 byte function that calculates the average without using any of the characters in +/÷≢
 
@rak1507 this one?
 
yep, just saw that and thought it was pretty fun
 
@rak1507 Yeah, that one is famous. Not 4 bytes, but fun: ⍴×⍣¯1≡⊥⊢
 
1:00 PM
@Adám The author has improved Julia Mono's APL characters since then, but says they won't do any more to make APL support better.
 
1:26 PM
@Marshall :(
 
1:57 PM
Is there a sorting algorithm that doesn't use ⍋/⍒ shorter than (⊂⍤?⍨∘≢⌷⊢)⍣{∧/2≤/⍺} (bogosort)
 
@rak1507 if there can be duplicates, probably
best i have is 26
 
2:16 PM
more proof that bogosort is the superior sorting algorithm
 
2:31 PM
got 22
 
Nice
 
3:22 PM
I have 20 with a kind of selection sort. I think it requires ⎕CT←0 to completely order the array, but so does the bogosort implementation.
 
Oh cool
 
@dzaima that 22 as it's now obsolete
 
22 in BQN that I came up with before the APL one, but it doesn't translate easily...
Down to 19.
 
Nothing beats the bogosort!
Oh I just had an idea hmm will implement it in an hour or so
 
@rak1507 But did you generate it by randomly permuting concepts in your head until some permutation made sense?
 
3:52 PM
I followed some links related to fonts and now I've ended up with a complete set of Pragmata Pro. I appreciate that they have an APL display right on the front page. Plus I guess that enables me to add a bit of customer driven weight to that open GitHub ticket?
 
FYI, the new tryapl.org doesn't work
 
⍐⍏ ← Are these valid APL symbols from non-Dyalog implementations? What am I missing?
or are they just useful comparison cases to ensure that the APL symbols fit well into their structurally related unicode characters?
 
"Ctrl + Shift + Backspace" "sort of" works only only the first time you do it. Subsequent time it totally breaks. And it ruins the whole experience of APL in my opinion - because building up expressions is how you typically iterate in APL, and if you have to start from scratch or manually copy and paste then it rly is an unpleasant experience
 
@code_report We saw this - it should be working again now
@code_report Is this regarding tryapl? I'll look into that
@code_report FYI - if you edit any line and press Enter then it executes that and takes the expression and result to the bottom of the log - i.e. you can edit expressions in-place
 
@rak1507 it only applies to integers, but I assume an implementation of radix sort would be very short
 
4:47 PM
@code_report Can I also ask what browser you are using?
 
@Adám 2 more programs because why not
@dzaima (4th one is a bit invalid as it fails on zeroes, but ¯\_(ツ)_/¯)
 
5:07 PM
@dzaima version of the 4th that only fails on result=0 instead (dzaima/APL fails on result<0, so an intersection of the two would always work)
 
5:50 PM
@rak1507 These are my two selection sort variants (20 and 19).
@coltim In BQN you can use ∾∘⊔˜ for natural numbers. It's basically a counting sort.
 
Is there a neater/more direct way to express lookup[;2][ lookup[;1]⍳⊂sortedLCaseWord ] ? Something like 2⊃lookup⍳[;2]⊂sortedLCaseWord ?
 
@TessellatingHeckler How many columns does lookup have?
 
@Adám Two; It's from {⍺,⊂⍵}⌸... which I could change if that made it better
 
So you're looking for the indices in ... corresponding to sortedLCaseWord?
 
@Marshall {c←0⍴⍨1+⌈/⍵⋄c[⍵]+←1⋄⍸c} is an easy APL counting sort implementation, and with Key you can do {⍸1-⍨⊢∘≢⌸⍵,⍨⍳1+⌈/⍵}, which is also 19.
 
6:02 PM
@TessellatingHeckler I think something like ⍸sortedLCaseWord∘≡¨... could work.
 
@Marshall It seems to work the same without the atop, at least for the provided example. Would the atop-free version break down with a more complex input?
 
      data←'Abe' 'Bob' 'Abe' 'Carl' 'Bob' 'Erik' 'Carl' 'Carl'
      lookup←{⍺,⊂⍵}⌸data
      lookup[;2][lookup[;1]⍳⊂'Bob']
┌───┐
│2 5│
└───┘
      ⍸'Bob'∘≡¨data
2 5
 
@Adám yes, it's a basic anagram finder. An incoming wordlist, the words sorted into alphabetical order and grouped with Key to get the indices of words which are the same after sorting. Then the lookup is to find a letter pattern in the first column and get the indices from the second column, and pull out those words.
 
@ab5tract No, ∾∘⊔˜ and ∾⊔˜ are identical functions. Sometimes I'm not so great at golfing.
 
@TessellatingHeckler Oh, then you don't even need to go via the indices.
 
6:06 PM
@Marshall Thanks for confirming! When one character can have such an impact on a program, it can be hard for newbs to discern what is vital and what is not
 
@Adám oh? (Although, the point isn't to have you write it, :P )
 
If you have a mask (like from ≡¨) you can use that to compress (replicate) the list.
      data←'abe' 'bob' 'bea' 'carl' 'larc' 'erik' 'iker' 'cral'
      Sort←⊂⍤⍋⌷⊢
      Sort¨data
┌───┬───┬───┬────┬────┬────┬────┬────┐
│abe│bbo│abe│aclr│aclr│eikr│eikr│aclr│
└───┴───┴───┴────┴────┴────┴────┴────┘
      data/⍨data≡⍥Sort¨⊂'erik'
┌────┬────┐
│erik│iker│
└────┴────┘
 
@ab5tract I want to make a "tacit expander" that shows what happens when a tacit function is called. That is, it expands all the trains and combinators to show where their arguments come from and where the results go.
 
@Adám is that "match under sort"?
 
@TessellatingHeckler … each.
Golfed in vanilla 18.0: ≡⍥(⍋⊃¨⊂)¨⊢⍤/⊣ dzaima/APL will be much shorter.
 
6:12 PM
@TessellatingHeckler Match over sort.
 
Oh, yes, over. Dyalog doesn't have Under.
dzaima/APL:
> data←'abe' 'bob' 'bea' 'carl' 'larc' 'erik' 'iker' 'cral'
┌───┬───┬───┬────┬────┬────┬────┬────┐
│abe│bob│bea│carl│larc│erik│iker│cral│
└───┴───┴───┴────┴────┴────┴────┴────┘
> data(≡⍥<¨⌿⊣)⊂'erik'
┌────┬────┐
│erik│iker│
└────┴────┘
 
@Marshall makes sense for it to be ⍥, I guess under would be Ü
 
Heh, that's the letter I usually use for polyfill. is the usual one used, though.
 
@Adám that sure is a lot shorter; hmm resorting the wordlist every time is expensive, but "worse" it doesn't work like implementations in other languages that build a lookup table.
 
@TessellatingHeckler That's only for golfing. You can easily modify it to only sort each once.
 
6:21 PM
@Adám of course golfable to data(≡⍥<ᐵ⌿⊣)'erik'
 
Ah, yes.
 
@Adám once the data is sorted once, the original words are lost, and I'm back to my "keep the indices of the original words" approach
 
@TessellatingHeckler data/⍨data≡¨⍥(Sort¨)⊂'erik'
 
f⍢< would be cool, but alas, is not implemented
 
> data(⊣⌿⍨≡¨⍥(<¨))⊂'erik'
LengthError: shapes not equal (8 vs 4)
data(⊣⌿⍨≡¨⍥(<¨))⊂'erik'
         ^
@dzaima ^?
 
6:36 PM
@Adám works locally
 
@dzaima I.e. you've not pushed the fix yet?
 
@Adám it is pushed, but not to TIO
 
adam@Adam-asus:/mnt/c/Users/Adam.DYALOG/Documents/GitHub/dzaima/APL$ git pull
Already up to date.
adam@Adam-asus:/mnt/c/Users/Adam.DYALOG/Documents/GitHub/dzaima/APL$ ./REPL
> data←'abe' 'bob' 'bea' 'carl' 'larc' 'erik' 'iker' 'cral'
┌───┬───┬───┬────┬────┬────┬────┬────┐
│abe│bob│bea│carl│larc│erik│iker│cral│
└───┴───┴───┴────┴────┴────┴────┴────┘
> data(⊣⌿⍨≡¨⍥(<¨))⊂'erik'
LengthError: shapes not equal (8 vs 4)
data(⊣⌿⍨≡¨⍥(<¨))⊂'erik'
         ^
 
7:04 PM
@Adám ./build?
 
@Adám hmm, that runs 10x slower than looking up in the precomputed sortedWords<->indices array
 
@dzaima Aha.
@TessellatingHeckler Of course, but how does it compare with lookup plus precomputing. If you're doing repeated lookups, then of course you'd want to precompute as much as possible. You could ever consider using a retained hash table.
 
Here's a sort that only works for non duplicates {⍵[(⍳≢⍵)⍳⍨+/∘.>⍨⍵]}
I wonder if the ∘.> method can be adapted to work for duplicates
 
@rak1507 that was my 26 - {⍵@((+/¨⍵=,\⍵)++/⍵∘.>⍵)⊢⍵}
 
I was going to say, that doesn't look like APL!
 
7:17 PM
@rak1507 annoyingly ctrl+c/v only works in some apps with the russian layout (doing homework)
 
 
1 hour later…
8:40 PM
@Marshall That sounds... amazing
 
 
2 hours later…
11:04 PM
Here's a code for a private leaderboard for AOC, if people here are doing it 656501-67f7cded, as far as I know no one has already made one
 
Random info: Shakti is one of the sponsors of AoC this year
 
Oh cool!
 

« first day (1405 days earlier)      last day (92 days later) »