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
Basic introduction to Perl 6 and its compiler
- How to install Rakudo
- How to run it from console or from a web service such as glot.io
- Notes on using Unicode
- Simple input and output
Running Perl 6
- Command-line options
- Phasers
- Understanding error messages
- The MAIN subroutine
Variables and data types
- Types of variable containers in Perl 6 (scalar, arrays, etc.)
- Understanding Perl 6 containers
- Integers
- Strings
- Date and Time built-in support
- Other data times
- Understanding a sequence
Operators
- Types of operators in Perl 6 (infix, prefix, etc.)
- Overview of operators in Perl 6
- Meta-operators
- User-defined operators
- Data type conversion (e.g., prefix operators "+" or "~", etc.)
Part 2
Control flow
- Blocks and scoping 101
- Boolean data type and type casting
- Conditional checks
- Loops
- Block-related phasers (e.g. LEAVE)
- Other options (e.g., gather, given)
Subroutines
- Creating a subroutine
- Signature
- Calling a subroutine
- Multiple dispatch
- Multiple MAIN subroutines
- Nested subroutines
- Anonymous subroutines
Modules
- Creating modules
- Using modules
- Different types of importing ("import", "need", etc.)
- Introspections
- Installing modules from web
Part 3
Object-oriented programming
- Classes in Perl 6
- Attributes
- Methods
- Class methods
- Subroutines vs methods
- Inheritance
- Roles
- Introspection
Input and output
- Standard input, output, and errors
- Working with files
- Working with directories
- File streams
Exceptions
- The "try" block
- What is a soft failure
- The CATCH phaser
- Exception objects
- Failure objects
- Multiple dispatch in handling exceptions
- Custom exceptions
Part 4
Regexes
- Literals and character classes
- Regexp matching
- Quantifiers
- Captures
- Alternations
- Anchors
- Forward and backward assertions
- Adverbs (such as :g etc.)
- String substitution and replacement
Grammars
- What is a grammar
- Creating grammars
- Rules
- Tokens
- Grammars vs. classes and inheritance
- AST (Abstract syntax tree) ("make", "made")
- Actions
- Inline actions vs. action class
Part 5
Functional programming
- Recursion
- Reduction
- Higher-order functions
- Lambdas
- Data feeds
- Iterators
- Lazy and infinite sequences
Concurrent programming
- Junctions
- Threads
- Promises
- Channels
Reactive programming
- Supplies
- Live and on-demand supplies
- Understanding "react"
- Understanding "whenever"
- Understanding "await"
Web programming
- Making remote connections
- Simple HTTP client
- Simple HTTP server
- 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:
- Perl 6 at a Glance, which is the first book in the new season of Perl 6
- Perl 6 Deep Dive
- Using Perl 6, which is a collection of exercises aimed to understand the nature and beauty of Perl 6
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:
- Introduction to Perl 6 at the German Perl Workshop 2018
- Python 3 3-day course
- Python in 5 days
- 5-day C++ course
- 2-day JavaScript course
There are a lot of exercises and materials prepared specially for Perl 6, including:
- Perl 6 challenges
- Perl 6 tests
- Perl 6 assorti
- Perl 6 at a glance
- Migrating to Perl 6
- Solving Euler problems
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.