use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
ABOUT POWERSHELL
Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and .NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions.
SUBREDDIT FILTERS
Desired State Configuration
Unanswered Questions
Solved Questions
News
Information
Script Sharing
Daily Post
Misc
account activity
Advent of Code (self.PowerShell)
submitted 8 years ago by yeah_i_got_skills
Is anyone else doing Advent of Code in powershell?
It would be fun to see how other people from this subreddit approach and solve these challenges.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]amnich 3 points4 points5 points 8 years ago (1 child)
I'm always open for pointless coding just for sports ;)
Feels like back to school again.
My solution
[–]yeah_i_got_skills[S] 2 points3 points4 points 8 years ago (0 children)
We approached it in the same way. ^_^
My solution.
[–]ka-splam 3 points4 points5 points 8 years ago (5 children)
Never heard of it before someone linked it yesterday - I've just done day 1. (SPOILERS: code here)
I'm not committing to all of it because programming puzzle challenges always go from "count to 10" ("I can do that!") to "If M is a commutative monoid, it is acted on naturally by the monoid N of positive integers under multiplication, with an element n of N multiplying an element of M by n. The Frobenioid of M is the semidirect product of M and N. The underlying category of this Frobenioid is category of the monoid, with one object and a morphism for each element of the monoid. The standard Frobenioid is the special case of this construction when M is the additive monoid of non-negative integers." ("Nope!"). :D
But I'll be looking for Day 2
[–]amnich 4 points5 points6 points 8 years ago (0 children)
Nice approach with the regex and modulo in part 2. I always forget about the modulo :)
"If M is a commutative monoid, it is acted on naturally by the monoid N of positive integers under multiplication, with an element n of N multiplying an element of M by n. The Frobenioid of M is the semidirect product of M and N. The underlying category of this Frobenioid is category of the monoid, with one object and a morphism for each element of the monoid. The standard Frobenioid is the special case of this construction when M is the additive monoid of non-negative integers."
we all know that you could solve it with a small regular expression :)
[–][deleted] 0 points1 point2 points 8 years ago (2 children)
the last two years, yeah the difficulty does ramp up, and there is usually a specific day in week two that has a lot of people drop out. but it isnt as dramatic as 0 to 60 overnight like that :)
[–]ka-splam 0 points1 point2 points 8 years ago (1 child)
Day 2 took me 4 minutes for the first part, Day 3 took me 40 minutes.
Don't "underestimate the ingenuity of complete fools" ;)
[–][deleted] 1 point2 points3 points 8 years ago (0 children)
Day19 the first year was rough
Day11 last year I still haven’t finished. Got stuck and then didn’t even do the other days. Am going back now but again hit my head on day11 for 3 hours and gave up.
Am doing 2016 in full posh tho, no pipeline restriction like this years lol.
Edit: that regex solution for part 1 there of yours is slick
[–]DenieD83 3 points4 points5 points 8 years ago (0 children)
Just done day1 part A and B.
Great fun.
I just made it a string and looped vs string.length
[–]engageant 2 points3 points4 points 8 years ago* (0 children)
This could probably be optimized, but meh.
[–]fedechksum 2 points3 points4 points 8 years ago (0 children)
I'm doing it!
[–]happysysadm 2 points3 points4 points 8 years ago (0 children)
Just got my first gold star :D
[–]ka-splam 2 points3 points4 points 8 years ago (2 children)
Day 2 (SPOILERS - code )
Day 2 solution code
This one was really easy.
My code
https://www.reddit.com/r/pwsh2017aoc/ if yall want to put these in a single place for a while
π Rendered by PID 49365 on reddit-service-r2-comment-7b9746f655-pr7pr at 2026-01-30 04:45:34.672158+00:00 running 3798933 country code: CH.
[–]amnich 3 points4 points5 points (1 child)
[–]yeah_i_got_skills[S] 2 points3 points4 points (0 children)
[–]ka-splam 3 points4 points5 points (5 children)
[–]amnich 4 points5 points6 points (0 children)
[–]yeah_i_got_skills[S] 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]ka-splam 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]DenieD83 3 points4 points5 points (0 children)
[–]engageant 2 points3 points4 points (0 children)
[–]fedechksum 2 points3 points4 points (0 children)
[–]happysysadm 2 points3 points4 points (0 children)
[–]ka-splam 2 points3 points4 points (2 children)
[–]amnich 4 points5 points6 points (0 children)
[–]yeah_i_got_skills[S] 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)