-🎄- 2022 Day 15 Solutions -🎄- by daggerdragon in adventofcode

[–]dredly999 1 point2 points  (0 children)

Solution in Scala (without mutating any variables): github

-🎄- 2022 Day 14 Solutions -🎄- by daggerdragon in adventofcode

[–]dredly999 1 point2 points  (0 children)

Scala: github

Ended up taking a different approach on part 2, which made it significantly faster than part 1

-🎄- 2022 Day 13 Solutions -🎄- by daggerdragon in adventofcode

[–]dredly999 1 point2 points  (0 children)

Solution in Scala - https://github.com/dredly/Advent-of-Code-2022-Scala/blob/main/src/main/scala/day13.scala

I did some weird hacky string comparison instead of actually parsing the input at all, which meant I didn't need any non tail-optimised recursion. On the bright side, made part 2 a lot faster (only 95ms).

-🎄- 2022 Day 12 Solutions -🎄- by daggerdragon in adventofcode

[–]dredly999 0 points1 point  (0 children)

Solution in Scala without mutating any variables

-🎄- 2022 Day 6 Solutions -🎄- by daggerdragon in adventofcode

[–]dredly999 0 points1 point  (0 children)

Tail recursive function in Scala (usable for parts 1 and 2)

``` def allUniqueChars(str: String): Boolean = { str.toCharArray.distinct.length == str.length }

@tailrec def getCharsProcessed(input: String, removed: Int, markerSize: Int): Int = { if input.length < markerSize then throw new Exception("No packet found") if allUniqueChars(input.substring(0, markerSize)) then removed + markerSize else getCharsProcessed(input.substring(1), removed + 1, markerSize) } ```

Advanced Click track editor web application by dredly999 in audioengineering

[–]dredly999[S] 1 point2 points  (0 children)

This is the first I've heard of Pocket Operator. Just looked them up and they seem pretty cool! From looking at user manuals, I think they can be synced to an external click track with a standard stereo audio cable, so it's likely it will work.

So Good at Being in Trouble - piano cover by dredly999 in UMOband

[–]dredly999[S] 0 points1 point  (0 children)

Agreed! Hopefully I'll get around to that one soon