<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/">
<!-- name="generator" content="blosxom/2.0" -->
<channel  rdf:about="http://perlgeek.de/blog-en/">
    <title>Perlgeek.de   </title>
    <link>http://perlgeek.de/blog-en/</link>
    <description>Perl and Programming Blog.</description>
</channel>

  <item rdf:about="http://perlgeek.de/blog-en/perl-6/copenhagen-hackathon.html">
 <title>Report from the Perl 6 Hackathon in Copenhagen</title>
  <link>http://perlgeek.de/blog-en/perl-6/copenhagen-hackathon.html</link>
 <author>Moritz Lenz</author>
   <pubDate>Wed, Mar 10 11:59:11 2010</pubDate>
    <description>&lt;!-- 1268218751 --&gt;

&lt;p&gt;During and the &quot;Open Source Days 2010&quot; in Copenhagen there was a
Perl 6 track, and also a hackathon that stretched out three more days after
the conference.&lt;/p&gt;

&lt;p&gt;I arrived on Saturday afternoon (which happend to be the last day of the
conference) and thus missed all of the talks and the more public part of the
hackathon.&lt;/p&gt;

&lt;h2&gt;Module Loading&lt;/h2&gt;

&lt;p&gt;On Sunday we discussed module loading extensively. Martin Berends had
prepared that topic, and drove the effort by asking the right questions.&lt;/p&gt;

&lt;h3&gt;Discussions&lt;/h3&gt;

&lt;p&gt;Modules are complicated beasts in Perl 6. They not only have a name and a
version as in Perl 5, but they can also have so-called &lt;em&gt;authorities&lt;/em&gt;,
which handle the case when different programmers write modules with the same
name. Also unlike Perl 5 a module can be installed with different versions,
and the programmer can either request a particular version or the highest
version available.&lt;/p&gt;

&lt;p&gt;Also they have Unicode and case sensitive names, which Perl 6 must support
even if the underlying file system does not provide both features.&lt;/p&gt;

&lt;p&gt;Although it doesn't really sound like it, this combination of requirements
make it incredibly hard to implement a module loader that is both correct and
efficient. Previously all discussions on the mailing lists and IRC channels
ended in huge threads full of bikeshedding and even more feature ideas.&lt;/p&gt;

&lt;p&gt;We were well aware of these requirements before the hackathon, and also
aware of the fact that we have no chance of implementing all that in a
reasonable time frame. So the first step was to decide what subset of features
to implement, and how that could be achieved.&lt;/p&gt;

&lt;p&gt;We decided not to implement Unicode emulation/mapping, and partially ignore
authorities for now. Still we leave some room for wriggeling in the mapping
from module name to file name: a module &lt;code&gt;My::Module&lt;/code&gt; can live in
the file &lt;code&gt;My/Module.pm&lt;/code&gt; or in
&lt;code&gt;My/Module.ignored.pm&lt;/code&gt;. That way several modules with the same name
but different versions or authorities can be stored in the same module
repository.&lt;/p&gt;

&lt;p&gt;This also implies that the Perl 6 compiler has to actually read and parse
those files to find out which file to load. In a later stage the compiler will
write a cache file to store the mapping from file name to module name(s),
verisons, authorities, a timestamp and probably also dependencies plus
timestamps (in order to know when to recompile a module).&lt;/p&gt;

&lt;p&gt;Once this caching mechanism is implemented, it solves the Unicode problem
mostly for free, because it will store the full Unicode module name and  ASCII
file name in the cache, and makes it available to the module locater.&lt;/p&gt;

&lt;p&gt;After reaching an initial consensus, the discussion went on to other
topics: can we use the existing CPAN infrastructure to actually distribute our
modules? The conclusion was that we most likely can use (with very little
patching) the PAUSE and mirroring infrastructure, but we likely have to write
our own indexing and searching facilities and also a completely separate
module installer.&lt;/p&gt;

&lt;h3&gt;Implementation&lt;/h3&gt;

&lt;p&gt;I wrote a very simplistic prototype of a module locater in Perl 5, which
Jonathan mostly translated to NQP on Monday, and actually plugged it into
Rakudo's module loading facility on Tuesday.&lt;/p&gt;

&lt;p&gt;So now you can actually have multi modules with different versions, and
load the one with the highest version - requesting a particular version is
not yet implemented, but hopefully now a mere SMOP.&lt;/p&gt;

&lt;h2&gt;Other matters&lt;/h2&gt;

&lt;p&gt;Martin Berends wrote up the results of our module discussions, and spent
the rest of his hacking time on a foreign function interface.&lt;/p&gt;

&lt;p&gt;Not everybody worked full-time on module things; baest worked on some
builtin functions and (most of the time) number handling. Carl Mäsak spent
some time on &lt;a href=&quot;http://github.com/masak/tardis/&quot;&gt;tardis&lt;/a&gt;, his time
travelling debugger. He also spent quite some effort on getting enums back
into Rakudo, with occasional assistance from Jonathan.&lt;/p&gt;

&lt;p&gt;Many of us fixed some bugs that popped up, and also found new bugs&lt;/p&gt;

&lt;h3&gt;RT Queue&lt;/h3&gt;

&lt;p&gt;The perl6 RT queue has grown to such a size that it was both scary and hard
to use at all. On Sunday it peaked around 725 open tickets.&lt;/p&gt;

&lt;p&gt;I did rough sweep over most of the tickets, identifying those that were
either fixed (but not yet closed), superseded by changes to the specification
or actually not bugs at all (spam and false reports), or could be closed by
simple changes to Rakudo.&lt;/p&gt;

&lt;p&gt;That way I closed about 80 tickets, and identified another 40 or so tickets
that are actually fixed, but need test coverage before being closed.&lt;/p&gt;

&lt;h2&gt;Personal notes&lt;/h2&gt;

&lt;p&gt;This was the first Perlish event to which I have traveled, and it was just
awesome. I met friends in &quot;meat space&quot; that I previously only (or mostly) knew
over the Internet, and found them to be just as I had experienced them from
the distance: friendly, witty, full of good jokes and bad puns, curious,
relaxed and all in all a very enjoyable company.&lt;/p&gt;

&lt;p&gt;We enjoyed the hospitality of Jonas Brømsø Nielsen and the OSD folks who
did everything to make our stay pleasant: prepare the arrival with maps and
tips about the public transport system, booking and funding (!) our
accommodation, inviting us to lunch or dinner now and then, and being
available whenever questions or problems arose. &lt;strong&gt;Thank you!&lt;/strong&gt;.
The March release of Rakudo will be named &lt;em&gt;Copenhagen&lt;/em&gt; for very good
reasons.&lt;/p&gt;


</description>
  </item>
  <item rdf:about="http://perlgeek.de/blog-en/perl-6/musings-on-feather-and-pugscode.html">
 <title>Musing and the future of feather and the Pugs repository</title>
  <link>http://perlgeek.de/blog-en/perl-6/musings-on-feather-and-pugscode.html</link>
 <author>Moritz Lenz</author>
   <pubDate>Fri, Jan 15 10:52:37 2010</pubDate>
    <description>&lt;!-- 1263549157 --&gt;

&lt;p&gt;(This blog post will probably only interest Perl 6 hackers, since it talks
only about infrastructure.)&lt;/p&gt;

&lt;p&gt;One of the central pieces of Perl 6 infrastructure is the Pugs svn
repository. It holds not only the Pugs source code, but also lots of other
Perl 6 projects:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;Specification&lt;/li&gt;
    &lt;li&gt;Test suite&lt;/li&gt;
    &lt;li&gt;STD.pm (the standard grammar)&lt;/li&gt;
    &lt;li&gt;SMOP&lt;/li&gt;
    &lt;li&gt;mildew and mildew-js&lt;/li&gt;
    &lt;li&gt;sprixel&lt;/li&gt;
    &lt;li&gt;vill&lt;/li&gt;
    &lt;li&gt;mp6, kp6, perlito&lt;/li&gt;
    &lt;li&gt;elf&lt;/li&gt;
    &lt;li&gt;various websites (perl6.org, pugscode.org, perlcabal.org/syn/)&lt;/li&gt;
    &lt;li&gt;a host of scripts related to keep things running (rebuild the HTML
        version of the synopsis; smartlink checking; cronjobs for updating
        websites etc.)&lt;/li&gt;
    &lt;li&gt;various documentation efforts&lt;/li&gt;
    &lt;li&gt;An unknown number of projects more or less related to Perl 6&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's huge, but at the same time it's very practical: anybody who is
interested can get write access very easily, create a new subfolder for a new
project, or can fix a typo in someone else's README file without asking for
commit access first.&lt;/p&gt;

&lt;p&gt;The pugs repo is also viral: Anybody with commit access and invite new
committers. Despite what you might think of it: it actually works in practice,
so far I haven't seen a single case of abuse.&lt;/p&gt;

&lt;p&gt;The pugs repository is hosted on &lt;a
href=&quot;http://feather.perl6.nl&quot;&gt;feather&lt;/a&gt;, a server kindly provided by
Juerd and his company. It contains three virtualized servers, feather{1,2,3}.
feather2 is used for &quot;sensitive&quot; data (for example an IRC bot that has API
keys for various github accounts, and the perl6.org website). Only a handful
of &quot;trusted&quot; users have an account there. feather3 is used for low security
stuff like evalbots which might go astray.&lt;/p&gt;

&lt;p&gt;feather1 holds all the rest. That means the pugs repository, commitbit (the
software we use for handing out commit bits and resetting svn passwords),
various websites, and a whole bunch of Perl 6 developers and users have a
shell account there, for trying out Perl 6 and hosting their screen + irssi
sessions there.&lt;/p&gt;

&lt;p&gt;I was about to write &lt;em&gt;feather1 is maintained by a bunch of
volunteers&lt;/em&gt;, but that would be a lie. It is &quot;maintained&quot; on an as-needed
basis by whoever has time and feels half-way competent. It is an &quot;interesting&quot;
mixture of Debian unstable and experimental. And it's becoming
unmaintainable.&lt;/p&gt;

&lt;p&gt;It seems clear what to do: set up a fourth virtual machine, set up a
replacement for feather1, and en passant migrate some things (like websites
and the pugs repo) to feather2.&lt;/p&gt;

&lt;p&gt;But wait! There is an issue. There's always an issue. Setting up a new
machine and migrating services takes time. Lots of time. And nobody wants to
do it right now. Quite understandably.&lt;/p&gt;

&lt;p&gt;Take the pugs repository for example: you might think it's easy enough to
copy &lt;code&gt;/var/svn/...&lt;/code&gt; recursively on the new host and set up
Apache... except that you need authentication. And authentication is coupled
to commitbit. And commitbit runs on Jifty. And if you want to install Jifty,
you install half of CPAN. Does anybody know if commitbit is still maintained?
and if it installs cleanly on a Debian stable?&lt;/p&gt;

&lt;p&gt;So I thought about some changes to the infrastructure to make it easier to
maintain. For example we handle commit bits differently for git projects on
github: an IRC bot knows the API keys of the project owners, and can add
committers to the projects. That's nice, and the IRC frontend is much leaner
than the Jifty-based web frontend. But we lose virality. For security reasons
the bot has to keep a whitelist of IRC users who are allowed to invite
commiters. Since IRC nick names and (git|svn) user names don't always match,
such a list has to be maintained manually.&lt;/p&gt;

&lt;p&gt;The second question is: should we take the chance and move the pugs repo to
git? I prefer git over svn by far, but there are also costs involved. For
example &lt;a href=&quot;http://rakudo.org/&quot;&gt;Rakudo&lt;/a&gt; checks out a copy of the test
suite via svn. The test suite is only a subdirectory of the pugs repo, so
unless we split the pugs repo, we'd have to find a way to check out only a
part of a git repository. I have no idea if that's possible.&lt;/p&gt;

&lt;p&gt;Either way, I'd like to hear your thoughts, and learn from your
experience:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;Do you know any &quot;viral&quot; git or svn hosting solution (ie where every
        committer can invite more committers)? (don't say commitbit - it's a
        PITA to maintain. Something more lightweight would be
        appreciated)&lt;/li&gt;
    &lt;li&gt;If you use the pugs repository now: do you prefer svn or git? how
        strongly?&lt;/li&gt;
&lt;/ul&gt;

 
</description>
  </item>
  <item rdf:about="http://perlgeek.de/blog-en/perl-6/perl-6-in-2009.html">
 <title>Perl 6 in 2009</title>
  <link>http://perlgeek.de/blog-en/perl-6/perl-6-in-2009.html</link>
 <author>Moritz Lenz</author>
   <pubDate>Mon, Jan  4 12:03:04 2010</pubDate>
    <description>&lt;!-- 1262602984 --&gt;

&lt;p&gt;Much has happened in the Perl 6 land in 2009. Here is my humble attempt to
summarize some of it; If you find something that I missed, feel free to
contact me, I'll try to add it.&lt;/p&gt;

&lt;h2&gt;Specification&lt;/h2&gt;

&lt;p&gt;The year started with lots of improvements to &lt;a
href=&quot;http://perlcabal.org/syn/S19.html&quot;&gt;S19&lt;/a&gt;. In January we also learned
that &lt;code&gt;*-1&lt;/code&gt; constructs a closure, which means that Perl 6 has
semi-automatic currying features built into most operators.&lt;/p&gt;

&lt;h3&gt;Lists, Captures and Parcels&lt;/h3&gt;

&lt;p&gt;We've seen a lot of talk about slices, lists, captures and parcels.
The heart of the discussions is always how interpolation and non-interpolation
of lists can be made both flexible and intuitive. For example: should &lt;code&gt;1,
2, 3 Z 'a', 'b', 'c'&lt;/code&gt; return a single, flat list? or instead a list of
lists? How can a function which receives the result decide for itself what it
want to receive? How does that mix with multi-dimensional arrays?&lt;/p&gt;

&lt;p&gt;I haven't followed these discussions very closely, and so I'm hard pressed
to give a good summary; however it seems that in the end an agreement was
reached: each parenthesis constructs a &lt;code&gt;Parcel&lt;/code&gt;, short for
&lt;em&gt;&lt;strong&gt;Par&lt;/strong&gt;enthesis &lt;strong&gt;cel&lt;/strong&gt;l&lt;/em&gt;. A Parcel can
behave context sensitively: A single-item Parcel degrades to its contents; as
a signature list it is converted to a &lt;code&gt;Capture&lt;/code&gt; object; code object
also return parcels.&lt;/p&gt;

&lt;p&gt;It remains to be seen how multi-dimensional slices (with the
&lt;code&gt;@@&lt;/code&gt; sigil) evolve, and if we can't find anything suitable to
replace them.&lt;/p&gt;

&lt;h3&gt;Built-in Routines&lt;/h3&gt;


&lt;p&gt;S29, the list of built-in functions and methods, finally got some long
awaited attention in 2009, starting with &lt;a
href=&quot;http://use.perl.org/~masak/journal/38170&quot;&gt;Carl Mäsak's S29 Laundry
List&lt;/a&gt;, and later carried on by Timothy Nelson, who split S29 into a set of
documents summarized as S32.&lt;/p&gt;

&lt;p&gt;In December it was decreed that most built-in
methods have a candidate in a new class &lt;code&gt;Cool&lt;/code&gt;, (&lt;em&gt;Convenient
OO Loopbacks&lt;/em&gt;), of which all value types and container types in Perl 6
inherit. That way maximal DWIMyness can be retained, while keeping user
defined types clean of the more than hundred methods defined in &lt;code&gt;Cool&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It is rather perlish to have a distinct name for each operation,
and make it coerce its arguments. A few exceptions exist in Perl 5 (like &lt;a
href=&quot;http://perldoc.perl.org/functions/reverse.html&quot;&gt;reverse&lt;/a&gt;, which is
list reverse in list context, and string reverse in string context); in
Perl 6, most of these exceptions have been removed: &lt;code&gt;reverse&lt;/code&gt; now
only reverses lists, strings are reverted with &lt;code&gt;flip&lt;/code&gt;, hashes with
&lt;code&gt;invert&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;At the Nordic Perl Workshop, Larry decided that the
&lt;code&gt;prefix:&amp;lt;=&amp;gt;&lt;/code&gt; operator had to go, and replaced it with the
&lt;code&gt;.get&lt;/code&gt; and &lt;code&gt;.lines&lt;/code&gt; methods.&lt;/p&gt;

&lt;h3&gt;Operators&lt;/h3&gt;

&lt;p&gt;The Cross Meta Operator is now &lt;code&gt;Xop&lt;/code&gt; instead of
&lt;code&gt;XopX&lt;/code&gt;; in analogy the &lt;code&gt;R&lt;/code&gt; meta operator reverses the
argument list, so &lt;code&gt;$a R- $b&lt;/code&gt; is the same as &lt;code&gt;$b -
$a&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Ranges served two purposes: one for denoting ranges in the sense that the
mathematicians use them, and for generating lists according to simple
schemes. These two functions have been separated: ranges are still constructed
with two dots, but the &lt;code&gt;:by&lt;/code&gt; adverb is gone; more intricate, lazy
list generation can be achieved with the new &lt;em&gt;series&lt;/em&gt; operator:&lt;/p&gt;

&lt;pre&gt;
&lt;span class=&quot;synStatement&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;synIdentifier&quot;&gt;say&lt;/span&gt; &lt;span class=&quot;synStatement&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;synConstant&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;synConstant&quot;&gt;1.1&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;synConstant&quot;&gt;1.2&lt;/span&gt; &lt;span class=&quot;synStatement&quot;&gt;...&lt;/span&gt; &lt;span class=&quot;synConstant&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;synStatement&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;synIdentifier&quot;&gt;say&lt;/span&gt; &lt;span class=&quot;synStatement&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;synConstant&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;synStatement&quot;&gt;...&lt;/span&gt; &lt;span class=&quot;synStatement&quot;&gt;*+&lt;/span&gt;&lt;span class=&quot;synConstant&quot;&gt;0.1&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;synConstant&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;;&lt;/span&gt;
&lt;/pre&gt;

&lt;h3&gt;Numbers&lt;/h3&gt;

&lt;p&gt;The above actually works, and doesn't suffer from floating-point
arithmetics, because &lt;code&gt;0.1&lt;/code&gt; isn't stored as a floating-point number,
but rather as a fractional number of type &lt;code&gt;Rat&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Other languages decided against that approach, because some very simple
loops quickly produce rather large numerators and denominators, degrading
performance of the integer operations. Perl 6 instead has a limit in
denominator size, and falls back to floating-point operations when that limit
is crossed.&lt;/p&gt;

&lt;h2&gt;Implementations&lt;/h2&gt;

&lt;h3&gt;Rakudo&lt;/h3&gt;

&lt;p&gt;A lot of work has been done in Rakudo; in fact it's hard to remember how it
used to be in January 2009; Most features were implemented by Patrick Michaud
and Jonathan Worthington, but we had a lot of other contributors too.&lt;/p&gt;

&lt;p&gt;In January, Rakudo left the Parrot repository and since then lives on
github as a git repository. It now relies on an installed parrot.&lt;/p&gt;

&lt;p&gt;Rakudo implements many new features and lifts old limitations:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;Many built-in routines are now written in Perl 6&lt;/li&gt;
    &lt;li&gt;&lt;code&gt;eval()&lt;/code&gt; and classes now have access to outer lexical variables&lt;/li&gt;
    &lt;li&gt;Much improved Unicode support, both in IO and regular expression&lt;/li&gt;
    &lt;li&gt;punning of roles when &lt;code&gt;.new&lt;/code&gt; is called&lt;/li&gt;
    &lt;li&gt;Typed arrays and hashes, parametric roles&lt;/li&gt;
    &lt;li&gt;Routine return types are now enforced&lt;/li&gt;
    &lt;li&gt;Error messages now contain backtraces with filenames and line
    numbers&lt;/li&gt;
    &lt;li&gt;Multi dispatch is now implemented with a custom dispatcher and
    signature binder, bringing much improvements over the dispatch and binding
    semantics that parrot supports.&lt;/li&gt;
    &lt;li&gt;User-defined operators now possible, and automatically generate some
    of their associated meta-operators.&lt;/li&gt;
    &lt;li&gt;Contextual variables&lt;/li&gt;
    &lt;li&gt;User-defined traits are now possible; some of the built-in traits are
    now written in pure Perl 6.&lt;/li&gt;
    &lt;li&gt;Rational numbers are now implemented, and support for Complex numbers
    has been much improved.&lt;/li&gt;
    &lt;li&gt;routine signatures can now be introspected properly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;SMOP and Mildew&lt;/h3&gt;

&lt;p&gt;SMOP and Mildew have seen a major refactoring, connected to the changed
semantics of slices, captures and parcels, and to the way method invocations
are stored.&lt;/p&gt;

&lt;p&gt;Paweł Murias implemented multi dispatch as a Summer of Code project. Mildew
now supports an impressive set of features, but since it is not very user
oriented, I know of no projects that actually use mildew as a platform.&lt;/p&gt;

&lt;h3&gt;Other implementations&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;http://perl.net.au/wiki/Elf&quot;&gt;Elf&lt;/a&gt; development seems to have
stalled. &lt;a href=&quot;http://pugscode.org/&quot;&gt;Pugs&lt;/a&gt; mostly sleeps, too, though
Audrey updated it to work with the latest Haskell compilers. (It doesn't live
in the Pugs repository anymore though, and is distributed by cabal,
the Haskell package manager).&lt;/p&gt;

&lt;p&gt;New in the field are &lt;a
href=&quot;/blog-en/perl-6/announcing-sprixel.html&quot;&gt;Sprixel&lt;/a&gt;, a Perl 6 to
Javascript compiler, and &lt;em&gt;vill&lt;/em&gt;, an experimental LLVM backend to
STD.pm+viv.&lt;/p&gt;

&lt;h2&gt;Test Suite&lt;/h2&gt;

&lt;p&gt;The test suite continued to grow; most tests have now been moved to
&lt;code&gt;t/spec/&lt;/code&gt;, the official Perl 6 test suite. Most tests in the other
remaining files are either rather dubious, or rely on behaviour that's not
officially specified (or are specific to an implementation).&lt;/p&gt;

&lt;p&gt;Many new tests have been contributed by two new faces: Solomon Foster
contributed a large number of tests for trigonometric functions on the various
number types, and rational and complex numbers. Kyle Hasselbacher provided us
with many regression tests for Rakudo which are also useful to other
implementations.&lt;/p&gt;

&lt;h2&gt;Documentation&lt;/h2&gt;

&lt;p&gt;Bemoaning the fact that Perl 6 has nearly no user-level documentation, Carl
Mäsak started &lt;a href=&quot;http://svn.pugscode.org/pugs/docs/u4x/README&quot;&gt;u4x,
User-Level Documentation for X-Mas&lt;/a&gt;. Hinrik Örn Sigurðsson chimed in, and
started to write &lt;a href=&quot;http://github.com/hinrik/grok/&quot;&gt;grok&lt;/a&gt;, a tool for
retrieving and showing documentation, sponsored by the Google Summer of Code
project.&lt;/p&gt;

&lt;p&gt;Patrick Michaud, Jonathan Worthington, Carl Mäsak, Jonathan Scott Duff
and Moritz Lenz started
&lt;a href=&quot;/blog-en/perl-6/we-write-a-perl-6-book-for-you.html&quot;&gt;to work on a
Perl 6 book&lt;/a&gt;, with a few chapters already being written.&lt;/p&gt;

&lt;h2&gt;Websites&lt;/h2&gt;

&lt;p&gt;In an attempt to provide an up-to-date link list, Moritz registered
perl6-projects.org and collected links. Later Susanne &quot;Su-Shee&quot; Schmitt
contributed a nice design, and Daniel Wright made the domain perl6.org
available to us.&lt;/p&gt;

&lt;p&gt;So we now have a community driven, &lt;a href=&quot;http://perl6.org/&quot;&gt;central
Perl 6 site at perl6.org&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Leo Lapworth redesigned &lt;a href=&quot;http://perl.org/&quot;&gt;perl.org&lt;/a&gt;, and also
the &lt;a href=&quot;http://dev.perl.org/perl6/&quot;&gt;old Perl 6 development page&lt;/a&gt;, and
updated it a bit.&lt;/p&gt;

&lt;h2&gt;Blogs&lt;/h2&gt;

&lt;p&gt;As an attempt to improve the visibility of the Perl community, Matt S.
Trout issued the &lt;a href=&quot;http://ironman.enlightenedperl.org/&quot;&gt;Ironman Perl
Blogging Challenge&lt;/a&gt;. So far it's a huge success, and quite a few hackers
blog about Perl 6 there. Also the blog roll of &lt;a
href=&quot;http://planetsix.perl.org/&quot;&gt;the Planetsix Blog Aggregator&lt;/a&gt; continued
to grow, some excellent new blogs were added in 2009.&lt;/p&gt;

&lt;p&gt;Carl Mäsak blogged at least once per day in Novemeber, &lt;a
href=&quot;http://www.youtube.com/watch?v=b1v4BYV-YvA&quot;&gt;same procedure as
least year :-)&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;IRC&lt;/h2&gt;

&lt;p&gt;The #perl6 IRC channel has been very pleasant and active in 2009, with
three times the activity of 2008.&lt;/p&gt;

&lt;img src=&quot;http://perlgeek.de/images/blog/perl6-lines-per-month.png&quot;
width=&quot;640&quot; height=&quot;480&quot; alt=&quot;&quot; /&gt;

&lt;h2&gt;The Future&lt;/h2&gt;

&lt;p&gt;For April 2010 the Rakudo developers have planned a big release called
&lt;em&gt;Rakudo *&lt;/em&gt;, not feature complete but still useful and usable. Around
the same time the new Perl 6 book will be released.&lt;/p&gt;

&lt;p&gt;The specification is still evolving, and has some areas that are in need of
implementation before they can evolve more; among them are macros, concurrency
and IO.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Update&lt;/b&gt;: improved floating point example as per comment from
Matthias.&lt;/p&gt;

 
</description>
  </item>
  <item rdf:about="http://perlgeek.de/blog-en/perl-6/why-was-the-perl6-advent-calendar-such-a-success.html">
 <title>Why was the Perl 6 Advent Calendar such a Success?</title>
  <link>http://perlgeek.de/blog-en/perl-6/why-was-the-perl6-advent-calendar-such-a-success.html</link>
 <author>Moritz Lenz</author>
   <pubDate>Sat, Dec 26 00:00:00 2009</pubDate>
    <description>&lt;!-- 1261782000 --&gt;

&lt;p&gt;I think it's not too bold to call the &lt;a
href=&quot;http://perl6advent.wordpress.com/&quot;&gt;Perl 6 Advent Calendar&lt;/a&gt; a full
success: over 40k page views, more than 150 non-spam comments, and lots of
new faces and nicknames in #perl6 - it's been a very pleasant surprise.&lt;/p&gt;

&lt;p&gt;I asked myself why it became such a success, and came up with this list of
things:&lt;/p&gt;

&lt;h3&gt;Limited in Scope&lt;/h3&gt;

&lt;p&gt;24 days are over rather quickly, so everyone who contributes knows when the
deed is done&lt;/p&gt;

&lt;h3&gt;It appeals to very different contributors&lt;/h3&gt;

&lt;p&gt;Some people like the shiny new regex and grammar features, others are
interested in the object model, operator overloading or complex numbers.
Since we had no fixed topics, everybody could choose a topic that played to
their strengths.&lt;/p&gt;

&lt;h3&gt;Each task is small and well limited&lt;/h3&gt;

&lt;p&gt;Writing a good post about a topic you know takes about half an hour up to
an hour, maybe two if you need to do some research on the topic. Either way
it's a relatively small task (compared to &quot;write a regex engine&quot; or &quot;redesign
the build system of $compiler&quot; or so).&lt;/p&gt;

&lt;h3&gt;Schedule and polite nagging&lt;/h3&gt;

&lt;p&gt;We had a schedule for each day, and people could add their name to a free
slot. When the day approached, the other authors started to ask politely how
it was progressing, making sure people did not forget their posts. Also
authors felt the subtle pressure to finish their posts on time.&lt;/p&gt;

&lt;h3&gt;Lots of positive feedback&lt;/h3&gt;

&lt;p&gt;We had lots of feedback, most of it quite positive: blog comments, visitors
in our IRC channel, being featured on slashdot. That was very encouraging.&lt;/p&gt;

&lt;p&gt;Also other authors would preview and proof-read the posts before they were
published, pointing out falsities and gems.&lt;/p&gt;

&lt;h3&gt;We had a driving force&lt;/h3&gt;

&lt;p&gt;PerlJam and colomon took care. The decided to make the advent calendar
happen, set up a blog, discussed things and so on - they made it happen.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;All these factors encouraged contributions. I don't think all of them are
necessary for a successful, lively projects, but they certainly help.&lt;/p&gt;

&lt;p&gt;What other factors do you know that encourage contribution in open-source
projects? What could we have done even better?&lt;/p&gt;

 

</description>
  </item>
  <item rdf:about="http://perlgeek.de/blog-en/perl-6/publicity-for-perl-6.html">
 <title>Publicity for Perl 6</title>
  <link>http://perlgeek.de/blog-en/perl-6/publicity-for-perl-6.html</link>
 <author>Moritz Lenz</author>
   <pubDate>Sat, Dec 19 00:00:00 2009</pubDate>
    <description>&lt;!-- 1261177200 --&gt;
&lt;p&gt;I've blogged about the &lt;a href=&quot;http://perl6advent.wordpress.com/&quot;&gt;Perl 6
Advent Calendar 2009&lt;/a&gt;, and want to follow up that it's been a huge success
so far.&lt;/p&gt;

&lt;p&gt;We're about half-way through, and you might be interested in our number of
visits per day:&lt;/p&gt;

&lt;a src=&quot;http://perlgeek.de/images/blog/advent-slashdot-peak.png&quot; width=&quot;682&quot;
height=&quot;260&quot; alt=&quot;visitors per day: about 1k to 2k visitors per day, except
for 6th and 7th of December with 9000 visitors each&quot; /&gt;

&lt;p&gt;On 6th and 7th of December we had about 18k visitors in sum, courtesy of &lt;a
href=&quot;http://developers.slashdot.org/story/09/12/06/196202/The-Perl-6-Advent-Calendar&quot;&gt;slashdot&lt;/a&gt;
and &lt;a href=&quot;http://twitter.com/timoreilly/status/6418183386&quot;&gt;Tim O'Reilly on
Twitter&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As a result we got a lot of new people in our #perl6 IRC channel, asking
for help on how to get Rakudo working, how to code some specific things in
Perl 6, or asking about general design decisions.&lt;/p&gt;

&lt;p&gt;Also mj41 reported that he &lt;a
href=&quot;http://tapir2.ro.vutbr.cz/P6aP-links/stats.html&quot;&gt;has collected more than
50% more Perl 6/parrot blog posts than in the previous year&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We've also &lt;a
href=&quot;http://perlgeek.de/blog-en/perl-6/a-shiny-perl6-org.html&quot;&gt;acquired
perl6.org&lt;/a&gt; for our uses this year, and it has been promoted enough to be
the third hit on a google search for &lt;code&gt;Perl 6&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;All in all I'm rather happy with the marketing state of Perl 6 in 2009, and
hope to see similar efforts for 2010. With the upcoming releases of &lt;a
href=&quot;http://use.perl.org/~pmichaud/journal/39411&quot;&gt;Rakudo Star&lt;/a&gt; and &lt;a
href=&quot;http://perlgeek.de/blog-en/perl-6/we-write-a-perl-6-book-for-you.html&quot;&gt;a
Perl 6 book&lt;/a&gt; I'm pretty sure we'll do well, and I hope for more slashdot
coverage :-).&lt;/p&gt;

 
</description>
  </item>
  <item rdf:about="http://perlgeek.de/blog-en/perl-6/defined-behaviour-with-undefined-values.html">
 <title>Defined Behaviour with Undefined Values</title>
  <link>http://perlgeek.de/blog-en/perl-6/defined-behaviour-with-undefined-values.html</link>
 <author>Moritz Lenz</author>
   <pubDate>Sat, Dec 12 17:43:39 2009</pubDate>
    <description>&lt;!-- 1260636219 --&gt;

&lt;p&gt;In Perl 5 there is the &lt;code&gt;undef&lt;/code&gt; value. Uninitialized variables
contain &lt;code&gt;undef&lt;/code&gt;, as well as non-existing hash values, reading from
unopened or exhausted file handles and so on.&lt;/p&gt;

&lt;p&gt;In Perl 6 the situation is a bit more complicated: variables can have a
type constraint, and are initialized with the corresponding type object:&lt;/p&gt;

&lt;pre&gt;
&lt;span class=&quot;synSpecial&quot;&gt;my&lt;/span&gt; &lt;span class=&quot;synType&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;$x&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;synIdentifier&quot;&gt;say&lt;/span&gt; &lt;span class=&quot;synType&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;synIdentifier&quot;&gt;WHAT&lt;/span&gt;()&lt;span class=&quot;synStatement&quot;&gt;;&lt;/span&gt;     &lt;span class=&quot;synComment&quot;&gt;# Int()&lt;/span&gt;
&lt;/pre&gt;

&lt;p&gt;These type objects are also &lt;em&gt;undefined&lt;/em&gt;, but in Perl 6 that doesn't
mean they are a magical value named &lt;code&gt;undef&lt;/code&gt;, but that they respond
with &lt;code&gt;False&lt;/code&gt; to the &lt;code&gt;defined()&lt;/code&gt; subroutine and
method.&lt;/p&gt;

&lt;p&gt;In fact there is no &lt;code&gt;undef&lt;/code&gt; anymore. Instead there are various
values that can take its place:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Mu&lt;/code&gt; is the type object of the root type of the object hierarchy
(or put differently, every object in Perl 6 conforms to &lt;code&gt;Mu&lt;/code&gt;). It's
the most general undefined value you can think of.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Nil&lt;/code&gt; is a &quot;magic&quot; value: in item (scalar) context it evaluates to
&lt;code&gt;Mu&lt;/code&gt;, in list context it evaluates to the empty list. It's the
&lt;em&gt;nothing to see here, move along&lt;/em&gt; value.&lt;/p&gt;

&lt;p&gt;Each type has a type object; if you want to return a string, but can't
decide which, just return a &lt;code&gt;Str&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Other interesting undefined values are &lt;code&gt;Exception&lt;/code&gt; (which
usually contain a message and  a back trace), &lt;code&gt;Failure&lt;/code&gt; (unthrown
exceptions), &lt;code&gt;Whatever&lt;/code&gt; is a generic placeholder that can stand for
&quot;all&quot;, &quot;infinitely many&quot;, &quot;many&quot; or as a placeholder for a real value.&lt;/p&gt;


</description>
  </item>
  <item rdf:about="http://perlgeek.de/blog-en/misc/keep-it-stupid-stupid.html">
 <title>Keep it stupid, stupid!</title>
  <link>http://perlgeek.de/blog-en/misc/keep-it-stupid-stupid.html</link>
 <author>Moritz Lenz</author>
   <pubDate>Tue, Dec  8 23:14:46 2009</pubDate>
    <description>&lt;!-- 1260310486 --&gt;

&lt;p&gt;How hard is it to build a good search engine? Very hard. So far I thought
that only one company has managed to build a search engine that's not only
decent, but good.&lt;/p&gt;

&lt;p&gt;Sadly, they seem to have overdone it. Today I searched for &lt;a
href=&quot;http://www.google.com/search?hl=en&amp;q=tagged+dfa&quot;&gt;tagged dfa&lt;/a&gt;. I was
looking for a technique used in regex engines. On the front page three out
of ten results actually dealt with the subjects, the other uses of
&lt;em&gt;dfa&lt;/em&gt; meant &lt;em&gt;dog friendly area&lt;/em&gt;, &lt;em&gt;department of foreign
affairs&lt;/em&gt; or other unrelated things.&lt;/p&gt;

&lt;p&gt;That's neither bad nor unexpected. But I wanted more specific results, so I
decided against using the abbreviation, and searched for the full form: &lt;a
href=&quot;http://www.google.com/search?hl=en&amp;q=tagged+deterministic+finite+automaton&quot;&gt;tagged
deterministic finite automaton&lt;/a&gt;. You'd think that would give better
results, no?&lt;/p&gt;

&lt;p&gt;No. It gave worse. On the first result page only one of the hits actually
dealt with the DFAs I was looking for. Actually the first hit contained none
of my search terms. None. It just contained a phrase, which is also sometimes
abbreviated &lt;em&gt;dfa&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;WTF? Google seemed to have internally converted my query into an
ambiguous, abbreviated form, and then used that to find matches, without
filtering. So it attempted to be very smart, and came out very stupid.&lt;/p&gt;

&lt;p&gt;I doubt that any Google engineer is ever going to read this rant. But if
one is: &lt;strong&gt;Please, Google, keep it stupid, stupid&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I'm fine with getting automatic suggestions on how to improve my search
query; but please don't automatically &quot;improve&quot; it for me. I want to find what
I search for. I'm not interested in dog friendly areas.&lt;/p&gt;

 
</description>
  </item>
  <item rdf:about="http://perlgeek.de/blog-en/perl-6/failing-softly.html">
 <title>Perl 6: Failing Softly with Unthrown Exceptions</title>
  <link>http://perlgeek.de/blog-en/perl-6/failing-softly.html</link>
 <author>Moritz Lenz</author>
   <pubDate>Tue, Dec  8 21:00:42 2009</pubDate>
    <description>&lt;!-- 1260302442 --&gt;

&lt;p&gt;Most programming languages handle failures with either of two paradigms:
failing routines return special values, or they throw exceptions.&lt;/p&gt;

&lt;p&gt;Either way has its severe problems: in languages like C it can be very
simple to forget to catch such a return value, and very tedious to propagate
them to the caller; on the other hand throwing exceptions often clutters the
code with way too many &lt;code&gt;try&lt;/code&gt; blocks, and it's  generally unfriendly
if you try to automatically parallelize expressions.&lt;/p&gt;

&lt;p&gt;So Perl 6 offers a middle ground: &lt;em&gt;soft&lt;/em&gt; or &lt;em&gt;unthrown&lt;/em&gt;
exceptions. If a routine calls &lt;code&gt;fail(&quot;message&quot;)&lt;/code&gt;, a new
&lt;code&gt;Failure&lt;/code&gt; object is created and returned from the current
routine. That object behaves as an undefined value, which stores the message,
file and line information of the fail() location, a backtrace and so on.&lt;/p&gt;

&lt;p&gt;When you ask such an object whether it's true or false, or defined or
undefined, you'll get a correct answer, and the exception is marked as
handled. However if you try to use it as an ordinary value, it turns into an
(ordinary) fatal exception. So both of these work:&lt;/p&gt;

&lt;pre&gt;
&lt;span class=&quot;synComment&quot;&gt;# Variant 1: no exception thrown&lt;/span&gt;

&lt;span class=&quot;synSpecial&quot;&gt;my&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;$handle&lt;/span&gt; &lt;span class=&quot;synStatement&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;open&lt;/span&gt;(&lt;span class=&quot;synSpecial&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;synConstant&quot;&gt;nonexistingfile&lt;/span&gt;&lt;span class=&quot;synSpecial&quot;&gt;'&lt;/span&gt;)&lt;span class=&quot;synStatement&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;synStatement&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;$handle&lt;/span&gt; {
    &lt;span class=&quot;synStatement&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;synIdentifier&quot;&gt;say&lt;/span&gt; &lt;span class=&quot;synStatement&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;$handle&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;synIdentifier&quot;&gt;lines&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;;&lt;/span&gt;
} &lt;span class=&quot;synStatement&quot;&gt;else&lt;/span&gt; {
    &lt;span class=&quot;synComment&quot;&gt;# do something else&lt;/span&gt;
}


&lt;span class=&quot;synComment&quot;&gt;# Variant 2&lt;/span&gt;

&lt;span class=&quot;synSpecial&quot;&gt;my&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;$handle&lt;/span&gt; &lt;span class=&quot;synStatement&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;open&lt;/span&gt;(&lt;span class=&quot;synSpecial&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;synConstant&quot;&gt;nonexistingfile&lt;/span&gt;&lt;span class=&quot;synSpecial&quot;&gt;'&lt;/span&gt;)&lt;span class=&quot;synStatement&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;synComment&quot;&gt;# throws a fatal exception while calling $handle.lines&lt;/span&gt;
&lt;span class=&quot;synStatement&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;synIdentifier&quot;&gt;say&lt;/span&gt; &lt;span class=&quot;synStatement&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;$handle&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;synIdentifier&quot;&gt;lines&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;;&lt;/span&gt;
&lt;/pre&gt;

&lt;p&gt;Now if you do some automatically parallelized operations, a single failure
doesn't have to abort the whole operation, and neither is information lost&lt;/p&gt;

&lt;pre&gt;
&lt;span class=&quot;synComment&quot;&gt;# divide @a1 by @a2 element-wise, a division by zero might occur:&lt;/span&gt;
&lt;span class=&quot;synIdentifier&quot;&gt;@a1&lt;/span&gt; &lt;span class=&quot;synStatement&quot;&gt;»/«&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;@a2&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;;&lt;/span&gt;
&lt;/pre&gt;

&lt;p&gt;The API for accessing the &lt;code&gt;Failure&lt;/code&gt; objects isn't very mature
yet, but the concept stands. See &lt;a
href=&quot;http://perlcabal.org/syn/S04.html#Exceptions&quot;&gt;S04/Exceptions&lt;/a&gt; for the
gory details, as they stand today.&lt;/p&gt;


</description>
  </item>
  <item rdf:about="http://perlgeek.de/blog-en/misc/doubt-and-confidence.html">
 <title>Doubt and Confidence</title>
  <link>http://perlgeek.de/blog-en/misc/doubt-and-confidence.html</link>
 <author>Moritz Lenz</author>
   <pubDate>Sat, Dec  5 00:00:00 2009</pubDate>
    <description>&lt;!-- 1259967600 --&gt;

&lt;p&gt;
    &amp;lt;meta&amp;gt;From my &lt;em&gt;useless musings&lt;/em&gt; series.&amp;lt;/meta&amp;gt;
&lt;/p&gt;

&lt;p&gt;
    As a programmer you have to have confidence in your skills, to some
    extent, and at the same time you have to constantly doubt them. Weird, eh?
&lt;/p&gt;

&lt;h2&gt;Confidence&lt;/h2&gt;

&lt;p&gt;
    You need some level of confidence to do anything efficiently.
    Planning ahead requires confidence that you can achieve the steps
    on your way.
&lt;/p&gt;

&lt;p&gt;
    As a programmer you also need some confidence with the language,
    libraries and other tools you're using.
&lt;/p&gt;

&lt;p&gt;
    If you program for money, you also have to assess what kind of programs
    you can write, and where you might have problems.
&lt;/p&gt;

&lt;h2&gt;Doubt&lt;/h2&gt;

&lt;p&gt;
    In the process of programming you make a lot of assumptions, some of the
    explicit, some of them implicit. If you want to write a good program, it's
    essential that you are aware of as many assumptions as possible.
&lt;/p&gt;

&lt;p&gt;
    When you find a bug in your program, you have to challenge previous
    assumptions, and that's where doubt comes in. You not only suspect, but
    you &lt;em&gt;know&lt;/em&gt; that at least one of the assumptions was false (or maybe
    just a bit too specific), and you know that &lt;em&gt;you&lt;/em&gt; did something
    wrong.
&lt;/p&gt;

&lt;p&gt;
    Sometimes programmers make really stupid mistakes which are rather tricky
    to track down. That's when you have to question your own sanity.
&lt;/p&gt;

&lt;p&gt;
    One example (that luckily doesn't happen all that often to me) is when I
    edit my program, and nothing seems to change. Nothing at all. Depending on
    the setup it might be some cache, but something it is even more
    devious - for example I didn't notice that the console where I edit and
    the console where I test are on different hosts - and thus the edits
    actually have no effect at all.
&lt;/p&gt;

&lt;p&gt;
    After having done such a thing once or twice I adopted the habit of just
    adding a &lt;code&gt;die('BOOM');&lt;/code&gt; instruction to my code, to verify that
    the part I'm looking at is actually run.
&lt;/p&gt;

&lt;p&gt;
    These are moments when I question my own sanity, thinking &quot;how could I
    have possibly done such a stupid thing?&quot;. Doubt.
&lt;/p&gt;

&lt;p&gt;
    The same phenomena applies when doing scientific research: since you
    usually do things that nobody has done before (or at nobody has published
    about it yet), you can't know the results beforehand -- if you could, your
    research would be rather boring. So you have no external reference for
    verification, only your intuition and discussion with peers.
&lt;/p&gt;

 
</description>
  </item>
  <item rdf:about="http://perlgeek.de/blog-en/perl-6/perl6-advent-calendar.html">
 <title>The Perl 6 Advent Calendar</title>
  <link>http://perlgeek.de/blog-en/perl-6/perl6-advent-calendar.html</link>
 <author>Moritz Lenz</author>
   <pubDate>Tue, Dec  1 22:39:22 2009</pubDate>
    <description>&lt;!-- 1259703562 --&gt;

&lt;p&gt;In the great tradition of Perl Advent Calendars, colomon started and
announced &lt;a href=&quot;http://perl6advent.wordpress.com/&quot;&gt;the 2009 Perl 6 Advent
Calendar&lt;/a&gt;, with a post about Perl 6 each day.&lt;/p&gt;

&lt;p&gt;After the first post many #perl6 regulars volunteered to contribute a post,
so 20 of the 24 days are already allocated.&lt;/p&gt;

&lt;p&gt;I'm looking forward to many nice posts, most of which will probably
highlight a small Perl 6 feature.&lt;/p&gt;



</description>
  </item>
  <item rdf:about="http://perlgeek.de/blog-en/perl-6/set-phasers-to-stun.html">
 <title>Set Phasers to Stun!</title>
  <link>http://perlgeek.de/blog-en/perl-6/set-phasers-to-stun.html</link>
 <author>Moritz Lenz</author>
   <pubDate>Thu, Nov 26 00:00:00 2009</pubDate>
    <description>&lt;!-- 1259190000 --&gt;

&lt;p&gt;Did you ever wonder how &lt;code&gt;BEGIN&lt;/code&gt;, &lt;code&gt;CHECK&lt;/code&gt;,
&lt;code&gt;END&lt;/code&gt; and so on are called in Perl? Well, they didn't have a good
name, until &lt;a
href=&quot;http://irclog.perlgeek.de/perl6/2009-11-06#i_1695188&quot;&gt;recently&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The Perl 6 spec listed them under &lt;em&gt;closure traits&lt;/em&gt;, which is
unwieldy, and not really exact either. &lt;a
href=&quot;http://perlcabal.org/svn/pugs/revision/?rev=29004&quot;&gt;Now they are called
&lt;em&gt;phasers&lt;/em&gt;&lt;/a&gt;, because they tell you which execution phase the block or
statement runs in.&lt;/p&gt;

&lt;p&gt;There are so many possible puns that I'll refrain from writing any.&lt;/p&gt;



</description>
  </item>
  <item rdf:about="http://perlgeek.de/blog-en/perl-6/immutable-sigils-and-context.html">
 <title>Immutable Sigils and Context</title>
  <link>http://perlgeek.de/blog-en/perl-6/immutable-sigils-and-context.html</link>
 <author>Moritz Lenz</author>
   <pubDate>Thu, Nov 19 00:03:20 2009</pubDate>
    <description>&lt;!-- 1258585400 --&gt;
&lt;p&gt;If you have an array &lt;code&gt;@a&lt;/code&gt; and want to access the first element,
in Perl 5 you write that as &lt;code&gt;$a[0]&lt;/code&gt;, in Perl 6 you write it as
&lt;code&gt;@a[0]&lt;/code&gt;. We call the former &lt;em&gt;mutable sigil&lt;/em&gt;, and the latter
&lt;em&gt;immutable sigil&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;You might think that's a small change, but the implications are rather
deep, and we've had quite a few discussions about it in &lt;a
href=&quot;http://irclog.perlgeek.de/perl6/today&quot;&gt;#perl6&lt;/a&gt;. In particular people
often ask if it's possible to backport the Perl 6 behavior to Perl 5. The
answer is &lt;em&gt;&quot;not easily&quot;&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;In Perl 5 context propagates inwards, which means that in a statement like

&lt;pre&gt;
... = func()
&lt;/pre&gt;

&lt;p&gt;The compiler wants to know at compile time which context
&lt;code&gt;func()&lt;/code&gt; is in. If it doesn't, it complains:&lt;/p&gt;

&lt;pre&gt;
2$ perl -ce '(rand() &amp;lt; 0.5 ? $a : @a) = func()'
Assignment to both a list and a scalar at -e line 1, at EOF
-e had compilation errors.
&lt;/pre&gt;

&lt;!-- unfreakout syntax hilightiing --&gt;

&lt;p&gt;This also means that, in Perl 5,  array slices and scalar array accesses have to be
syntactically distinguished:&lt;/p&gt;

&lt;pre&gt;
&lt;span class=&quot;synStatement&quot;&gt;my&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;@a&lt;/span&gt;;
&lt;span class=&quot;synIdentifier&quot;&gt;$a{&lt;/span&gt;other_func()&lt;span class=&quot;synIdentifier&quot;&gt;}&lt;/span&gt; = ...; &lt;span class=&quot;synComment&quot;&gt;# scalar context&lt;/span&gt;
&lt;span class=&quot;synIdentifier&quot;&gt;@a{&lt;/span&gt;other_func()&lt;span class=&quot;synIdentifier&quot;&gt;}&lt;/span&gt; = ...; &lt;span class=&quot;synComment&quot;&gt;# list context&lt;/span&gt;
&lt;/pre&gt;

&lt;p&gt;So you can't just make sigils in Perl 5 immutable without also rewriting
the whole context handling rules.&lt;/p&gt;

&lt;p&gt;In Perl 6 that's not a problem at all, because functions don't know the
context they're in, in fact can't know because of multi dispatch.&lt;/p&gt;

&lt;p&gt;Instead functions return objects that behave appropriately in various
contexts, and the context is determined at run time.&lt;/p&gt;

&lt;p&gt;After getting used to it the immutable sigils are quite nice, and less
complicated when references are involved. Anybody who objects without having
tried it for at least three weeks, and is spoiled by Perl 5, will be shot.&lt;/p&gt;


</description>
  </item>
  <item rdf:about="http://perlgeek.de/blog-en/perl-6/is-perl-6-really-perl.html">
 <title>Is Perl 6 really Perl?</title>
  <link>http://perlgeek.de/blog-en/perl-6/is-perl-6-really-perl.html</link>
 <author>Moritz Lenz</author>
   <pubDate>Thu, Nov 12 12:50:41 2009</pubDate>
    <description>&lt;!-- 1258026641 --&gt;

&lt;p&gt;A few days ago &lt;a href=&quot;http://use.perl.org/~masak/journal/39861&quot;&gt;masak
blogged about the social aspect&lt;/a&gt; of the &lt;em&gt;is Perl 6 really Perl?&lt;/em&gt;
question.&lt;/p&gt;

&lt;p&gt;He presumes that the answer is &lt;em&gt;yes&lt;/em&gt;, but doesn't tell us why.
I'll try to give some reasons.&lt;/p&gt;

&lt;h2&gt;Perl 6 started as the successor to Perl 5&lt;/h2&gt;

&lt;p&gt;Perl 6 &lt;a
href=&quot;http://www.mail-archive.com/perl6-meta@perl.org/msg00409.html&quot;&gt;started
off as the successor to Perl 5, at a Perl 5 meeting&lt;/a&gt;, by the Perl
crowd. It was a plan to escape both the backwards compatibility trap (which
meant that broken things couldn't be fixed without many people yelling), and
the lack of momentum in the community.&lt;/p&gt;

&lt;h2&gt;Perl 6 embraces the Perl philosophy&lt;/h2&gt;

&lt;p&gt;What makes Perl Perl? In my opinion it's not the sigils on variables that
make Perl Perl, or that writing a regex only need two characters and so on.
It's mostly the philosophy that makes the difference.&lt;/p&gt;

&lt;p&gt;There are some underlying principles like TIMTOWTDI, context sensitivity,
convenience over consistency, making simple things easy and hard things
possible, often used constructs short and less frequent things longer, and so
on.&lt;/p&gt;

&lt;p&gt;Perl 6 is founded on all those philosophies and ideals, and also shares
some technical principles. For example sigils on variables (oh, I mentioned
them already ...), easy access to powerful regexes, that fact that operations
coerce their arguments (instead of the type of arguments determining the
operation like in javascript, where a &lt;code&gt;+&lt;/code&gt; can either mean addition
or string concatenation).&lt;/p&gt;

&lt;p&gt;So if you agree with my definition of what makes Perl Perl, Perl 6 is also
Perl. If not, please tell me what's the essence of Perl!&lt;/p&gt;


 
</description>
  </item>
  <item rdf:about="http://perlgeek.de/blog-en/perl-6/lost-in-wonderland.html">
 <title>Perl 6: Lost in Wonderland</title>
  <link>http://perlgeek.de/blog-en/perl-6/lost-in-wonderland.html</link>
 <author>Moritz Lenz</author>
   <pubDate>Thu, Nov  5 20:06:56 2009</pubDate>
    <description>&lt;!-- 1257448016 --&gt;

&lt;p&gt;When you learn a programming language, you not only learn about the syntax,
semantics and core libraries, but also the coding style and common
idioms.&lt;/p&gt;

&lt;p&gt;Idioms are common usage patterns; learning and reusing them means you have
to spend less time thinking on common things, and have more time working out
the algorithms you deal with.&lt;/p&gt;

&lt;p&gt;That's different if you learn Perl 6 - it's a largely unexplored field, and
while there are loads of nice features, you might still feel a bit lost. At
least I do.  That's because I often think &lt;em&gt;&quot;There's got to be a much easier
way to achieve $this&lt;/em&gt;, but it often takes time to find that easier
solution - because nobody developed an idiom for it.&lt;/p&gt;

&lt;p&gt;In those cases it helps to ask on the #perl6 IRC channel; many smart people
read and write there, and are rather good in coming up with simpler
solutions.&lt;/p&gt;

&lt;p&gt;For example see &lt;a
href=&quot;https://gist.github.com/224204/a13c291237d438f331dff6cf9b30d6759c9185b9&quot;&gt;masak's
ROT13 implementation in Perl 6&lt;/a&gt;.  In the right column you can see later
revisions, and how they gradually improve, steady up to a &lt;a
href=&quot;https://gist.github.com/224204/fdb1468afffb9bc122bb84797b9e0c4df6cf0c96&quot;&gt;one-liner&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I also made &lt;a
href=&quot;http://github.com/moritz/json/commit/107a11c0b4f181c130a9ff0433e8939c730d3f53&quot;&gt;some
simplifications to JSON::Tiny&lt;/a&gt;, which basically shows that when I wrote
these reduction methods first I used Perl 6 baby talk language.&lt;/p&gt;

&lt;p&gt;The nice things about exploring the Perl 6 wonderland of unexplored idioms
is that it really pushes your ego if you find a nice simplification, and that
you have something to blog about for the &lt;a
href=&quot;http://ironman.enlightenedperl.org/&quot;&gt;Planet Perl Iron man&lt;/a&gt; ;-)&lt;/p&gt;



</description>
  </item>
  <item rdf:about="http://perlgeek.de/blog-en/perl-6/tidings-2009-10.html">
 <title>Perl 6 Tidings from October 2009</title>
  <link>http://perlgeek.de/blog-en/perl-6/tidings-2009-10.html</link>
 <author>Moritz Lenz</author>
   <pubDate>Thu, Oct 29 22:16:53 2009</pubDate>
    <description>&lt;!-- 1256851013 --&gt;

&lt;p&gt;These tidings posts seem to become rather sparse, but I hope you get some
news by reading the &lt;a href=&quot;http://planetsix.perl.org/&quot;&gt;Planet Six&lt;/a&gt; feed
aggregator anyway.&lt;/p&gt;

&lt;h2&gt;Specification&lt;/h2&gt;

&lt;ul&gt;
    &lt;li&gt;Larry lifted up the dual nature of Ranges. They mostly serve as an
    interval now, for smart iteration the series operator has been pimped up.
    You can now write &lt;code&gt; for 1, 3 ... *+2, 9 { .say }&lt;/code&gt; to print all
    the odd numbers between 1 and 9. (&lt;a
            href=&quot;http://perlcabal.org/svn/pugs/revision/?rev=28344&quot;&gt;r28344&lt;/a&gt;,
            &lt;a
            href=&quot;http://perlcabal.org/svn/pugs/revision/?rev=28348&quot;&gt;r28348&lt;/a&gt;,
            &lt;a href=&quot;http://perlcabal.org/svn/pugs/revision/?rev=28351&quot;&gt;r28351&lt;/a&gt;).&lt;/li&gt;
    &lt;li&gt;&lt;code&gt;Rat&lt;/code&gt;ional and Complex types now have their own literals
    (&lt;a href=&quot;http://perlcabal.org/svn/pugs/revision/?rev=28173&quot;&gt;r28173&lt;/a&gt;).&lt;/li&gt;
    &lt;li&gt;Stubbed classes are now documented (&lt;a
            href=&quot;http://perlcabal.org/svn/pugs/revision/?rev=28196&quot;&gt;r28196&lt;/a&gt;,
            &lt;a href=&quot;http://perlcabal.org/svn/pugs/revision/?rev=28197&quot;&gt;r28197&lt;/a&gt;).&lt;/li&gt;
    &lt;li&gt;The new &lt;a href=&quot;http://perlcabal.org/syn/S08.html&quot;&gt;S08&lt;/a&gt; documents
    Parcels and Captures.&lt;/li&gt;
    &lt;li&gt;The numeric types have been cleaned up a lot (&lt;a href=&quot;http://perlcabal.org/svn/pugs/revision/?rev=28502&quot;&gt;r28502&lt;/a&gt; and later commits
    up to &lt;a href=&quot;http://perlcabal.org/svn/pugs/revision/?rev=28597&quot;&gt;r28597&lt;/a&gt;).&lt;/li&gt;
    &lt;li&gt;New and improved signature introspection (&lt;a
            href=&quot;http://perlcabal.org/svn/pugs/revision/?rev=28664&quot;&gt;r28664&lt;/a&gt;,
            &lt;a href=&quot;http://perlcabal.org/svn/pugs/revision/?rev=28665&quot;&gt;r28665&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Compilers&lt;/h2&gt;

&lt;h3&gt;Rakudo&lt;/h3&gt;

&lt;p&gt;As opposed to two months ago, Rakudo now&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;supports the Rat type&lt;/li&gt;
    &lt;li&gt;supports overloading of many built-in operators&lt;/li&gt;
    &lt;li&gt;has contextual variables&lt;/li&gt;
    &lt;li&gt;has a faster and much better signature binder&lt;/li&gt;
    &lt;li&gt;supports all kind of trigonometric functions, including on complex
    numbers&lt;/li&gt;
    &lt;li&gt;implements sophisticated signature introspection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Patrick Michaud is also working on a new tool named npq-rx, which combines
a self-hosting NQP compiler and a new regex engine, which already supports
proto regexes, NQP code assertions and closures, and is generally much faster
and better than PGE.&lt;/p&gt;

&lt;h3&gt;Sprixel&lt;/h3&gt;

&lt;p&gt;Mathew Wilson aka diakopter started &lt;a
href=&quot;http://perlgeek.de/blog-en/perl-6/announcing-sprixel.writeback&quot;&gt;sprixel&lt;/a&gt;,
a Perl 6 to Javascript compiler.&lt;/p&gt;

&lt;h3&gt;Mildew&lt;/h3&gt;
&lt;p&gt;Mildew now has an experimental javascript emitter.&lt;/p&gt;

&lt;h2&gt;Other matters&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://perl6.org/&quot;&gt;perl6.org&lt;/a&gt; is redesigned again, this time
spanning multiple pages, thus allowing much more stuff to be linked there.&lt;/p&gt;

&lt;p&gt;Four Perl 6 and Rakudo hackers &lt;a
href=&quot;http://perlgeek.de/blog-en/perl-6/we-write-a-perl-6-book-for-you.writeback&quot;&gt;announced
that they are writing a Perl 6 book&lt;/a&gt;, the print release of which shall
coincide with the release of Rakudo Star.&lt;/p&gt;



</description>
  </item>
 
</rdf:RDF>