Grant Proposal: A Complete Perl 6 Course with Exercises

The Grants Committee has received the following grant proposal for the May/June 2019 round. Before the Committee members vote, we would like to solicit feedback from the Perl community on the proposal.

Review the proposal below and please comment here by June 14th, 2019. The Committee members will start the voting process following that.

A Complete Perl 6 Course with Exercises

  • Name

    Andrew Shitov

  • Amount Requested

    USD $10,000

Task: Create a complete course of the Perl 6 programming language.

Abstract

I want to create a complete course with exercises covering all aspects of Perl 6. It will be aimed at everyone familiar with programming. The goal is to make a course that you can use in self-studying or as a platform in the class.

Target audience

Perl 6 is a language that many people find extremely attractive. The efforts of our activists during recent years show that there are people from outside of the Perl community who also want to start learning Perl 6.

There are two groups of potential users: those with and without Perl 5 background. As Perl 6 significantly differs from Perl 5, both target groups can benefit from a single Perl 6 course.

Unique points

I am willing to create a course (not documentation), which is primarily intended to be read in order from page 1 to the last page. It is aimed at those, who are not familiar with Perl 6 and want to go through all the features of the language from the simplest to the most advanced.

The second target group is an offline class where the course can be used as teaching material. You just follow it, and you are happy with the order of topics, and as soon as the lesson turns from theory to practice, here you are: you have a list of problems to solve in the class or at home.

How this is different from what already exists: vast online documentation, books, etc.? The proposed course is a step-by-step flow that begins from simple things, which makes it different from the documentation. Unlike the books, the main focus will be on having small lessons with many exercises. There are also a few video lectures and introductions, but again with very little homework.

My idea is aligned towards online courses such as perltuts.com (not completed for Perl 6) and www.snakify.org/en that I used myself to learn and teach Python.

Content

The course contains 16 sections. Each section includes 15-30 lessons. Each lesson covers a single topic (such as accessing array elements or using different variants of multi-methods, or a regex quantifier, or an aspect of concurrent code) and includes 2-4 exercises with displaying correct solutions on request.

The work is divided into five parts.

Part 1

  1. Basic introduction to Perl 6 and its compiler

    1. How to install Rakudo
    2. How to run it from console or from a web service such as glot.io
    3. Notes on using Unicode
    4. Simple input and output
  2. Running Perl 6

    1. Command-line options
    2. Phasers
    3. Understanding error messages
    4. The MAIN subroutine
  3. Variables and data types

    1. Types of variable containers in Perl 6 (scalar, arrays, etc.)
    2. Understanding Perl 6 containers
    3. Integers
    4. Strings
    5. Date and Time built-in support
    6. Other data times
    7. Understanding a sequence
  4. Operators

    1. Types of operators in Perl 6 (infix, prefix, etc.)
    2. Overview of operators in Perl 6
    3. Meta-operators
    4. User-defined operators
    5. Data type conversion (e.g., prefix operators "+" or "~", etc.)

Part 2

  1. Control flow

    1. Blocks and scoping 101
    2. Boolean data type and type casting
    3. Conditional checks
    4. Loops
    5. Block-related phasers (e.g. LEAVE)
    6. Other options (e.g., gather, given)
  2. Subroutines

    1. Creating a subroutine
    2. Signature
    3. Calling a subroutine
    4. Multiple dispatch
    5. Multiple MAIN subroutines
    6. Nested subroutines
    7. Anonymous subroutines
  3. Modules

    1. Creating modules
    2. Using modules
    3. Different types of importing ("import", "need", etc.)
    4. Introspections
    5. Installing modules from web

Part 3

  1. Object-oriented programming

    1. Classes in Perl 6
    2. Attributes
    3. Methods
    4. Class methods
    5. Subroutines vs methods
    6. Inheritance
    7. Roles
    8. Introspection
  2. Input and output

    1. Standard input, output, and errors
    2. Working with files
    3. Working with directories
    4. File streams
  3. Exceptions

    1. The "try" block
    2. What is a soft failure
    3. The CATCH phaser
    4. Exception objects
    5. Failure objects
    6. Multiple dispatch in handling exceptions
    7. Custom exceptions

Part 4

  1. Regexes

    1. Literals and character classes
    2. Regexp matching
    3. Quantifiers
    4. Captures
    5. Alternations
    6. Anchors
    7. Forward and backward assertions
    8. Adverbs (such as :g etc.)
    9. String substitution and replacement
  2. Grammars

    1. What is a grammar
    2. Creating grammars
    3. Rules
    4. Tokens
    5. Grammars vs. classes and inheritance
    6. AST (Abstract syntax tree) ("make", "made")
    7. Actions
    8. Inline actions vs. action class

Part 5

  1. Functional programming

    1. Recursion
    2. Reduction
    3. Higher-order functions
    4. Lambdas
    5. Data feeds
    6. Iterators
    7. Lazy and infinite sequences
  2. Concurrent programming

    1. Junctions
    2. Threads
    3. Promises
    4. Channels
  3. Reactive programming

    1. Supplies
    2. Live and on-demand supplies
    3. Understanding "react"
    4. Understanding "whenever"
    5. Understanding "await"
  4. Web programming

    1. Making remote connections
    2. Simple HTTP client
    3. Simple HTTP server
    4. Cro 101

Timeline and deliverable chunks

The project needs about six months to complete all sections; independent sections are published earlier, upon completion. The content will be uploaded to a GitHub repository in Markdown format.

Licensing

The course will be publicly available and will be published and released under the Creative Commons license. It will be allowed for everyone to freely use and modify it, both commercially and not.

The course can be used by anyone who want to prepare their own teaching class on Perl 6 and related topics (such as 101, or grammars, or concurrency).

The course will contain hints for the trainer of which parts should be used and included in a one-day, three-day or a five-day class.

Hosting

The materials will be submitted to a GitHub repository (github.com — GitHub is a web-based hosting service for version control using Git) and will be hosted by the GitHub Pages service.

For the end user, the course will be accessible online. For the potential future contributors, it will be accessible via pull requests.

The Perl Foundation can offer a different place of hosting static files if that will benefit the Perl community.

About me

I am a Perl 5 developer since around 1998 and a Perl 6 enthusiast since around 2000.

I have/had run a few Perl 6 blogs:

I wrote three Perl 6 books:

I gave a lot of Perl 6 talks at different events including FOSDEM 2019. A couple of the recent talks being:

I prepared and ran a few classes on Perl and other programming languages, including:

There are a lot of exercises and materials prepared specially for Perl 6, including:

I have organises a number of events dedicated to the Perl programming languages. The event map covers 8 countries spanning the distance of about 10,000 km between the most Western and the most Eastern city. Among the events, there are three YAPC::Europe conferences (YAPC::Europe conferences are the biggest annual Perl events in Europe):

Financial

The requested amount is US$2000 per each of the five content parts, thus US$10,000 in total.