Wrote some more J as a warmup for #adventofcode. This is AOC 2021, day 3, part 1.

Screenshot attached, code's also at https://gist.github.com/SamirTalwar/a0dddc670bda4a5cc757574bdeb5abde#file-aoc_03_1-ijs.

I think I'm done warming up now. Looking forward to the real deal.

Solutions for Advent of Code 2021, in J. This is a warmup for 2022.

Solutions for Advent of Code 2021, in J. This is a warmup for 2022. - AOC_01_1.ijs

Gist
I gotta be honest, J's precedence mechanic is *not* my favourite.
@SamirTalwar this my friend might be among the least readable pieces of code that i have ever seen which, at the same time, is (probably) written in a completely idiomatic style 🤣
@tpflug @SamirTalwar I think I can one-up that! J is one of the more conventionally readable among array languages. Last year I used #BQN to solve Advent of Code. Here's my solution for Day 3, part 1:

@johnny @tpflug Oooh, a proper APL-like. I will check it out. Thanks for the tip!

Honestly, I think this is more readable. At least the symbols mean something.

@SamirTalwar @tpflug It's still different from APL in many ways, but if you're familiar with APL then it will definitely not be too hard to get used to. This was the first time I used anything like it and it was a lot of fun. Can definitely recommend it!
@johnny @tpflug Only in passing. It looks very entertaining.
@SamirTalwar @tpflug Oh yeah, I'm not that big into it either, but I like dabbling in it. BQN in particular was quite appealing because it felt somewhat modern and had very good documentation.
I generally like obscure programming paradigms though. If I can find the time again to learn something completely new, I might do stack programming for this year's AoC,
@johnny @tpflug Me too. I think I enjoyed Prolog the most. I’d like to try Forth or something one year, too.

@johnny @tpflug Well, I'm reading up on BQN and now I kind of want to use this instead of J for AoC.

TBF, once you've written some Agda, everything is readable. https://github.com/SamirTalwar/stream-processors/blob/main/StreamProcessors/Monadic.agda

stream-processors/Monadic.agda at main · SamirTalwar/stream-processors

An implementation of stream processors in Agda. Contribute to SamirTalwar/stream-processors development by creating an account on GitHub.

GitHub
@SamirTalwar @tpflug Nice. I want to learn Agda at some point as well. Next year I'll be forced to do some more theory and learn Haskell, so maybe there's my chance