aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.html
blob: e3b28f9d1d1067a728b0d4b269b93b9b5c396587 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!doctype html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width" />
    <title>Lambda Screen - Fractals in Pure Lambda Calculus</title>
    <link rel="stylesheet" href="style.css" type="text/css" media="all" />
  </head>
  <body>
    <main>
      <canvas height="800" width="800" id="canvas"></canvas>
      <!-- <div> -->
      <!--   <div class="inputWrap"> -->
      <!--     Reduction mode: -->
      <!--     <select id="reductionMode"> -->
      <!--       <option value="auto" selected>Reduce to normal form</option> -->
      <!--       <option value="slider">Reduce by sliding</option> -->
      <!--       <option value="click">Reduce by clicking</option> -->
      <!--     </select> -->
      <!--   </div> -->
      <!--   <input type="range" min="0" max="20" value="0" id="slider" /> -->
      <!-- </div> -->
      <div>
        <div class="inputWrap">
          Load preset:
          <select id="examples">
            <option value="" selected>Empty</option>
            <option
              value="-- the final term gets applied with the empty screen
\0"
            >
              Identity
            </option>
            <option
              value="-- define substitutions of top-left, top-right, bottom-left, bottom-right black pixels
tl = \\0
tr = \\0
bl = \\0
br = \\0

-- two abstractions to ignore the screen state and replace the entire screen
\\((((0 tl) tr) bl) br)"
            >
              Just black
            </option>
            <option
              value="map = \\(0 \\\\\((((0 (6 4)) (6 3)) (6 2)) (6 1)))
invert = \\\((2 0) 1)
(map invert)"
            >
              Invert
            </option>
            <option
              value="00010001010101000000000001010101101111101111011101100101000001101100000110100101000001101100000110010100000110110000010100101000001101100000110010100000110110000010010100000110110000010100101000001101100000110010100000110110000010010100000110110000010010100000110110000010100100010001010100010001110000101110110100001110000101110110100000000101100000000101000000010110111011001111110111001011111110111110110000010000110110100101010001000111000010111011010000111000010111011010000000010110000000010100000001011011101100111111011100101111111011111011000001000000101010001000111000010111011010000111000010111011010000000010110000000010111111100111111011101101101100101010001000111000010111011010000111000010111011010000000010110000000010100000001011011101100111111011100101111111011111011000001000000101110111010101001010000000101101110110000000000101010100000000000101010110111110111101110110111101110110000010010100000001011011101100000000001010101000000000001010101101111101111011101101111011100000101001010000000101101110110000000000101010100000000000101010110111110111101110110111100000101101001000101000000010110111011010000010000000000101010100000000000101010110111110111101110110000010111011010"
            >
              T-square v1
            </option>
            <option
              value="00010001010101000000000001010101101111101111011101100101000001101100000110100101000001101100000110010100000110110000010100101000001101100000110010100000110110000010010100000110110000010100101000001101100000110010100000110110000010010100000110110000010010100000110110000010100100010001010100010001110000101110110100001110000101110110100000000101100000000101000000010110111011001111110111001011111110111110110000010000110110100101010001000111000010111011010000111000010111011010000000010110000000010100000001011011101100111111011100101111111011111011000001000000101010001000111000010111011010000111000010111011010000000010110000000010111111100111111011101101101100101010001000111000010111011010000111000010111011010000000010110000000010100000001011011101100111111011100101111111011111011000001000000101110111010101001010000000101101110110000000000101010100000000000101010110111110111101110110111101110110000010010100000001011011101100000000001010101000000000001010101101111101111011101101111011100000101001010000000101101110110000000000101010100000000000101010110111110111101110110111100000101101001000101000000010110111011010000010000000000101010100000000000101010110111110111101110110000010111011010"
            >
              T-square v2 (1/2) TODO
            </option>
            <option
              value="00010001010101000000000001010101101111101111011101100101000001101100000110100101000001101100000110010100000110110000010100101000001101100000110010100000110110000010010100000110110000010100101000001101100000110010100000110110000010010100000110110000010010100000110110000010100100010001010100010001110000101110110100001110000101110110100000000101100000000101000000010110111011001111110111001011111110111110110000010000110110100101010001000111000010111011010000111000010111011010000000010110000000010100000001011011101100111111011100101111111011111011000001000000101010001000111000010111011010000111000010111011010000000010110000000010111111100111111011101101101100101010001000111000010111011010000111000010111011010000000010110000000010100000001011011101100111111011100101111111011111011000001000000101110111010101001010000000101101110110000000000101010100000000000101010110111110111101110110111101110110010101010000000000010101011011111011110111011000001000001100000110000010010100000001011011101100000000001010101000000000001010101101111101111011101101111011100101010100000000000101010110111110111101110110000011000001000001000001101001010000000101101110110000000000101010100000000000101010110111110111101110110111100101010100000000000101010110111110111101110110000011000001000001000001101101001000101000000010110111011010000010000000000101010100000000000101010110111110111101110110010101010000000000010101011011111011110111011000001000001100000110000010111011010"
            >
              Sierpinski carpet
            </option>
            <option
              value="-- note how no white gets drawn since the highlighted parts would be infinitely detailed
y = \(\(1 (0 0)) \(1 (0 0)))
\(y \\((((0 1) \\0) 1) 1))"
            >
              Sierpinski "triangle"
            </option>
            <option value="">Cantor dust</option>
            <option value="">Vicsek saltire</option>
          </select>
        </div>
        <span id="error"></span>
        <textarea
          type="text"
          rows="5"
          placeholder="e.g. \\(0...) or 00000110... (BLC) or [[0 ...]] (bruijn)"
          name="term"
          id="term"
        ></textarea>
      </div>
      <button id="render">Render!</button>
    </main>
    <script src="common.js"></script>
    <script src="main.js"></script>
  </body>
</html>