Data update

This commit is contained in:
Ingy döt Net 2023-12-16 21:33:55 -08:00
parent 35bcdeebf8
commit 74c69a0df6
2427 changed files with 31826 additions and 3468 deletions

View file

@ -0,0 +1,24 @@
10 rem Morse code
20 dim c$(54)
30 for f = 1 to 54
40 read l$ : read m$
50 d$ = d$+l$ : c$(f) = m$
60 next f
100 line input "Message? ";t$
105 t$ = ucase$(t$)
110 for f = 1 to len(t$)
120 p = instr(d$,mid$(t$,f,1))
130 if p > 0 then print c$(p); else print "?";
140 next f
150 print
160 goto 100
1000 data "A","._","B","_...","C","_._.","D","_..","E",".","F",".._."
1010 data "G","__.","H","....","I","..","J",".___","K","_._","L","._.."
1020 data "M","__","N","_.","O","___","P",".__.","Q","__._","R","._."
1030 data "S","...","T","_","U",".._","V","..._","W",".__","X","_.._"
1040 data "Y","_.__","Z","__..","1",".____","2","..___","3","...__"
1050 data "4","...._","5",".....","6","_....","7","__...","8","___.."
1060 data "9","____.","0","_____",".","._._._",",","__..__","?","..__.."
1070 data "'",".____.","!","_._.__","/","_.._.","(","_.__.",")","_.__._"
1080 data "&","._...",":","___...",";","_._._.","=","_..._","+","._._.","-","_...._"
1090 data "_","..__._","\","._.._.","$","..._.._","@",".__._."

View 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 ( $ --> )