Skip to content
This repository has been archived by the owner on Jan 9, 2021. It is now read-only.

Commit

Permalink
Changes based on Hoon style feedback from Fang
Browse files Browse the repository at this point in the history
  • Loading branch information
mattnewport committed Aug 30, 2019
1 parent cb2c4c2 commit c274ae7
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions speakrune/gen/speakrune.hoon
@@ -1,51 +1,51 @@
|= raw=tape
|= runes=tape
^- tape
=< ?:((valid raw) (turn raw convert) "input contains non-rune characters")
|%
|^ ?: (valid runes)
(turn runes convert)
"input contains non-rune characters"
++ valid
|= x=tape
^- ?
=/ chars (sy x)
(~(all in chars) |=(c=@t (~(has by table) c)))
(~(all in chars) ~(has by table))
++ convert
|= x=@t
^- @t
=/ r (trip (~(got by table) x))
(crip r)
(~(got by table) x)
++ 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'
:~ [' ' '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']
==
--

0 comments on commit c274ae7

Please sign in to comment.