apl-inputrc icon indicating copy to clipboard operation
apl-inputrc copied to clipboard

Easier way to input APL symbols in GNU APL (or other interactive command line programs).

apl-inputrc

Easier way to input APL symbols in GNU APL (or other interactive command line programs).

demo gif

This repository contains an inputrc configuration file meant to be used with rlwrap and a command line APL interpreter.

The file contains easy to remember mappings for all symbols used by APL that are not present on a standard keyboard.

The mappings follow a what-it-looks-like convention. For example, the character looks like <- and so can be typed using a 3 character sequence: `<-. Similarly, is typed as `e and as `o~.

If the symbol contains a character that looks similar to a vertically flipped ASCII character, the mappings use the capitalized version of that character. For example, `t is and `T is .

Usage

GNU APL

$ INPUTRC=/path/to/this/directory/inputrc rlwrap --always-readline apl

Dyalog APL

$ INPUTRC=/path/to/this/directory/inputrc rlwrap /bin/bash -c 'cat | /Applications/Dyalog-17.1.app/Contents/Resources/Dyalog/dyalog -q'

/Applications/Dyalog-17.1.app/Contents/Resources/Dyalog/dyalog is the path to the Dyalog APL CLI on macOS + Dyalog 17.1; replace it appropriately with the path in your system.

(-q prevents Dyalog APL from quitting on error.)

All Mappings

Input Output
`/ ÷
`x ×
`L
`l
`o*
`*o
`o
`[:-]
`T
`t
`^
`v
`^~
`~^
`v~
`~v
`<=
`>=
`/=
`==
`=/=
`p
`-,
`,-
`o|
`|o
`o-
`-o
`o\
`\o
`^|
`|^
`|v
`v|
`(
`(_
`_(
`e
`[]
`)
`/-
`\-
`-\
`u
`U
`-|
`|-
`i
`i_
`_i
`e_
`_e
`/|\
`\|/
`- ¯
`<-
`o~
`~o
`oT
`To
`ot
`to
`<>
`Uo
`oU
`\-/
`a
`w
`[ ]
`: ¨
`:~
`~:
`:*
`*:
`.
`[=]
`.:
`:.
`[<>]
`[:]
`I