VampireExpert

cohost's #1 sleepyposter

⎯⎯⎯⎯⎯

Approximate age36
LocationSweden
Trans?Yes
Goth?Yes
Lesbian?Yes
GF?No

⎯⎯⎯⎯⎯

Tunnel Snakes gang logo
Who are the Tunnel Snakes?

List of places where I can be found
vampire.expert/

I'm doing AoC 2021 in Python to remember the language, and I'm enjoying contrasting how I did this in Python vs. APL:

def mark_boards(num):
  for board in boards:
    for i, n in enumerate(board):
      if n == num:
        board[i] = -n
⍝ Mark a number on a board by adding 100 to it:
mark←{(⊃⍵)∊2⊃⍵:{({100+⍵}@(⊃⍵)(⊃⍵))2⊃⍵}(⍸(2⊃⍵)∊⊃⍵)(2⊃⍵)⋄1:2⊃⍵}

That line of APL is just so funny to me. Absolutely inscrutable. Presumably I understood it while I wrote it almost a year ago? Who knows.


You must log in to comment.

in reply to @VampireExpert's post: