Posts tagged puzzle

Advent of Code 2022

:: programming, racket, python, javascript, puzzle

Advent of Code 2022 will start on December 1. This will be my third year, after participating in 2021 and 2020.

I hope to have time to code all of the solutions in Racket, my favorite programming language, and I should be able to translate some of them into Python and/or Javascript as a learning exercise.

My primary goal is to create an elegant Racket solution for each day’s puzzle that is clear, commented and tested. For some of the days, I may also create variants that emphasize performance or conciseness.

Solving Anagrams in Ruby

:: programming, puzzle, ruby

Someone posted a question on comp.lang.ruby recently asking for help with solving anagrams. The poster originally asked about ways of generating permutations and several people pointed him to the facets library which has some permutation utility functions. As it turns out, I benchmarked the following naive permutation generator as 3 times faster than the facets library code: