satvikpendem
Just finished Day 1. Series of prompts were:

- --- Day 1: Calorie Counting --- (verbatim copied and pasted the problem text)

    To solve this problem, we need to read the list of food Calories and keep track of how many Calories each Elf is carrying. We can do this by keeping a list of the Calories carried by each Elf and updating the list as we read the input.

    (gave the answer here in Python-like pseudocode)
- Solve the above problem in Python

    (gave the answer in actual Python)
- Give me the answer but with the input hardcoded also (wanted to try some input hardcoded just to see if it works)

    (worked)
- I'm getting an error

    Traceback (most recent call last):
      File "main.py", line 18, in <module>
        ElfCalories[-1] += Calories
    IndexError: list index out of range

    The error IndexError: list index out of range means that you are trying to access an index in a list that does not exist. In this case, it looks like it is happening when you try to add the Calories to the current Elf (ElfCalories[-1] += Calories).

    The problem is that you are not adding a new Elf to the list when you encounter the first non-blank line in the input. This means that when you try to add the Calories to the current Elf, the list is empty, so there is no -1 index to access.

    To fix this, you can add a new Elf to the list when you first encounter a non-blank line in the input, like this:

    (fixed the error)
- Give me a function that reads in a file and solves the previous problem with the elves

    (gives the answer)
- Give me the same solution above but with the ability to input a link address to download the input file instead

    (gives the answer but the code itself didn't work, so I manually copied and pasted the input file and added it to the folder, which then gave the right answer)
dougdonohoe
I tried this on a lark for Day 3 last night and it got Part 1 correct with no changes (other than using go:embed for the input file). Part 2 required a bit of tweaking. It is pretty impressive nonetheless.

Today, I used it to solve Day 2 (rock/paper/scissors). It got pretty close, but had 95% of the logic correct.

iDon
This blog is reporting on doing the advent of code via ChatGPT : https://note89.github.io/the-advent-of-code-ai-edition/
sr.ht