Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
44
Task/Morse-code/Quackery/morse-code.quackery
Normal file
44
Task/Morse-code/Quackery/morse-code.quackery
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
[ $ /
|
||||
import subprocess
|
||||
subprocess.run(["say",
|
||||
string_from_stack()])
|
||||
/ python ] is speak ( $ --> )
|
||||
|
||||
[ 3 times [ $ " " speak ] ] is pause ( --> )
|
||||
|
||||
[ [] swap witheach
|
||||
[ char - = iff
|
||||
[ $ "dash " join ]
|
||||
else [ $ "dot " join ] ]
|
||||
space join ] is dotdash ( $ --> $ )
|
||||
|
||||
[ table ] is letter ( n --> $ )
|
||||
$ ".- -... -.-. -.. . ..-.
|
||||
--. .... .. .--- -.-
|
||||
.-.. -- -. --- .--.
|
||||
--.- .-. ... - ..- ...-
|
||||
.-- -..- -.-- --.."
|
||||
nest$ witheach
|
||||
[ dotdash ' letter put ]
|
||||
|
||||
|
||||
[ table ] is number ( n --> $ )
|
||||
$ "----- .---- ..--- ...--
|
||||
....- ..... -.... --...
|
||||
---.. ----."
|
||||
nest$ witheach
|
||||
[ dotdash ' number put ]
|
||||
|
||||
[ witheach
|
||||
[ dup space = iff
|
||||
[ drop pause ] done
|
||||
dup char 0 char 9 1+
|
||||
within iff
|
||||
[ char 0 -
|
||||
number speak ] done
|
||||
upper
|
||||
dup char A char Z 1+
|
||||
within iff
|
||||
[ char A -
|
||||
letter speak ] done
|
||||
drop ] ] is morse ( $ --> )
|
||||
Loading…
Add table
Add a link
Reference in a new issue