Show newer
jcmorrow boosted

Was able to finish all of today's . When all you have is a for loop, everything looks like a list

jcmorrow boosted

Most fun AoC 2020 day yet! Day 11 done :) Final time: 00:44:01

Just used plain C today.

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!

Show thread

I'm pretty proud of my J solution to part one of today's advent of code.

gist.github.com/jcmorrow/b0426

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.

jcmorrow boosted

But I'm still not sure how to apply dyadic verbs to arrays 🤔

Show thread

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 😞

Show thread
jcmorrow boosted

Unix but audio streams are the standard interface between applications.

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.

Show thread

Ah gosh, day 6 of AoC done. I kind of know how to do basic stuff in J now, but I have a *really* hard time getting the ranks of my parsed input and the verbs to agree. I'm guessing that will become more instinctual with time, but gosh it sucks right now.

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:
code.jsoftware.com/wiki/Essays

jcmorrow boosted

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."

solar.lowtechmagazine.com/2018

Well I eventually got through day one by doing everything with matrix operations. But I just opened day two and... it's not just a list of numbers so I guess I have to learn about how J handles strings 😂

I'm trying to do AOC in J and it's already so hard. How does anyone program without LOOPS?

Show older
Merveilles

Merveilles is a community project aimed at the establishment of new ways of speaking, seeing and organizing information — A culture that seeks augmentation through the arts of engineering and design. A warm welcome to any like-minded people who feel these ideals resonate with them.