-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
60 lines (53 loc) · 1.32 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Uiua playground</title>
</head>
<body>
<div id="editor"></div>
<script type="module">
import { EditorView, basicSetup } from "codemirror";
import { uiua } from "./src/index.ts";
new EditorView({
doc: `# Numbers
5 6e3 0 3.2 3/4 ¯2/¯4 ¯1.1 η π τ ∞
# Characters
@a @Z @ @\\n @\\s @\xae @\x1F @\u2665 @\u{1f600}
# Strings
""
"Hello, world!"
"Hello,\\sworld!"
"Hello, \\"world\\"!"
$"Hello _" "World"
$ Hello
$ World!
"World"
$$ Hello _
# Arrays
[] [1 2 3]
1_2_3 [1_2 3_4]
{} {1 {2 3}}
# Glyphs
◠⌵+⌝’⍤∠˜◡⋯∩□⊓⊸⍩⌈⑄⊛ℂ◇⊟◴∂♭⊙÷⍢↘.∵=⍖⬚⌕⊢¤:⌊∧⊃⋅≥>⊕∘⊗∫⍚⊂▽⊣⧻≤<ₙ⦷≍↥∊∈↧◿ׯ¬≠⌅⤚⟜⤸⋕⊜⊡◌ⁿ⚂⇡/⍥☇↯⇌⍏↻⁅≡⊏△±∿⍆√?-⨬⊞↙⸮⍉◹⍣⧅°⍜◰⊚◫⤙
# Bindings
x ← 3
one ← 1
NumTwo ← 2
😀 ← "happy"
X__1 = 5
Sha__256 = "TODO"
# Functions
Cube ← ××..
Cube ← (××..)
TimesThree ← |1.1 ×3
TimesThree ← |1 ×3
Cube ← (|1.2 .××..)
`,
extensions: [basicSetup, uiua()],
parent: document.querySelector("#editor"),
});
</script>
</body>
</html>