Was able to finish all of today's #adventofcode . When all you have is a for loop, everything looks like a list
However, short of making a custom stencil for each cell, I have absolutely no clue how to do part 2 in J, so that will have to wait!
I'm pretty proud of my J solution to part one of today's advent of code.
https://gist.github.com/jcmorrow/b042608a5bb1d6012029d0011793140e
It's probably not as terse as a seasoned J programmer might go, but the way that tile, is, pad, unpad and count all work together is really nice IMHO.
okay, it's on my blog now https://leetusman.com/nosebook/programing-patching with a synth / desk photo
not so bad after some cleanup: https://gist.github.com/jcmorrow/d95113066f69ffb1a69de4b63f03e900
Well, this problem wasn't bad, and it was my second day in a row of solving the problem in J in less than an hour, but it feels like I'm not quite doing things the proper J-way 😞
it was a good one! I have gotten *much* better at J in the past week. Although I did use `if`s a bit more than I would have liked.
But I learned about and used the prefix adverb today, and it is 🔥 https://code.jsoftware.com/wiki/Vocabulary/bslashdot
J code is hillarious. Solution for day 4 part 1 (I don't think this is a spoiler because I wrote it and even I can't read it):
```
load 'regex'
input =: fread '~/code/advent_of_code/day_4.txt'
passports =: ('\n\n'&rxmatches rxcut ]) input
requiredFields =: ;:'byr iyr eyr hgt hcl ecl pid'
allMatches =: dyad : '(|: 0 _1 + |: ({."2 x rxmatches y)) rxfrom y'
+/ 7 = >+/ L:0 requiredFields e. L:1 '\w+:' allMatches L:0 passports
```
I still haven't finished AOC day two : (
But I *did* find the solutions to 2016 in J and boy... they sure do look like an alien rolled their face on a very awkward keyboard:
https://code.jsoftware.com/wiki/Essays/Advent_Of_Code_2016#alternate_solution
On Fermentation: "It’s unlike canning—with canning you kill all of the microbes and seal it hermetically. With fermentation you invite the microbes you want and don’t let in the ones you don’t. Fermentation is diplomacy and canning is a massacre. Canning is a high-tech food technology."
https://solar.lowtechmagazine.com/2018/07/fermentation-and-daily-life.html