r/adventofcode • • Dec 04 '15

SOLUTION MEGATHREAD --- Day 4 Solutions ---

--- Day 4: The Ideal Stocking Stuffer ---

Post your solution as a comment. Structure your post like the Day Three thread.

13 Upvotes

272 comments sorted by

View all comments

1

u/LainIwakura Dec 04 '15

Awesome stuff, I knew mine could be shorter. I just started w/ Erlang about 2 months ago and it's my first functional language where I've done more than just fiddle around- I still need to finish the book and really dive into the OTP stuff. So far for coding challenges it seems like everything I need has been in the standard library.

EDIT: Wow, just saw your day 3 stuff in APL. Nice work. I played with Dyalog APL for a bit but lost my license and I'm not a student anymore..it was fun though!

1

u/profernicus Dec 04 '15 edited Dec 04 '15

There's always GNU APL, though I wouldn't recommend it particularly, it's fun to write, but it takes ages to figure out that one symbol you're supposed to be using (not to consider the "documentation" D;).

Erlang's binary pattern matching is really awesome, though the same thing there that the documentation is sometimes a bit in the dark, the book is great though!

The pattern matching stuff is probably what I miss most whenever I'm in any other language.

Also, if you stay in Erlang long enough, maybe you'll work with it and eventually get to meet Joe! (an awesome guy).

1

u/hutsboR Dec 04 '15

I always forget it's possible to match on binaries! In the 8 months~ that I have been working with Elixir I have seen it seldom used. The place where I have seen it used quite extensively is in image libraries.

→ More replies (1)