Post Scarcity
A prototype for a post scarcity programming environment
Loading...
Searching...
No Matches
scratchpad2.lisp
Go to the documentation of this file.
1"This demonstrates that although the print representation of three cell bignums blows up, the internal representation is sane"
2
3"We start by adding 8 copies of 2^60 - i.e. the first two-cell integer"
4
5(set! a
6 (+
7 1152921504606846976
8 1152921504606846976
9 1152921504606846976
10 1152921504606846976
11 1152921504606846976
12 1152921504606846976
13 1152921504606846976
14 1152921504606846976))
15
16"Then repeatedly add eight copies of the previous generation"
17
18(set! b (+ a a a a a a a a))
19
20(set! c (+ b b b b b b b b))
21
22(set! d (+ c c c c c c c c))
23
24(set! e (+ d d d d d d d d))
25
26(set! f (+ e e e e e e e e))
27
28(set! g (+ f f f f f f f f))
29
30(set! h (+ g g g g g g g g))
31
32(set! i (+ h h h h h h h h))
33
34(set! j (+ i i i i i i i i))
35
36(set! k (+ j j j j j j j j))
37
38(set! l (+ k k k k k k k k))
39
40(set! m (+ l l l l l l l l))
41
42(set! n (+ m m m m m m m m))
43
44(set! o (+ n n n n n n n n))
45
46"p"
47(set! p (+ o o o o o o o o))
48
49"q"
50(set! q (+ p p p p p p p p))
51
52"r"
53(set! r (+ q q q q q q q q))
54
55"s"
56(inspect
57 (set! s (+ r r r r r r r r)))
58
59"t - first three cell integer. Printing blows up here"
60(inspect
61 (set! t (+ s s s s s s s s)))
62
63"u"
64(inspect
65 (set! u (+ t t t t t t t t)))
66
67"v"
68(inspect
69 (set! v (+ u u u u u u u u)))
70
71"w"
72(inspect
73 (set! w (+ v v v v v v v v)))
74
75(inspect
76 (set! x (+ w w w w w w w w)))
77
78(inspect
79 (set! y (+ x x x x x x x x)))
80
81(inspect
82 (set! z (+ y y y y y y y y)))
83
84(inspect
85 (set! final (+ z z z z z z z z)))