I know you're interested in developing encode and decode for Playfair,
but members _might_ like to know that the London Times "Listener"
crosswords*,
which appear every Saturday, occasionally employ Playfair codes.
FYI, I've found these pertinent puzzles in my records:
4236 4303 4406 4451 4480 4517
IIRC, the key or codeword is always to be deduced (!), I always
doubles up as J,
and codewords are always even-lettered words/phrases, without digraphs.
Some friends disapprove, but I've tinkered away on a Dyalog APL
workspace for many
years to help with anagrams and word-matches, with many of the sneaky
variants
that Listener setters employ. I reworked it as a J script a couple of
years ago. The
word-list is built up from various open sources, topped up quite
frequently when the
setter includes a word unknown to my list. A minor problem now is that
J9 is diverging
from J701 on my iPad, so I can't include direct definition, say, as
that is incompatible with
older versions of J; I had to replace all my APL direct definitions
with conventional
verbs for the J script when transcribing them.
Playfair is included in the APL w/s, but it hasn't been needed so far
in the J version!
Sorry this has been chat rather than programming, but might have been
of some interest
Mike
* http://listenercrossword.com/ includes lists by year, but not the
actual crosswords.
I could copy those I've listed, and many others, by private message.
On 04/02/2021 04:02, Ric Sherlock wrote:
I need to separate any digraphs in a string, that consist of 2 letters the
same, by inserting an 'X' between them.
_2 ]\ 'THEEQUICKBROWFFOX'
TH
EE
QU
IC
KB
RO
WF
FO
X
'EE' is a digraph that needs an 'X' inserted. Doing so will result in:
TH
EX
EQ
UI
CK
BR
OW
FF
OX
So now we also need to separate the 'FF' digraph.
I want to define a verb "dedouble" that will process a string so:
dedouble 'THEEQUICKBROWFFOX'
THEXEQUICKBROWFXFOX
But:
dedouble 'THEEQUICKBROWFOOX'
THEXEQUICKBROWFOOX
I have implemented a solution at
https://rosettacode.org/wiki/Playfair_cipher#J but am interested in
alternative implementations.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm