Toots for oinak@ruby.social account

Written by Oinak :ruby: on 2024-12-24 at 11:42

I just completed "Garden Groups" - Day 12 - Advent of Code 2024 #AdventOfCode in #ruby, this one eluded me on first try, but after abandoning the 3x3 bounding box check for 4 2x2 corner checks I was able to express the solution in 20 lines with mostly one-line methods.

You can peek if you don't mind spoilers: https://gitlab.com/oinak/advent-of-code-2024/-/blob/main/day12/garden_groups.rb?ref_type=heads#L29-51

=> More informations about this toot | View the thread

Written by Oinak :ruby: on 2024-12-13 at 20:25

I just completed "Claw Contraption" - Day 13 - Advent of Code 2024 #AdventOfCode in #ruby

Today I knew it was a 2D equation system, but could not remember the maths so I had to look it up.

You cab get it from me if you are looking too: https://gitlab.com/oinak/advent-of-code-2024/-/tree/main/day13

=> More informations about this toot | View the thread

Written by Oinak :ruby: on 2024-12-11 at 15:01

I just completed "Plutonian Pebbles" - Day 11 - Advent of Code 2024 #AdventOfCode on #ruby

The shortest, most terse code of the year so far, very happy with the result, both parts run in 0.2s

You can have a peek if you don't mind spoilers: https://gitlab.com/oinak/advent-of-code-2024/-/tree/main/day11

=> More informations about this toot | View the thread

Written by Oinak :ruby: on 2024-12-10 at 11:54

I just completed "Hoof It" - Day 10 - Advent of Code 2024 #AdventOfCode in #ruby https://gitlab.com/oinak/advent-of-code-2024/-/tree/main/day10

Felt easier than previous days and easier to express in Ruby.

=> More informations about this toot | View the thread

Written by Oinak :ruby: on 2024-12-09 at 19:07

I just completed "Disk Fragmenter" - Day 9 - Advent of Code 2024 #AdventOfCode in #ruby

I abandoned a whole strategy (stuck at off-by-1s) and tried a completely different approach.

You can peek: https://gitlab.com/oinak/advent-of-code-2024/-/tree/main/day09

=> More informations about this toot | View the thread

Written by Oinak :ruby: on 2024-12-08 at 17:50

I just completed "Resonant Collinearity" - Day 8 - Advent of Code 2024 #AdventOfCode with #ruby https://adventofcode.com/2024/day/8

Looked harder than it was but it was the first day I needed to sketch.

Have a peek if you want... https://gitlab.com/oinak/advent-of-code-2024/-/tree/main/day08

=> More informations about this toot | View the thread

Written by Oinak :ruby: on 2024-12-07 at 18:29

I just completed "Bridge Repair" - Day 7 - Advent of Code 2024 #AdventOfCode https://adventofcode.com/2024/day/7 with #ruby, and today I got to use "case in" pattern matchin and recursion. So much easier than yesterday 😅

Have a look if you don't mind spoilers! https://gitlab.com/oinak/advent-of-code-2024/-/tree/main/day07

Leave me your comments if you did it differently

=> More informations about this toot | View the thread

Written by Oinak :ruby: on 2024-12-06 at 18:56

I just completed "Guard Gallivant" - Day 6 - Advent of Code 2024 #AdventOfCode with #ruby https://adventofcode.com/2024/day/6

I almost gave up on part 2, because my bug (forgetting double turns) did not trigger with test input

=> More informations about this toot | View the thread

Written by Oinak :ruby: on 2024-12-01 at 17:34

One year more...

[#]adventofcode #ruby

https://gitlab.com/oinak/advent-of-code-2024

let's play

=> More informations about this toot | View the thread

Written by Oinak :ruby: on 2024-09-06 at 18:09

Some thoughts on memoization of methods in :ruby:

https://gitlab.com/-/snippets/3745145

=> View attached media

=> More informations about this toot | View the thread

=> This profile with reblog | Go to oinak@ruby.social account

Proxy Information
Original URL
gemini://mastogem.picasoft.net/profile/109287699933897797
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
322.910742 milliseconds
Gemini-to-HTML Time
2.513027 milliseconds

This content has been proxied by September (3851b).