27 Followers
39 Following
225 Posts

author of eureka-framework (with PSR-7) and some other components, like ORM, validator...
Also author of MySQL Queue system (for small queue < 100k): php-mqdb

working with PHP since more than 20 years

GitHubhttps://github.com/velkuns
Eureka (GitHub)https://github.com/eureka-framework

I've completed Part One of "Step Counter" - Day 21 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/21

Done with #php

Part 1 done, Part 2, no more time to improve it.
Have a way to calculate approximation, but need to be more accurate. Probably close to something (and "image" appear in personal input maybe be a clue 🙂)

Code: https://github.com/velkuns/adventofcode-2023/blob/main/src/Day/PuzzleDay21.php
+
https://github.com/velkuns/adventofcode-2023/blob/main/src/Matrix/Garden.php

Day 21 - Advent of Code 2023

I've completed Part One of "Pulse Propagation" - Day 20 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/20

done with #php

Code here: https://github.com/velkuns/adventofcode-2023/blob/main/src/Day/PuzzleDay20.php
+
Some objects for clean code: https://github.com/velkuns/adventofcode-2023/tree/main/src/Day20

Part 1 was easy with clear logic in mind, no bug.
Part 2 ... still running (it tooks ~ 55s for 1million times), so I don't know when it will finish, but probably in long time 😅
Maybe the response tomorrow morning 😄
But it was fun to code !

Day 20 - Advent of Code 2023

I've completed Part One of "Aplenty" - Day 19 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/19

Done in #php

Code: https://github.com/velkuns/adventofcode-2023/blob/main/src/Day/PuzzleDay19.php

Just only the part 1 today. I don't really like this kind of part 2 with optimised range calculation, so just skip it and have some rest for remaining time :D

Day 19 - Advent of Code 2023

I just completed "Lavaduct Lagoon" - Day 18 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/18

done with #php

Part 1: hard to try appropriate formula & fix the code, part 2 will provide the exact result without any fix or change.

Code here: https://github.com/velkuns/adventofcode-2023/blob/main/src/Day/PuzzleDay18.php
Also re-use an enum from Day 10: https://github.com/velkuns/adventofcode-2023/blob/main/src/Enum/PathDirection.php

Day 18 - Advent of Code 2023

Day 17 - Advent of Code 2023

I just completed "Lens Library" - Day 15 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/15

Done in #php

Pretty simple today.
Probably can do it with less lines, but it will be more difficult to read & understand the code.

Code here: https://github.com/velkuns/adventofcode-2023/blob/main/src/Day/PuzzleDay15.php

Day 15 - Advent of Code 2023

I just completed "Parabolic Reflector Dish" - Day 14 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/14

Done with #php

Not so complicated today. Once again, my Matrix class was very helpful.

And final try was false due to miss read the number of cycle to reach (1 million instead of 1 billion 😅)
Fun fact: brute force will take ~100 year to achieve with my current code 😆

Code: https://github.com/velkuns/adventofcode-2023/blob/main/src/Day/PuzzleDay14.php
+
https://github.com/velkuns/adventofcode-2023/blob/main/src/Service/Platform.php (extended Matrix class)

Day 14 - Advent of Code 2023

I just completed "Point of Incidence" - Day 13 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/13

Done with #php

Code here: https://github.com/velkuns/adventofcode-2023/blob/main/src/Day/PuzzleDay13.php
+
Extended Matrix: https://github.com/velkuns/adventofcode-2023/blob/main/src/Service/Pattern.php

Pfiou, lots of stupid bugs in my code for part 2. But finally done after 4 tries.
My Matrix class is clearly the best class for this kind of puzzle game, that help me a lot.
Probably can optimise the part for try to fixing smudge, but it is quite reasonnable (and also improve naming) 😅

Day 13 - Advent of Code 2023

I've completed Part One of "Hot Springs" - Day 12 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/12

Done with #php (only part 1 for now)

Code is here: https://github.com/velkuns/adventofcode-2023/blob/main/src/Day/PuzzleDay12.php

Pretty simple solution (not really optimised), but obviously not usable for part 2.

Have an idea for part 2, more reasonable, but need some more time to implement it. But keep pretty same logic.

Day 12 - Advent of Code 2023

I just completed "Cosmic Expansion" - Day 11 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/11

Done with #php

Code here: https://github.com/velkuns/adventofcode-2023/blob/main/src/Day/PuzzleDay11.php
+
https://github.com/velkuns/adventofcode-2023/blob/main/src/Service/Universe.php (extended Matrix)

Quite simple today, but a little bit challenging on part 2

The time to process for part 1 can be around 180ms (2 times less) by using real expanse of the matrix

Day 11 - Advent of Code 2023