« first day (2138 days earlier)      last day (519 days later) » 

3:24 AM
codegolf.stackexchange.com/questions/255135/… wonder how short this can go in APL
I have 26
 
 
4 hours later…
7:15 AM
21 now (including 0, :( )
 
 
2 hours later…
9:08 AM
@xpqz some time ago there was chat about how to be able to get problem input directly without copying request headers from the browser interface into a text file, do you remember what that was?
 
10:00 AM
@RikedyP I recall the conversation, but not if there was a conclusion. I guess it’s not impossible to write something that uses the google/github auth APIs, but for the few seconds it takes to copypasta the competition data set from the browser into a textfile, it seems like diminishing returns.
 
10:13 AM
@xpqz fair enough, I'll stick with what I've got then
 
10:33 AM
@RikedyP See: github.com/wimglenn/advent-of-code-data -- looks like they've written a way to scrape the token automatically.
 
 
4 hours later…
2:07 PM
Day 3
{(⍳52)+.×+/((⎕C⎕A),⎕A)∘.=⍵}{⍵(⊃↓∩↑)⍨2÷⍨≢⍵}¨⊃⎕nget 'input.txt' 1
 
2:37 PM
{(⍳52)+.×+/((⎕C⎕A),⎕A)∘.=⍵}{⊃⊃∩/⍵}¨↓100 3⍴⊃⎕nget 'inut.txt' 1
part 2
would it be nice if +/ 3¨⍳9 gives (1+2+3)(4+5+6)(7+8+9)? Or is ↓3 3 ⍴ ⍳9 the best way to group it in parts of 3?
 
 
2 hours later…
4:17 PM
I had:
d←⊃⎕NGET'd/3'1⋄l←∊(⎕C⎕A)⎕A⋄f←{∪⊃∩/⍵}
+⌿l⍳∊{f↓2(2÷⍨≢⍵)⍴⍵}¨d ⍝ part 1
+⌿l⍳∊f¨↓(3÷⍨≢d)3⍴d    ⍝ part 2
 
4:28 PM
@xpqz using index is smarter than my outer-inner product combo
 
 
2 hours later…
6:43 PM
@Richard Indeed. I was too rushed there.
 
7:14 PM
@rabbitgrowth It would make it (even) harder to see the odd-even rule of a long train.
 
 
3 hours later…
10:41 PM
lol I didn't realize there is
 
:) How did you solve it?
 
by {∪(⍺∊⍵)/⍺}
otherwise pretty same idea to xpqz's answer
 

« first day (2138 days earlier)      last day (519 days later) »