|
daggerdragon posted:(you did save it, right?) Haha, I actually got up to 7 in the Chrome console and just closed it when I was done. Dunno if I feel like attempting it in there, though.
|
# ¿ Dec 10, 2015 21:42 |
|
|
# ¿ May 12, 2024 01:58 |
|
KARMA! posted:I spent so much time on 9 to get a recursive thing to work without crapping on me. Turned out sometimes js really fucks with its variables. Nothing a judicious use of var can't fix, but I still don't know where exactly it went wrong. Bah humbug. I think that's what I'm going to have to do. My first attempt has been to transpile it to JS (bn RSHIFT 2 -> bo => function bo_wire(){return bn_wire() >> 2;}) and let the interpreter figure out the graph for me but that's so loving slow I left it running all day and it hadn't finished, which I expected problem 5 to do, but nooo - that took whole seconds. Second attempt was changing the transpiler to emit F# and then try to sort the calls to make it a valid F# program (single-pass compilers in tyool 2015!), but I can't get that second part of that right and doing it by hand? Bleh Would have been done with this in an hour if my first attempt worked as well as I'd hoped.
|
# ¿ Dec 14, 2015 15:53 |
|
IronDoge posted:https://github.com/JohnWang42/Advent-Code-Solutions/blob/master/day7.py Ah, so you just memoized results I just didn't think a ~300-line program with no loops could possibly take so long to resolve. 7 is appropriately Xmas-y in LinqPad because it shows you the call stack interactively in the gutter next to line numbers and it's like watching a strand of lights with a really good random setting.
|
# ¿ Dec 14, 2015 17:36 |
|
Aww hell yeah - I might even have time to finish this year, heh
|
# ¿ Dec 1, 2016 21:50 |