Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: The science fiction writer who most personifies Perl is:

by Ratazong (Prior)
on Jul 01, 2010 at 12:20 UTC ( #847502=note: print w/ replies, xml ) Need Help??


in reply to The science fiction writer who most personifies Perl is:

I nominate Neal Stephenson, for showing that Perl has its uses even in literacy. E.g. in his book Cryptonomicon, which contains a Perl script. It starts with

#!/usr/bin/perl -s Sf=Sd?-1 1,SD=pack('C*',33 86),Sp=shift; $p=--y/a-z +/A-Z/,SU='SD=--s/(.*)US/US1/, SD=-s/U(.)/S1U/;',(SV ...
.. and according to wikipedia it is a precise description of (and indeed a Perl script for) the Solitaire cipher (called Pontifex in the book).

Rata (relying on 2nd-hand-information)


Comment on Re: The science fiction writer who most personifies Perl is:
Download Code
Re^2: The science fiction writer who most personifies Perl is:
by ww (Bishop) on Jul 02, 2010 at 02:49 UTC
    Read the book...while out-of-reach of the net.

    Typed in the code.

    Didn't get a t-shirt; didn't even get the code to pass -c but didn't get any useful info by adding strict, warnings, diagnostics, etc. ad nauseum.

    Proofread... repeatedly. To no avail. (Remember: the one-eyed man is king in a world of the blind)

    Lo and behold: your wiki ref led me eventually to a Stevenson site where I found this:

    13. Hey, the perl script doesn't work! What's the deal?

    The production people at the publisher tried valiantly to get the perl script typeset without any errors, but one error did slip in. It is located on the eighth line. Where the book says
    $o=~s/.chr((
    and so on, it SHOULD say
    $o=~s/./chr((
    and so on.

    And following a few links further, http://www.ciphergoth.org/crypto/solitaire/perl-sol and http://www.ciphergoth.org/crypto/solitaire/c-sol.c

    Woot!

    Update 20100704: added link to Stevenson's errata in para beginning "Lo and...."

Re^2: The science fiction writer who most personifies Perl is:
by ambrus (Abbot) on Jul 04, 2010 at 10:48 UTC

    Are all those S supposed to be dollar signs?

      No, "s" is correct; there's a very obscurely implied ellipsis ("and so on"); previous node's blockquote is verbatim from site. We're looking at a substitution:
      $o =~ s/./chr((ord($&)-13+$f*&e)%26+65)/eg;
      See Bruce Schneier's Counterpane site, referenced by author's errata.
Re^2: The science fiction writer who most personifies Perl is:
by JediWizard (Deacon) on Jul 20, 2010 at 19:08 UTC

    I second (or third or forth or whatever) this nomination. Between Cryptonomicon and "In the begining there was the command line" Stephenson in my mind personifies perl, and the open source software movement in SciFi.


    They say that time changes things, but you actually have to change them yourself.

    —Andy Warhol

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://847502]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (16)
As of 2014-09-17 13:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (81 votes), past polls