An APL session, compiled to WebAssembly and running in a worker in this tab. There is no server: nothing typed here leaves your browser, and nothing is sent anywhere.
⍴
⎕
⍟
○
*
⍝
∩
∘
)LIB 1 lists the workspaces sw-apl ships; )LOAD 1 RACE loads one. )SAVE writes library 0 into this browser's own storage, so a saved workspace comes back next time you open this page in this browser -- and is in no other browser and on no other machine.
)LIB 1
)LOAD 1 RACE
)SAVE
)LIBS lists the libraries this page reaches: 0 is yours, 1 is what sw-apl ships, and 2 is EXTENDED, the workspaces kept in the sw-apl-workspaces repository. )LIB 2 lists them and )LOAD 2 COURSE loads one. Only library 0 can be saved to.
)LIBS
)LIB 2
)LOAD 2 COURSE
)HELP lists the commands this mode has, and )HELP LOAD (or any command, or )HELP TOPICS) shows a page. )DIALECT says which mode you are in.
)HELP
)HELP LOAD
)HELP TOPICS
)DIALECT
∇Z←S W;V opens a new function, and the prompt [1] numbers the line you type next; ∇ closes it. ∇S reopens one. While it is open:
∇Z←S W;V
[1]
∇
∇S
[3]
[3] text
[1.5]
[∆3]
[⎕]
[3⎕]
[⎕3]
∇S[⎕]∇
[3⎕10]
/
A function name already in use is a DEFN ERROR: )ERASE it, or reopen it with ∇NAME. )HELP EDITOR has the whole list.
)ERASE
∇NAME
)HELP EDITOR
The tabs at the top are the modes, and the page opens in Ⓑ '75 until you choose the other. Ⓐ '70 is APL\360-inspired. Ⓑ '75 is IBM 5100-inspired: it adds execute ⍎ and the quad system variables and functions such as ⎕IO and ⎕FX, and has no I-beams and no )ORIGIN, )DIGITS or )WIDTH. Each mode lists and loads only the workspaces that run in it. Switching starts a new session in a clear workspace, so )SAVE first what you want to keep.
⍎
⎕IO
⎕FX
)ORIGIN
)DIGITS
)WIDTH
Once this page has loaded, sw-apl runs without the network: the interpreter is here in the tab, and workspaces you save are kept in this browser. Reload it offline, or open it from your home screen, and it starts as before; offline at the foot of the page says the network is off. Library 2 comes from another repository, so it is there offline only if it was reached before. Online, the page always takes the newest build.
The interpreter stops and waits for a line, which needs a SharedArrayBuffer, which a browser grants only to an isolated page. Served locally by just demo or just pages-serve, that is two headers and it simply works. A static host will not send them, so the published page installs a service worker to add them and loads once more under it. If the browser will not install it, the page clears out what this site left in the browser and tries again before it gives up; the words after the colon say why it stopped.
SharedArrayBuffer
just demo
just pages-serve
The keyboard picture is by Rursus, under CC BY-SA 3.0; the glyphs are drawn in APL385 Unicode, by Adrian Smith, public domain. The terms travel with them, in apl-keyboard and apl385-font.
What this browser said, to send with a report:
The session starts again in the other mode, in a clear workspace: the workspace in hand is not carried across. )SAVE it first to keep it. A saved workspace is listed in the modes it runs in, so one that runs in both is there in either.