Quantcast
Adriano Ferreira

Biography

Adriano Ferreira is a Brazilian software developer fond of open source and dynamical programming languages. He is a CPAN author and a frequent habituč at many Perl channels, besides doing some Java for a living. He believes programming should be fun or, if not possible, at least it should not be painful.

Blog

YAP6 Operator: Junction Operators

January 07 2008

Another article of the series “Yet Another Perl 6 Operator” Perl 6 introduces a new scalar data-type: the “junction”. A junction is a single scalar value that can act like two or more values at once. example a value which acts like any(1,2,3) 1 or 2 or 3 all(@vals) all members of @vals… read more

YAP6 Operator: Filetests?

January 03 2008

Another article of the series “Yet Another Perl 6 Operator” This article is not about some set of Perl 6 operators, but rather about what happened to Perl 5 filetests operators. Short answer: They are not operators anymore. Where programmers were used to write # good ol' Perl 5 if ( -e $filename ) {… read more

YAP6 Operator: Reduce Operators - Part II

December 28 2007

Another article of the series “Yet Another Perl 6 Operator” In a previous article , we introduced the reduction operators (like '[*]' and '[~]') which produced list operators from infix operators (like '*' and '~'). There is a variant of the reduction operator that operates over its list argument producing all intermediate… read more

YAP6 Operator: The Pair Constructor

December 27 2007

Another article of the series “Yet Another Perl 6 Operator” Binary '=>' is no longer just a “fancy comma”. In Perl 6, it now constructs a Pair object that can, among other things, be used to pass named arguments to functions. my $pair = (one => 1); $pair.isa(Pair) # Bool::True $pair.key # 'one' $pair.value #… read more

YAP6 Operator: Mutating Operators

December 26 2007

Another article of the series “Yet Another Perl 6 Operator” We already have seen two Perl 6 meta-operators in articles of this series: namely, the negate and the reduction operators. These are two of the five standard meta-operators of the language. What makes meta-operators interesting is how Perl automatically generates new operators… read more

YAP6 Operator: Reduce operators

December 25 2007

Another article of the series “Yet Another Perl 6 Operator” And that’s time to take a look at another of the Perl 6 meta-operators: the reduction operator. By surrounding with square brackets an (associative) infix operator, a new list operator is created. [*] 1..10 # that's 1*2*...*10 = 10! [~] <m oo s… read more

YAP6 Operator: Iterate Operator

December 24 2007

Another article of the series “Yet Another Perl 6 Operator” If you are wondering how processing the lines of a file will look in Perl 6, the answer is something like this: my $h = open '<', $filename; for =$h { ... } (Yes, we need error handling yet. I just ommitted the… read more

perldoc.perl.org updated

December 21 2007

Jon Allen announced that http://perldoc.perl.org/ has been updated with Perl 5.10 documentation. This is great news as the look of the rendered PODs with syntax highlighting and many other nice effects makes me feel good. read more

YAP6 Operator: The Cross Operator

December 21 2007

Another article of the series “Yet Another Perl 6 Operator” Perl 6 provides an operator 'X', the cross operator, which combines its list operands into a sort of cartesian product of these arguments. 1,2 X 3,4 # (1,3), (1,4), (2,3), (2,4) 1,2 X 3,4 X 5,6 # (1,3,5), (1,3,6), (1,4,5), ..., (2,4,6)… read more

YAP6 Operator: Conditional Operator

December 20 2007

Another article of the series “Yet Another Perl 6 Operator” The syntax of an if-then-else expression in Perl 6 is composed by the conditional operator. say "My answer is: ", $maybe ?? 'yes' !! 'no'; The expression above is equivalent to that, which uses the if-then-else statement within a do. say "My… read more

YAP6 Operator: Negated Operators

December 19 2007

Another article of the series “Yet Another Perl 6 Operator” The design of Perl 6 includes some unification mechanisms to bring some extra power to syntax and developers. One of such artefacts is the notion of meta-operators. With them, it is possible to construct augmented operators from existing ones. The first of… read more

YAP6 Operator: Range Operators

December 18 2007

Another article of the series “Yet Another Perl 6 Operator” In Perl 6, you may construct ranges with expressions like $min .. $max $min ^.. $max $min ..^ $max $min ^..^ $max and even ^$limit These operators are Range object constructors, specified by their endpoints. These endpoints are excluded if there is ^ in the… read more

YAP6 Operator: The Default Operator

December 18 2007

Another article of the series “Yet Another Perl 6 Operator” Among the new Perl 6 operators, there is the handy operator '//', known as defined-or or the default operator. This novelty was anticipated by the introduction of this syntactic bit in Perl 5 (see the upcoming 5.10 release) — so you won’t need… read more

YAP6 Operator: The Default Operator

December 17 2007

Another article of the series “Yet Another Perl 6 Operator” Among the new Perl 6 operators, there is the handy operator '//', known as defined-or or the default operator. This novelty was anticipated by the introduction of this syntactic bit in Perl 5 (see the upcoming 5.10 release) — so you won’t need… read more

Yet Another Perl 6 Operator: Boolean Operators

December 12 2007

The series “Yet Another Perl 6 Operator” is back with this brand new article In the article on coercion operators, we got to know the prefix operator '?' which converts values into Bool::True or Bool::False. Like it happens with '~' for strings, '?' is recurrent for boolean operators. In Perl 6, the… read more
Adriano Ferreira