Re: [PATCH -ac] Panicking in morse code

From: Andrew Rodland (arodland@noln.com)
Date: Fri Jul 26 2002 - 23:00:05 EST


On Fri, 26 Jul 2002 22:05:03 -0400 (EDT)
"Albert D. Cahalan" <acahalan@cs.uml.edu> wrote:

> Jens Schmidt writes:
>
> > I am not a "morse" guy myself, but appreciate this idea.
>
> Yeah, same here. I have to wonder if morse is the
> best encoding, since many people don't know it.
> The vast majority of us would need a microphone and
> translator program anyway, so a computer-friendly
> encoding makes more sense. Modems don't do morse.

"asciimorse" would be possible, just going through the byte and doing -
for 1 and . for 0... as a matter of fact, it would probably only take
about two lines of code to get that to be an option, too. Does everyone
else think that that's really the situation? (Personally, I can't do
morse in my head. But neither do I have any oops-decoding hardware. >:)

I'll probably code it anyway. It should allow for a faster transmission
rate, anyway, since you don't have to accomodate humans. (Anyone who
can decode "asciimorse" in their head is a REAL freak. Er. no offense.)

> [some stuff on formats]
> I suspect it's false economy to not encode all of ASCII.
> If you have all of ASCII, then the ugly switch() goes away
> and all you need is a foo&0x7f to ensure things don't go
> from bad to worse.
>

The ugly switch _is_ gone. However, all of the characters that have a
reasonable encoding are between " and Z (with the exception of
lowercase, which can be mapped onto uppercase with one line).

so current tomorse does:

if (c >= 'a' && c <= 'z') {
        c = c - 'a' + 'A'; //This could be a bit-twiddle, but why?
}
if (c >= '"' && c <= 'Z') {
        return morsetable[c - '"'];
} else {
        return 0;
}

I think this is plenty good. :)

As for Farnsworth spacing... someone provide me with proper timings
(ditlen, inter-component space, inter-letter space) for
12wpm+farnsworth and I'll code it in, if it's really that much better.
I think it's OK the way it is, but I'm one of those types who doesn't
know anything more than 'S', 'O', and 'S'. (Well, and 'E' and 'V' and
the numbers. :)

About changing the encoding: I still don't think that anything could
really be better, from a program-flow standpoint, than what we've got
now. Prove me wrong and I'll be happy.

I don't really think the pretty macros gain anything either, unless the
morse code letters are under heavy development. Last I checked, they're
not. :)

--hobbs's $0.02

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 30 2002 - 14:00:26 EST