7 ms·
I did Common Lisp last year. It was fun and often my solutions were extremely short in terms of LOC, because of how expressive Lisp is. I got frustrated half
by na85 5y ago
I did Common Lisp last year. It was fun and often my solutions were extremely short in terms of LOC, because of how expressive Lisp is.
I got frustrated half way through because most of my time was spent fighting parsing bugs, since AOC tends to give you the data in very inconvenient formats.
- dunefox 5y agoYeah, I did the first week of 2020 with both Lisp and Julia and parsing was indeed an issue; but I'm a Lisp beginner anyway. Do you have a repo somewhere with the lisp code?
- na85 5y agoI'm afraid I don't have a repo, sorry. I was working via several different machines and so I kept all the code on my brother's server but he lost the disk encryption keys, kind of a long story.
- Jtsummers 5y agoI just scanned through my 2020 solutions. It seems I used cl-ppcre for almost all my parsing if I couldn't read them directly with the built-in read or read-line functions. On the one occasion I used parseq in 2020 I didn't actually need it (a regex would've done the trick, day 2 password parsing). Parseq is a good option for anything more complex than regexes, though. I'd suggest taking a few days worth of puzzles and writing parsers to get some practice. https://github.com/mrossini-ethz/parseq/ https://github.com/mrossini-ethz/parseq/
- zelphirkalt 5y agoFor the parsing I used a PEG parsing module (of GNU Guile). That made it really safe and precise, but also cost much more time than fumbling around with regex. I am more comfortable with my code being probably correct and for a work problem, I would rather use a grammar and parser than some elaborate regex mess in many cases. So I did the same in AoC. This meant however, that I fell behind. Once that happened, I did not continue for long. Coworkers also stopped a bit earlier. Lets see how far I can go with solving this year's puzzles. Hopefully I can share the joy of collecting stars with anyone I know.