about summary refs log tree commit diff stats
path: root/README.md
blob: 2aadeb45a811c315d20f45b0a93c1529d4da87c9 (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
# JonesForth ARM64 with APL symbols

This is an ARMv8 AArch64 version of Richard W.M. Jones' original x86 JonesForth.
I have added a few things including:

    - Defining words
    - Combinators
    - Delimited continuations

Also I have used the APL character set.

The pizza is in the examples dir but by way of garlic bread:

```
∇ ε ( ⌈⌊ ⊤ - ↑ ∥) ↓ ∇   / Define ε as Euclid's algorithm /          

∇ λ ◁ , ▷ @ ⍎ ∇         / A defining word λ which names anonymous functions /

3 ⊂ ↑ ⊃ ⊂ + ⊃ cat ⍎     / Double three using the cat combinator /

1 2 3 4 ⊂ × ⟦ + - ⊃ ⟧ ⍎ / Capture '+ -' in a delimited continuation with ⟦ ⟧ /
```

ASCII equivalents for APL-character words are defined in ascii.f (they are the
corresponding Forth words where applicable so ascii.f makes a handy glossary).


You can compile and run with

    gcc -nostdlib jonesforth.S

    cat jonesforth.f - | ./a.out

and run the the examples like

    cat jonesforth.f examples/sockets.f - | ./a.out

You may need to

    stty iutf8

if your terminal isn't set up to handle utf8 by default.