By Jon Orwant Publisher: O'Reilly Media Released: May 2003 Pages: 592
The Perl Journal (TPJ) did something most print journals aspire to, but few succeed. Within a remarkable short time, TPJ acquired a cult-following and became the voice of the Perl community. Every serious Perl programmer subscribed to it, and every notable Perl guru jumped at the opportunity to write for it. Back issues were swapped like trading cards. No longer in print format, TPJ remains the quintessential spirit of Perl--a publication for and by Perl programmers who see fun and beauty in an admittedly quirky little language. Games, Diversions, and Perl Culture is the third volume of The Best of the Perl Journal, compiled and re-edited by the original editor and publisher of The Perl Journal, Jon Orwant. In this series, we've taken the very best (and still relevant) articles published in TPJ over its 5 years of publication and immortalized them into three volumes. The 47 articles included in this volume are simply some of the best Perl articles ever written on the subjects of games, diversions, and the unique culture of this close-knit community, by some of the best Perl authors and coders. Games, Diversions & Perl Culture focuses on entertaining topics that make Perl users such fanatics about the language. You'll find all of the playful features TPJ offered over the years, including the Obfuscated Perl Contests, Perl Quiz Shows, humor articles, and renowned one-line recipes. The book also contains a panoply of quirky applications of Perl, including genetic algorithms, home automation, music programming, and an entire section on natural language processing. This anthology is an unmatched compendium of Perl lore. |
-
Chapter 1 Introduction -
Culture -
Chapter 2 Wherefore Art, Thou? - Music to My Ears
-
Chapter 3 TPJ Cover Art: From Camels to Spam - TPJ #1: The Camel
- TPJ #2: The Pearl
- TPJ #3: RSA on Greenbar
- TPJ #4: Etch-a-Sketch.
- TPJ #5: Commodities
- TPJ #6: Scrabble
- TPJ #7: Spiderball
- TPJ #8: The Coffee Cup Fiasco
- TPJ #9: Drummer/Coder Wanted
- TPJ #10: The Underwood Typewriter
- TPJ #11: The Conspiracy
- TPJ #12: The Atari Perl Cartridge
- TPJ #13: Dance Remixes
- TPJ #14: Outlook Not So Good
- TPJ #15: Braille blocks
- TPJ #16: e. e. cummings’ Gravestone
- TPJ #17: Napster
- TPJ #18: Spam
- TPJ #19: Monopoly Money
- TPJ #20: WAP
-
Chapter 4 Perl Style - Background
- Existing Measures
- The Basic Units
- The Tool
- Usage
- Why This Should Be Hard To Do
- The Perl Compiler to the Rescue
- Future Directions
- Acknowledgments
-
Chapter 5 Home Automation with MisterHouse - HA! Perl?
- MisterHouse
- Objects in the Home
- Talking and Listening
- A Smart TV Guide
- Whole House CallerID
- Squeaky Stairs
- You Have Mail
- Say What?
- Give Your House a Brain
-
Chapter 6 Home Automation: The X10 Nitty-Gritty - Simple Output Commands: The CM17
- The ControlX10::CM17 and ControlX10::CM11 Modules
- What’s in a Command?
- Timing Issues
- Bidirectional I/O with the CM11
- A Few More Considerations
-
Chapter 7 A Day in the Life of comp.lang.perl.misc - A Little History
- How the “Day in the Life” Was Done
- The Raw Statistics
- The Day’s Weather Report
- Netiquette Nits
- The Regulars
- The Future of comp.lang.perl.misc
-
Science -
Chapter 8 Perl-fect Sundials - Building Your Own
-
Chapter 9 Genetic Algorithms - The Genetic Code
- Assembling an Organism
- Survival of the Fittest
- Sex and Mutation
- The Terrifying Results
- Other Applications
- Going Further
- Other Fitness Functions
- Resources
-
Chapter 10 How Perl Saved the Human Genome Project - Bioinformatics and Perl
- Other Uses for Perl
- Problems with Perl
-
Chapter 11 PDL: The Perl Data Language - The perldl Shell
- Listing of a Few PDL Functions
- Where Are We Now?
-
Language -
Chapter 12 Chatbot::Eliza - How It Works
- What Now?
- References
-
Chapter 13 Infobots and Purl - IRC
- Bots and Infobots
- So What?
- Are You Spongeworthy?
- You Can’t Do That in Public!
- What Are You Thinking?
- Idiot Savant
- A Sense of Play
- What? We Ordered No Pizzas!
- Future Directions
- Where to Get It
- Acknowledgments
- References
-
Chapter 14 Speech Synthesis - Pre-Recorded Sentences
- Lexical Synthesis in One s///
- The Out-of-Vocabulary Problem: Synthesis in One s///e
- Text-to-Phoneme Conversion
- More Context: Two Substitutions
- What Else?
- References
-
Chapter 15 Lazy Text Formatting - Text::Autoformat
- Paragraphs
- Quoting
- Lists
- Quotations
- Widows
- Justification and Sentencing
- Future Features
-
Chapter 16 Perl and MIDI: Simple Languages, Easy Music - Hard Things Possible
- Approach 1: A Novel Language
- Approach 2: An Extensional Language
- Easy Things Easy
- Behold MIDI::Simple!
- “Relative” Notes
- Percussion, Uniformity, and noop
- The Object-Oriented Interface
- Using synch, and Some Actual Music
- Mod, Canons, and Rounds
- Future Features
- References
-
Chapter 17 Braille Contractions and Regular Expressions - Braille and Contractions
- Sample Text in Braille
-
Chapter 18 Hypernyms, Hyponyms, Pertainyms, and Other Word Relationships - Concepts in Wordnet
- Converting the Data
- Installing Lingua::Wordnet
- Basic Usage
- Movin’ It Up a Level
- Other Word Relationships
- Other Useful Functions
- What’s Next?
-
Chapter 19 Parsing Natural Language - I See a Pattern Developing
- Link Grammar
- Lingua::LinkParser
- Irregular Regular Expressions, Overloaded
- What Sucks? What Rocks?
- What Sucks, Regex Style
- The What-Sucks-Ometer
- There’s Lots More Here
- References
- A Full Lingua::LinkParser Example
-
Chapter 20 Word Morphology - Morphology: Word Form and Structure
- Morphological Analysis and Perl
- Constructing a Word Frequency List
- Morphological Inflections and Derivations
- Representing a Single Rule
- Representing Many Rules
- Telling Good from Bad
- The Key Insight!
- Implementing It
- Applying the Derivation Process to All Tokens
- Summary
- Future Work
-
Chapter 21 Smart Matching for Human Names - Installing the Modules
- Module Contents
- Using the Modules
- What They Do
- Matching Nicknames
- Conclusion
-
Chapter 22 Localizing Your Perl Programs - A Localization Horror Story: It Could Happen to You
- The Linguistic View
- Breaking gettext
- Replacing gettext
- Buzzwords: Abstraction and Encapsulation
- Buzzword: Isomorphism
- Buzzword: Inheritance
- Buzzword: Concision
- The Devil in the Details
- Proof in the Pudding: Localizing Web Sites
- References
-
Chapter 23 Internationalized Sorting - Default sort Versus “Normal” English Sorting
- Locale-Based Sorting
- Spanish: Cana y Caña
- Spanish: Chorizo, Chimichangas, Chicharrones, y Churros
- Bi-Level Sorting to the Rescue
- English: Résumé and Resume
- Optimizing with Memoization
- Sorting it All Out
-
Chapter 24 Simulating Typos with Perl - Simulating the Typos
- How to Identify Words
- Typos in Other Languages
- Results
- References
-
Chapter 25 Correcting Typos with Perl - Why Was It Written?
- How Does It Work?
- The Sub::Approx Module
- The Symbol::Approx::Sub Module
- Future Plans
- Afterword
-
Chapter 26 Learning Japanese with an HTML Filter - The Web
- Dictionary Database
- The CGI Script
- Taking It a Step Further
- Conclusion
- wwwkan.pl
-
Games and Quizzes -
Chapter 27 Games in Perl - Strategy Games
- Cards
- Dice
- Word Games
- Twitch Games
-
Chapter 28 The Prisoner’s Dilemma - The Iterated Prisoner’s Dilemma
- The Three-Way Prisoner’s Dilemma
- The Prisoner’s Dilemma Programming Contest
- Results of the Contest
-
Chapter 29 The Rezrov Infocom Game Interpreter - Resurrecting the Z-Machine
- Enter the Camel
- What’s It Do?
- The Joy of vec
- Tinkering with the Z-Machine
- Teleport
- Bamf
- Pilfer
- Universal Command Set
- Interface Abstraction
- Performance Considerations
- Quantity Is Job One
- A Plea for Inlining
- Conclusion
- References
-
Chapter 30 Tktk: A Perl/Tk Solitaire Game - The Rules
- A First Cut
- Shuffling
- Layout
- Show the Tableau!
- Would You Like to Play a Game?
- Making the Moves
- Laying the Base
- Pickup Lines
- Oops!
- Finishing Touches
-
Chapter 31 The First Perl/Internet Quiz Show - Toss-up Questions
- Bonus Questions
- The Answers
-
Chapter 32 The Second Perl/Internet Quiz Show - Sample Questions
- Toss-up Questions
- Bonus Questions
- The Answers
-
Chapter 33 The Third Perl/Internet Quiz Show - Toss-up Questions
- Bonus Questions
-
Chapter 34 The Fourth Perl/Internet Quiz Show - Toss-up Questions
- Toss-up Answers
- Bonus Answers
-
Chapter 35 The Perl Whirl Quiz Show - Toss-up Questions
- Bonus Questions
- Toss-up Answers
- Bonus Answers
-
Chapter 36 The Perl Wizard’s Quiz - Answers
-
Poetry -
Chapter 37 Just Another Perl Haiku - The Tao of Haiku
- Haiku Online
- Artificial Haiku
- The Coy Module
- A Note About the Name
- Inside the Coy Module
- Mere Words
- Random Harvesting
- Filling in the Blanks
- The Other Type of Grammar
- Counting the Beat
- But Does the Bear Dance?
- Extending the Module
- Is There a Poet in the House?
- It Seemed Like a Good Idea at the Time
-
Chapter 38 Searching for Rhymes with Perl - Where to Look
- Preparing the Data
- Searching the Prepared Data
- Counting Syllables
- Coping with (Syllabic) Stress
- A Simple mpron Searcher
- Accommodating Another Notation
-
Chapter 39 The Perl Poetry Contest - The Categories
- The Results
-
Politics -
Chapter 40 Pairwise Voting - The Preference Ballot
- Impossibility Theorems
- The Borda Method
- The Hare Method
- Pairwise Election Methods
- Condorcet’s Method
- Smith’s Method
- Copeland’s Method
- The Algorithms
- The Pairwise Engine
- Using CGI to Spit It All Out
- Random Thoughts
- References
- Sites
-
Chapter 41 Secure Internet Voting - About Secure Elections
- The Database Schema
- Generating VRNs
- The E-Ballot
- The vote Program
- Tallying the Votes
-
Chapter 42 Perl and Nuclear Weapons Don’t Mix - A Little Rocket Science
- Red Alert!
-
Obfuscated Perl -
Chapter 43 The Zeroth Annual Obfuscated Perl Contest - The Categories
- How It Works
- Hints and Suggestions
- So There You Have It
- Results
-
Chapter 44 The First Obfuscated Perl Contest - Results
-
Chapter 45 The Third Obfuscated Perl Contest - Most Powerful
- Most Creative
- Best “The Perl Journal”
- Best of Show
-
Chapter 46 The Fourth Obfuscated Perl Contest - Results
-
Chapter 47 The Fifth Obfuscated Perl Contest - Results
-
Chapter 48 One-Liners - Useful One-Liners
- Not So Useful One-Liners
-
Colophon |
- Title:
- Games, Diversions & Perl Culture
- By:
- Jon Orwant
- Publisher:
- O'Reilly Media
- Formats:
-
- Print
- Ebook
- Safari Books Online
- Print:
- May 2003
- Ebook:
- October 2010
- Pages:
- 592
- Print ISBN:
- 978-0-596-00312-8
- | ISBN 10:
- 0-596-00312-9
- Ebook ISBN:
- 978-1-4493-0171-2
- | ISBN 10:
- 1-4493-0171-1
|
Colophon Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal on the cover of Games, Diversions, and Perl Culture: Best of the Perl Journal is a flying dragon (genus drac). Found in the tropical rain forests of the East Indies and Southern Asia, this small lizard has five or six hind ribs on each side that are prolonged and covered with weblike skin, forming "wings." While jumping, the lizard spreads its wings and glides to the ground; it can generally glide almost nine yards. Gliding is used only as a means of locomotion and not for predator escape; toescape danger, the lizard always climbs. The lizard also never glides when it's raining or windy. A flying dragon feeds mostly on small ants and termites and is described as a sit-and-wait feeder. It will sit next to a tree trunk waiting for insects to come to it. A female flying dragon builds a nest for her eggs by forcing her head into the soil to create a small hole. She then lays five eggs into the hole and covers them with dirt, packing the soil on top with a patting motion of her head. The eggs take approximately 32 days to incubate. Humans don't eat flying dragons, and they aren't currently listed as threatened. Jane Ellin was the production editor and proofreader for Games, Diversions, and Perl Culture: Best of the Perl Journal. Colleen Gorman, Sarah Sherman, and Claire Cloutier provided quality control. Sue Willing, Linley Dolby, Jamie Peppard, and Sada Preisch provided production support. Judy Hoer wrote the index. Hanna Dyer designed the cover of this book, based on a series design by Edie Freedman. The cover image is a 19th-century engraving from the Dover Archives. Emma Colby produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font. Bret Kerr designed the interior layout, based on a series design by David Futato. Erik Ray and Mike Sierra converted the files from pod to FrameMaker 5.5.6. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed. The illustrations that appear in the book were produced by Robert Romano and Jessamyn Read using Macromedia FreeHand 9 and Adobe Photoshop 6. The tip and warning icons were drawn by Christopher Bing. This colophon was written by Mary Anne Weeks Mayo. |
|
Description
|
Table of Contents
|
Product Details
|
Colophon
|
 |
|
 |
|
|
|
Recommended for You
|
Recently Viewed
|
 |
|
By Michael Fitzgerald
July 2007
Ebook: $7.99
Print & Ebook: $10.99
Print: $9.99
By Bonnie Biafore
August 2007
Ebook: $31.99
Print & Ebook: $43.99
Print: $39.99
By Sal Mangano
December 2005
Ebook: $43.99
Print & Ebook: $60.49
Print: $54.99
|
Customer Reviews
|
|
|