Re: Perl Quiz of the Week #24 (Turing Machine simulation)
Jon Ericson <[email protected]>
| Newsgroups | gmane.comp.lang.perl.qotw.discuss |
|---|---|
| Organization | I speak for myself; not JPL, NASA nor the US Government |
| Message-ID | <[email protected]> |
Zed Lopez <[email protected]> writes: > The earliest Turing Machines were implemented on manual typewriters, > where '1' and 'l' were fungible. I was maintaining this tradition. > > Well, actually, no, I just goofed. Jon's right -- that program > should produce: > > hel1o_world I like the first explaination better. :-) Here's a patch to fix the output: $ diff -u helloworld.tm helloworld_fixed.tm --- helloworld.tm 2004-09-16 16:02:27.547539100 -0700 +++ helloworld_fixed.tm 2004-09-16 16:03:39.578328100 -0700 @@ -9,3 +9,12 @@ s8 _ s9 r R s9 _ s10 l R s10 _ s11 d R + + # Fix typo + s11 d s11 d L + s11 l s11 l L + s11 r s11 r L + s11 o s11 o L + s11 w s11 w L + s11 _ s11 _ L + s11 1 s12 l L Somehow I think there must be a simpler solution. Jon