• Complain

Moritz Lenz - Perl 6 Fundamentals: A Primer with Examples, Projects, and Case Studies

Here you can read online Moritz Lenz - Perl 6 Fundamentals: A Primer with Examples, Projects, and Case Studies full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2017, publisher: Apress, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Moritz Lenz Perl 6 Fundamentals: A Primer with Examples, Projects, and Case Studies
  • Book:
    Perl 6 Fundamentals: A Primer with Examples, Projects, and Case Studies
  • Author:
  • Publisher:
    Apress
  • Genre:
  • Year:
    2017
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

Perl 6 Fundamentals: A Primer with Examples, Projects, and Case Studies: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Perl 6 Fundamentals: A Primer with Examples, Projects, and Case Studies" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Gain the skills to begin developing Perl 6 applications from the ground up in this hands-on compact book, which includes a foreword from Larry Wall, creator of Perl. Youll learn enough to get started building with Perl 6, using Perl 6s gradual typing, handy object orientation features, powerful parsing capabilities, and human-usable concurrency. After a short introduction, each chapter develops a small example project, explaining the Perl 6 features used. When the example is done, youll explore another aspect, such as optimizing further for readability or testing the code.
Along the way youll see Perl 6 basics, such as variables and scoping; subroutines; classes and objects; regexes; and code testing. When youve mastered the basics, Perl 6 Fundamentals moves onto more advanced topics to give you a deeper understanding of the language. Youll learn, amongst other things, how to work with persistent storage, how to generate good error messages, and how to write tricky applications such as a file and directory usage graph and a Unicode search tool.
What Youll Learn
  • Get coding with Perl 6
  • Work on several hands-on examples and projects
  • Integrate Python libraries into your Perl 6 programs
  • Parse INI files using regexes and grammars
  • Build a date time converter
  • Carry out refactoring and other automated tests
Who This Book Is For
If you already know one or more programming languages, and want to learn about Perl 6, this book is for you.

Moritz Lenz: author's other books


Who wrote Perl 6 Fundamentals: A Primer with Examples, Projects, and Case Studies? Find out the surname, the name of the author of the book and a list of all author's works by series.

Perl 6 Fundamentals: A Primer with Examples, Projects, and Case Studies — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Perl 6 Fundamentals: A Primer with Examples, Projects, and Case Studies" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Moritz Lenz 2017
Moritz Lenz Perl 6 Fundamentals
1. What Is Perl 6?
Moritz Lenz 1
(1)
Frth, Bayern, Germany
Perl 6 is a programming language. It is designed to be easily learned, read, and written by humans, and is inspired by natural language. It allows the beginner to write in baby Perl, while giving the experienced programmer freedom of expression, from concise to poetic.
Perl 6 is gradually typed . It mostly follows the paradigm of dynamically typed languages in that it accepts programs whose type safety it cant guarantee during compilation. However, unlike many dynamic languages, it accepts and enforces type constraints. Where possible, the compiler uses type annotations to make decisions at compile time that would otherwise only be possible at runtime.
Many programming paradigms have influenced Perl 6. You can write imperative, object-oriented, and functional programs in Perl 6. Declarative programming is supported through features like multiple-dispatch, sub-typing, and the regex and grammar engine.
Most lookups in Perl 6 are lexical, and the language avoids global state. This makes parallel and concurrent execution of programs easier, as does Perl 6s focus on high-level concurrency primitives. When you dont want to be limited to one CPU core, instead of thinking in terms of threads and locks, you tend to think about promises and message queues.
Perl 6 as a language is not opinionated about whether Perl 6 programs should be compiled or interpreted. Rakudo Perl 6 the main implementationprecompiles modules on the fly and interprets scripts.
1.1 Perl 5, the Older Sister
Around the year 2000, Perl 5 development faced major strain from the conflicting desires to evolve and to keep backward compatibility.
Perl 6 was the valve to release this tension. All the extension proposals that required a break in backward compatibility were channeled into Perl 6, leaving it in a dreamlike state where everything was possible and nothing was fixed. It took several years of hard work to get into a more solid state.
During this time, Perl 5 also evolved, and the two languages are different enough that most Perl 5 developers dont consider Perl 6 a natural upgrade path anymore, to the point that Perl 6 does not try to obsolete Perl 5 (at least not more than it tries to obsolete any other programming language :-), and the first stable release of Perl 6 in 2015 does not indicate any lapse in support for Perl 5.
Perl 5 is developed by a separate community of enthusiasts, who keep an eye on Perl 6 to find features worth adopting into Perl 5. So while the Perl 5 and Perl 6 communities have a certain overlap and communicate with each other, both thrive mostly independently.
1.2 Library Availability
Being a relatively young language, Perl 6 lacks the mature module ecosystem that languages such as Perl 5 and Python provide.
To bridge this gap, interfaces exist that allow you to call into libraries written in C, Python, Perl 5, and Ruby. The Perl 5 and Python interfaces are sophisticated enough that you can write a Perl 6 class that subclasses a class written in either language, and the other way around.
So if you like a particular Python library, for example, you can simply load it into your Perl 6 program through the Inline::Python module.
1.3 Why Should I Use Perl 6?
If you like the quick prototyping experience from dynamically typed programming languages, but you also want enough safety features to build big, reliable applications, Perl 6 is a good fit for you. Its gradual typing allows you to write code without having a full picture of the types involved, and later introduce type constraints to guard against future misuse of your internal and external APIs.
Perl has a long history of making text processing via regular expressions ( regexes ) very easy, but more complicated regexes have acquired a reputation of being hard to read and maintain. Perl 6 solves this by putting regexes on the same level as code, allowing you to name them like subroutines, and even to use object-oriented features such as class inheritance and role composition to manage code and regex reuse. The resulting grammars are very powerful and easy to read. In fact, the Rakudo Perl 6 compiler parses Perl 6 source code with a Perl 6 grammar!
Speaking of text, Perl 6 has amazing Unicode support. If you ask your user for a number, and they enter it with digits that dont happen to be the Arabic digits from the ASCII range, Perl 6 still has you covered. And if you deal with graphemes that cannot be expressed as a single Unicode code point, Perl 6 still presents it as a single character.
There are more technical benefits that I could list, but more importantly, the language is designed to be fun to use. An important aspect of that is good error messages. Have you ever been annoyed at Python for typically giving just SyntaxError: invalid syntax when somethings wrong? This error could come from forgetting a closing parenthesis, for example. In this case, a Perl 6 compiler says
Unable to parse expression in argument list; couldn't find final ')'
which actually tells you whats wrong. But this is just the tip of the iceberg. The compiler catches common mistakes and points out possible solutions, and even suggests fixes for spelling mistakes. The Perl 6 community considers error messages that are less than awesome , short LTA, to be worthy of bug reports, and much effort is spent into raising the bar for error messages.
Finally, Perl 6 gives you the freedom to express your problem domain and solution in different ways and with different programming paradigms. And if the options provided by the core language are not enough, it is designed with extensibility in mind, allowing you to introduce both new semantics for object-oriented code and new syntax.
1.4 Summary
Perl 6 is a flexible programming language that offers many cool and convenient features to both beginners and experts. It offers flexibility, type checking, and powerful Unicode and text processing support.
Moritz Lenz 2017
Moritz Lenz Perl 6 Fundamentals
2. Running Rakudo Perl 6
Moritz Lenz 1
(1)
Frth, Bayern, Germany
Before we start exploring Perl 6, you should have an environment where you can run Perl 6 code. So you need to install Rakudo Perl 6, currently the only actively developed Perl 6 compiler. Or even better, install Rakudo Star, which is a distribution that includes Rakudo itself, a few useful modules, and a tool that can help you install more modules.
Installing Rakudo itself gives you just the compiler. It follows a monthly release cycle, so it allows you to keep up to date with the latest developments.
When you choose to install Rakudo Star , which is typically released every three months, you get a more stable base for development, and some tools like a debugger and a module installer. You can use the module installer to make use of prepackaged software libraries that are included neither in Rakudo itself nor in Rakudo Star.
The following sections discuss a few options for installing Rakudo Star. Choose whatever works for you.
The examples in this book use Rakudo 2017.04.03 or Rakudo Star 2017.04 (which is built on top of Rakudo 2017.04.03) and should work with this or any newer version of Rakudo, as long as it supports Perl 6 version 6.c.
Note
The examples and source code used in this book can be accessed via the Download Source Code button at https://www.apress.com/9781484228982 .
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Perl 6 Fundamentals: A Primer with Examples, Projects, and Case Studies»

Look at similar books to Perl 6 Fundamentals: A Primer with Examples, Projects, and Case Studies. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Perl 6 Fundamentals: A Primer with Examples, Projects, and Case Studies»

Discussion, reviews of the book Perl 6 Fundamentals: A Primer with Examples, Projects, and Case Studies and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.