1
2
3
4
module                    Morse

 A,B,C=proc{M.tr(' ','').gsub(/#{$/}+/,$/).split($/).map{|x|
...

Ruby On Morse Code Encoder/Decoder

by Magnus Holm, October 19, 2008 18:28 Star_fullStar_fullStar_fullStar_fullStar_full

lel: You're absolutely righ...

B397b498cc02503a2d86c86176f7fd3e Talk
1
2
3
4
module Morse;A=[19,189,192,63,6,165,66,162,18,175,64,171,22,21,67,174,199,57,
54,7,55,163,58,190,193,198];B=proc{|c|A[c-65].to_s(3)[1..-1].tr('10','-.')}
C=proc{|m|(A.index(("2"+m.tr('-.','10')).to_i(3))||return)+65}
...

Ruby On Morse Code Encoder/Decoder

by Magnus Holm, October 01, 2008 12:49 Star_fullStar_fullStar_fullStar_fullStar_full
B397b498cc02503a2d86c86176f7fd3e Talk