I'm using the Advent of Code 2020 to exercise my Common Lisp muscles.
Common Lisp is an enormous language with a rich library ecosystem. It's easy to get stuck in the same old corner of the language you are familiar with. What I love about the Advent of Code event is the opportunity to see how other hackers tackle the same small problems. Here are some of my personal learnings from 2020.
labelsis likefletbut allows for recursion- Check that a value is within a range thusly:
(<= min value max) - You can map any sequences, for example
(map 'string #'fn "ssdfs") cl-ppcre:register-groups-bindsimplifies text extractionparseqcan be an even nicer text parsing toolalexandria:xoris Common Lisp's missing xormetabang-bindcan simplify code that requires multiple different kinds of bindingsalexandria:map-combinationsand related functions are nice
Anthony Green green@moxielogic.com