reklama - zainteresowany?

Think Perl 6. How to Think Like a Computer Scientist - Helion

Think Perl 6. How to Think Like a Computer Scientist
ebook
Autor: Laurent Rosenfeld, Allen B. Downey
ISBN: 978-14-919-8050-7
stron: 466, Format: ebook
Data wydania: 2017-05-08
Księgarnia: Helion

Cena książki: 186,15 zł (poprzednio: 216,45 zł)
Oszczędzasz: 14% (-30,30 zł)

Dodaj do koszyka Think Perl 6. How to Think Like a Computer Scientist

Tagi: Perl/CGI - Programowanie

Want to learn how to program and think like a computer scientist? This practical guide gets you started on your programming journey with the help of Perl 6, the younger sister of the popular Perl programming language. Ideal for beginners, this hands-on book includes over 100 exercises with multiple solutions, and more than 1,000 code examples so you can quickly practice what you learn. Experienced programmers—especially those who know Perl 5—will also benefit.

Divided into two parts, Think Perl 6 starts with basic concepts that every programmer needs to know, and then focuses on different programming paradigms and some more advanced programming techniques. With two semesters’ worth of lessons, this book is the perfect teaching tool for computer science beginners in colleges and universities.

  • Learn basic concepts including variables, expressions, statements, functions, conditionals, recursion, and loops
  • Understand commonly used basic data structures and the most useful algorithms
  • Dive into object-oriented programming, and learn how to construct your own types and methods to extend the language
  • Use grammars and regular expressions to analyze textual content
  • Explore how functional programming can help you make your code simpler and more expressive

Dodaj do koszyka Think Perl 6. How to Think Like a Computer Scientist

 

Osoby które kupowały "Think Perl 6. How to Think Like a Computer Scientist", wybierały także:

  • Learning Perl. Making Easy Things Easy and Hard Things Possible. 7th Edition
  • 100 sposobów na Perl
  • Learning Perl 6. Keeping the Easy, Hard, and Impossible Within Reach
  • Mastering Perl. 2nd Edition
  • Intermediate Perl. 2nd Edition

Dodaj do koszyka Think Perl 6. How to Think Like a Computer Scientist

Spis treści

Think Perl 6. How to Think Like a Computer Scientist eBook -- spis treści

  • Preface
    • The Aim of This Book
    • The History of This Book
      • Conventions Used in This Book
      • Using Code Examples
      • OReilly Safari
      • How to Contact Us
    • Acknowledgments
    • Contributor List
  • I. Starting with the Basics
  • 1. The Way of the Program
    • What Is a Program?
    • Running Perl 6
    • The First Program
    • Arithmetic Operators
    • Values and Types
    • Formal and Natural Languages
    • Debugging
    • Glossary
    • Exercises
  • 2. Variables, Expressions, and Statements
    • Assignment Statements
    • Variable Names
    • Expressions and Statements
    • Script Mode
    • One-Liner Mode
    • Order of Operations
    • String Operations
    • Comments
    • Debugging
    • Glossary
    • Exercises
  • 3. Functions
    • Function Calls
    • Functions and Methods
    • Math Functions
    • Composition
    • Adding New Functions (a.k.a. Subroutines)
    • Definitions and Uses
    • Flow of Execution
    • Parameters and Arguments
    • Variables and Parameters Are Local
    • Stack Diagrams
    • Fruitful Functions and Void Functions
    • Function Signatures
    • Immutable and Mutable Parameters
    • Functions and Subroutines as First-Class Citizens
    • Why Functions and Subroutines?
    • Debugging
    • Glossary
    • Exercises
  • 4. Loops, Conditionals, and Recursion
    • Integer Division and Modulo
    • Boolean expressions
    • Logical Operators
    • Conditional Execution
    • Alternative Execution
    • Chained Conditionals
    • Nested Conditionals
    • if Conditionals as Statement Modifiers
    • Unless Conditional Statement
    • for Loops
    • Recursion
    • Stack Diagrams for Recursive Subroutines
    • Infinite Recursion
    • Keyboard Input
    • Program Arguments and the MAIN Subroutine
    • Debugging
    • Glossary
    • Exercises
  • 5. Fruitful Subroutines
    • Return Values
    • Incremental Development
    • Composition
    • Boolean Functions
    • A Complete Programming Language
    • More Recursion
    • Leap of Faith
    • One More Example
    • Checking Types
    • Multi Subroutines
    • Debugging
    • Glossary
    • Exercises
  • 6. Iteration
    • Assignment Versus Equality
    • Reassignment
    • Updating Variables
    • The while Statement
    • Local Variables and Variable Scoping
    • Control Flow Statements (last, next, etc.)
    • Square Roots
    • Algorithms
    • Debugging
    • Glossary
    • Exercises
  • 7. Strings
    • A String Is a Sequence
    • Common String Operators
      • String Length
      • Searching for a Substring Within the String
      • Extracting a Substring from a String
      • A Few Other Useful String Functions or Methods
        • flip
        • split
        • String concatenation
        • Splitting on words
        • join
        • Changing the case
    • String Traversal with a while or for Loop
    • Looping and Counting
    • Regular Expressions (Regexes)
    • Using Regexes
    • Building your Regex Patterns
      • Literal Matching
      • Wildcards and Character Classes
      • Quantifiers
      • Anchors and Assertions
        • Anchors
        • Look-around assertions
        • Code assertions
      • Alternation
      • Grouping and Capturing
      • Adverbs (a.k.a. Modifiers)
      • Exercises on Regexes
    • Putting It All Together
      • Extracting Dates
      • Extracting an IP Address
    • Substitutions
      • The subst Method
      • The s/search/replace/ Construct
      • Using Captures
      • Adverbs
    • Debugging
    • Glossary
    • Exercises
  • 8. Case Study: Word Play
    • Reading from and Writing to Files
    • Reading Word Lists
    • Exercises
    • Search
      • Words Longer Than 20 Characters (Solution)
      • Words with No e (Solution)
      • Avoiding Other Letters (Solution)
      • Using Only Some Letters (Solution)
      • Using All Letters of a List (Solution)
      • Alphabetic Order (Solution)
      • Another Example of Reduction to a Previously Solved Problem
    • Debugging
    • Glossary
    • Exercises
  • 9. Arrays and Lists
    • Lists and Arrays Are Sequences
    • Arrays Are Mutable
    • Adding New Elements to an Array or Removing Some
    • Stacks and Queues
    • Other Ways to Modify an Array
    • Traversing a List
    • New Looping Constructs
    • Map, Filter, and Reduce
      • Reducing a List to a Value
      • The Reduction Metaoperator
      • Mapping a List to Another List
      • Filtering the Elements of a List
      • Higher-Order Functions and Functional Programming
    • Fixed-Size, Typed, and Shaped Arrays
    • Multidimensional Arrays
    • Sorting Arrays or Lists
    • More Advanced Sorting Techniques
    • Debugging
    • Glossary
    • Exercises
  • 10. Hashes
    • A Hash Is a Mapping
    • Common Operations on Hashes
    • Hash as a Collection of Counters
    • Looping and Hashes
    • Reverse Lookup
    • Testing for Existence
    • Hash Keys Are Unique
    • Hashes and Arrays
    • Memos
    • Hashes as Dispatch Tables
    • Global Variables
    • Debugging
    • Glossary
    • Exercises
  • 11. Case Study: Data Structure Selection
    • The Ternary Conditional Operator
    • The given ... when Switch Statement
    • Subroutine Named and Optional Parameters
      • Named Parameters
      • Optional Parameters
    • Word Frequency Analysis
    • Random Numbers
    • Word Histogram
    • Most Common Words
    • Optional Parameters
    • Hash Subtraction
    • Constructing New Operators
    • Sets, Bags, and Mixes
    • Random Words
    • Markov Analysis
    • Data Structures
    • Building Your Own Data Structures
      • Linked Lists
      • Trees
      • Binary Heaps
    • Debugging
    • Glossary
    • Exercises: Huffman Coding
      • Variable-Length Codes
      • The Frequency Table
      • Building the Huffman Code
  • II. Moving Forward
  • 12. Classes and Objects
    • Objects, Methods, and Object-Oriented Programming
    • Programmer-Defined Types
    • Attributes
    • Creating Methods
    • Rectangles and Object Composition
    • Instances as Return Values
    • Inheritance
      • The Pixel Class
      • The MovablePoint Class
      • Multiple Inheritance: Attractive, but Is It Wise?
    • Roles and Composition
      • Classes and Roles: An Example
      • Role Composition and Code Reuse
      • Roles, Classes, Objects, and Types
    • Method Delegation
    • Polymorphism
    • Encapsulation
      • Private Methods
      • Constructing Objects with Private Attributes
    • Interface and Implementation
    • Object-Oriented Programming: A Tale
      • The Fable of the Shepherd
      • The Moral
        • Delegation
        • Encapsulation
        • Polymorphism
    • Debugging
      • The Perl 6 Debugger
      • Getting Some Help
      • Stepping Through the Code
      • Stopping at the Right Place with Breakpoints
        • Youre all set to start using the debugger
      • Logging Information with Trace Points
      • Stepping Through a Regex Match
    • Glossary
  • 13. Regexes and Grammars
    • A Brief Refresher
    • Declarative Programming
    • Captures
    • Named Rules (a.k.a. Subrules)
    • Grammars
    • Grammar Inheritance
    • Actions Objects
    • A Grammar for Parsing JSON
      • The JSON Format
      • Our JSON Sample
      • Writing the JSON Grammar Step by Step
        • Numbers
        • JSON strings
        • JSON objects
        • JSON arrays
        • JSON values
      • The JSON Grammar
      • Adding Actions
    • Inheritance and Mutable Grammars
    • Debugging
    • Glossary
    • Exercise: A Grammar for an Arithmetic Calculator
  • 14. Functional Programming in Perl
    • Higher-Order Functions
      • A Refresher on Functions as First-Class Objects
      • Anonymous Subroutines and Lambdas
      • Closures
    • List Processing and Pipeline Programming
      • Feed and Backward Feed Operators
      • The Reduction Metaoperator
      • The Hyperoperator
      • The Cross (X) and Zip (Z) Operators
      • List Operators: A Summary
      • Creating New Operators
    • Creating Your Own Map-Like Functions
      • Custom versions of map, grep, etc.
        • my-map, a pure Perl version of map
        • my-grep
      • Our Own Version of a Sort Function
      • An Iterator Version of map
      • An Iterator Version of grep
    • The gather and take Construct
    • Lazy Lists and the Sequence Operator
      • The Sequence Operator
      • Infinite Lists
      • Using an Explicit Generator
    • Currying and the Whatever Operator
      • Creating a Curried Subroutine
      • Currying an Existing Subroutine with the assuming Method
      • Currying with the Whatever Star Parameter
    • Using a Functional Programming Style
      • The Merge Sort Algorithm
      • A Nonfunctional Implementation of Merge Sort
      • A Functional Implementation of Merge Sort
    • Debugging
    • Glossary
    • Exercise: Quick Sort
  • 15. Some Final Advice
    • Make It Clear, Keep It Simple
    • Dos and Donts
    • Use Idioms
    • Whats Next?
  • A. Solutions to the Exercises
    • Exercises of Chapter 3: Functions and Subroutines
      • Exercise 3-1: Subroutine right-justify
      • Exercise 3-2: Subroutine do-twice
      • Exercise 3-3: Subroutine print-grid
    • Exercises of Chapter 4: Conditionals and Recursion
      • Exercise Suggested in Stack Diagrams for Recursive Subroutines: Subroutine do-n-times
      • Exercise 4-1: Days, Hours, Minutes, and Seconds
      • Exercise 4-2: Fermats Theorem
      • Exercise 4-3: Is It a Triangle?
      • Exercise 4-4: The Fibonacci Numbers
      • Exercise 4-5: The recurse Subroutine
    • Exercises of Chapter 5: Fruitful Functions
      • Exercise: Compare
      • Exercise: Hypotenuse
      • Exercise: Chained Relational Operators
      • Exercise 5-2: The Ackermann Function
      • Exercise 5-3: Palindromes
      • Exercise 5-4: Powers
      • Exercise 5-5: Finding the GCD of Two Numbers
    • Exercises of Chapter 6: Iteration
      • Exercise 6-1: Square Root
      • Exercise 6-2: Pi Estimate
    • Exercises of Chapter 7: Strings
      • Exercise: String Traversal
      • Exercise: The Ducklings
      • Exercise: Counting the Letters of a String
      • Exercise: Simulating a Regex with a Loop
      • Exercise: Regex Exercises
        • Ten digits in a row
        • An octal number
        • First word at the start of the string
        • First word starting with an a
        • First word starting with a lowercase vowel
        • A mobile number
        • First word starting with a vowel (lower- or uppercase)
        • Repeated letters
      • Exercise: is-reverse Subroutine
      • Exercise 7-1: Counting Letters
      • Exercise 7-2: Lowercase Letters
      • Exercise 7-3: Caesars Cipher
    • Exercises of Chapter 8: Word Play
      • Exercise 8-7: Consecutive Double Letters
      • Exercise 8-8: Palindromes in Odometers
      • Exercise 8-9: Palindromes in Ages
    • Exercises of Chapter 9: Arrays and Lists
      • Exercise: Implementing a Queue
        • Improving the queue subroutine signatures
        • Slurpy (or variadic) parameters
        • A queue using shift and append
        • Exceptions
        • Encapsulating the data
      • Exercise: Other Ways to Modify an Array
        • Simulating the pop function
        • Simulating the push function
        • Simulating the unshift function
        • Simulating the delete subscript adverb
      • Exercise: Mapping and Filtering the Elements of a List
      • Exercise: Advanced Sorting Techniques
      • Exercise 9-1: Nested Sum
      • Exercise 9-2: Cumulative Sum
      • Exercise 9-3: Middle
      • Exercise 9-4: Chop
      • Exercise 9-5: Subroutine is-sorted
      • Exercise 9-6: Subroutine is-anagram
      • Exercise 9-7: Subroutine has-duplicates
      • Exercise 9-8: Simulating the Birthday Paradox
      • Exercise 9-9: Comparing push and unshift
      • Exercise 9-10: Bisection Search in a List
      • Exercise 9-11: Reverse Pairs
        • Comparing bisection search with hash lookup
        • Creating and using a module
      • Exercise 9-12: Interlocking Words
    • Exercises of Chapter 10: Hashes
      • Exercise: A Hash Is a Mapping
      • Exercise 10-1: Storing the Word List into a Hash
      • Exercise 10-2: Memoizing the Ackermann Function
      • Exercise 10-3: Finding Duplicates with a Hash
      • Exercise 10-4: Rotate Pairs
      • Exercise 10-5: Homophones
    • Exercises of Chapter 11
      • Exercise: The given ... when switch statement
      • Exercise: Constructing New Operators
      • Exercise: Sets, Bags, and Mixes
      • Exercise: Random Words
      • Exercise: Markov Analysis
        • The MAIN subroutine
        • Solution to the Markov analysis exercise
      • Exercise: The Huffman Code
        • Exercise 11-8: The frequency table
        • Exercise 11-9: Huffman coding of a DNA strand
        • Exercise 11-9: Huffman coding of a more complex string
        • Exercise 11-9: Encoding the input string
        • Exercise 11-9: Decoding the pseudo-Morse string
    • Exercises of Chapter 13: Regexes and Grammars
      • Exercise 13-1: Getting the February Dates Right
        • Recognizing a leap year
        • Back to the February date validation
      • Exercise: A Grammar for an Arithmetic Calculator
        • The grammar
        • The actions
    • Exercises of Chapter 14: Functional Programming
      • Exercise: Making a Functional Implementation of Quick Sort
  • Index

Dodaj do koszyka Think Perl 6. How to Think Like a Computer Scientist

Code, Publish & WebDesing by CATALIST.com.pl



(c) 2005-2024 CATALIST agencja interaktywna, znaki firmowe należą do wydawnictwa Helion S.A.