Hmm, I thought I understand this idea but I do not. I did this in the playground : | answer | answer := Key5Solver new solver. ^ answer Result class : Object subclass: #Key5Solver instanceVariableNames: '' classVariableNames: 'Result' package: 'AdventOfCode2015-Day4 - Part1' solver : zeros := '000'. zerosSize := zeros size. count := 0. [ [ candidate := secret , count printString. ((MD5 hashMessage: candidate) hex first: zerosSize) = zeros ] whileFalse: [ count := count + 1. ]. ] forkAt: 35 named: 'Mining'. but still I do not see the answer. Maybe I have to go for the blocking answer. Roelof Op 9-12-2018 om 23:10 schreef Ben Coman:
|
- [Pharo-users] good game plan for AoC2015 day 4 Roelof Wobben
- Re: [Pharo-users] good game plan for AoC2015 day 4 Roelof Wobben
- Re: [Pharo-users] good game plan for AoC2015 day ... Ben Coman
- Re: [Pharo-users] good game plan for AoC2015 ... Ben Coman
- Re: [Pharo-users] good game plan for AoC2015 ... Roelof Wobben
- Re: [Pharo-users] good game plan for AoC2... Ben Coman
- Re: [Pharo-users] good game plan for... Roelof Wobben
- Re: [Pharo-users] good game plan for... Roelof Wobben
- Re: [Pharo-users] good game plan for AoC2015 day 4 Richard O'Keefe
- Re: [Pharo-users] good game plan for AoC2015 day ... Richard O'Keefe