From 14b46091bcaaa3d4e4c3fbdd90980a48d438e15b Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Wed, 28 Apr 2021 19:54:34 -0600 Subject: [PATCH] [aoc] silence more of the tests --- projects/aoc/src/year2020/BootCodeFixDSL.kiss | 7 ++----- projects/aoc/src/year2020/Solutions.kiss | 5 +++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/projects/aoc/src/year2020/BootCodeFixDSL.kiss b/projects/aoc/src/year2020/BootCodeFixDSL.kiss index 6cf919da..3d195b2e 100644 --- a/projects/aoc/src/year2020/BootCodeFixDSL.kiss +++ b/projects/aoc/src/year2020/BootCodeFixDSL.kiss @@ -17,22 +17,19 @@ (stream.dropWhitespace) `(cond ((or self.forked (instructionsTested.exists self.instructionPointer)) - (print "can't fork again") (,instSymbol (,op 0 ,arg) self)) (true (dictSet instructionsTested self.instructionPointer true) (self.setBreakPoint) (self.fork [ (lambda [:Dynamic self] - (print self.accumulator) (when ,(ReaderExp.Symbol (Std.string (= inst "nop"))) - (print (set self.forked true)) + (set self.forked true) (set self.forkedAt self.instructionPointer)) (jmp (,op 0 ,arg) self)) (lambda [:Dynamic self] - (print self.accumulator) (when ,(ReaderExp.Symbol (Std.string (= inst "jmp"))) - (print (set self.forked true)) + (set self.forked true) (set self.forkedAt self.instructionPointer)) (nop (,op 0 ,arg) self)) ]))))) diff --git a/projects/aoc/src/year2020/Solutions.kiss b/projects/aoc/src/year2020/Solutions.kiss index 29eb4c01..3b8414a5 100644 --- a/projects/aoc/src/year2020/Solutions.kiss +++ b/projects/aoc/src/year2020/Solutions.kiss @@ -96,7 +96,7 @@ (bootCode.setBreakHandler (lambda [bootCode] (assert (= 2058 (print bootCode.accumulator))))) (bootCode.run)) (print "BootCodeFixExample") - (let [bootCode (new BootCodeFixExample)] + /* (let [bootCode (new BootCodeFixExample)] (bootCode.setBreakHandler (lambda [bootCodeFork] (if (= bootCodeFork.instructionPointer (bootCodeFork.instructionCount)) @@ -112,7 +112,8 @@ (print (+ "answer could be " (Std.string bootCodeFork.accumulator) " forked at " (Std.string (+ 1 bootCodeFork.forkedAt)))) (print "hit an infinite loop")))) (bootCode.addBreakPoint (bootCode.instructionCount)) - (bootCode.run))) + (bootCode.run)) */ + ) // Day 9 (when (<= 0 (days.indexOf 9))