Did you know Alonzo can send Morse code ?
Cute! Poor Alonzo, being hit on the head so much. :~)
Ah, the perks of understanding Morse Code!
What if he isn’t being hit on the head, but instead is being tapped?
I think he’s being scratched (pun intended) on his lambda like a cat or dog behind the ear.
Disclamer:
No mascots were harmed during the execution of this software…
I want to know why the Morse code translations for digits have the digit itself minus one in them. What happened to zero too? Is it being taken literally?
Idk, i will look at this today. Probably when i translate char to morse, the morse code is store wirh a key paired dictionnary, so item “a” of morse code return the value of a, but item 5 of morse code don’t return the value of “5” but the 5th item os the list
Ah, the perils of overloading… To fix that you have to use
![]()
as the label.
Problen solved. Thk for reporting it to me.
As I suspected, the problem originated from the dictionary “letters” (key, translation)
old json
{
“!”: “—.”, “"”: “.-..-.”, “$”: “…-..-”, “'”: “.----.”,
“(”: “-.–.”, “)”: “-.–.-”, “+”: “.-.-.”, “,”: “–..–”,
“-”: “-…-”, “.”: “.-.-.-”, “/”: “-..-.”,
“0”: “-----”, “1”: “.----”, “2”: “..—”, “3”: “…–”,
“4”: “…-”, “5”: “…”, “6”: “-…”, “7”: “–…”,
“8”: “—..”, “9”: “----.”,
“:”: “—…”, “;”: “-.-.-.”, “=”: “-…-”, “?”: “..–..”,
“@”: “.–.-.”,
“A”: “.-”, “B”: “-…”, “C”: “-.-.”, “D”: “-..”,
“E”: “.”, “F”: “..-.”, “G”: “–.”, “H”: “…”,
“I”: “..”, “J”: “.—”, “K”: “-.-”, “L”: “.-..”,
“M”: “–”, “N”: “-.”, “O”: “—”, “P”: “.–.”,
“Q”: “–.-”, “R”: “.-.”, “S”: “…”, “T”: “-”,
“U”: “..-”, “V”: “…-”, “W”: “.–”, “X”: “-..-”,
“Y”: “-.–”, “Z”: “–..”,
“[”: “-.–.”, “]”: “-.–.-”, “_”: “..–.-”, " ": " "
}
(I add the letter “N” before each number in the new json)
new json
{
“!”: “—.”, “"”: “.-..-.”, “$”: “…-..-”, “'”: “.----.”,
“(”: “-.–.”, “)”: “-.–.-”, “+”: “.-.-.”, “,”: “–..–”,
“-”: “-…-”, “.”: “.-.-.-”, “/”: “-..-.”,
“N0”: “-----”, “N1”: “.----”, “N2”: “..—”, “N3”: “…–”,
“N4”: “…-”, “N5”: “…”, “N6”: “-…”, “N7”: “–…”,
“N8”: “—..”, “N9”: “----.”,
“:”: “—…”, “;”: “-.-.-.”, “=”: “-…-”, “?”: “..–..”,
“@”: “.–.-.”,
“A”: “.-”, “B”: “-…”, “C”: “-.-.”, “D”: “-..”,
“E”: “.”, “F”: “..-.”, “G”: “–.”, “H”: “…”,
“I”: “..”, “J”: “.—”, “K”: “-.-”, “L”: “.-..”,
“M”: “–”, “N”: “-.”, “O”: “—”, “P”: “.–.”,
“Q”: “–.-”, “R”: “.-.”, “S”: “…”, “T”: “-”,
“U”: “..-”, “V”: “…-”, “W”: “.–”, “X”: “-..-”,
“Y”: “-.–”, “Z”: “–..”,
“[”: “-.–.”, “]”: “-.–.-”, “_”: “..–.-”, " ": " "
}
Ah, the perils of overloading… To fix that you have to use
as the label.
That’s already my solution !
Thk for reporting it to me.
Thank @mobility212, not me. :~)
(I add the letter “N” before each number in the new json)
My suggestion was a little different: put the N before every key in the dictionary, not just numbers. It doesn’t do any harm and it simplifies the code by leaving out tests both in the creation and in the lookup of keys.


