🔬8. Digging into operator precedence in Perl 6, part 2

Yesterday, we took a look at how the ? and so operators are dispatched depending on the type of the variable. We did it with the intention to understand what is the difference between them. Here is once again an excerpt from the src/core/Bool.pm file, where the bodies of the subs look alike: proto sub … Continue reading “🔬8. Digging into operator precedence in Perl 6, part 2”

🔬7. Digging into operator precedence in Perl 6, part 1

Today, we’ll once again look at the src/core/Bool.pm file. This is a good example of a full-fledged Perl 6 class, which is still not very difficult to examine. Look at the definitions of the ? and so operators: proto sub prefix:<?>(Mu $) is pure {*} multi sub prefix:<?>(Bool:D \a) { a } multi sub prefix:<?>(Bool:U … Continue reading “🔬7. Digging into operator precedence in Perl 6, part 1”

🔬6. The dd routine of Rakudo Perl 6

In Rakudo, there is a useful routine dd, which is not a part of Perl 6 itself. It dumps its argument(s) in a way that you immediately see the type and content of a variable. For example: $ ./perl6 -e’my Bool $b = True; dd($b)’ Bool $b = Bool::True It works well with data of … Continue reading “🔬6. The dd routine of Rakudo Perl 6”

🔬5. Lurking behind interpolation in Perl 6

In the previous articles, we’ve seen that the undefined value cannot be easily interpolated in a string, as an exception occurs. Today, our goal is to see where exactly that happens in the source code of Rakudo. So, as soon as we’ve looked at the Boolean values, let’s continue with them. Open perl6 in the … Continue reading “🔬5. Lurking behind interpolation in Perl 6”

🔬4. Exploring the Bool type in Perl 6, part 2

Today, we are continuing reading the source codes of the Bool class: src/core/Bool.pm, and will look at the methods that calculate the next or the previous values, or increment and decrement the values. For the Boolean type, it sounds simple, but you still have to determine the behaviour of the edge cases. pred and succ … Continue reading “🔬4. Exploring the Bool type in Perl 6, part 2”

🔬3. Playing with the code of Rakudo Perl 6

Yesterday, we looked at the two methods of the Bool class that return strings. The string representation that the functions produce is hardcoded in the source code. Let’s use this observation and try changing the texts. So, here is the fragment that we will modify: Bool.^add_multi_method(‘gist’, my multi method gist(Bool:D:) { self ?? ‘True’ !! … Continue reading “🔬3. Playing with the code of Rakudo Perl 6”

🦋1. The proto keyword in Perl 6

Today, we are looking precisely at the proto keyword. It gives a hint for the compiler about your intention to create multi-subs. Example 1 Consider an example of the function that either flips a string or negates an integer. multi sub f(Int $x) {     return -$x; } multi sub f(Str $x) {   … Continue reading “🦋1. The proto keyword in Perl 6”

Interview with Reini Urban

Reini Urban is the author of alternative Perl compilers. In this interview he talks about his work, discusses their internals and shares his thoughts about different approaches to make Perl faster. Before it all started How and when did you learn to program? My father was electrical and mechanical engineer and had a small enterprise … Continue reading “Interview with Reini Urban”

Interview with Carl Mäsak

Carl Mäsak is an application developer for Perl 6. He is the number one Perl 6 bug reporter, the author of November, one of the first real web applications written in Perl 6. October You started following the Perl 6 development in 2003–2004, a few years after the Perl 6 project was announced. What was … Continue reading “Interview with Carl Mäsak”

Interview with Stevan Little

Stevan Little is the author of Moose, the library introducing Perl 6-inspired classes in Perl 5. He also started the p5-mop project, which was aimed to bring classes to the Perl 5’s core. Perl and OOP Once you said that it was Damian Conway’s “Object Oriented Perl” book, which gave you the idea of real … Continue reading “Interview with Stevan Little”

Interview with Damian Conway

Damian Conway is one of the key figures in the Perl 6 design team, and the author of Exegeses, the documents explaining the ideas behind the concentrated design decisions reflected in Apocalypses. We talked to Damian during his visit to Amsterdam in March 2015. Design Backgrounds Of course, you’ve heard that Perl 6 is going … Continue reading “Interview with Damian Conway”

Interview with Flávio Glock

Flávio Glock is the creator of Perlito, the Perl 6 and Perl 5 compiler, and a v6 module, the one compiling Perl 6 to Perl 5 in Perl 5. Background First of all, can you please clarify the names? There are MiniPerl6, KindaPerl6, and Perlito, and a few others, which seem to refer to the same project and its … Continue reading “Interview with Flávio Glock”

Interview with Audrey Tang

The questions and answers in this document are CC0 and in the public domain. Audrey Tang first of all is known as the creator and developer of Pugs, the Perl 6 User’s Golfing System, an implementation of Perl 6 in Haskell, which started on 1 February 2005 and was the most actively developing and the most complete … Continue reading “Interview with Audrey Tang”