Using Raku
Using Raku
$4.99
Minimum price
$19.99
Suggested price
Using Raku

This book is 100% complete

Completed on 2019-10-14

About the Book

In this book, you will find 100 solutions of different common programming challenges that are written in Raku. 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 the language; firstly, the strings, numbers, and aggregate data structures, and secondly, of Raku 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.

About the Author

Andrew Shitov
Andrew Shitov

A passionate promoter of the Raku programming language

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

Authors have earned$9,196,652writing, publishing and selling on Leanpub,
earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.

Learn more about writing on Leanpub

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub