Adventures in Advent of Code
davedelong.com
Adventures in Advent of Code
1–10 of 71 posts
Re: Adventures in Advent of Code
#2Except
> "It turns out, there was a bug in Set.intersection(_:), but it had only been discovered this past June, and the fix hasn’t made it into a public version of Swift yet. "
Re: Adventures in Advent of Code
#3When your code fails it's never the fault of the language. It's always ones own fault, a typo, some error in the logic, or something. Debugging always reveals that with a stone face. Always. Except > "It turns out, there was a bug in Set.intersection(_:), but it had only been discovered this past June, and the fix hasn’t made it into a public version of Swift yet. "
Re: Adventures in Advent of Code
#4Re: Adventures in Advent of Code
#5I picked go for my language this year, which doesn't have good support for sets. May end up writing my own buggy implementation of this.
Requires thinking if you want to implement set difference or intersection. I just figured depending on needs using existing built-in types may be fun.
Re: Adventures in Advent of Code
#6When your code fails it's never the fault of the language. It's always ones own fault, a typo, some error in the logic, or something. Debugging always reveals that with a stone face. Always. Except > "It turns out, there was a bug in Set.intersection(_:), but it had only been discovered this past June, and the fix hasn’t made it into a public version of Swift yet. "
It turns out the bug fix has been released publicly, but only on newer OS versions.
Re: Adventures in Advent of Code
#7Re: Adventures in Advent of Code
#8I picked go for my language this year, which doesn't have good support for sets. May end up writing my own buggy implementation of this.
What if you used a map and stored the value as a key? Then get all keys? Could work as a simple alternative and you could check if values are in it. Requires thinking if you want to implement set difference or intersection. I just figured depending on needs using existing built-in types may be fun.
Re: Adventures in Advent of Code
#9I also like it since I don't do any work or even side projects in C these days, and so it's nice to keep my C chops up to scratch.
Re: Adventures in Advent of Code
#10When your code fails it's never the fault of the language. It's always ones own fault, a typo, some error in the logic, or something. Debugging always reveals that with a stone face. Always. Except > "It turns out, there was a bug in Set.intersection(_:), but it had only been discovered this past June, and the fix hasn’t made it into a public version of Swift yet. "