Raku Recipes: A Problem-Solution Approach (Paperback)

Raku Recipes: A Problem-Solution Approach Cover Image
Ships Today - Not Currently In-Store


  1. How do I start to put (Perl 6RakuCamelia) to use in a real world environment.
    1. Get your tools ready. Put concepts from other languages to use in Perl 6.
    2. Get involved in the community.
    3. Install some external and useful modules.
    4. Detect OS environment and change program behavior according to it.
  2. Input and output
    1. Read files handled as arguments
    2. Read and process files asynchronously
    3. Connect input and output of external utilities and files.
    4. Read and process binary files.
    5. Watch a file for changes
  3. Data science and data analytics
    1. How do I extract unique email addresses/user names from several files.
    2. How do I create a weighted random number generator. How do I work with a spreadsheet, filtering by row or column, or sorting, or converting row into columns or the other way round.
    3. How do I apply a series of transformations to a group of elements and then extract a single quantity from them.
    4. How do I create a random data generator
    5. How do I process big, structured files.
  4. Math
    1. How can you generate mathematical sequences and extract random elements from it.
    2. Program a divide-and-conquer algorithm.
    3. Work with matrices.
    4. Compute Mandelbrot's and Julia's set
    5. Look for pairs of integers with a certain property, such as friendly numbers or contiguous primes, to use infinite precision integers.
    Configuration and execution of programs.
    1. Configure a program using JSON/YAML/.ini files.
    2. Configure a command line command with flags and arguments.
    3. Use shell environment variables in my program.
    4. Advanced/distributed configuration with etcd Create a Docker container for an application to distribute it easily
  5. Automation of system tasks.
    1. Check log for certain events.
    2. Check logs interactively on the console.
    3. Check git commits for patterns, metadata, or store them. Clean up your Docker image store.
    4. Process the last persons logged to our system
  6. Perl 6 modules
  7. Design classes, roles and modules in Perl 6.
  8. Document your module.
  9. Test your module.
  10. Release it as an open source module for every one.
  11. Use multiple dispatch to speed up applications.
Dealing with errors
  1. Design an exception hierarchy.
  2. Deliver meaningful error messages to the user.
  3. Catch and deal with errors in your program.
  4. Debug your application in CommaIDE.
  5. Make grammars fail graciously with pretty errors.
Web and microservices on the client side
  1. Query a GeoIP database Download and extract information from a web site.
  2. Use a web API to get information from a site.
  3. Check IP and addresses by querying Internet services.
Text processing
  1. Scrape markdown documents.
  2. Generate a set of static web pages
  3. Create a dictionary and do fast searches over it
  4. Compute differences in plain texts
  1. Create a microservice.
  2. Work with web sockets, connecting to a client.
  3. Respond to web hooks.
  4. Create a mini-bot for Telegram or Slack.
  5. Test your microservice.
Work with data sources.

About the Author

J.J. Merelo is a professor at the university of Granada, where he has been teaching since 1988. He has been using Perl since 1994, and Perl 6/Raku intensively since December 2016. He trains, teaches, and consults on Perl and Raku projects.

Product Details
ISBN: 9781484262573
ISBN-10: 1484262573
Publisher: Apress
Publication Date: November 1st, 2020
Pages: 402
Language: English