[aoc] silence more of the tests
This commit is contained in:
@@ -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))
|
||||
])))))
|
||||
|
@@ -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))
|
||||
|
Reference in New Issue
Block a user