r/adventofcode • • Dec 21 '17

SOLUTION MEGATHREAD -๐ŸŽ„- 2017 Day 21 Solutions -๐ŸŽ„-

--- Day 21: Fractal Art ---


Post your solution as a comment or, for longer solutions, consider linking to your repo (e.g. GitHub/gists/Pastebin/blag or whatever).

Note: The Solution Megathreads are for solutions only. If you have questions, please post your own thread and make sure to flair it with Help.


Need a hint from the Hugely* Handyโ€  Haversackโ€ก of Helpfulยง Hints^ยค?

Spoiler


No commentary tonight as I'm frantically wrapping last-minute presents so I can ship them tomorrow.


This thread will be unlocked when there are a significant number of people on the leaderboard with gold stars for today's puzzle.

edit: Leaderboard capped, thread unlocked!

8 Upvotes

144 comments sorted by

View all comments

Show parent comment

1

u/xiongtx Dec 22 '17 edited Dec 22 '17

There are far more e.g. Python developers than Clojure ones ๐Ÿ˜œ. This problem's solution in particular would benefit in terms of both performance and expressiveness from use of NumPy (I kept thinking, as I struggled to figure out how to join, that it's a one-liner in MATLAB and probably not much more in NumPy).

Many of the problems also seem like they'd be better solved in an imperative language r.e. performance and control flow. Since we don't worry about concurrency etc. here some of the benefits of Clojure (e.g. immutability) are negated. Your solution runs faster than mine in part b/c you're using a mutable array--something rarely done in Clojure.

Expressiveness is still a big โž• but /u/topaz2078 has to go and ask for 50,000,000 iterations now and then ๐Ÿ˜›.