Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Re: Re: (Golf) Cryptographer's Tool #1

by srawls (Friar)
on Jun 20, 2001 at 00:20 UTC ( [id://89874]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Re: Re: (Golf) Cryptographer's Tool #1
in thread (Golf) Cryptographer's Tool #1

Yes it does, but the this is straight from the specification:

Given: a word, and an 'alphabet' string (and to be exact about this latter part, each character in the word and the alphabet can be represented in 7 bits, eg the printable ASCII set).

The 15 year old, freshman programmer,
Stephen Rawls

  • Comment on Re: Re: Re: Re: (Golf) Cryptographer's Tool #1

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: (Golf) Cryptographer's Tool #1
by MeowChow (Vicar) on Jun 20, 2001 at 00:41 UTC
    Well, let's go pickin' nits... the latin abbreviation, "eg" means "for example". So according to the spec, any 7 bit ASCII character is possible; printable ASCII characters mearly represent examples of possible 7-bit characters. If, however, Masem had written "ie", which means "that is to say", then you would be correct.

    /me ducks and covers...

       MeowChow                                   
                   s aamecha.s a..a\u$&owag.print
      Drats, I knew I should have taken latin : )

      Just tack on 4 chars to my solution, \200 is the first 8 bit ASCII char, so that is what I'll have to use:

      sub c { ($_,$a,%h)=@_;s!.!$h{$&}||=($a=~/./g,"$&\200")!sge;y/\200//d;$_ }

      Update: Chipmunk seemed to think this needed to work : ) so it's fixed above, but doesn't come close to competing.

      The 15 year old, freshman programmer,
      Stephen Rawls

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://89874]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.