Kirk HainesProwyhaines.io·Jun 4, 2023Stretching the Language with Macros; Implementing a `for` Loop In CrystalThis article was originally published a couple of years ago on New Relic's now-defunct Relicans site. I am reprinting it here as I was the original author. What Are Crystal's Looping Structures? The Crystal language offers three different language-l...Discuss·34 readscrystal
Kirk HainesProwyhaines.io·Jan 30, 2023Base58 - What Is it? Why Use It?As programmers, we are familiar with using numbers in different bases. We know about the binary, or base 2 system, that underlies our hardware. We are also usually aware of hexadecimal, or base 16, numbers because they are ubiquitous in many areas of...Discuss·10 likes·3.5K readsRust
Kirk HainesProwyhaines.io·Jan 12, 2023Ruby/Crystal/Rust Advent of Code 2022 - Day 7Day 7 finds us still working with that pesky communication device. For today's task, though, all that we have to do is to analyze its filesystem. No worries, right? Let's see! Can pattern matching come to the rescue? The Repository All of the code fo...Discuss·1 like·147 readsRust
Kirk HainesProwyhaines.io·Jan 6, 2023Ruby/Crystal/Rust Advent of Code 2022 - Day 6Day 6 is a fun one. The task itself is very simple, but I took it as an opportunity to do some performance benchmarking and explore some of the nuances around how implementation affects performance. Read on for more details! The Repository All of the...Discuss·202 readscrystal
Kirk HainesProwyhaines.io·Jan 2, 2023Ruby/Crystal/Rust Advent of Code 2022 - Day 5Day 5's challenge was interesting less for the challenge itself, which can be implemented in a handful of lines, even in Rust, but rather for the mandatory precursor to all Advent of Code challenges -- the input data parsing. Today's input data is mo...Discuss·174 readsRust
Kirk HainesProwyhaines.io·Dec 28, 2022Ruby/Crystal/Rust Advent of Code 2022 - Day 4Day 4 takes an interesting turn with our Rust solutions. They are taking another shift towards architectural parity with the Ruby and Crystal solutions. Rust isn't object-oriented in the same way that those two languages are, but it does have object-...Discuss·141 readsRust
Kirk HainesProwyhaines.io·Dec 22, 2022Ruby/Crystal/Rust Advent of Code 2022 - Day 3The Elves are on a roll as they get ready to head into the jungle on day 3 of Advent of Code. As usual, though, they need some help. The Repository All of the code for this day's solutions, as well as the data input file, can be found at: https://git...Discuss·1 like·179 readsRust
Mario Ariasmarioarias.hashnode.dev·Dec 21, 2022Comparing implementations of the Monkey Language X: An update on performance for Go, Kotlin, Crystal, Python and RubyPreviously In the last episode, we wrote a TypeScript implementation for the Monkey Language. Let's review some numbers, shall we? Since I started this series, most languages and runtimes have released new versions. On the other hand, I did some modi...Discuss·776 readsComparing implementations of the Monkey languageGo Language
Kirk HainesProwyhaines.io·Dec 16, 2022Ruby/Crystal/Rust Advent of Code 2022 - Day 2Welcome to the second day of Advent of Code for 2022! The Elves have been busy setting up camp on the beach, but there are decisions to be made, and the Elves, who always seem to want to do things the hard way, have a plan - Rock Paper Scissors. The ...Discuss·3 likes·158 readsRuby
Kirk HainesProwyhaines.io·Dec 15, 2022Ruby/Crystal/Rust Advent of Code 2022 - Day 1Welcome to my Advent of Code adventure for 2022! This year, I am going to solve the Advent of Code challenges using three different languages - Ruby, Crystal, and Rust. The goal is not to golf for the most terse answer in each language, but rather to...Discuss·3 likes·224 readsRuby