Andrew Shitov
Using Perl 6
Andrew Shitov. Using Perl 6.
100 Programming Challenges Solved with the Perl 6 Programming Language
Programming languages series
Published by DeepText
Amsterdam, November 2017
ISBN 978-90-821568-1-2
Feedback: mail@deeptext.media
|
|
|
This book is a collection of different programming challenges and solutions in Perl 6. It can be used as an exercise book, when you are learning Perl 6, or as a reference book when you are teaching it.
It is assumed that the reader knows the basics of Perl 6 and wants to have some practice.
In this book, you will find 100 solutions of different common programming challenges that are written in Perl 6. Once you already know some of the basics of the language, it is a good idea to spend some time trying to do some exercises and the most popular tasks, which will vary from displaying the ‘Hello, World!’ greeting, to creating a parser for the command-line calculator.
The seven chapters are divided into two parts, which cover the essential parts of Perl; firstly, the strings, numbers, and aggregate data structures, and secondly, of Perl 6 in particular, namely, the new regexes, grammars, and parallel computing.
Each of the 100 tasks presented in the book demonstrates the main idea of how to approach a problem; big chunks of code are avoided, as much as possible.
Buy your copy Worldwide delivery
E-book (PDF + EPUB + MOBI) ships immideately. Paper book will be shipped today
etc.
20+ copies? Contact us at mail@deeptext.media for discounts!
|
Status:
E-book ready to download. Paper book will be shipped today
|
|
100
challenges
|
180
pages
|
6.c
modern Perl 6
|
Chapter 1. Strings
Using strings ~
Modifying string data ~
Text analysis
Chapter 2. Numbers
Using numbers ~
Random numbers ~
Mathematical problems ~
Numbers and strings
Chapter 3. Aggregate Data Types
Manipulating lists and arrays ~
Information retrieval ~
Working with subroutines ~
Multi-dimensional data
Chapter 4. Regexes and Grammars
Regex matching ~
Substitutions with regexes ~
Using grammars
Chapter 5. Date and Time
Current date and time ~
Formatted date ~
Datetime arithmetic
Chapter 6. Parallel Computing
Setting timeouts ~
Atomic operations ~
Parallel file processing
Chapter 7. Miscellaneous
Reading directory content ~
The cat utility ~
Brainfuck interpreter
Table of Contents
|
- Chapter 1.
Strings
- 1.1. Using strings
- 1. Hello, World!
- 2. Greet a person
- 3. String length
- 4. Unique digits
- 1.2. Modifying string data
- 5. Reverse a string
- 6. Removing blanks from a string
- 7. Camel case
- 8. Incrementing filenames
- 9. Random passwords
- 10. DNA-to-RNA transcription
- 11. Caesar cipher
- 1.3. Text analysis
- 12. Plural endings
- 13. The most frequent word
- 14. The longest common substring
- 15. Anagram test
- 16. Palindrome test
- 17. The longest palindrome
- 18. Finding duplicate texts
- Chapter 2.
Numbers
- 2.1. Using numbers
- 19. π
- 20. Factorial!
- 21. Fibonacci numbers
- 22. Print squares
- 23. Powers of two
- 24. Odd and even numbers
- 25. Compare numbers approximately
- 26. Multiplying big numbers
- 27. Prime numbers
- 28. List of prime numbers
- 29. Prime factors
- 30. Reducing a fraction
- 31. Divide by zero
- 2.2. Random numbers
- 32. Generating random numbers
- 33. Neumann’s random generator
- 34. Histogram of random numbers
- 2.3. Mathematical problems
- 35. Distance between two points
- 36. Standard deviation
- 37. Polar coordinates
- 38. Monte Carlo method
- 2.4. Numbers and strings
- 39. Unicode digits
- 40. Guess the number
- 41. Binary to integer
- 42. Integer as binary, octal, and hex
- 43. Sum of digits
- 44. Bit counter
- 45. Compose the largest number
- 46. Convert to Roman numerals
- 47. Spelling numbers
- Chapter 3.
Aggregate Data Types
- 3.1. Manipulating lists and arrays
- 48. Swap two values
- 49. Reverse a list
- 50. Rotate a list
- 51. Randomise an array
- 52. Incrementing array elements
- 53. Adding up two arrays
- 54. Exclusion of two arrays
- 3.2. Information retrieval
- 55. Sum of the elements of an array
- 56. Average of an array
- 57. Moving average
- 58. Is an element in a list?
- 59. First odd number
- 60. Take every second element
- 61. Number of occurrences in array
- 62. Finding unique elements
- 63. Minimum and maximum
- 64. Increasing sequences
- 3.3. Working with subroutines
- 65. Passing arrays to subroutines
- 66. Variadic parameters in a sub
- 3.4. Multi-dimensional data
- 67. Transpose a matrix
- 68. Sort hashes by parameter
- 69. Count hash values
- 70. Product table
- 71. Pascal triangle
- Chapter 4.
Regexes and Grammars
- 4.1. Regex matching
- 72. Count vowels in a word
- 73. Count words
- 74. Skipping Pod documentation
- 75. Currency converter
- 4.2. Substitutions with regexes
- 76. Double each character
- 77. Remove duplicated words
- 78. Separate digits and letters
- 79. Separate groups of digits
- 80. Increase digits by one
- 81. Pig Latin
- 82. Simple string compressor
- 83. %Templating% engine
- 4.3. Using grammars
- 84. Decode Roman numerals
- 85. Balanced parentheses
- 86. Basic calculator
- Chapter 5.
Date and Time
- 87. Current date and time
- 88. Formatted date
- 89. Datetime arithmetic
- 90. Leap years
- Chapter 6.
Parallel Computing
- 91. Setting timeouts
- 92. Sleep Sort
- 93. Atomic operations
- 94. Parallel file processing
- Chapter 7.
Miscellaneous
- 95. The cat utility
- 96. The uniq utility
- 97. Reading directory content
- 98. Text to Morse code
- 99. Morse to text
- 100. Brainfuck interpreter
|
|