r/PowerShell • u/dantose • Dec 01 '25
Anyone doing Advent of Code in powershell?
Day 1 is up.
Part 1 was straightforward. Part 2 needed a bit of troubleshooting for double counts. I'm going to half-assedly code gold them on r/codegolf
23
Upvotes
3
u/Otacrow Dec 01 '25
Poshing it! Part one was quite simple. Second part I brute forced. Started with some modulus etc, but after half an hour of almost but not quite, I let it rest
1
u/dantose Dec 02 '25
Day 2 is going to be ROUGH in powershell. Logic is straight forward (for part 1 at least) but running into issues where it REALLY wants an [int] instead of a [long] and some of the sets are probably too big. Looping will almost certainly be too slow.
4
u/Th3Sh4d0wKn0ws Dec 01 '25
Took me longer than I care to admit, but I did complete day 1.
4
u/lan-shark Dec 01 '25
I'm probably doing it in Go this year, but pwsh could be fun. If I have extra time maybe I'll do some of the puzzles in both
1
u/Rincey_nz Dec 01 '25
Sorry, I'm being dense. I can't find the puzzle(s) to solve. I can see users' solutions, just not the actual puzzle
2
u/darkspark_pcn Dec 01 '25
Yep.
2
u/SrBlackVoid Dec 03 '25
Completed all 3 days so far. This year I'm intentionally going the 'proper dev' route with these, using tests, somewhat-decent verbose and debug logging, and a relatively 'clean' structure.
If you want to check mine out: https://github.com/SrBlackVoid/AdventOfCode2025
1
u/overlydelicioustea Dec 02 '25
i did some previous ones in ps. will do the same this year
1
u/ka-splam Dec 03 '25
A day late, five attempts at part two and ending up switching modulo for brute-forcing it one dial step at a time, oof I really haven't been writing much code this year :o
0
u/DoubleEweSea Dec 02 '25
FYI, I have attempted multiple years of AoC in Powershell... The issue I consistently run into is that a solution in Powershell will often take hours (sometimes 10+) whereas an identical logic/loop in Python will take seconds...
It's still fun and an interesting challenge, but it can become impractical pretty quickly.
Enjoy!
0
u/BlackV Dec 02 '25
Sitting there spinning wondering why my number is just going up and up and up
Oh...... 99..... Let's start again
0
u/joshooaj Dec 02 '25
I will be - might do some live streaming for fun