The translator
idun converts APL source to rune files and back. Install it with Go:
go install github.com/cursork/idun/cmd/idun@latest
The direction follows from the file name: .apl ↔ .idun, .aplf ↔
.idunf (and likewise .aplo .apln .aplc .apli .apla), and .dyalog ↔
.idund.
idun Stats.aplf # writes Stats.idunf
idun Stats.idunf # writes Stats.aplf
idun -ascii Stats.aplf # also swap the ASCII primitives (tier B)
idun -f Stats.aplf # overwrite an existing output
idun - < in.aplf > out.idunf
idun -check Stats.aplf # verify the round trip
idun proj # mirror the directory proj/ into proj.idun/
Conversion swaps each glyph with its rune and each rune with its glyph, in one pass, comments and strings included. Doing it twice gives back the original file byte for byte.
ᚳ a rune in a string: '⍺'
greetᚷ{'Hello, ',ᛦ}
⍝ a rune in a string: 'ᚠ'
greet←{'Hello, ',⍵}