Skip to content

Instantly share code, notes, and snippets.

@Anticubex
Created December 4, 2025 21:42
Show Gist options
  • Select an option

  • Save Anticubex/1423b454a964d1f3d02149b9392c46f1 to your computer and use it in GitHub Desktop.

Select an option

Save Anticubex/1423b454a964d1f3d02149b9392c46f1 to your computer and use it in GitHub Desktop.
Advent of Code 2025 Day 4 Uiua solution
# AOC Day 4
# uiua.org/pad
# Uiua 0.18.0-dev.3
$ ..@@.@@@@.
$ @@@.@.@.@@
$ @@@@@.@.@@
$ @.@@@@..@.
$ @@.@@@@.@@
$ .@@@@@@@.@
$ .@.@.@.@@@
$ @.@@@.@@@@
$ .@@@@@@@@.
$ @.@.@@@.@.
Test ←
Data ← &fras "AOC_day4.txt"
Accessible ← ⬚0⧈(×⊃(⊡1_1|≤4/+/+)) 3_3
Part₁ ← (
÷₁₈-@.⊜∘⊸≠@\n
Accessible
/+/+
)
Part₁ Test # 13
Part₁ Data
Part₂ ← (
÷₁₈-@.⊜∘⊸≠@\n
1
⊸⍢(
⊸Accessible
⍥₂(⍉⍥₂(⇌↘₁)) # Trim filled border
⊃(/+/+)-
| >₀)
/+/+-◌
)
Part₂ Test # 43
# Pretty slow, I needed like 30s of execution time
Part₂ Data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment