Skip to content

Instantly share code, notes, and snippets.

@mattnewport
Last active February 22, 2020 04:25
Show Gist options
  • Save mattnewport/47f25ba2399d75ea1869aa21817fdb55 to your computer and use it in GitHub Desktop.
Save mattnewport/47f25ba2399d75ea1869aa21817fdb55 to your computer and use it in GitHub Desktop.
Convert runes to their spoken form
|= raw=tape
^- tape
=< ?:((valid raw) (turn raw convert) "input contains non-rune characters")
|%
++ valid
|= x=tape
^- ?
=/ chars (sy x)
(~(all in chars) |=(c=@t (~(has by table) c)))
++ convert
|= x=@t
^- @t
=/ r (trip (~(got by table) x))
(crip r)
++ table
%- my
:~ :- ' ' 'ace'
:- '|' 'bar'
:- '\\' 'bas'
:- '$' 'buc'
:- '_' 'cab'
:- '%' 'cen'
:- ':' 'col'
:- ',' 'com'
:- '"' 'doq'
:- '.' 'dot'
:- '/' 'fas'
:- '<' 'gal'
:- '>' 'gar'
:- '#' 'hax'
:- '-' 'hep'
:- '{' 'kel'
:- '}' 'ker'
:- '^' 'ket'
:- '+' 'lus'
:- ';' 'mic'
:- '(' 'pal'
:- '&' 'pam'
:- ')' 'par'
:- '@' 'pat'
:- '[' 'sel'
:- ']' 'ser'
:- '~' 'sig'
:- '\'' 'soq'
:- '*' 'tar'
:- '`' 'tic'
:- '=' 'tis'
:- '?' 'wut'
:- '!' 'zap'
==
--
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment