crystal
-
Solving Scrabble with Crystal
I recently solved a problem I’ve always wanted to solve: writing a library that can unscramble words. I know, this is a pretty geeky and pointless endeavor. Geeky, though, is what I do. Originally, the library focused on exact matches. Given some string, I could…
-
Rewriting Ruby’s #pack and #unpack Methods in Crystal
In Ruby, especially while writing low-level protocols, you may have encountered Array#pack() and/or String#unpack(). If you’ve ever experimented with them, they may seem mysterious; they take a cryptic string as a parameter (maybe something like C4 or w*) and seem to return gibberish (or, conversely,…