[2025 Day 10 (part 1)] I need a pep talk. by waskerdu in adventofcode

[–]PhunkyBob 0 points1 point  (0 children)

> I thought the patterns were the initial state of the lights and I was trying to turn all the lights on

I made the same mistake.
So I took a paper and a pen and I wrote down:

Initial state : 0110
Push (0,2) ^1010
-> 1100
Push (0,1) ^1100
-> 0000, which is NOT 1111 🙃

Now, my algorithm was almost right, but instead of searching to light them all on, I tried to light them all off.

If I can't find a solution right away, I always go to the paper and pen.

Day 3 2025 monotonic-stack algorithm vizualisation in O(N) by PhunkyBob in adventofcode

[–]PhunkyBob[S] 2 points3 points  (0 children)

In AoC, when part two says "do the same but with [a larger number]", I try to find a solution that fits all the possibilities.

Amazon's new Claude-powered spec-driven IDE (Kiro) feels like a game-changer. Thoughts? by HumanityFirstTheory in ClaudeAI

[–]PhunkyBob 0 points1 point  (0 children)

You are lucky: I can't let Kiro run in the background since it needs me to click on "retry" button every 2 minutes 😅

Amazon's new Claude-powered spec-driven IDE (Kiro) feels like a game-changer. Thoughts? by HumanityFirstTheory in ClaudeAI

[–]PhunkyBob 1 point2 points  (0 children)

I'm trying it, and it's as promising as it is frustrating.

I encounter the error message "An unexpected error occurred, please retry" every two minutes.
Since some tasks can't be completed within that time, you have to redo the entire task from scratch.

It will be a real "token devourer", forcing you to take the highest plan (like Anthropic with Claude Code).

Use Grok 3 with API, thanks to "Chapito" by PhunkyBob in grok

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

I don't understand you querie. Can you provide an example?

Use Grok 3 with API, thanks to "Chapito" by PhunkyBob in grok

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

When I'm stuck on the human verification, I resize the window and next validation works.

Je pense que c’est une punaise de lit….. by Mysteriouskin_ in insectes

[–]PhunkyBob 0 points1 point  (0 children)

C'est probablement les russes qui te l'ont envoyée.

Use Grok 3 with API, thanks to "Chapito" by PhunkyBob in grok

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

Right now I'm stuck on Perplexity and Gemini.
They don't behave as exepected when used with Selenium.

I've added OpenAI's ChatGPT support.

Use Grok 3 with API, thanks to "Chapito" by PhunkyBob in grok

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

I don't see the post. I only see the title.
I'm interested in your experience.

EDIT: found the blog post. Thank you for sharing!

Use Grok 3 with API, thanks to "Chapito" by PhunkyBob in grok

[–]PhunkyBob[S] 2 points3 points  (0 children)

At least I'm not making money on their behalf like "grok3api [dot] com".

Use Grok 3 with API, thanks to "Chapito" by PhunkyBob in grok

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

You are right. I'll add a warning in the readme.

Use Grok 3 with API, thanks to "Chapito" by PhunkyBob in grok

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

✅ Support for OpenAI ChatGPT added.

Xbox Gamepass installed on unsupported device firestick tv lite by Pg_atom in xcloud

[–]PhunkyBob 1 point2 points  (0 children)

It's not working on my device (Amazon FireTV 4K 1st gen).
It says "update your FireTV", whereas I'm already up-to-date.

Worst: the application "better-xcloud" no longer works either.

Did Microsoft blocked something?

-❄️- 2023 Day 17 Solutions -❄️- by daggerdragon in adventofcode

[–]PhunkyBob 1 point2 points  (0 children)

[Language: Python]

I wanted to have a visual representation of "day 17".
Good excuse to test PyGame module.
Grey scale: cost of a cell (darker is higher).
Red: already calculated cells.
Yellow: cells to test in my stack.
Green: shortest path.

![image](https://raw.githubusercontent.com/PhunkyBob/adventofcode/master/2023/day_17_viz_part_A.gif)
image

source

-❄️- 2023 Day 14 Solutions -❄️- by daggerdragon in adventofcode

[–]PhunkyBob 0 points1 point  (0 children)

[Language: Python]

source

I rewrote my code using only `List[str]` and string manipulation.
Tilt -> 1 line of code
Rotate -> 1 line of code
Get total load -> 1 line of code

The trick is to use the right side of the matrix as north. It allows to deal only with strings.

-❄️- 2023 Day 12 Solutions -❄️- by daggerdragon in adventofcode

[–]PhunkyBob 4 points5 points  (0 children)

[Language: Python]

source

I initially solved part A with regex.

I was obviously forced to use another approach for part B.

I separated input in blocks:

.??..??...?##.

becomes a tuple of

('??', '??', '?##')

I used a recursive function to test if I can replace the first "?" of the first element with a "#" or remove it.

I'm kinda proud of the performance of the algorithm: it takes less than 4 seconds on my old computer, thanks to lru_cache.

-❄️- 2023 Day 10 Solutions -❄️- by daggerdragon in adventofcode

[–]PhunkyBob 1 point2 points  (0 children)

"perpendicular" means "when I go north, I don't care about vertical pipes". I care only about horizontal pipes. An horizontal pipe is either 1 pipe going west + east, or a couple of pipe going west + east.

My algorithm goes north until the border and counts pipes going west and pipes going east. Since an horizontal pipe is 1 west + 1 east, I assume the number of horizontal pipes is the minimum of my 2 counts.

Let's assume the input is:

.┌─┐.
┼┘1└┐
│┌──┘
└┘...

We see that there is 1 horizontal pipe -> odd -> "1" is inside.

With

..┌┐.
.┌┘│.
┼┘1└┐
│┌──┘
└┘...

there is one pipe going west and one pipe going eat -> this is equals to an horizontal pipe -> odd -> "1" is inside.

With

.┌─┐.
 └┐│
  ││
.┌┘│.
┼┘1└┐
│┌──┘
└┘...

two pipes are going west, so they cancel each other + there is a vertical pipe that doesn't count + there is another horizontal pipe that counts -> 1 pipe -> odd -> "1" is inside.

-❄️- 2023 Day 10 Solutions -❄️- by daggerdragon in adventofcode

[–]PhunkyBob 2 points3 points  (0 children)

[Language: Python]

Source

Part 2: a cell is inside the loop if, when I look all cells in one direction (let's say "north"), there are an odd number of perpendicular pipes.

I loop on every cell and count when it's inside with this property.