rak1507 (@rak_1507) profile picture
Joined August 2020
#AdventOfCode day 1 in APL (⊃,+/){⍵[3↑⍒⍵]}+/↑0(≠⊆⊢)∊⎕csv'1.txt'⍬3 That's the whole solution, both parts!
1
1
6
No inverse error function in desmos? J to the rescue: c=:1:`((1#.>:%~(*&($:"0)|.)%1++:)@i.)@.* latex =: 1 }.&; (('x^',[: fmt 1++:) ,~ '+\frac' ,&; [: (fmt=:'{','}',~":) each 2 x: c%1++:) each@i.
4
Random snake moves in APL
1
3
Kilordle words finder in a line of APL m←⍪(⎕C⎕A)∘.=⍨↑⊃⎕NGET'wordlist.txt'1 ⋄ w⌷⍨⊂⊃{i s←⍵ ⋄ (∪i),⍥⊆s∨m⌷⍨i,←⊢/⍸(⊢=⌈/)m+.>⍤1⊢s}⍣≡⍬(130⍴0)
1
5
Some slight tweaking and using the full wordlist gives a 35... optimal is 30 though apparently! Still not too bad for 1 line of code.
1
I'm not writing any algorithms this month - it's No Knuth November.
9
Thanks to @RACTF_UK for their great hosting for rarctf :D
9
Replying to @tryaplbot
@dyalogaplbot `{'`'`}{_←⍺⍺⋄1}⍬`
1
Replying to @tryaplbot
@dyalogaplbot `' #'[1+↑≠\⍤⊢\32⍴⊂32⍴1]`
1
1
Replying to @tryaplbot
@dyalogaplbot ' #'[1+↑≠\⍤⊢\32⍴⊂32⍴1]
1
It's not an understatement to say @CyberDiscUK has completely changed my life, thanks a lot to @jameslyne, and to @xzer0f and @mcnamee_simon for running Elite and being really supportive throughout. Going to miss it a lot next year.
1
12
Another win with @WagwanNick @TheJJ100100 @RowanREEEE :)
1
8
The power of #APL
Floyd–Warshall algorithm computes all pairs shortest distances. Related to iterative powering of the adjacency matrix for the (min,+) algebra from Tropical geometry. en.wikipedia.org/wiki/Floyd%… en.wikipedia.org/wiki/Min-pl… en.wikipedia.org/wiki/Tropic…
1
5
#AdventOfCode2020 Days 15, 16, and 17 done in APL! Day 17 in particular was very straightforward due to the use of ⌺, with almost no changes needed between the part 1 and part 2 solutions!
1
8
#AdventOfCode Day 14 done, part 2 only just fits on the screen! Who needs newlines anyway 😉
2
9
#AdventOfCode2020 Day 13 done, the fact APL doesn't have a built in modular inverse or CRT might have made this challenge more painful if it wasn't for brilliant resources like aplcart.info!
6
#AdventOfCode Days 11 and 12 in #APL! Both fun challenges, and there are certainly ways of optimising my solutions further.
15
#AdventOfCode Day 10 in APL! Really nice problem, translates well to APL. Part 2 is satisfying to figure out as well.
2
16
#AdventOfCode Day 9 in APL! Fun challenge, certainly translates well to APL. Hopefully there will be more challenges like this and less like yesterday's!
6
#AdventOfCode Day 8, interesting challenge, particularly part 2. There must be a smarter way of approaching it, but I just tried all possibilities.
1
9