Higher-Order Perl: Transforming Programs with Programs

A Guide To Program Transformation

av Mark-Jason Dominus  (inbunden, 2004)

Pris:  692:-
Skickas inom 2-5 vardagar.
Fri frakt vid beställning på minst 99 kr för privatpersoner i Sverige - Läs mer


Bli först att betygsätta och recensera boken Higher-Order Perl: Transforming Programs with Programs.

Higher-Order Perl: Transforming Programs with Programs (inbunden)
  • Inbunden (cloth)
  • Språk: Engelska
  • Antal sidor: 540
  • Utg.datum: 2004-12-01
  • Medarbetare: JasonDominus, Mark
  • Illustrationer: Ill.
  • Dimensioner: 240 x 194 x 34 mm
  • Vikt: 1190 g
  • Antal komponenter: 1
  • Komponenter: 3:B&W 7.5 x 9.25 in or 235 x 191 mm Perfect Bound on White w/Gloss Lam
  • ISBN: 9781558607019

Recensioner i media

Higher-Order Perl is the most exciting, most clearly-written, most comprehensive, and most forward-looking programming book I've read in at least ten years. It's your map to the future of programming in any language. - Sean M. Burke, Leading Programmer, Comprehensive Perl Archive Network (CPAN) There are lots of book that teach you new Perl modules or techniques. This book goes beyond that and teaches a new way to think about Perl programming. - Peter Norvig, Google Inc. As a programmer, your bookshelf is probably overflowing with books that did nothing to change the way you program... or think about programming. You're going to need a completely different shelf for this book. While discussing caching techniques in Chapter 3, Mark Jason Dominus points out how a large enough increase in power can change the fundamental way you think about a technology. And that's precisely what this entire book does for Perl. It raids the deepest vaults and highest towers of Computer Science, and transforms the many arcane treasures it finds--recursion, iterators, filters, memoization, partitioning, numerical methods, higher-order functions, currying, cutsorting, grammar-based parsing, lazy evaluation, and constraint programming--into powerful and practical tools for real-world programming tasks: file system interactions, HTML processing, database access, web spidering, typesetting, mail processing, home finance, text outlining, and diagram generation. Along the way it also scatters smaller (but equally invaluable) gems, like the elegant explanation of the difference between 'scope' and 'duration' in Chapter 3, or the careful exploration of how best to return error flags in Chapter 4. It even has practical tips for Perl evangelists. Dominus presents even the most complex ideas in simple, comprehensible ways, but never compromises on the precision and attention to detail for which he is so widely and justly admired. His writing is - as always - lucid, eloquent, witty, and compelling. Aptly named, this truly is a Perl book of a higher order, and essential reading for every serious Perl programmer. - Damian Conway, Co-designer of Perl 6

Bloggat om Higher-Order Perl: Transforming Programs with Programs

Övrig information

By Mark-Jason Dominus


1. Recursion and Callbacks; 1.1 Decimal to Binary Conversion; 1.2 Factorial; 1.2.1 Why Private Variables are Important; 1.3 The Tower of Hanoi; 1.4 Hierarchical Data; 1.5 Applications and Variations of Directory Walking; 1.6 Functional vs. Object-Oriented Programming; 1.7 HTML; 1.7.1 More Flexible Selection; 1.8 When Recursion Blows Up; 1.8.1 Fibonacci Numbers; 1.8.2 Partitioning; 2. Dispatch Tables; 2.1 Configuration File Handling; 2.1.1 Table-driven configuration; 2.1.2 Advantages of Dispatch Tables; 2.1.3 Dispatch Table Strategies; 2.1.4 Default Actions; 2.2 Calculator; 2.2.1 HTML Processing Revisited; 3. Caching and Memoization; 3.1 Caching Fixes Recursion; 3.2 Inline Caching; 3.2.1 Static Variables; 3.3 Good Ideas; 3.4 Memoization; 3.5 The Memoize Module; 3.5.1 Scope and Duration; Scope; Duration; 3.5.2 Lexical Closure; 3.5.3 Memoization Again; 3.6 Caveats; 3.6.1 Functions whose Return Values do not Depend on their Arguments; 3.6.2 Functions with Side Effects; 3.6.3 Functions that Return References; 3.6.4 A Memoized Clock?; 3.4.5 Very Fast Functions; 3.7 Key Generation; 3.7.1 More Applications of User-Supplied Key Generators; 3.7.2 Inlined Cache Manager with Argument Normalizer; 3.7.3 Functions with Reference Arguments; 3.7.4 Partioning; 3.7.5 Custom Key Generation for Impure Functions; 7.8 Caching in Object Methods; 3.8.1 Memoization of Object Methods; 3.9 Persistent Caches; 3.10 Alternatives to Memoization; 3.11 Evangelism; 3.12 The Benefits of Speed; 3.12.1 Profiling and Performance Analysis; 3.12.2 Automatic Profiling; 3.12.3 Hooks; 4. Iterators; 4.1 Introduction; 4.1.1 Filehandles are Iterators; 4.1.2 Iterators are Objects; 4.1.3 Other Common Examples of Iterators; 4.2 Homemade Iterators; 4.2.1 A Trivial Iterator: ; Syntactic Sugar for Manufacturing Iterators; 4.2.2 dir_walk(); 4.2.3 On Clever Inspirations; 4.3 Examples; 4.3.1 Permutations; 4.3.2 Genomic Sequence Generator; 4.3.3 Filehandle Iterators; 4.3.4 A Flat-File Database; Improved Database; 4.3.5 Searching Databases Backwards; A Query Package that Transforms Iterators; An Iterator that Reads Files Backwards; Putting it Together; 4.3.6 Random Number Generation; 4.4 Filters and Transforms; 4.5 The Semipredicate Problem; 4.5.1 Avoiding the Problem; 4.5.2 Alternative undefs; 4.5.3 Rewriting Utilities; 4.5.4 Iterators that Return Mulitple Values; 4.5.5 Explicit Exhaustion Function; 4.5.6 Four-Operation Iterators; 4.5.7 Iterator Methods; 4.6 Alternative Interfaces to Iterators; 4.6.1 Using foreach to Loop over more than one Array; 4.6.2 An Iterator with an each-like Interface; 4.6.3 Tied Variable Interfaces; Summary of tie; Tied Scalars; Tied Filehandle; 4.7 An Extended Example: Web Spiders; 4.7.1 Pursuing only Interesting Links; 4.7.2 Referring URLs; 4.7.3 robots.txt; 4.7.4 Summary; 5. From Recursion to Iterators; 5.1 The Partition Problem Revisited; 5.1.1 Finding All Possible Partions; 5.1.2 Optimizations; 5.1.3 Variations; 5.2 How to Convert a Recursive Function to an Iterator; 5.3 A Generic Search Iterator; 5.4 Other General Techniques for Eliminating Recursion; 5.4.1 Tail Call Elimination; Someone Else's Problem; Creating Tail Calls; Explicit Stacks; Eliminating Recursion from fib(); 6. Infinite Streams; 6.1 Linked Lists; 6.2 Lazy Linked Lists; 6.2.1 A Trivial Stream: upto(); 6.2.2 Utilities for Streams; 6.3 Recursive Streams; 6.3.1 Memoizing Streams; 6.4 The Hamming Problem; 6.5 Regex String Generation; 6.5.1 Generating Strings in Order; 6.5.2 Regex Matching; 6.5.3 Cutsorting; Log Files; 6.6 The Newton-Raphson Method; 6.6.1 Approximation Streams; 6.6.2 Derivatives; 6.6.3 The Tortoise and the Hare; 6.6.4 Finance; 6.7 Power Series; 6.7.1 Derivatives; 6.7.2 Other Functions; 6.7.3 Symbolic Computation; 7. Higher-Order Functions and Currying; 7.1 Currying; 7.2 Common Higher-Order Functions; 7.2.1 Automatic Currying; 7.2.2 Prototypes; Pro

Du kanske gillar...

Windows 10 helt enkelt (häftad)

Windows 10 helt enkelt

Mark Edward Soper
World of Warcraft: Chronicle Volume 1: Chronicle volume 1 (inbunden)

World of Warcraft: Chronicle Volume 1: Chronicle vol...

Blizzard Entertainment
Programmering 1 med C# : Lärobok (kartonnage)

Programmering 1 med C# : Lärobok

Krister Trangius
Programmering 1 med C# : Arbetsbok ()

Programmering 1 med C# : Arbetsbok

Krister Trangius