« first day (1104 days earlier)      last day (1543 days later) » 

3:54 AM
Writing an APL solution for this question, and I've got it working, but not very well golfed. Try it online, any tips for golfing (other than remove whitespace)?
 
ngn
@Bubbler ⌽¨∘(( -> ((⌽¨
 
@Bubbler Is that second one just a general rule of thumb, because it isn't any shorter than the first. Actually, with one of the other golfs I figured out, it's one byte longer, though I might just be missing how to apply it in the second version
 
Oh. I thought it was shorter somehow
 
Thanks for the though, I didn't realise that was what that did
 
ngn
@JoKing fails for "flybuys"
 
4:51 AM
darn
I should test with multiple test cases hah
 
I thought extracting the pattern could be shorter, but it really isn't...
@JoKing It's actually just trying out alternatives until you get a shorter one.
 
ngn
here's an idea: generate indices, encode them with 0 2 3, negate the digit correspond to 2, decode again, and sort according to the decoded
@JoKing 23 bytes - tell me if you want me to show them
 
5:09 AM
@ngn Is it excluding f←?
 
ngn
@Bubbler yes, without f←
the 23 bytes are an implementation of the encode-decode idea
 
@ngn I also got to 23 using the same idea but not explicitly using or
Got 20 bytes.
 
ngn
@Bubbler wow. is it with a different method?
 
@ngn Very similar but doing arithmetic on indexes directly.
 
ngn
5:25 AM
@Bubbler got it!
i have 19
 
@ngn Me too.
And I got 17.
f←⍬∘(⍋⍋_______⍋)⊃¨⊂ (7 blanks)
 
5:53 AM
 
How do you sort by indexes? I thought it would be , but 'abcd' ⌷ 1 2 4 3 throws a length error
 
@JoKing There are three main ways to do it: array[indexes], (⊂indexes)⌷array, indexes⊃¨⊂array.
Obviously you can't use the first one in trains.
 
yeah, that makes me sad
Oh, err wait, what if the indexes are out of range? Like if it were 'abcd' ⌷ 5 6 4 3?
 
@JoKing Index error.
 
no, I mean how would I sort by those numbers?
 
ngn
6:01 AM
@Bubbler interesting trick with ⍬⍋. if i had the same idea, i would have written it like this
 
Oh, wait, I think I got it, I'd use right?
 
@JoKing Right, it gives a permutation of 1..n (or 0..n-1), so it is perfect for rearranging tasks.
 
@JoKing That works, but ⊃¨⊂ is shorter.
 
@JoKing I wouldn't use + for identity. Use , lest you one day deal with complex numbers and get confused.
 
6:12 AM
@Adám IMHO, the actual problem is the function named "conjugate" not throwing DOMAIN ERROR on characters.
 
@Adám i'll try to heed that warning
 
@Bubbler The cost of a half-century of backwards compatibility :-)
@Bubbler Although, now we're making it a "style". ⎕C will ignore numbers.
 
I should probably use ≢ for length too
bleh, that renders badly
 
@JoKing Go Firefox! (or override with a font that has the glyph, e.g. one of these)
 
6:28 AM
I use CSS override plugin to force all code fragments to DejaVu Sans Mono (with the webfont from TIO).
 
ngn
@Bubbler 15 in k using the advantage of null reshapes
 
ngn
it's got a builtin for split and reverse, lol :)
 
 
17 hours later…
11:18 PM
@ngn what do your explanations "neighbour graph" and "transitive closure" mean in this context? I think I can tell that neighbour graph is computing absolute distances between every 1 and every other 1, but in what way is it a "graph"? And the transitive closure - some logical operations turned into a matrix dot product, repeated until the match stops but what does that process do and why?
 
11:56 PM
@TessellatingHeckler Do you know what a graph is in this context?
 

« first day (1104 days earlier)      last day (1543 days later) »