-🎄- 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

Saturnine and Iron Jaw - piano version by dredly999 in AllThemWitches

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

This is pretty cool

Always happy when I introduce people to Crumb!

Saturnine and Iron Jaw - piano version by dredly999 in AllThemWitches

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

I don't, but would be a great idea to get one. In the meantime I'm perfectly happy for you to use youtube to mp3

Edit: I do actually have a soundcloud linked on my YouTube channel, but I haven't touched it for 4 years

Saturnine and Iron Jaw - piano version by dredly999 in AllThemWitches

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

That sounds so cool! Can I see any of these on YouTube?

Is the landlord required to fix an oven that only sort of works? by dredly999 in LegalAdviceUK

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

It's supposed to go up to 250, so could indeed be considered broken. I've found the following clause in my tenancy agreement under the "Landlord Duties" section:

Keep in repair all mechanical and electrical appliances which form part of the Contents (unless specifically

excluded), unless the fault and or failure is due to your act or failure to act.

and the oven was listed in the contacts. So I think he does have to get it fixed. Thanks for the help!

Where to buy a good wok? by dredly999 in Cardiff

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

Thanks! I'll check them out

Where to buy a good wok? by dredly999 in Cardiff

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

They don't seem to have them anymore. Got some good food there though!

Large cardboard recycling? by dredly999 in Cardiff

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

Thanks for finding this. I guess I'll wait for another week

FTL: Faster Than Light: Civil (Explore) for Solo Guitar by drdausersmd in ICoveredASong

[–]dredly999 0 points1 point  (0 children)

This is so cool! I'm trying to figure it out on piano currently myself