This is a thread to discuss Day 4
It is VERY important NOT to write any public spoilers
ALWAYS keep spoiler stuff hidden inside one of these
This text will be hidden
which you can obtain by clicking on the gear icon
FYI one of the features of Advent of Code is that we all get given different inputs so our answers will be different.
The examples are all the same but each of us gets different inputs for us to solve
Part 1 done but I've having trouble using the pipe command - I keep getting errors when I use it so just using my usual repeating technique of repeatably modifying my result list
Aaah - Part 2 is one of those ones where the simple brute force approach might take too long to complete - been running for 5 mins and only up to item 19 of 199 and it's getting worse each time!
Going to set it running in a VM just to see if it ever finishes and then carry on main machine trying to find a more efficient method
[edit 5 mins later] - didn't take too long to make it MUCH faster - all done now
This one wasn't actually very hard, although part 2 was much harder.
My original idea was to put the for each loop in a map, and modify the list, but then I realized that was a bad idea, since map creates a shallow copy of the list, and I would be putting a command block in it (which is fine in some cases, but not in this case).
Snap! Build Your Own Blocks
Honestly, I'm a native english speaker, and even I had to read it many times to understand it.
Are you talking about the SET INPUT TO PIPE... script, first thing in the scripting area? If so, I'm not surprised you had trouble -- it gives me a headache reading all those nested HOFs, because I don't know what the data structure looks like. If you could show me the simplest example that fails, and then show the alternate code that didn't fail, I could try to figure out what's tripping you up.
Thanks for the offer
I'm giving it a go again on another Day's puzzle and I'll shout out if I can't grasp it again
All worked fine on Day 6 Part 1 puzzle