this repo has no description
1/**
2 * This was where I reverse engineered the assembly steps into
3 * JS so I could inspect values along the way.
4 *
5 * The translated version of this in haskell is in /millisecond23/app/Main.hs
6 */
7
8let b = 0
9let c = 0
10let d = 0
11let e = 0
12let f = 0
13let g = 0
14let h = 0
15
16// for numbers `b`, in steps of 17 from b to b+17000
17for (b = 108400; b < b + 17000; b += 17) {
18 f = 1
19
20 // Check if any two numbers between 2..b == b, meaning *not* prime
21 for (d = 2; d - b !== 0; d++) {
22 for (e = 2; e - b !== 0; e++) {
23 if (d * e - b == 0) {
24 f = 0
25 }
26 }
27 }
28
29 // If not prime, add 1 to h
30 if (!f) h+= 1
31
32 b += 17
33}
34
35console.log(h) // Obviously this didn't run to completion..