<?xml version="1.0"?>
<rss version="2.0">

<channel>
	<title>Planet Perl Six</title>
	<link>http://planetsix.perlfoundation.org</link>
	<language>en</language>
	<description>Planet Perl Six - http://planetsix.perlfoundation.org</description>

<item>
	<title>Carl Masak: Week 10 of Web.pm -- Genshi, Grampa and some docs</title>
	<guid>http://use.perl.org/~masak/journal/39224?from=rss</guid>
	<link>http://use.perl.org/~masak/journal/39224?from=rss</link>
	<description>&lt;dl&gt; &lt;dd&gt; &lt;i&gt;Happy Cat sez, &quot;I gots a plan. Momz wantz booze, she getz booze. Fill teh bukkitz with waterz.&quot; And teh doodz fillded dem full.&lt;/i&gt; &lt;/dd&gt;&lt;dd&gt; &lt;i&gt;He sed to teh doodz, &quot;Teyk som waters to teh party dood.&quot; Tehy didz it. Teh party dood was liek, &quot;Tihs iz teh booze! I lieks tihs booze! Where didz tihs come?&quot; (Teh doodz who broughted teh booze knowd.) Teh party dood wentz to teh pplz gettin hitchded and sed, &quot;WTF!? Most doodz gives teh gud booze first, and tehn crappy booze when pplz iz too drunk to care. But tihs booze pwns!&quot;&lt;/i&gt; &lt;/dd&gt;&lt;dd&gt; &lt;i&gt;Happy Cat didded this, teh first of hiz signz, in Cana inz Galilee, and revealded hiz Pwnage; and Happy Cat's doodz beleved in him.&lt;/i&gt; &amp;#8212; John 2:7-11&lt;/dd&gt;&lt;/dl&gt;&lt;p&gt;Today I've had some fairly good progress with Hitomi, the XML templater. Using the draft grammar moritz++ helped me build, I created a class that takes an XML document and translates it to a stream of events. This makes about half of the tests that I ported from Genshi &lt;a href=&quot;http://use.perl.org/~masak/journal/39137&quot;&gt;last time&lt;/a&gt; pass; the other half of that test file concern tag soup input &amp;#8212; I think I'll punt that one for now, and go for the lower hanging fruit: the classes &lt;code&gt;Template&lt;/code&gt; and &lt;code&gt;MarkupTemplate&lt;/code&gt;. With those, it should be possible to actually, you know, do some templating.&lt;/p&gt;&lt;p&gt;I'm getting more and more familiar with the original Python code, and starting to have some significant respect for the Genshi code base. It's simply a very well-thought-out piece of software. I can see why people like it. The project doesn't seem terribly active, unfortunately, so sometimes questions from me and others go unanswered on the &lt;code&gt;#python-genshi&lt;/code&gt; IRC channel.&lt;/p&gt;&lt;p&gt;Is Hitomi a good name? jnthn++ pointed out today that it sounded very similar to &quot;hit on me&quot;, and I find myself constantly writing either &quot;Hitmo&quot; or &quot;Himoti&quot;. Then again, I kinda like that it means (or so I've read) &quot;doubly beautiful&quot;, and I don't have a better suggestion at the moment.&lt;/p&gt;&lt;p&gt;Another thing that has been going on in the past week is that viklund++ said, almost in passing, that it'd be nice to have an XPath engine for &lt;code&gt;Match&lt;/code&gt; objects. I thought it was a great idea, and incubated the project &lt;a href=&quot;http://github.com/masak/grampa&quot;&gt;&quot;Grampa&quot;&lt;/a&gt; (short for &quot;grammar paths&quot;) on github. I've since made some good progress on it, and it's already slightly useful. Not to mention that I've learned a few new things about XPath and EBNF that I didn't know before. pmichaud++ helped me with some questions on the latter.&lt;/p&gt;&lt;p&gt;How does that tie into Web.pm? Well, it turns out that at least two of the subprojects of Web.pm would benefit from XPath searches: Hitomi, and Happle (our Hpricot clone). This suggests that Grampa should really be a &lt;code&gt;Match&lt;/code&gt; front-end to an XPath query back-end, so that the back-end can then be reused in other projects. I've been implementing Grampa with this in mind.&lt;/p&gt;&lt;p&gt;Finally, since it's nearing the end of my original part of the grant, I've taken a fresh look at &lt;a href=&quot;http://github.com/masak/web/blob/master/doc/PLAN&quot;&gt;doc/PLAN&lt;/a&gt; and refined it a little. No major course corrections were needed, which feels comforting. I'll probably write some more about the status of the subprojects in next week's blog post.&lt;/p&gt;&lt;p&gt;Another thing I plan to do in the coming week is start on my Web.pm talk for YAPC::EU. I thought I'd write the talk in Perl 6 Pod, and then do various conversions to end up with a PDF. Since most of the toolchain for doing that doesn't exist yet, I thought I'd better start now. &amp;#21704;&amp;#21704;&lt;/p&gt;&lt;p&gt;I wish to thank The Perl Foundation for sponsoring the Web.pm effort.&lt;/p&gt;</description>
	<pubDate>Fri, 03 Jul 2009 21:19:10 +0000</pubDate>
</item>
<item>
	<title>chromatic: How to Count (Parrot Style)</title>
	<guid>http://use.perl.org/~chromatic/journal/39219?from=rss</guid>
	<link>http://use.perl.org/~chromatic/journal/39219?from=rss</link>
	<description>&lt;blockquote&gt;&lt;div&gt;&lt;p&gt; &lt;em&gt;Parrot releases are harder to count because of their prolific release cycle.&lt;/em&gt;&lt;/p&gt;&lt;/div&gt; &lt;/blockquote&gt;&lt;p&gt; &lt;a href=&quot;http://coolnamehere.com/brian/index.html&quot;&gt;Brian Wisti&lt;/a&gt;, &lt;a href=&quot;http://brianwisti.blogspot.com/2009/07/in-which-brian-whinges-about-perl-5.html&quot;&gt;In Which Brian Whinges About The Perl 5 Release Schedule&lt;/a&gt;

&lt;/p&gt;&lt;p&gt;This is a trivial nitpick (read the rest of the article!  It's very good!), but Parrot releases are very, very easy to count.  The same goes for Rakudo releases.&lt;/p&gt;&lt;p&gt;The other day someone asked what Parrot might look like in a hundred years.  I laughed and thought, &quot;What would its version number be?&quot;  Then I realized that &lt;em&gt;I can predict its version number in 100 years&lt;/em&gt;.  Parrot 101.6 will be out, with Parrot 101.7 on the way.&lt;/p&gt;&lt;p&gt;For all of the lofty talk about &quot;stability&quot; and &quot;maturity&quot; and &quot;predictability&quot; which results in Perl 5 &lt;em&gt;not&lt;/em&gt; getting released, the fact that I can predict the release date and version number of a piece of software one hundred years in the future says something about the stability, maturity, predictability, and reliability of a very different kind of development process.&lt;/p&gt;&lt;p&gt;(Oh, and Alias -- I can crash several so-called stable releases of Perl 5 with a one-liner the same way you crashed Parrot in December 2008 with a short program.  If you want to make the argument that the 30 stable monthly releases of Parrot in a row don't actually exist because they had bugs, the two so-called stable releases of Perl 5 from the same time period don't exist either.  Ontological debates are easy to lose.)&lt;/p&gt;</description>
	<pubDate>Fri, 03 Jul 2009 09:11:54 +0000</pubDate>
</item>
<item>
	<title>Herbert Breunung: come to where real action is.</title>
	<guid>http://use.perl.org/~perl6doc/journal/39217?from=rss</guid>
	<link>http://use.perl.org/~perl6doc/journal/39217?from=rss</link>
	<description>since my first post at this blog 2 weeks ago, &lt;a href=&quot;http://www.perlfoundation.org/perl6/index.cgi?perl_table_index&quot;&gt;Appendix A&lt;/a&gt; is now twice as long (454 entries). Today i completed regex modifier, aiming now toward control chars and escape sequences. But not only the numbers improved, also quality improved much. There are now also more pointer to similar terms, tags when commands kept same since p5, etc. But I still need your help. So please have a look at these wiki pages and edit them if you have the feeling you can improve them.</description>
	<pubDate>Fri, 03 Jul 2009 00:35:30 +0000</pubDate>
</item>
<item>
	<title>chromatic: Perl 6 Design Minutes for 27 May 2009</title>
	<guid>http://use.perl.org/~chromatic/journal/39216?from=rss</guid>
	<link>http://use.perl.org/~chromatic/journal/39216?from=rss</link>
	<description>&lt;p&gt;The Perl 6 design team met by phone on 27 May 2009. Larry, Allison, Patrick, Jerry, and chromatic attended.&lt;/p&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;changed the &lt;code&gt;time&lt;/code&gt; function to return a &lt;code&gt;Rat&lt;/code&gt; &lt;/li&gt;&lt;li&gt;thinking about the traits that have been bothering Jonathan and others&lt;/li&gt;&lt;li&gt;have some changes to check into the spec when I'm happy with them&lt;/li&gt;&lt;li&gt;thinking about the primitives we use to define &lt;code&gt;use&lt;/code&gt; &lt;/li&gt;&lt;li&gt;breaks down into load and import&lt;/li&gt;&lt;li&gt;thinking of establishing compile-time keywords for both concepts&lt;/li&gt;&lt;li&gt;intended so that I can import from anything acting like a module -- an inlined role, for example&lt;/li&gt;&lt;li&gt;otherwise trying to keep up with the flow of IRC&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;working on the Parrot book&lt;/li&gt;&lt;li&gt;changed its focus to a small, 100-page PIR book from a monolithic Parrot book&lt;/li&gt;&lt;li&gt;the intent is to get something out for YAPC and OSCON&lt;/li&gt;&lt;li&gt;will send out a draft for review&lt;/li&gt;&lt;li&gt;will merge my changes into the repo later this week&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;released Rakudo #17 last week&lt;/li&gt;&lt;li&gt;was easy again&lt;/li&gt;&lt;li&gt;875 more tests since #16, so we pass 68% of the spectest suite&lt;/li&gt;&lt;li&gt;finished implementing the &lt;code&gt;root_new&lt;/code&gt; opcode in Parrot&lt;/li&gt;&lt;li&gt;cleans up a lot of the PMCProxy issues from moving Rakudo to its own HLL&lt;/li&gt;&lt;li&gt;gained half of the speed we lost from the migration&lt;/li&gt;&lt;li&gt;we'll get more back as we update more places that need it&lt;/li&gt;&lt;li&gt;NQP never expected anything like that&lt;/li&gt;&lt;li&gt;I have to rework some it and PCT&lt;/li&gt;&lt;li&gt;haven't quite figured out how to do that&lt;/li&gt;&lt;li&gt;refactoring &lt;code&gt;use&lt;/code&gt; and &lt;code&gt;import&lt;/code&gt; in Rakudo&lt;/li&gt;&lt;li&gt;the current implementation doesn't work&lt;/li&gt;&lt;li&gt;will hopefully match with what Larry's putting in the spec&lt;/li&gt;&lt;li&gt;it seems like the logical way to do things&lt;/li&gt;&lt;li&gt;updated Rakudo's ROADMAP in &lt;em&gt;docs/ROADMAP&lt;/em&gt; &lt;/li&gt;&lt;li&gt;gives us an idea of dependencies and next tasks&lt;/li&gt;&lt;li&gt;may also help people understand what blocks features they want&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Jerry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;the bonding period has ended for GSoC&lt;/li&gt;&lt;li&gt;time for students to start coding&lt;/li&gt;&lt;li&gt;everyone on the Perl 6 and Parrot projects is ready&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;c:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;fixed some memory leaks in Parrot and Rakudo&lt;/li&gt;&lt;li&gt;there are still some in Rakudo, but the web examples should be able to live longer&lt;/li&gt;&lt;li&gt;did more profiling&lt;/li&gt;&lt;li&gt;think NFG is important for Parrot in the near term&lt;/li&gt;&lt;li&gt;have some documentation to write&lt;/li&gt;&lt;li&gt;have been editing the Parrot book&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;how's the command line for Rakudo coming?&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Jerry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;I expect to get back to that&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;the &quot;parens build captures&quot; decision surprised me&lt;/li&gt;&lt;li&gt;what's the rationale?&lt;/li&gt;&lt;li&gt;I really liked &quot;parens mean grouping&quot;&lt;/li&gt;&lt;li&gt;maybe I haven't reconfigured my worldview yet, but it feels messy&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;when used in an argument list, it has the same effect as a capture&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;it even works when they're used as a term&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;they still mean that you have to look at what you're binding to and decide&lt;/li&gt;&lt;li&gt;am I binding this to a scalar or to an array?&lt;/li&gt;&lt;li&gt; &lt;code&gt;(1, 2, 3)&lt;/code&gt; bound to an array...&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;I'm going to have to think about that&lt;/li&gt;&lt;li&gt;the &lt;code&gt;zip&lt;/code&gt; operator in slice context....&lt;/li&gt;&lt;li&gt;is this three or one positional arguments?  &lt;code&gt;zip($a,$b,$c)&lt;/code&gt; &lt;/li&gt;&lt;li&gt;how many positional arguments are in this case? &lt;code&gt;zip($a,$b,$c;$d)&lt;/code&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;one slice&lt;/li&gt;&lt;li&gt;you wouldn't want to write that&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;what in the arg list distinguishes the use of the semicolon versus the comma&lt;/li&gt;&lt;li&gt;inside of an argument list we have to recognize a variety of syntactic things&lt;/li&gt;&lt;li&gt;comma, semicolon, colon, array or hash sigil, named parameters&lt;/li&gt;&lt;li&gt;seems like captures need more information than just positional&lt;/li&gt;&lt;li&gt;they need to store metadata about positional arguments&lt;/li&gt;&lt;li&gt;I like the syntactic stuff showing up in the argument list&lt;/li&gt;&lt;li&gt;but I don't want to handle them in three different ways&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;I'll have to think about that&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;haven't figured out how to deal with slice context either&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;might say that the presence of a semicolon implies the presence of other parens&lt;/li&gt;&lt;li&gt;the comma implies...&lt;/li&gt;&lt;li&gt;that might be more consistent binding for a top-level list&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;I half expected that answer&lt;/li&gt;&lt;li&gt;I can see the semicolon as just a lower precedence grouping operator&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;otherwise you have a semicolon that's just not there in every other argument list&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;assuming that, the other commas form an argument list through the infix semicolon&lt;/li&gt;&lt;li&gt;an array in there means Capture of Capture of Capture&lt;/li&gt;&lt;li&gt;we were about to refactor List and Array in Rakudo anyway&lt;/li&gt;&lt;li&gt;the question is &quot;Do we really have a List type now?&quot;&lt;/li&gt;&lt;li&gt;Rakudo assumes that&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;if we can unify args list with List, that's probably healthy&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;I'd really like that&lt;/li&gt;&lt;li&gt;that makes things a lot cleaner&lt;/li&gt;&lt;li&gt;infix comma and infix semis now just create arglists&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;or Lists&lt;/li&gt;&lt;li&gt;if you define List as &quot;something that has out of band metadata&quot;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;any more decisions that you can make about that will help our implementation&lt;/li&gt;&lt;li&gt;I probably won't get around to that this week&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;we make syntactic distinctions&lt;/li&gt;&lt;li&gt;we know that this is an arg list&lt;/li&gt;&lt;li&gt;we treat pairs as named arguments&lt;/li&gt;&lt;li&gt;we don't do that if we know it's not an argument list&lt;/li&gt;&lt;li&gt;it stays positional&lt;/li&gt;&lt;li&gt;that's the only distinction between an arg list and a List&lt;/li&gt;&lt;li&gt;purely syntactic&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;to summarize&lt;/li&gt;&lt;li&gt; &lt;code&gt;zip($a, $b, $c)&lt;/code&gt; has three positional arguments&lt;/li&gt;&lt;li&gt; &lt;code&gt;zip($a, $b, $c; $d)&lt;/code&gt; has two, the first of which is itself a list/capture&lt;/li&gt;&lt;/ul&gt;</description>
	<pubDate>Thu, 02 Jul 2009 23:03:51 +0000</pubDate>
</item>
<item>
	<title>Moritz Lenz (Perl 6): Strings and Buffers</title>
	<guid>http://perlgeek.de/blog-en/perl-6/strings-and-buffers.writeback</guid>
	<link></link>
	<description>&lt;!-- 1246518493 --&gt;
&lt;p&gt;Subtitled &quot;The Zen of not messing up your strings&quot;.&lt;/p&gt;

&lt;p&gt;Handling non-ASCII strings in Perl 5 is a real pain, because there are no
real separate types for binary data and text strings. Mostly the operation
provides a context of either binary or string processing, but function like
&lt;code&gt;length&lt;/code&gt; don't, so the answer is dependent on internal
representations about wich the programmer should never care.&lt;/p&gt;

&lt;p&gt;In the Perl 6 language design we decided not to repeat that mistake. Since
Strings are objects like everything else, it's easy to invent new types. So in
essence we have two types relevant for our discussion, &lt;code&gt;Str&lt;/code&gt; and
&lt;code&gt;Buf&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;Str&lt;/h3&gt;

&lt;p&gt;A &lt;code&gt;Str&lt;/code&gt; is notionally a sequence of characters, or a text
string. There's no character encoding attached to it, and while it is surely 
stored in a specific encoding scheme internally, it's nothing that programmer
cares about.&lt;/p&gt;

&lt;p&gt;A Str co-exists on two (at least) two levels, on codepoint and
grapheme level. A codepoint is everything that the Unicode consortium has
assigned a number and a name, like &lt;code&gt;U+0065 LATIN SMALL LETTER E&lt;/code&gt;
or &lt;code&gt;U+0300 COMBINING GRAVE ACCENT&lt;/code&gt;. A grapheme is either a
codepoint or a sequence of codepoints that are visually represented together,
for example the two codepoints mentioned before would be printed as a single
grapheme &lt;code&gt;è&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The default level is grapheme, because that's closest to how humans usually
think of characters and text. Specific operations can override the default
abstraction level, or it can be adjusted by pragmas like &lt;code&gt;use
codes;&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;Buf&lt;/h3&gt;

&lt;p&gt;Of course you can also handle binary data in Perl 6. Such data is stored in
objects of type &lt;code&gt;Buf&lt;/code&gt;. Notionally a Buf is a list of integers of a
fixed size. It has subtypes for common sizes &lt;code&gt;buf8&lt;/code&gt; is a sequence
of unsigned bytes, &lt;code&gt;buf16&lt;/code&gt; and &lt;code&gt;buf32&lt;/code&gt; store unsigned 16
and 23 bit integers.&lt;/p&gt;

&lt;p&gt;When you communicate with anything outside of Perl 6, you'll need
&lt;code&gt;Buf&lt;/code&gt; objects for that, because files and terminals only understand
byte streams, not character streams.&lt;/p&gt;

&lt;p&gt;There are also a different kind of &lt;code&gt;Buf&lt;/code&gt;s which enforce a
specific encoding, for example &lt;code&gt;utf8&lt;/code&gt; can only hold byte sequences
which can be interpreted as UTF-8. They are not strictly necessary, but
provide a nice, convenient interface for some operations.&lt;/p&gt;

&lt;h3&gt;Conversion&lt;/h3&gt;

&lt;p&gt;Conversion between Str and Buf is called encoding, the other way round is
called decoding. For example &lt;code&gt;&quot;møøse&quot;&lt;/code&gt; is a Str, and
&lt;code&gt;&quot;møøse&quot;.encode('Latin-1')&lt;/code&gt; returns a Buf, more specifically a
buf8.&lt;/p&gt;

&lt;p&gt;On the other hand if you read some bytes from a socket and want to treat
the result as a text string, you decode it: &lt;code&gt;my $str =
$buf.decode('UTF-16LE')&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Mixing a Str and Buf that doesn't know about its own encoding in an
operation like concatenation or comparison throws an exception, because those
are the conditions where most Perl 5 programs mess up strings beyond all
repair.&lt;/p&gt;

&lt;h3&gt;IO&lt;/h3&gt;

&lt;p&gt;If you read the above, maybe you think that printing a Str to standard
output is an error because the string doesn't know its encoding, so it can't
represented as a byte stream. That's only half the truth; the output handle can
also have knowledge about its own encoding.&lt;/p&gt;

&lt;p&gt;When you open a file, you can either specify that it's opened as a binary
file, or you specify an encoding. In the former case reading from the handle
returns &lt;code&gt;Buf&lt;/code&gt;s, in the latter &lt;code&gt;Str&lt;/code&gt;s.&lt;/p&gt;

&lt;p&gt;For the sake of convenience a pseudo encoding called &lt;code&gt;Unicode&lt;/code&gt;
exists. (Yes, we know that Unicode defines a character repertoire, not a
character encoding). If there's a byte order mark (short BOM) at the start of
the stream, it is used to determine the encoding. If not, a very simple
autodetection is used: If the file is obviously UTF-16LE, UTF-16BE or UTF-32
(detectable by the position of the zero bytes when encoding ASCII characters)
then the detected encoding is used, otherwise as a fallback UTF-8 is
used. This autodetection scheme is the default.&lt;/p&gt;

&lt;h3&gt;Conclusions&lt;/h3&gt;

&lt;p&gt;We learned from the experience that cramming too many different semantics
into a single data type is harmful. So now byte streams and text streams have
different data types, and a clean interface for converting back and forth.&lt;/p&gt;

&lt;p&gt;The specification is not set in stone so far, and no compiler implements
the Buf type yet, but it is already planned for Rakudo.&lt;/p&gt;

&lt;p&gt;Since this is an important topic to me I will continue to nag the
implementors and language designers about it, and write tests to ensure a
solid implementation.&lt;/p&gt;</description>
	<pubDate>Thu, 02 Jul 2009 16:08:13 +0000</pubDate>
</item>
<item>
	<title>Gabor Szabo: Why am I writing Padre?</title>
	<guid>http://szabgab.com/blog/2009/07/1246515871.html</guid>
	<link>http://szabgab.com/blog/2009/07/1246515871.html</link>
	<description>&lt;p&gt;
It is probably not that interesting for most of the people but I have my excuses.
What is more interesting - at least to me - is why others are involved. 
&lt;/p&gt;
&lt;p&gt;
After all there were already more than 40 people who made some contribution to Padre.
&lt;/p&gt;
&lt;p&gt;
So I asked them to start writing down why are they involved. 
Some of them have already added themselves to the 
&lt;a href=&quot;http://padre.perlide.org/developers.html&quot;&gt;developers&lt;/a&gt; page
and we started a separate page for 
&lt;a href=&quot;http://padre.perlide.org/translators.html&quot;&gt;translators&lt;/a&gt; though that 
one is new and has no been filled yet.
&lt;/p&gt;
&lt;p&gt;
So why do I write Padre?
&lt;/p&gt;
&lt;p&gt;
There is a short explanation on that page but let me bore you with a longer one
here.
&lt;/p&gt;
&lt;p&gt;
I have been teaching Perl 5 for almost 10 years now. Both beginner level and 
advanced courses. In the beginner courses the majority of the people use 
Windows with about 20-30 percent using Linux. Most of the Windows users use Notepad++
or a similar editor. Some of them can configure their editor to run the perl script
right from the editor, others don't even know how to enable syntax highlighting 
for Perl 5. Some of the people on Windows don't know what the command line is but
even those who know how to open the command prompt are either afraid of it or 
just dislike it. 
&lt;/p&gt;
&lt;p&gt;
Mind you these are not stupid people or anything like that.
Some of them have many years of hardware design behind them. 
They are just used to some kind of IDEs.
&lt;/p&gt;
&lt;p&gt;
Others might use Linux/Unix but many not by choice. In many cases the company
they are working for gives them telnet access to an oldish Unix machine and
tell them to code in Perl. They hardly know vi, they don't know how to configure
syntax highlighting and they don't know how to install any other editor.
&lt;/p&gt;
&lt;p&gt;
I have been using vim for many years and I can testify that it is a superb editor.
Emacs is similary strong but I have not used it since university. The problem
with both of them is that they are totally different from the editors most
people are used to and their learning curve is long and steep. It takes
several months or even years to become familiar with them. Most of the people
don't want to invest that energy and I certainly don't have the time for that
in a 4 days long Perl 5 course.
&lt;/p&gt;
&lt;p&gt;
So I usually tell them to use whatever they are familiar with. I think I never had
a student who picked Eclipse or Emacs. There were a few using vi/vim 
but most of the people used Notepad++ or a similar Windows based editor.
&lt;/p&gt;
&lt;p&gt;
I don't think my students are too different from the average people learning and 
using Perl. Most of them will never write a full blown web application. Heck most
of them won't have a need for object oriented coding as they write only 
100-200 line long scripts in Perl.
&lt;/p&gt;
&lt;p&gt;
They never get really familiar with Perl and they will always have to deal with 
strange code written by others. With all the other tasks they are required to do
in their primary language or tool they will keep wondering what is $_ when they see
it and will be surprised when they don't.
&lt;/p&gt;
&lt;p&gt;
They will wonder what is the relationship between $_ and $_[0].
&lt;/p&gt;
&lt;p&gt;
So my first objective was to &lt;b&gt;provide a simple Notepad++ like editor with strong 
support for beginners or people with relatively little experience with Perl&lt;/b&gt;.
&lt;/p&gt;
&lt;p&gt;
For example I'd like to make sure that Padre users will be able to highlight $_, 
press F1 and get an explanation. In case they highlight $_ from a $_[0] expression
Padre should be clever enough to point this out and give an explanation on @_ and
@_[0].
&lt;/p&gt;
&lt;p&gt;
I knew it is a big task though I did not think it is soo big. In any case I knew
I cannot handle this alone, especially as I am not such a good programmer.
So from the very beginning I tried to make it &lt;b&gt;interesting, accessible
to experienced Perl 5 developers&lt;/b&gt; and in turn they made it
&lt;b&gt;fun and hackable&lt;/b&gt;.
&lt;/p&gt;
&lt;p&gt;
Unfortunatelly most of the experienced Perl developers are also hard-core vim or 
emacs users and it is nearly impossible to move them away from their editor.
Luckily there were a few who got interested by the idea of having a lot
of control over their editor and that made the difference between a failing
one man project to a project with a lot of potential.
&lt;/p&gt;
&lt;p&gt;
Then at one point came the idea to integrate Parrot and Rakudo and try 
to provide &lt;b&gt;a platform for Perl 6 development&lt;/b&gt; as well. With the awesome
work of &lt;a href=&quot;http://ahmadzawawi.blogspot.com/&quot;&gt;Ahmad M. Zawawi&lt;/a&gt;
Padre has a lot to offer to anyone who wants to write Perl 6 code. With some more
work we'll be able to integrate Parrot even better and then Padre will be 
able to handle any language running on top of Parrot.
&lt;/p&gt;
&lt;p&gt;
While there are still lots of problems with Padre and installation can still
be difficult it already more or less has the same power as Notepad++ on both Windows
and Linux and probably on Mac too and it has some extra features that even 
&lt;a href=&quot;http://code-and-hacks.blogspot.com/2009/06/stealing-from-padre-for-vim.html&quot;&gt;vim people started to steal&lt;/a&gt;.
&lt;/p&gt;</description>
	<pubDate>Thu, 02 Jul 2009 09:24:31 +0000</pubDate>
</item>
<item>
	<title>Patrick Michaud: Rakudo day:  operators in setting and lots of RT bugfixes</title>
	<guid>http://use.perl.org/~pmichaud/journal/39199?from=rss</guid>
	<link>http://use.perl.org/~pmichaud/journal/39199?from=rss</link>
	<description>&lt;p&gt;At the beginning of June the Vienna.pm organization generously
committed to funding me for 1-day-per-week of Rakudo effort,
but because of the Rakudo release, Parrot Virtual Machine Workshop,
YAPC::NA, and a short vacation, today is the first day that I
had available to really dedicate to the task.  In fact, to catch
things up a bit I plan to do another Rakudo day tomorrow or Thursday.
&lt;/p&gt;&lt;p&gt;Here's what I accomplished for today's Vienna.pm-funded Rakudo day.
&lt;/p&gt;&lt;p&gt;The biggest task I tackled for the Rakudo day was to be able to
write operators in the setting (Perl 6) instead of PIR (RT #66826).
In fact, I had actually done most of this last week during the
YAPC::NA hackathon day, but interruptions then and a few annoying
Parrot bugs kept me from marking the task as completely accomplished
then.  What this means is that we can now begin defining operators
directly in Perl 6 code (perhaps with some inlined PIR), which
moritz++ has already been exercising for infix:&amp;lt;...&amp;gt;, infix:&amp;lt;eqv&amp;gt;,
and a few other operators.  Over the next few weeks I expect we'll
move even more operators out of PIR and into the setting.
&lt;/p&gt;&lt;p&gt;The rest of today's Rakudo day was spent reviewing and cleaning up
the RT queue; it had grown to over 400 tickets but by the end of
the day Jonathan and I have shrunk it back down to 387.  I think
we collectively closed about 16 tickets today, and I responded with
requests for clarification or updates on several more.  Here are
some of the highlights:
&lt;/p&gt;&lt;p&gt;RT #66060 noted a problem that the .uc method would fail on some
strings where .lc worked.  I tracked this down to a Parrot issue
in its handling of Unicode strings when ICU wasn't present, and
refactored the code to be a bit more robust there.
&lt;/p&gt;&lt;p&gt;RT #66640 noted that the minmax operator wasn't implemented, so after
some discussion about what it should do I added it to the setting
(using the operator features mentioned above).
&lt;/p&gt;&lt;p&gt;In RT #66624, the exception message coming back from
not finding a substring within a string was particularly misleading;
I adjusted .substr to provide a more useful error message.
&lt;/p&gt;&lt;p&gt;For RT #66928 .WHAT would not work on some subs like &amp;amp;infix:&amp;lt;+&amp;gt;;
this was because some of the builtin operators are still using
Parrot's MultiSub PMC instead of the Perl6MultiSub PMC, and those
didn't have a mapping to the type object.  Eventually all of the
operators will become Perl6MultiSub; in the meantime I set Parrot
MultiSub PMCs to map to the Multi() type objects in the same
manner that other Parrot PMC classes are mapped to Perl 6 types.
&lt;/p&gt;&lt;p&gt;RT #66818 noted a problem with unwanted flattening of %*VM
in a for statement; this was because the contents of %*VM were
incorrectly bound to the Hash directly instead of going through
a non-flattening reference (Perl6Scalar).  Eventually I expect
%*VM to be initialized in the setting, though, which will provide
a more robust and direct solution to this problem.
&lt;/p&gt;&lt;p&gt;In RT #66840 it was discovered that precedence errors in the
ternary operator would cause Rakudo to issue an error message
and exit completely, instead of throwing a catchable exception.
I tracked this down to PGE's OPTable handling of the ternary
operator, it was actually using &quot;exit&quot; when the error occurred
(probably because it came from before Parrot's exception model
was firmly in place).  This was changed to throw an exception
instead; the actual exception message needs a bit of work but
I expect that will come from the much larger PGE refactoring
that will be done as part of the Hague grant.
&lt;/p&gt;&lt;p&gt;Lastly, today I spent a good bit of time discussing Rakudo
and Parrot build/install issues with Allison, and I think we
have basic agreement on the changes we'll be making in order to
get those working.  Hopefully we can get all of that done
in time for the July release.
&lt;/p&gt;&lt;p&gt;So, that's my first Vienna.pm Rakudo day -- lots of little
pestering bug fixes, and a key bit of infrastructure to fully
enable writing the builtin operators in Perl 6.  Later this week I
plan to do a long-needed refactor of container handling in
Rakudo, and maybe to get a more complete implementation of BEGIN
blocks (which we massively cheat on at the moment).
&lt;/p&gt;&lt;p&gt;Thanks again to Vienna.pm for sponsoring this work.
&lt;/p&gt;&lt;p&gt;Pm
&lt;/p&gt;</description>
	<pubDate>Wed, 01 Jul 2009 04:08:20 +0000</pubDate>
</item>
<item>
	<title>Jonathan Worthington: Lots of little improvements</title>
	<guid>http://use.perl.org/~JonathanWorthington/journal/39196?from=rss</guid>
	<link>http://use.perl.org/~JonathanWorthington/journal/39196?from=rss</link>
	<description>&lt;p&gt;I'm back from a nice break in Italy and have been digging back in to Perl 6 stuff again. Today I've been doing a Vienna.pm-funded Rakudo day, and here's what I got up to.&lt;/p&gt;&lt;p&gt;First off, I went for a look through our RT queue. We now have over 400 tickets that are either new or open. While on the one hand that means we've a lot of work to do, it's also a sign that people, more and more, are playing with and exercising Rakudo. In just browsing through it, I found a bunch of things I could work on and hopefully resolve fairly easily during the day, and also another bunch of things that were already resolved. Just spotting the latter allowed me to mark 3 tickets resolved.&lt;/p&gt;&lt;p&gt;A couple of the things I worked on related to subtyping. Of note, the standard grammar accepted:&lt;/p&gt;&lt;p&gt;

&lt;code&gt;subset Foo of Int;&lt;br /&gt; &lt;/code&gt;

&lt;/p&gt;&lt;p&gt;Without requiring a where clause. Rakudo now also accepts this, and our parsing is a little closer to STD.pm too (we parse traits on subtypes, but we don't do anything with them just yet). Next, I got Rakudo to support a neater syntax for declaring anonymous subtypes in signatures. If you just want to match a specific value, you can write the value in the signature, and that's it. For example, here is yet another way to do factorial (a recursive version).&lt;/p&gt;&lt;p&gt;

&lt;code&gt;multi factorial(0) { 1 }&lt;br /&gt;
multi factorial(Int $n) { $n * factorial($n - 1) }&lt;br /&gt;
say factorial(5); # 120&lt;br /&gt; &lt;/code&gt;

&lt;/p&gt;&lt;p&gt;A signature :(0) is equivalent to :(Int $ where 0). This means that it will sort in the candidate list with Int. More generally, any literal value in where will get a nominal type based on the .WHAT of the value and have the value made into an anonymous subtype, so the signature :(&quot;tava&quot;) is just like :(Str $ where &quot;tava&quot;). I added some tests for all of this too.&lt;/p&gt;&lt;p&gt;Lyle++ had sent in a patch a while back for $*CWD and chdir. I took a look at these today. The $*CWD one looked pretty good, so I applied that with just a minor tweak. The chdir one needed some more attention and fixing up first, but I got that applied and extended the tests to better exercise it. Then I got both test files added to spectest.data. So now chdir and $*CWD are both functional. Here's some play with them in the REPL.&lt;/p&gt;&lt;p&gt;

&lt;code&gt;&amp;gt; my $fh = open(&quot;spectest.data&quot;, :r);&lt;br /&gt;
Unable to open filehandle from path 'spectest.data'&lt;br /&gt;
in Main (:1)&lt;br /&gt;
&amp;gt; say $*CWD;&lt;br /&gt;
C:\Consulting\parrot\trunk\languages\rakudo&lt;br /&gt;
&amp;gt; chdir &quot;t&quot;;&lt;br /&gt;
&amp;gt; say $*CWD;&lt;br /&gt;
C:\Consulting\parrot\trunk\languages\rakudo\t&lt;br /&gt;
&amp;gt; my $fh = open(&quot;spectest.data&quot;, :r);&lt;br /&gt;
&amp;gt;&lt;br /&gt; &lt;/code&gt;

&lt;/p&gt;&lt;p&gt;We had a couple of tickets relating to the interaction of //= and state variables. A little investigation, some discussion on #parrot and a fix later, I was able to unfudge tests and mark those resolved. A small inheritance bug was a similar story.&lt;/p&gt;&lt;p&gt;Finally, in preparation to improve type check failure error reporting and resolve at least one ticket in that area, I factored all type check error generation out to one routine, which we now call consistently. That means errors that previously missed out mentioning the expected and received types now do so, and the other issues I can fix - on some future Rakudo day - in one place, and everywhere that reports such errors will benefit.&lt;/p&gt;&lt;p&gt;In the course of the day, I also discovered a couple of other tickets that I had opened up to investigate at the start of the day were also already-fixed issues, so I made sure we had proper test coverage and got them closed up.&lt;/p&gt;&lt;p&gt;So, a pretty productive day. Thanks to Vienna.pm for funding!&lt;/p&gt;</description>
	<pubDate>Tue, 30 Jun 2009 21:09:56 +0000</pubDate>
</item>
<item>
	<title>Herbert Breunung: starting to crosslink</title>
	<guid>http://use.perl.org/~perl6doc/journal/39186?from=rss</guid>
	<link>http://use.perl.org/~perl6doc/journal/39186?from=rss</link>
	<description>After fixing some markup jitter in the german version of perl6tutorial (which Su-Shee found), I added new sections in &lt;a href=&quot;http://www.perlfoundation.org/perl6/index.cgi?perl_lookup_table&quot;&gt;Appendix B:&lt;/a&gt; (sigils and regex metachar). Thanks to Larry I know now that &quot;|&quot; is not a sigil (of the capture context) because it reduces informations.
&lt;br /&gt; &lt;br /&gt;
But the real reason I post here: Appendix A and B now get more connection. From the start I added to each term in the index the name of its syntax category. Now i started to turn these addon info into links, which point to the according table in Appendix B. Its no real crosslink yet because I don't links back into appendix A. Most probably I will link from there into the, yet to be translated chapter(tablet 3-9), where links Appendix A too. Different to FOSWiki i can set everywhere invisible anchors in the document. So maybe there will be maybe chrosslinking.
&lt;br /&gt; &lt;br /&gt;
While struggling with the limits of the different wiki markups, im happy that november wiki targets the MediaWiki syntax which works well in most cases, even with operator and special char laden languages like perl. (FOSWiki and Socialtext does not very well, you can't even have italic text in links in socialtext)
&lt;br /&gt; &lt;br /&gt;
Still the structure evolves, but since the tablets get more substance, I hear it more often that u4x, grok and other docs will have it easier to build content, because the have in parts just to reformat stuff from the tablets.
&lt;br /&gt; &lt;br /&gt;
P.S.
a postscriptum to my last post: a colon is also used when converting numbers to a different base and as jump label suffix. Always indicating a relation in different context.</description>
	<pubDate>Mon, 29 Jun 2009 02:06:44 +0000</pubDate>
</item>
<item>
	<title>Carl Masak: Reading up on MVC, part 1: Ruby on Rails</title>
	<guid>http://use.perl.org/~masak/journal/39182?from=rss</guid>
	<link>http://use.perl.org/~masak/journal/39182?from=rss</link>
	<description>&lt;p&gt;Hello, don't mind me. I'm just going through a few MVC frameworks to see how they differ and how they're alike. I need the knowhow to create an MVC for Web.pm. Right now, my plan is to examine Rails, Catalyst, Django and Jifty. I'll write down my impressions of each of the in some kind of list, for future reference. Basically the only way you'd want to read this is if you want to laugh at how little I know about MVC frameworks.&lt;/p&gt;&lt;p&gt;Here's the list I got from watching &lt;a href=&quot;http://media.rubyonrails.org/video/rails_blog_2.mov&quot;&gt;this screencast&lt;/a&gt;:&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Man, the Ruby folks sure can make a beatuiful screencast!&lt;/li&gt;&lt;li&gt;Rails uses scaffolding. I've heard not all people like scaffolding, but it does look kinda convenient to my untrained eye.&lt;/li&gt;&lt;li&gt;Partial templates are called, logically, &quot;partials&quot;. They bind smartly with variable names somehow.&lt;/li&gt;&lt;li&gt;Different output formats are really easy to add. XML, JSON, Atom...&lt;/li&gt;&lt;li&gt;A blog is a really nice example for an MVC framework screencast, because it's just a list of posts, each with a list of comments.&lt;/li&gt;&lt;li&gt;Rails can add authentication through before_filter.&lt;/li&gt;&lt;li&gt;Hm, clearly the strength of Rails comes largely through the keywords it introduces. Wonder if it uses monkey typing for that?&lt;/li&gt;&lt;li&gt;Rails has Routes! Maybe this is my chance to finally understand ihrd++'s Routes, which I never really grokked.&lt;/li&gt;&lt;li&gt;Controllers do things like index, show, new, update and delete. Probably related to CRUD somehow.&lt;/li&gt;&lt;li&gt;That 'debugger' trick is fantastic! One of those features which you feel can't be just hot air.&lt;/li&gt;&lt;li&gt;AJAX is fairly well integrated, though I'll be danged if I understand exactly how. Looks like magic to me.&lt;/li&gt;&lt;li&gt;Did I hear that right? &quot;rjs is just a way to generate JavaScript using Ruby.&quot; Wow.&lt;/li&gt;&lt;li&gt;There's graceful fallback from JS to non-JS.&lt;/li&gt;&lt;li&gt;There's built-in automated testing.&lt;/li&gt;&lt;li&gt;The console seems like the debugger again, but without the breakpoint. Yes, I can see how that might be very useful.&lt;/li&gt;&lt;li&gt;Never once do they explicitly say 'the database' in the screencast. They say the word 'database-agnostic' once, and 'table' and 'column' a few times, but most of the time it's just 'model', 'view', 'controller'. Seems like the abstraction is largely intact.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Um. Well, in summary, that cool-aid sure seems to have an effect on me. I'll leave the comments open so that you people can tell me how Rails, despite all appearances, is really bad for your teeth and leaves skid marks on your puppy.&lt;/p&gt;&lt;p&gt;Next up: Catalyst.&lt;/p&gt;</description>
	<pubDate>Fri, 26 Jun 2009 20:11:31 +0000</pubDate>
</item>
<item>
	<title>Herbert Breunung: squeezing Regex Modifier in the Table</title>
	<guid>http://use.perl.org/~perl6doc/journal/39177?from=rss</guid>
	<link>http://use.perl.org/~perl6doc/journal/39177?from=rss</link>
	<description>Yes its me again.
&lt;br /&gt; &lt;br /&gt;
Please have a look at the newly made
&lt;a href=&quot;http://www.perlfoundation.org/perl6/index.cgi?perl_lookup_table#regex_modifier&quot;&gt;regex modifier table&lt;/a&gt;. The special variable list above is now also almost in its final shape.
&lt;br /&gt; &lt;br /&gt;
But secondly and more important: the current state of the &lt;a href=&quot;http://www.perlfoundation.org/perl6/index.cgi?perl_6&quot;&gt;TPF-Wiki-frontpage&lt;/a&gt; looks lousy to me. I cleaned up some of the disorder in documentation related stuff, but before I do a major revamp, I would like to know your opinion. So please post me. My plan is to move a lot of the content from the front page to separate pages for each topic, and then link to them all from the front page. The TPF-Wiki is and should be for us - the Perl folks, a brewing pot for ideas. The easy and sane guide through the Perl 6-world we do in the &lt;a href=&quot;http://november-wiki.org/&quot;&gt;November-Wiki&lt;/a&gt;. Nevertheless it should look good. Please reply to this use.perl post. Thank you very much.</description>
	<pubDate>Fri, 26 Jun 2009 01:56:35 +0000</pubDate>
</item>
<item>
	<title>Herbert Breunung: Natural Elegance</title>
	<guid>http://use.perl.org/~perl6doc/journal/39171?from=rss</guid>
	<link>http://use.perl.org/~perl6doc/journal/39171?from=rss</link>
	<description>I like the elegance, consistency and similarity with natural language of Perl 6. E.g. the colon, with which we express a relation. Cups in the basket: 5.
&lt;br /&gt; &lt;br /&gt;
And indeed a pair as a data type, which describes a simple relation, you declare in Perl 6 :key(value). Also hashes (which are build with pairs), named parameters in signatures (which too descibe a relation between a name(ID) and a value) autogenerated named parameter (have colon as twigil) use the colon. And not only the reuse of pairs everywhere as quote or regex adverbs or filetest operators, also in macro defenitions, if you specify what you like to create with this macro (because unlike LISP there is more than lists and brackets), you write macro category: { ... }. Again colons are used almost like in text. and you have it again when you use objects with a special syntax that doesnt look in that way. feed $author: 'cake and herbal tee'; is nothing else then $author.feed('cake and herbal tee'); All that you can understand intuitively and behind all that are very very few rules. So yes Perl 6 is complex, but only where we adress complexity of life. And to be practical was always the goal of Perl.
&lt;br /&gt; &lt;br /&gt;
thanks jesse++ for adding me.</description>
	<pubDate>Wed, 24 Jun 2009 23:26:24 +0000</pubDate>
</item>
<item>
	<title>Moritz Lenz (Perl 6): Trying to implement new operators - failed</title>
	<guid>http://perlgeek.de/blog-en/perl-6/new-operators-failed.writeback</guid>
	<link></link>
	<description>&lt;!-- 1245616389 --&gt;

&lt;p&gt;This isn't a success story - it's only almost a success story.&lt;/p&gt;

&lt;p&gt;On &lt;a href=&quot;http://www.perlmonks.org/&quot;&gt;perlmonks.org&lt;/a&gt; we had a Golf
challenge (ie writing code in as little characters as possible): write an
&lt;a href=&quot;http://www.perlmonks.org/?node_id=772766&quot;&gt;implementation of the
Euclidian algorithm in Perl 6&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I proposed &lt;a href=&quot;http://www.perlmonks.org/?node_id=772778&quot;&gt;a solution
which I liked very much&lt;/a&gt;, but which didn't work in Rakudo yet, because it
used the series operator &lt;code&gt;infix:&amp;lt;...&amp;gt;&lt;/code&gt; (yes, three literal
dots) which isn't yet implemented in Rakudo. D'oh!.&lt;/p&gt;

&lt;p&gt;I like Perl 6 discussions on Perlmonks, but every solution that shows a
NYI-feature encourages the &quot;Perl 6 is vapor-ware&quot; thoughts and comments. So I
decided to make it work, and decided to JFDI and implement the missing
operator.&lt;/p&gt;

&lt;p&gt;In general implementing a new operator in &lt;a href=&quot;http://rakudo.org/&quot;&gt;Rakudo&lt;/a&gt; is not much harder than implementing a
function: all you have to do more is to add it to &lt;a href=&quot;http://github.com/rakudo/rakudo/blob/1b06df80900096dab8a9f74467f504f73a6115dd/src/parser/grammar-oper.pg&quot;&gt;src/parser/grammar-oper.pg&lt;/a&gt;
including precedence and associativity (both of which can be found in &lt;a href=&quot;http://perlcabal.org/syn/S03.html&quot;&gt;the spec&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For quite a while now built-in functions and methods can be written in Perl
6 now, so I also decided to write the new operator in Perl 6. Since lazy lists
aren't implemented yet, I decided not to care about the lazy version, and did
the eager version instead. This is what my code looked like:&lt;/p&gt;

&lt;pre&gt;
&lt;span class=&quot;synStatement&quot;&gt;multi&lt;/span&gt; &lt;span class=&quot;synStatement&quot;&gt;sub&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;infix&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;synSpecial&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;synConstant&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;synSpecial&quot;&gt;&amp;gt;&lt;/span&gt; (&lt;span class=&quot;synIdentifier&quot;&gt;@lhs&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;synType&quot;&gt;Code&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;$generator&lt;/span&gt;) {
    &lt;span class=&quot;synSpecial&quot;&gt;my&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;$c&lt;/span&gt; &lt;span class=&quot;synStatement&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;$generator&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;synIdentifier&quot;&gt;count&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;$c&lt;/span&gt; &lt;span class=&quot;synStatement&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;@lhs&lt;/span&gt; {
        &lt;span class=&quot;synStatement&quot;&gt;fail&lt;/span&gt; &lt;span class=&quot;synSpecial&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;synConstant&quot;&gt;the closure wants more parameters than given on the LHS&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;synSpecial&quot;&gt;my&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;@result&lt;/span&gt; &lt;span class=&quot;synStatement&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;@lhs&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;synSpecial&quot;&gt;my&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;@r&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;synComment&quot;&gt;# &lt;/span&gt;&lt;span class=&quot;synTodo&quot;&gt;XXX&lt;/span&gt;&lt;span class=&quot;synComment&quot;&gt; work around http://rt.perl.org/rt3/Ticket/Display.html?id=66824&lt;/span&gt;
    &lt;span class=&quot;synComment&quot;&gt;# this is a bit ugly.. since @a[1..1] returns a single item and not &lt;/span&gt;
    &lt;span class=&quot;synComment&quot;&gt;# an array, |@result[$one-item-range] throws the error&lt;/span&gt;
    &lt;span class=&quot;synComment&quot;&gt;# &amp;quot;argument doesn't array&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;synStatement&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;@r&lt;/span&gt; &lt;span class=&quot;synStatement&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;$generator&lt;/span&gt;(&lt;span class=&quot;synStatement&quot;&gt;|@&lt;/span&gt;(&lt;span class=&quot;synIdentifier&quot;&gt;@result&lt;/span&gt;[&lt;span class=&quot;synStatement&quot;&gt;*-&lt;/span&gt;&lt;span class=&quot;synIdentifier&quot;&gt;$c&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;..*-&lt;/span&gt;&lt;span class=&quot;synConstant&quot;&gt;1&lt;/span&gt;])) {
        &lt;span class=&quot;synIdentifier&quot;&gt;@result&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;synIdentifier&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;@r&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;;&lt;/span&gt;
    }
    &lt;span class=&quot;synSpecial&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;synIdentifier&quot;&gt;@result&lt;/span&gt;&lt;span class=&quot;synStatement&quot;&gt;;&lt;/span&gt;
}
&lt;/pre&gt;

&lt;p&gt;This works... partly. It works only in the file it is defined in, &lt;a href=&quot;http://rt.perl.org/rt3/Ticket/Display.html?id=66826&quot;&gt;not if it's defined
in the setting library&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So to summarize: I have an implementation ready, but due to Rakudo bugs it
can't go into mainstream Rakudo right now. JFDI, partly failed.&lt;/p&gt;</description>
	<pubDate>Mon, 22 Jun 2009 05:33:09 +0000</pubDate>
</item>
<item>
	<title>Carl Masak: Asking #perl about Modern Perl</title>
	<guid>http://use.perl.org/~masak/journal/39158?from=rss</guid>
	<link>http://use.perl.org/~masak/journal/39158?from=rss</link>
	<description>&lt;p&gt;This is my first Perl 5 post ever. &amp;#21704;&amp;#21704; &lt;/p&gt;&lt;p&gt;

&lt;code&gt;
&amp;lt;masak&amp;gt; while I'm here, I'd like to talk about &lt;a href=&quot;http://www.modernperlbooks.com/mt/2009/01/why-modern-perl.html&quot;&gt;Modern Perl&lt;/a&gt;.&lt;br /&gt;
&amp;lt;masak&amp;gt; in y'all's opinion, what are the modules a Modern Perl 5 user should be aware of?&lt;br /&gt;
&amp;lt;masak&amp;gt; I'm thinking of things like &lt;a href=&quot;http://search.cpan.org/dist/Moose/&quot;&gt;Moose&lt;/a&gt;, &lt;a href=&quot;http://search.cpan.org/dist/Scalar-List-Utils/&quot;&gt;List::Util&lt;/a&gt;, maybe &lt;a href=&quot;http://search.cpan.org/dist/Catalyst-Runtime/&quot;&gt;Catalyst&lt;/a&gt;...&lt;br /&gt;
&amp;lt;claes&amp;gt; it all depends on what the task is&lt;br /&gt;
&amp;lt;lucs&amp;gt; masak: &lt;a href=&quot;http://dev.perl.org/perl5/news/2007/perl-5.10.0.html&quot;&gt;5.10&lt;/a&gt; in general maybe&lt;br /&gt;
&amp;lt;claes&amp;gt; using &lt;a href=&quot;http://perldoc.perl.org/warnings.html&quot;&gt;warnings&lt;/a&gt;, &lt;a href=&quot;http://perldoc.perl.org/strict.html&quot;&gt;strict&lt;/a&gt; and perhaps &lt;a href=&quot;http://search.cpan.org/dist/indirect/&quot;&gt;indirect&lt;/a&gt; pragmas&lt;br /&gt;
&amp;lt;masak&amp;gt; I think things that we take for granted as good time-savers all qualify.&lt;br /&gt;
&amp;lt;masak&amp;gt; so maybe stuff like &lt;a href=&quot;http://search.cpan.org/dist/Getopt-Long/&quot;&gt;Getopt::Long&lt;/a&gt; too.&lt;br /&gt;
&amp;lt;claes&amp;gt; personaly I don't use Moose because I haven't had any use for it yet&lt;br /&gt;
&amp;lt;masak&amp;gt; for me as a Perl 6 user, it's not that difficult to see the use for Moose.&lt;br /&gt;
&amp;lt;masak&amp;gt; I saw a blog post recently that said that Moose even helped the blogger &lt;a href=&quot;http://elliotlovesperl.com/2009/06/16/moose-as-documentation/&quot;&gt;document things more succinctly&lt;/a&gt;.&lt;br /&gt;
&amp;lt;masak&amp;gt; that is, even when he wasn't using Moose, he was using habits gained from it to write better documentation.&lt;br /&gt;
&amp;lt;Hinrik&amp;gt; &lt;a href=&quot;http://search.cpan.org/dist/Perl-Critic/&quot;&gt;Perl::Critic&lt;/a&gt;, definitely&lt;br /&gt;
&amp;lt;claes&amp;gt; &lt;a href=&quot;http://search.cpan.org/dist/Devel-NYTProf/&quot;&gt;Devel::NYTProf&lt;/a&gt; &lt;br /&gt;
&amp;lt;Hinrik&amp;gt; some of the eventy things (&lt;a href=&quot;http://search.cpan.org/dist/AnyEvent/&quot;&gt;AnyEvent&lt;/a&gt;, &lt;a href=&quot;http://search.cpan.org/dist/Coro/&quot;&gt;Coro&lt;/a&gt;, &lt;a href=&quot;http://search.cpan.org/dist/POE/&quot;&gt;POE&lt;/a&gt;) too, if that's what your app requires&lt;br /&gt;
&amp;lt;Hinrik&amp;gt; and the various Test::* modules, of course&lt;br /&gt;
&amp;lt;masak&amp;gt; Hinrik: which ones, more exactly?&lt;br /&gt;
&amp;lt;Hinrik&amp;gt; &lt;a href=&quot;http://search.cpan.org/dist/Test-Simple/&quot;&gt;Test::More&lt;/a&gt; usually works for me, along with some other specialized ones depending on the typo of app&lt;br /&gt;
&amp;lt;Hinrik&amp;gt; e.g. &lt;a href=&quot;http://search.cpan.org/dist/Test-Script/&quot;&gt;Test::Script&lt;/a&gt; to test if scripts compile&lt;br /&gt;
&amp;lt;Hinrik&amp;gt; masak: oh, and &lt;a href=&quot;http://search.cpan.org/dist/Devel-Cover/&quot;&gt;Devel::Cover&lt;/a&gt; is also quite helpful in determining test coverage&lt;br /&gt;
&amp;lt;cfedde&amp;gt; see also &lt;a href=&quot;http://search.cpan.org/dist/Modern-Perl/&quot;&gt;Modern::Perl&lt;/a&gt; &lt;br /&gt;
&amp;lt;cfedde&amp;gt; I think that the standard template will become 'use Modern::Perl; use Moose'
&lt;/code&gt;

&lt;/p&gt;&lt;p&gt;Feel the need to add something to the list? The comments are open.&lt;/p&gt;</description>
	<pubDate>Sun, 21 Jun 2009 15:38:28 +0000</pubDate>
</item>
<item>
	<title>Herbert Breunung: p6tut complete, November rising</title>
	<guid>http://use.perl.org/~perl6doc/journal/39155?from=rss</guid>
	<link>http://use.perl.org/~perl6doc/journal/39155?from=rss</link>
	<description>As I finalized the proofreading for the 8th part, my &lt;a href=&quot;http://wiki.perl-community.de/cgi-bin/foswiki/view/Wissensbasis/Perl6Tutorial&quot;&gt;german Perl 6 Turorial&lt;/a&gt; is now complete, online and next month also &lt;a href=&quot;http://perl-magazin.de/&quot;&gt;printed&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;
In november we completed the first 2 chunks (&lt;a href=&quot;http://november-wiki.org/view/FAQ&quot;&gt;FAQ&lt;/a&gt; and &lt;a href=&quot;http://november-wiki.org/view/Perl_6_Interpreter&quot;&gt;Implementations&lt;/a&gt;) of content and i filed several bugs and issues (TPF P6 wiki is in parts beyond repair). Looks we can make i reallly usable wiki out of it. Masak and Viklund worked hard to fix the newlina at the end-bug, the UTF-bug, made a preview and cancel button work and some other stuff. but my filed wishlist is long, internal links with different label, flags with spaces in it as in Perl 6, table of content, means to make unformated and indended text and so on.
&lt;br /&gt; &lt;br /&gt;
The Perl Tablets are also improved dayly, more than 60 new items in both languages in &lt;a href=&quot;http://www.perlfoundation.org/perl6/index.cgi?perl_table_index&quot;&gt;Appendix A&lt;/a&gt; but that you hardly notice if you don't see history. But now p6tut is complete we translate more text chapters.</description>
	<pubDate>Sat, 20 Jun 2009 22:56:34 +0000</pubDate>
</item>
<item>
	<title>Daniel Carrera: Embedding Parrot in Perl 6</title>
	<guid>http://daniel.carrera.bz/?p=1337</guid>
	<link>http://daniel.carrera.bz/2009/06/embedding-parrot-in-perl-6/</link>
	<description>&lt;p&gt;One of the interesting things about &lt;a href=&quot;http://www.rakudo.org&quot;&gt;Rakudo&lt;/a&gt; is that you can embed Parrot assembly code (&lt;a href=&quot;http://docs.parrot.org/parrot/latest/html/docs/book/ch03_pir.pod.html&quot;&gt;PIR&lt;/a&gt; to be exact) into Perl 6 code. With this you can optimize critical parts of the code and you can expose additional Parrot features to Perl 6. Let&amp;#8217;s start with a hello-world example:&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;
Q:PIR {
	say &lt;span class=&quot;green&quot;&gt;&quot;Hello world&quot;&lt;/span&gt;
};
&lt;/pre&gt;
&lt;p&gt;Though it is not obvious right now, the stuff inside the &lt;tt class=&quot;red&quot;&gt;Q:PIR { ... };&lt;/tt&gt; is parrot code.&lt;/p&gt;
&lt;h3&gt;Parameters&lt;/h3&gt;
&lt;p&gt;Of course, embedded Parrot code would be pretty useless if you couldn&amp;#8217;t send parameters in and get results out. Here is a simple Parrot routine that takes two parameters, adds then and returns the result:&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;
&lt;b class=&quot;blue&quot;&gt;sub&lt;/b&gt; (&lt;b class=&quot;red&quot;&gt;$a&lt;/b&gt;,&lt;b class=&quot;red&quot;&gt;$a&lt;/b&gt;) = (3,4);
&lt;b class=&quot;blue&quot;&gt;sub&lt;/b&gt; &lt;b class=&quot;red&quot;&gt;$result&lt;/b&gt; = Q:PIR {
	&lt;span class=&quot;grey&quot;&gt;# Input.&lt;/span&gt;
	$P0 = find_lex &lt;span class=&quot;green&quot;&gt;'$a'&lt;/span&gt;
	$P1 = find_lex &lt;span class=&quot;green&quot;&gt;'$b'&lt;/span&gt;

	&lt;span class=&quot;grey&quot;&gt;# Compute the sum.&lt;/span&gt;
	$I0 = $P0
	$I1 = $P1
	$I2 = $I0 + $I1

	&lt;span class=&quot;grey&quot;&gt;# Return it.&lt;/span&gt;
	%r = box $I2
};
say &lt;b class=&quot;red&quot;&gt;$result&lt;/b&gt;;
&lt;/pre&gt;
&lt;p&gt;Yes, that&amp;#8217;s quite verbose. PIR is not much higher level than an assembly language. The &lt;tt class=&quot;red&quot;&gt;$P0&lt;/tt&gt;, &lt;tt class=&quot;red&quot;&gt;$P1&lt;/tt&gt;, &amp;#8230; are Parrot registers. The &lt;tt class=&quot;red&quot;&gt;$P*&lt;/tt&gt; registers hold Parrot objects, and the &lt;tt class=&quot;red&quot;&gt;$I*&lt;/tt&gt; registers hold integers. A more interesting example would be a factorial function:&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;
&lt;b class=&quot;blue&quot;&gt;sub&lt;/b&gt; factorial(Int &lt;b class=&quot;red&quot;&gt;$n&lt;/b&gt; where {&lt;b class=&quot;red&quot;&gt;$n&lt;/b&gt; &gt;= 0}) {
	&lt;b class=&quot;blue&quot;&gt;return&lt;/b&gt; 1 if &lt;b class=&quot;red&quot;&gt;$n&lt;/b&gt; == 0;
	&lt;b class=&quot;blue&quot;&gt;return&lt;/b&gt; Q:PIR {
		&lt;span class=&quot;grey&quot;&gt;# Define variables.&lt;/span&gt;
		.local int ans, n

		&lt;span class=&quot;grey&quot;&gt;# Input.&lt;/span&gt;
		$P0 = find_lex &lt;span class=&quot;green&quot;&gt;'$n'&lt;/span&gt;
		n = $P0

		&lt;span class=&quot;grey&quot;&gt;# Compute the answer.&lt;/span&gt;
		ans = 1
		LOOP:
			ans *= n
			n -= 1
			if n &gt; 1 goto LOOP

		&lt;span class=&quot;grey&quot;&gt;# Return it.&lt;/span&gt;
		%r = box ans
	};
}
&lt;b class=&quot;blue&quot;&gt;say&lt;/b&gt; &lt;span class=&quot;green&quot;&gt;&quot;5! = &quot;&lt;/span&gt; ~ factorial(5);
&lt;/pre&gt;
&lt;h3&gt;Exposing Parrot libraries to Perl&lt;/h3&gt;
&lt;p&gt;A specially neat feature of embedded Parrot is that you can expose Parrot libraries to Perl. For example, Parrot comes with support for the MD5 digest function, which itself comes from the &lt;a href=&quot;http://www.openssl.org/&quot;&gt;OpenSSL&lt;/a&gt; library:&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;
&lt;b class=&quot;blue&quot;&gt;sub&lt;/b&gt; md5(Str &lt;b class=&quot;red&quot;&gt;$text&lt;/b&gt;) {
	&lt;b class=&quot;blue&quot;&gt;my&lt;/b&gt; &lt;b class=&quot;red&quot;&gt;$binary&lt;/b&gt; = Q:PIR {
		.local string text
		.local pmc digest

		&lt;span class=&quot;grey&quot;&gt;# Input.&lt;/span&gt;
		$P0 = find_lex &lt;span class=&quot;green&quot;&gt;'$text'&lt;/span&gt;
		text = $P0

		&lt;span class=&quot;grey&quot;&gt;# Load digest library.&lt;/span&gt;
		$P1 = loadlib &lt;span class=&quot;green&quot;&gt;'digest_group'&lt;/span&gt;
		digest = new &lt;span class=&quot;green&quot;&gt;'MD5'&lt;/span&gt;

		&lt;span class=&quot;grey&quot;&gt;# Calculate the digest.&lt;/span&gt;
		digest.&lt;span class=&quot;green&quot;&gt;'Init'&lt;/span&gt;()
		digest.&lt;span class=&quot;green&quot;&gt;'Update'&lt;/span&gt;(text)
		$S0 = digest.&lt;span class=&quot;green&quot;&gt;'Final'&lt;/span&gt;()

		%r = box $S0
	};
	&lt;span class=&quot;grey&quot;&gt;# Convert to hex.&lt;/span&gt;
	&lt;b class=&quot;blue&quot;&gt;return join&lt;/b&gt; &lt;span class=&quot;green&quot;&gt;''&lt;/span&gt;, map {sprintf &lt;span class=&quot;green&quot;&gt;'%02x'&lt;/span&gt;, (ord &lt;b class=&quot;red&quot;&gt;$^a&lt;/b&gt;)}, &lt;b class=&quot;red&quot;&gt;$binary&lt;/b&gt;.comb;
}
&lt;b class=&quot;blue&quot;&gt;say&lt;/b&gt; md5(&lt;span class=&quot;green&quot;&gt;&quot;The quick brown fox jumps over the lazy dog&quot;&lt;/span&gt;);
&lt;/pre&gt;
&lt;p&gt;The resulting library is of course much simpler and runs much faster than anything we could code in pure Perl. And this will run wherever Rakudo is available, without the need for a separate compilation step.&lt;/p&gt;</description>
	<pubDate>Sat, 20 Jun 2009 00:50:08 +0000</pubDate>
</item>
<item>
	<title>Carl Masak: 3D, baby!</title>
	<guid>http://use.perl.org/~masak/journal/39152?from=rss</guid>
	<link>http://use.perl.org/~masak/journal/39152?from=rss</link>
	<description>&lt;p&gt;Last night I had one of those rapid prototyping sprints where everything goes just right. I wanted to scout the terrain for drawing a 3D Druid board using SVG.&lt;/p&gt;&lt;p&gt;The result is &lt;a href=&quot;http://masak.org/carl/druid/board.png&quot;&gt;this&lt;/a&gt;. Yup, Perl 6 did that, with a little help from me.&lt;/p&gt;&lt;p&gt;It was very pleasing to see this image grow step by step. I literally started with a grey rectangle. Then I programmatically massaged the coordinates, adding projections, translations, scalings and rotations until I had what I wanted. &lt;a href=&quot;http://github.com/masak/druid/blob/d309b630710f9dc8d1bca00b995519b188ba9bfd/bin/generate-board&quot;&gt;Here's the code.&lt;/a&gt; &lt;/p&gt;&lt;p&gt;I still feel two things are missing.&lt;/p&gt;&lt;ul&gt;
 &lt;li&gt; &lt;strong&gt;Real perspective.&lt;/strong&gt; Because I currently project the 3D coordinates flatly onto the canvas, the result is isometric perspective. For some reason I don't like that &amp;#8212; to me, the furthermost corner looks like it's sloping upwards from the plane of the board. I think I'd be happy with &lt;a href=&quot;http://en.wikipedia.org/wiki/3D_projection#Diagram&quot;&gt;this kind of perspective&lt;/a&gt;, so I'll try that next. I was offline today, and had a couple of minutes to sit down and do the (really simple) math. I'm glad to see Wikipedia agrees with what I got. &amp;#21704;&amp;#21704; [&lt;b&gt;Update&lt;/b&gt;: Fixed, see comment.]&lt;/li&gt;&lt;li&gt; &lt;strong&gt;Non-cheating with the piece order.&lt;/strong&gt; I cheat right now in the sense that I placed the pieces in an order which looks good when drawn. The moves in a real game will not abide by such a restriction. I've already realized that I can draw all the horizontal surfaces in a separate pass, and don't need to sort those. I keep wondering whether I need to sort all the vertical surfaces separately, or whether it's enough to sort the pieces. Also, I'm thinking there might be nice, fast ways to determine that a surface will be completely covered by other surfaces, and can be thrown away. (Apart from the very simple case with the three surfaces on the back of each piece. I know about that one already.) [&lt;b&gt;Update&lt;/b&gt;: Fixed, see comment.]&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Anyway, I've been wanting to do this for a long time, and I'm glad that when I finally sat down to do it, not only was the result quite satisfactory, but also the process of getting there. It's 2009, and I'm using Perl 6 to rapid-prototype 3D board games. Cool!&lt;/p&gt;</description>
	<pubDate>Fri, 19 Jun 2009 21:20:13 +0000</pubDate>
</item>
<item>
	<title>Patrick Michaud: Rakudo Perl 6 development release #18 (&quot;Pittsburgh&quot;)</title>
	<guid>http://use.perl.org/~pmichaud/journal/39149?from=rss</guid>
	<link>http://use.perl.org/~pmichaud/journal/39149?from=rss</link>
	<description>&lt;p&gt;On behalf of the Rakudo development team, I'm pleased to announce
the June 2009 development release of Rakudo Perl #18 &quot;Pittsburgh&quot;.
Rakudo is an implementation of Perl 6 on the &lt;a href=&quot;http://parrot.org/&quot;&gt;Parrot Virtual Machine&lt;/a&gt;.
The tarball for the June 2009 release is available from
&lt;a href=&quot;http://github.com/rakudo/rakudo/downloads&quot;&gt;http://github.com/rakudo/rakudo/downloads&lt;/a&gt; .
&lt;/p&gt;&lt;p&gt;Due to the continued rapid pace of Rakudo development and the
frequent addition of new Perl 6 features and bugfixes, we continue
to recommend that people wanting to use or work with Rakudo obtain
the latest source directly from the main repository at github.
More details are available at &lt;a href=&quot;http://rakudo.org/how-to-get-rakudo&quot;&gt;http://rakudo.org/how-to-get-rakudo&lt;/a&gt; .
&lt;/p&gt;&lt;p&gt;Rakudo Perl follows a monthly release cycle, with each release code named
after a Perl Mongers group.  This release is named &quot;Pittsburgh&quot;, which
is the host for &lt;a href=&quot;http://yapc10.org/&quot;&gt;YAPC|10&lt;/a&gt; (YAPC::NA 2009) and the
&lt;a href=&quot;http://yapc10.org/yn2009/talk/2045&quot;&gt;Parrot Virtual Machine
Workshop&lt;/a&gt;.  Pittsburgh.pm has also sponsored hackathons for Rakudo
Perl as part of the &lt;a href=&quot;http://pghpw.org/ppw2008/&quot;&gt;2008 Pittsburgh Perl Workshop&lt;/a&gt;.
&lt;/p&gt;&lt;p&gt;In this release of Rakudo Perl, we've focused our efforts on refactoring
many of Rakudo's internals; these refactors improve performance,
bring us closer to the Perl 6 specification, operate more cleanly
with Parrot, and provide a stronger foundation for features to be
implemented in the near future.  Some of the specific major changes
and improvements in this release include:
&lt;/p&gt;&lt;ul&gt; &lt;li&gt;Rakudo is now passing 11,536 spectests, an increase of 194
passing tests since the May 2009 release.  With this release
Rakudo is now passing 68% of the available spectest suite.
&lt;/li&gt;&lt;li&gt;Method dispatch has been substantially refactored; the new dispatcher
is significantly faster and follows the Perl 6 specification more
closely.
&lt;/li&gt;&lt;li&gt;Object initialization via the BUILD and CREATE (sub)methods is
substantially improved.
&lt;/li&gt;&lt;li&gt;All return values are now type checked (previously only explicit
'return' statements would perform type checking).
&lt;/li&gt;&lt;li&gt;String handling is significantly improved: fewer Unicode-related
bugs exist, and parsing speed is greatly improved for some programs
containing characters in the Latin-1 set.
&lt;/li&gt;&lt;li&gt;The IO .lines and .get methods now follow the specification more closely.
&lt;/li&gt;&lt;li&gt;User-defined operators now also receive some of their associated
meta variants.
&lt;/li&gt;&lt;li&gt;The 'is export' trait has been improved; more builtin functions
and methods can be written in Perl 6 instead of PIR.
&lt;/li&gt;&lt;li&gt;Many Parrot changes have improved performance and reduced overall
memory leaks (although there's still much more improvement needed).
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The development team thanks all of our contributors and sponsors for
making Rakudo Perl possible.  If you would like to contribute,
see &lt;a href=&quot;http://rakudo.org/how-to-help&quot;&gt;http://rakudo.org/how-to-help&lt;/a&gt; , ask on the perl6-compiler@perl.org
mailing list, or ask on IRC #perl6 on freenode.
&lt;/p&gt;&lt;p&gt;The next release of Rakudo (#19) is scheduled for July 23, 2009.
A list of the other planned release dates and codenames for 2009 is
available in the &quot;docs/release_guide.pod&quot; file.  In general, Rakudo
development releases are scheduled to occur two days after each
Parrot monthly release.  Parrot releases the third Tuesday of each month.
&lt;/p&gt;&lt;p&gt;Have fun!
&lt;/p&gt;&lt;p&gt;References:
&lt;br /&gt;[1]  Parrot, &lt;a href=&quot;http://parrot.org/&quot;&gt;http://parrot.org/&lt;/a&gt;
&lt;br /&gt;[2]  YAPC|10 &lt;a href=&quot;http://yapc10.org/yn2009/&quot;&gt;http://yapc10.org/yn2009/&lt;/a&gt;
&lt;br /&gt;[3]  Parrot Virtual Machine Workshop, &lt;a href=&quot;http://yapc10.org/yn2009/talk/2045&quot;&gt;http://yapc10.org/yn2009/talk/2045&lt;/a&gt;
&lt;br /&gt;[4]  Pittsburgh Perl Workshop, &lt;a href=&quot;http://pghpw.org/ppw2008/&quot;&gt;http://pghpw.org/ppw2008/&lt;/a&gt;
&lt;/p&gt;</description>
	<pubDate>Fri, 19 Jun 2009 05:17:59 +0000</pubDate>
</item>
<item>
	<title>Herbert Breunung: Pandemonium</title>
	<guid>http://use.perl.org/~perl6doc/journal/39148?from=rss</guid>
	<link>http://use.perl.org/~perl6doc/journal/39148?from=rss</link>
	<description>The &lt;a href=&quot;http://www.perlfoundation.org/perl6/index.cgi?perl_table_index&quot;&gt;Perl tablets&lt;/a&gt; are a beast. I spend hours without much visible progress. Just details here and there, translating fore and back, understanding Perl 6, hacking around weak wiki syntax that don't get well along with a programming languages that uses all characters available.
&lt;br /&gt; &lt;br /&gt;
Maybe the single achievement is to have alle the quoting ops right in appendix A and B.</description>
	<pubDate>Fri, 19 Jun 2009 00:17:07 +0000</pubDate>
</item>
<item>
	<title>Moritz Lenz (Perl 6): The first Perl 6 module on CPAN</title>
	<guid>http://perlgeek.de/blog-en/perl-6/first-perl6-module-on-cpan.writeback</guid>
	<link></link>
	<description>&lt;!-- 1245275198 --&gt;
&lt;p&gt;About a month ago we had a discussion about distributing Perl 6 modules,
again. This time I also looked at &lt;a href=&quot;http://cpan6.org/&quot;&gt;cpan6.org&lt;/a&gt;
and mailed Mark Overmeer about his progress and visions.&lt;/p&gt;

&lt;p&gt;The discussion moved to the perl6-language mailing list, and I went to
vacations. When I came back roughly three weeks later, there were nearly
hundred messages on that subject in five different threads, and so far I
didn't feel like reading it all. (Additionally my mail server went down
during that time, so I didn't even have them in my mailbox).&lt;/p&gt;

&lt;p&gt;So instead of discussing things, I started to &lt;strong&gt;do&lt;/strong&gt;
something: I &lt;a href=&quot;http://github.com/moritz/json/commit/52295f3ae0d0375f4f888ffdac5a9354f677e8d9&quot;&gt;added
meta data files&lt;/a&gt; to my Perl 6 &lt;a href=&quot;http://github.com/moritz/json&quot;&gt;JSON
parser&lt;/a&gt; and &lt;a href=&quot;http://search.cpan.org/~moritz/JSON-Tiny-0.1.1/&quot;&gt;uploaded it to
CPAN&lt;/a&gt;. I think that's the first Perl 6 module on CPAN, discounting some
modules included in distributions like pugs and v6.pm.&lt;/p&gt;

&lt;p&gt;Since the documentation is in Perl 6 Pod, search.cpan.org doesn't display
it properly. So my next steps will be to find out whom I can prod to implement
Perl 6 Pod rendering and indexing, or if I have to do that myself (and if yes,
on which code base).&lt;/p&gt;

&lt;p&gt;In parallel I'll try to get the &lt;a href=&quot;http://github.com/masak/proto/&quot;&gt;proto&lt;/a&gt; hackers to install from
tarballs, or write that myself too. In the end I'd want Perl 5 and Perl 6
modules to coexist on CPAN, presumably with the option to select packages
implemented in either language for searching.&lt;/p&gt;</description>
	<pubDate>Thu, 18 Jun 2009 06:46:38 +0000</pubDate>
</item>
<item>
	<title>chromatic: Perl 6 Design Minutes for 20 May 2009</title>
	<guid>http://use.perl.org/~chromatic/journal/39144?from=rss</guid>
	<link>http://use.perl.org/~chromatic/journal/39144?from=rss</link>
	<description>&lt;p&gt;The Perl 6 design team met by phone on 20 May 2009.  Larry, Allison, Patrick, Jerry, Nicholas, and chromatic attended.

&lt;/p&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;trying to delegate some of my spec writing&lt;/li&gt;&lt;li&gt;if someone has something that needs to change and that person understands the design principles, someone can go ahead&lt;/li&gt;&lt;li&gt;Moritz respecced &lt;code&gt;each&lt;/code&gt; to make it a conjectural junction&lt;/li&gt;&lt;li&gt;other people are working on the NFG specification&lt;/li&gt;&lt;li&gt;I haven't seen any changes committed on that yet&lt;/li&gt;&lt;li&gt;thinking about how importation works&lt;/li&gt;&lt;li&gt;particularly with inlined modules&lt;/li&gt;&lt;li&gt;expect that there will be an &lt;code&gt;import&lt;/code&gt; declarator implied by &lt;code&gt;use&lt;/code&gt; but usable explicitly&lt;/li&gt;&lt;li&gt;if you say &lt;code&gt;import&lt;/code&gt; with an inline module or role declaration, it'll perform the export&lt;/li&gt;&lt;li&gt;which won't happen by default&lt;/li&gt;&lt;li&gt;thinking about how that declaration works at the moment&lt;/li&gt;&lt;li&gt;instead of &lt;code&gt;trait_auxiliary&lt;/code&gt; and &lt;code&gt;trait_verb&lt;/code&gt;, which fill the same syntactic category, we have &lt;code&gt;trait_mod&lt;/code&gt; &lt;/li&gt;&lt;li&gt;they all occur in the same spot&lt;/li&gt;&lt;li&gt;you're always looking for them both simultaneously&lt;/li&gt;&lt;li&gt;the hander routines are now all upperclass autocalled, like other handlers&lt;/li&gt;&lt;li&gt; &lt;code&gt;IS&lt;/code&gt; or &lt;code&gt;TRAIT_IS&lt;/code&gt; or &lt;code&gt;APPLY_IS&lt;/code&gt;, or some such&lt;/li&gt;&lt;li&gt;still thinking about namespaces for typeless traits not based on classes&lt;/li&gt;&lt;li&gt;perhaps &lt;code&gt;rw&lt;/code&gt; or &lt;code&gt;readonly&lt;/code&gt; traits aren't types&lt;/li&gt;&lt;li&gt;they need to be in a namespace somewhere&lt;/li&gt;&lt;li&gt;maybe just a syntactic category&lt;/li&gt;&lt;li&gt;added the use of ampersand variables on method calls to STD, &lt;code&gt;.&amp;amp;foo&lt;/code&gt; &lt;/li&gt;&lt;li&gt;you can already say &lt;code&gt;$.foo&lt;/code&gt;, call a code reference as if it were a method&lt;/li&gt;&lt;li&gt; &lt;code&gt;&amp;amp;&lt;/code&gt; is also a code reference; ought to be allowed there too&lt;/li&gt;&lt;li&gt;Jonathan was playing with ampersand attributes, &lt;code&gt;.&amp;amp;!foo&lt;/code&gt; &lt;/li&gt;&lt;li&gt;the rudimentary POD parser now complains if you don't have a matching &lt;code&gt;=end&lt;/code&gt; for your &lt;code&gt;=begin&lt;/code&gt;, except in the case of &lt;code&gt;=begin END&lt;/code&gt; &lt;/li&gt;&lt;li&gt;if you put a default onto a named parameter, parser assumed it to be a positional parameter&lt;/li&gt;&lt;li&gt;gave a bogus error message&lt;/li&gt;&lt;li&gt;I fixed that&lt;/li&gt;&lt;li&gt;another interesting grammar tweak&lt;/li&gt;&lt;li&gt;defining an &lt;code&gt; infix:&amp;lt;&amp;lt; &amp;gt;&amp;gt;&lt;/code&gt; and then a signature&lt;/li&gt;&lt;li&gt;if you leave a space out between the name and the signature parentheses, it would misparse&lt;/li&gt;&lt;li&gt;French angles ambiguously hyper parentheses there&lt;/li&gt;&lt;li&gt;I didn't want to require the space there&lt;/li&gt;&lt;li&gt;it's nice that you can write the declaration as if it a were call with the parens&lt;/li&gt;&lt;li&gt;if you're going to hyperoperate on parentheses, you have to use the dot form&lt;/li&gt;&lt;li&gt; &lt;code&gt;&amp;gt;&amp;gt;(&lt;/code&gt; is now specifically not a hyperoperator within interpolation&lt;/li&gt;&lt;li&gt; &lt;code&gt;&amp;gt;&amp;gt;.(&lt;/code&gt; is&lt;/li&gt;&lt;li&gt;that seems to be pretty DWIMmy&lt;/li&gt;&lt;li&gt;everything else is cage cleaning and hanging out&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;did not write any posts&lt;/li&gt;&lt;li&gt;will fix that first&lt;/li&gt;&lt;li&gt;mostly worked with others to make these happen&lt;/li&gt;&lt;li&gt;Tene and I ported Rakudo to run in its own HLL namespace instead of Parrot's&lt;/li&gt;&lt;li&gt;caused a 40-50% slowdown in execution time&lt;/li&gt;&lt;li&gt;we know the cause and have a fix before tomorrow's Rakudo release&lt;/li&gt;&lt;li&gt;I'll compare Rakudo's speed to before the switch&lt;/li&gt;&lt;li&gt;want to credit chromatic for any performance optimizations&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;c:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;I have a 6.5% improvement for all function calls&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;we have better error reporting now&lt;/li&gt;&lt;li&gt;can point to the point in your code with the error, rather than some point in generated PIR code&lt;/li&gt;&lt;li&gt;added the ability to define custom operators in Rakudo&lt;/li&gt;&lt;li&gt;infix, prefix, postfix&lt;/li&gt;&lt;li&gt;in select cases also circumfix&lt;/li&gt;&lt;li&gt;we can move even more parts of the builtins to Perl 6 as a Setting&lt;/li&gt;&lt;li&gt;exposed a few other places we need cleanup&lt;/li&gt;&lt;li&gt;Jonathan is working on those&lt;/li&gt;&lt;li&gt;added a variable to PCT which gives the compiler the names of the files it's compiling&lt;/li&gt;&lt;li&gt;improved error reporting there&lt;/li&gt;&lt;li&gt;added an inline PIR construct to NQP to match Rakudo's&lt;/li&gt;&lt;li&gt;added the &lt;code&gt;qx//&lt;/code&gt; quoting term&lt;/li&gt;&lt;li&gt;can now run shell commands and capture the output into a variable&lt;/li&gt;&lt;li&gt;answering questions online and taking care of other little things&lt;/li&gt;&lt;li&gt;preparing for tomorrow's release&lt;/li&gt;&lt;li&gt;though it may occur very late tonight&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;mainly release prep this week&lt;/li&gt;&lt;li&gt;lots of ticket review and patch application&lt;/li&gt;&lt;li&gt;submitted an article to Linux Magazine, &quot;Why Parrot is Important&quot;&lt;/li&gt;&lt;li&gt;more high-level than a tutorial&lt;/li&gt;&lt;li&gt;continuing to work on the book&lt;/li&gt;&lt;li&gt;a good week for high-level design discussions&lt;/li&gt;&lt;li&gt;seems like that happens when I have more time to be on IRC&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Nicholas:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;an update on smart-match&lt;/li&gt;&lt;li&gt;Paul Fenwick gave the position of a Perl trainer&lt;/li&gt;&lt;li&gt;the design decision of not being able to overload the left side of the smart match bothered him&lt;/li&gt;&lt;li&gt;there's more discussion there&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;c:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;optimizing Parrot and Rakudo&lt;/li&gt;&lt;li&gt;finding bottlenecks&lt;/li&gt;&lt;li&gt;fixing many of them&lt;/li&gt;&lt;li&gt;editing the Parrot book&lt;/li&gt;&lt;li&gt;doing a little more design work on nanoparrot&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Nicholas:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;how far off are you from letting other people release Rakudo?&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;the instructions are in the repository&lt;/li&gt;&lt;li&gt;they're straightforward&lt;/li&gt;&lt;li&gt;I could turn it over to Jonathan or Jerry or any number of people with ease&lt;/li&gt;&lt;li&gt;they could just do it&lt;/li&gt;&lt;li&gt;it's basically a &lt;em&gt;Makefile&lt;/em&gt; target&lt;/li&gt;&lt;li&gt;you do some prep work, run the target, then upload the tarball to the right places&lt;/li&gt;&lt;li&gt;I stole liberally from how Parrot does things&lt;/li&gt;&lt;li&gt;I can hand it off any time I get tired of making them&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Nicholas:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;so the bus number is low&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Jerry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;any plans to turn it over soon?&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;if other folks think it's important, I can do that&lt;/li&gt;&lt;li&gt;I could pick someone at YAPC::NA to do it&lt;/li&gt;&lt;li&gt;the release day is the Hackathon day there&lt;/li&gt;&lt;li&gt;we could just walk a few people through it that day&lt;/li&gt;&lt;li&gt;even if they don't upload the tarball and push the tag&lt;/li&gt;&lt;li&gt;we'll target that for the June release, even if no one else releases an official release&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Jerry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;I've been trying to get the Parrot release bus number above 10&lt;/li&gt;&lt;li&gt;we're close, which is a great place to be&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;that was evident, as yesterday's release manager couldn't make it, and Mark Glines picked it up&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Jerry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;and it was his first release&lt;/li&gt;&lt;/ul&gt;</description>
	<pubDate>Thu, 18 Jun 2009 02:08:58 +0000</pubDate>
</item>
<item>
	<title>Herbert Breunung: overview over perl 6 documentation</title>
	<guid>http://use.perl.org/~perl6doc/journal/39142?from=rss</guid>
	<link>http://use.perl.org/~perl6doc/journal/39142?from=rss</link>
	<description>I reformated and enriched a bit this &lt;a href=&quot;http://www.perlfoundation.org/perl6/index.cgi?documentation&quot;&gt;overview&lt;/a&gt;, please let me know if anything is missing there.</description>
	<pubDate>Thu, 18 Jun 2009 00:03:41 +0000</pubDate>
</item>
<item>
	<title>Gabor Szabo: Perl 5 to Perl 6 - Arrays</title>
	<guid>http://szabgab.com/blog/2009/06/1245228625.html</guid>
	<link>http://szabgab.com/blog/2009/06/1245228625.html</link>
	<description>&lt;h2&gt;Abstract&lt;/h2&gt;

Continuing the &lt;a href=&quot;http://szabgab.com/perl6_tricks_and_treats.html&quot;&gt;Perl 6 Tricks and Treats&lt;/a&gt;
newsletter to help people switch from Perl 5 to Perl 6. Looking at arrays.


&lt;p&gt;For the full article visit &lt;a href=&quot;http://szabgab.com/blog/2009/06/1245228625.html&quot;&gt;Perl 5 to Perl 6 - Arrays&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Wed, 17 Jun 2009 11:50:25 +0000</pubDate>
</item>
<item>
	<title>Carl Masak: Week 9 of Web.pm -- encodings, and a deep dive into Genshi</title>
	<guid>http://use.perl.org/~masak/journal/39137?from=rss</guid>
	<link>http://use.perl.org/~masak/journal/39137?from=rss</link>
	<description>&lt;dl&gt; &lt;dd&gt; &lt;i&gt;Den all IRS d00dz an bad kittehs coem to hear Jebus. An Fariseez sez &quot;LOL Jebus etz wit bad kittehs! Him sux!'&lt;/i&gt; &lt;/dd&gt;&lt;dd&gt; &lt;i&gt;Jebus sez, &quot;WTF? If lolcat had hundrd sheeps an won gits losted, doan him leev naintee nain sheeps an go luk fr losted won? Den him find it an iz liek 'w00t!' An dem him coem hoem, trow partee cuz him finded losted sheep. Srsly! Ceiling Cat moar happi wen a bad kitteh being maed lolcat den bowt naintee nain gud kittehs.&quot; &lt;/i&gt; &amp;#8212; Luke 15:1-7&lt;/dd&gt;&lt;/dl&gt;&lt;p&gt;I'm working mostly on &lt;a href=&quot;http://github.com/masak/web/tree/master/t/hitomi&quot;&gt;Hitomi&lt;/a&gt;, a Perl 6 port of the Python templating engine &lt;a href=&quot;http://genshi.edgewall.org/&quot;&gt;Genshi&lt;/a&gt;. In the past week, I decided to dive into Genshi, looking at how data flows from the template to the finished result. I now have a pretty good understanding of this, so I thought I'd expand a bit on it here.&lt;/p&gt;&lt;p&gt;Genshi's fundamental data structure is called &lt;code&gt; &lt;a href=&quot;http://genshi.edgewall.org/wiki/Documentation/streams.html&quot;&gt;Stream&lt;/a&gt;,&lt;/code&gt; and it looks very much like a sequence of &lt;a href=&quot;http://en.wikipedia.org/wiki/Simple_API_for_XML&quot;&gt;SAX&lt;/a&gt; events to me: open-tag, close-tag, text, processing-instruction, etc. Different transformations are then applied to a stream to yield the final result. A transformation could be something like &quot;remove all &amp;lt;script&amp;gt; elements&quot; or &quot;shorten all posts that are longer than 400 characters&quot;. A stream modified in-place, but combine with a transformation to produce a new stream. The nice thing is that the actual templating is also expressed as a series of this kind of transformations. But the Genshi user can easily provide her own transformation on top of the standard ones.&lt;/p&gt;&lt;p&gt;I like this model very much. It feels extremely clean and extensible. I decided to port as much as I can to Hitomi. My short-term goal is to make things round-trip using the streams, and to that effect, I've ported a test file with &lt;a href=&quot;http://github.com/masak/web/blob/6127e91c62c1b2ac382627d27ed46972e760415b/t/hitomi/05-input.t&quot;&gt;89 tests&lt;/a&gt; from Genshi to Perl 6.&lt;/p&gt;&lt;p&gt;It's still not totally clear to me how text is converted to a stream and then back. I can easily picture how a stream event knows how to serialize itself back into text, so the mystery on that side isn't very great; it's just that I haven't found the actual Python code for it yet. On the stream generation side, the data flow disappears into a Python-&lt;a href=&quot;http://www.libexpat.org/&quot;&gt;Expat&lt;/a&gt; library. Delegating XML parsing to a third party also seems like an exceedingly good idea to me.&lt;/p&gt;&lt;p&gt;Can we do the same thing &amp;#8212; delegate to Expat, or some other suitable library &amp;#8212; in Hitomi? I think so, and the &lt;a href=&quot;http://www.parrotcode.org/docs/pdd/pdd16_native_call.html&quot;&gt;Parrot documentation&lt;/a&gt; seems hopeful. I'd very much like to get that working. But in the short run, I'm pondering whether it might not be easier to make a small, throwaway XML parser out of the bits and pieces we developed as prototypes. I could make it a separate class and call it &lt;code&gt;Impostor&lt;/code&gt;, to make sure we remember to remove it later.&lt;/p&gt;&lt;p&gt;Another issue I ran into is one of encoding. viklund++ has been doing heroic work in the past week making November handle UTF-8 correctly. The reason this is heroic is that Rakudo doesn't have a model for string encodings yet. The information has to be forced out of Rakudo against its will, and I've heard viklund mutter darkly about hacks and workarounds lately... It all culminated in &lt;a href=&quot;http://irclog.perlgeek.de/perl6/2009-06-16#i_1244954&quot;&gt;a good discussion&lt;/a&gt; on #perl6 last night, and pmichaud++ &lt;a href=&quot;http://irclog.perlgeek.de/perl6/2009-06-16#i_1245092&quot;&gt;promised&lt;/a&gt; to make a preliminary implementation of &lt;code&gt;.encode&lt;/code&gt; (for &lt;code&gt;Str&lt;/code&gt;) and &lt;code&gt;.decode&lt;/code&gt; (for &lt;code&gt;Buf&lt;/code&gt;), if we just sat down and wrote some tests to show what we expected these to do.&lt;/p&gt;&lt;p&gt;Looking forward a bit; I think there's a good chance we'll have something usable with Hitomi before my original grant period is over. After that, it might be a good idea to start looking at the port of Ruby's &lt;a href=&quot;http://wiki.github.com/why/hpricot&quot;&gt;Hpricot&lt;/a&gt; (for manipulating and searching HTML documents), and to start digging into the MVC quagmire. I still expect to do some preliminary MVC investigations before that, though.&lt;/p&gt;&lt;p&gt;I wish to thank The Perl Foundation for sponsoring the Web.pm effort.&lt;/p&gt;</description>
	<pubDate>Wed, 17 Jun 2009 11:50:15 +0000</pubDate>
</item>
<item>
	<title>Carl Masak: No update today</title>
	<guid>http://use.perl.org/~masak/journal/39133?from=rss</guid>
	<link>http://use.perl.org/~masak/journal/39133?from=rss</link>
	<description>&lt;p&gt;Just writing in to say that I'm too tired to blog today about the progress today, due to all the progress today.&lt;/p&gt;&lt;p&gt;Tomorrow I'll put together a summary of the last &quot;week&quot; of Web.pm. Who knows, I might even be coherent by then.&lt;/p&gt;&lt;p&gt;In the meantime, for those of you who bothered to read all three paragraphs of a post called &quot;No update today&quot;, here's what I currently have as &lt;a href=&quot;http://redballoon.tumblr.com/post/68179964/ffffound-creepy&quot;&gt;my desktop background&lt;/a&gt;. I just can't stop analyzing that picture, it's mesmerizing.&lt;/p&gt;</description>
	<pubDate>Tue, 16 Jun 2009 22:43:56 +0000</pubDate>
</item>
<item>
	<title>chromatic: Perl 6 Design Minutes for 13 May 2009</title>
	<guid>http://use.perl.org/~chromatic/journal/39131?from=rss</guid>
	<link>http://use.perl.org/~chromatic/journal/39131?from=rss</link>
	<description>&lt;p&gt;The Perl 6 design team met by phone on 13 May 2009.  Larry, Allison, Patrick, Jerry, Will, Nicholas, and chromatic attended.&lt;/p&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;continuing to think about how braided languages work&lt;/li&gt;&lt;li&gt;implementing the notion in the STD parser&lt;/li&gt;&lt;li&gt;the notion of how you switch between these languages&lt;/li&gt;&lt;li&gt;now called &lt;em&gt;slangs&lt;/em&gt; &lt;/li&gt;&lt;li&gt;thinking about how macros work in embedded lexical scopes&lt;/li&gt;&lt;li&gt;if you define a role which contains a trait auxiliary definition&lt;/li&gt;&lt;li&gt;label it &lt;code&gt;is export&lt;/code&gt; &lt;/li&gt;&lt;li&gt;how does it export?&lt;/li&gt;&lt;li&gt;to which lexical scope?&lt;/li&gt;&lt;li&gt;when you do the role or what?&lt;/li&gt;&lt;li&gt;no defined way of exporting to outer&lt;/li&gt;&lt;li&gt;that's a problem in some tests&lt;/li&gt;&lt;li&gt;with &lt;code&gt;augment slang&lt;/code&gt;, we have a way of embedding grammar modifications inline&lt;/li&gt;&lt;li&gt;when do ordinary macros embedded in subscopes desugar to that sort of thing?&lt;/li&gt;&lt;li&gt; &lt;code&gt;%*LANG&lt;/code&gt; now holds the whole language braid&lt;/li&gt;&lt;li&gt;the &lt;code&gt;$*PARSER&lt;/code&gt; variable is just the &lt;code&gt;MAIN&lt;/code&gt; element of that&lt;/li&gt;&lt;li&gt;I backed off some of the errors in the STD parser to just warnings&lt;/li&gt;&lt;li&gt;don't really handle module and role long names yet&lt;/li&gt;&lt;li&gt;you get bogus &quot;can't augment&quot; warnings now&lt;/li&gt;&lt;li&gt;it thinks something isn't there that should be there and vice versa&lt;/li&gt;&lt;li&gt;fixed a test where STD needs to parse &lt;code&gt;=for&lt;/code&gt;; now it does&lt;/li&gt;&lt;li&gt;added the slang declarator so that we could augment them&lt;/li&gt;&lt;li&gt;a twigil indicates a current slang subset of the current braid&lt;/li&gt;&lt;li&gt;fixed a bug to recognize the invocant marker after an unspace&lt;/li&gt;&lt;li&gt;that was a longest-token match problem&lt;/li&gt;&lt;li&gt;the message I added about a missing block gobbled by a function is now two separate messages&lt;/li&gt;&lt;li&gt;one talks about the function which needs parens&lt;/li&gt;&lt;li&gt;the other talks about the missing block&lt;/li&gt;&lt;li&gt;they point to two different areas as a matter of clarity&lt;/li&gt;&lt;li&gt;I'm really enjoying adding clever error messages&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Rakudo now passes 11,200+ tests&lt;/li&gt;&lt;li&gt;up by 70 tests since yesterday&lt;/li&gt;&lt;li&gt;a couple of hundred in the past week&lt;/li&gt;&lt;li&gt;mostly doing little bug fixes and refactors&lt;/li&gt;&lt;li&gt;typically, I'll start to add a feature and find some code which doesn't look right&lt;/li&gt;&lt;li&gt;then I add the feature&lt;/li&gt;&lt;li&gt;slurpy arrays and hashes weren't added properly to subs&lt;/li&gt;&lt;li&gt;always added automatically regardless of the type of &lt;code&gt;Block&lt;/code&gt; &lt;/li&gt;&lt;li&gt;I cleaned that up&lt;/li&gt;&lt;li&gt;also cleaned up lots of parameter handling in the code&lt;/li&gt;&lt;li&gt;that made &lt;em&gt;actions.pm&lt;/em&gt; 100 lines shorter, and I removed three duplicate subroutines&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;c:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;that also speeds up startup&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;every time we do that it helps&lt;/li&gt;&lt;li&gt;found a bug dealing with Unicode characters in grammars&lt;/li&gt;&lt;li&gt;prevented us from properly parsing French quotes as an angle delimiter&lt;/li&gt;&lt;li&gt;working on adding operator parsing to Rakudo today&lt;/li&gt;&lt;li&gt;define your own custom operators&lt;/li&gt;&lt;li&gt;refer to them using canonical names&lt;/li&gt;&lt;li&gt;expect to have that done today&lt;/li&gt;&lt;li&gt;they won't be lexically scoped&lt;/li&gt;&lt;li&gt;I'll work on fixing that, when we get more to lexical scopes and language braids&lt;/li&gt;&lt;li&gt;continuing to consider protoregexes and LTM in PGE&lt;/li&gt;&lt;li&gt;probably will implement contextual variables in NQP and Rakudo&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;we'll have packages in Ubuntu soon&lt;/li&gt;&lt;li&gt;just a straight sync of the Debian packages&lt;/li&gt;&lt;li&gt;no reason to make Ubuntu-specific packages, if that works&lt;/li&gt;&lt;li&gt;working on editing the book&lt;/li&gt;&lt;li&gt;working on the calling conventions branch&lt;/li&gt;&lt;li&gt;writing a Parrot article&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Jerry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;GSoC mentors and students seem to be bonding in their bonding period&lt;/li&gt;&lt;li&gt;set up &lt;a href=&quot;http://www.parrot.org/donate/&quot;&gt;parrot.org to accept donations from individuals&lt;/a&gt; &lt;/li&gt;&lt;li&gt;there's a sidebar link under the Foundation heading&lt;/li&gt;&lt;li&gt;and we received our first donation!&lt;/li&gt;&lt;li&gt;thank you, Bradley Kuhn&lt;/li&gt;&lt;li&gt;we'll work on placement and prominence&lt;/li&gt;&lt;li&gt;think I'll give a keynote at YAPC::NA, following Larry&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;if you pay me enough, I'll run over&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;if you don't pay him, I suspect he'll run over&lt;/li&gt;&lt;li&gt;you are what stands between everybody and lunch&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Will:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;added some regression tests&lt;/li&gt;&lt;li&gt;made some stuff work in Perl 5.8.8, so we don't have to upgrade our dependency&lt;/li&gt;&lt;li&gt;wrote a script to summarize our old branches&lt;/li&gt;&lt;li&gt;convinced people to delete a bunch of old branches&lt;/li&gt;&lt;li&gt;hopefully we can weed them out&lt;/li&gt;&lt;li&gt;TPF's grant committee votes this week on the current crop of proposals&lt;/li&gt;&lt;li&gt;one of them is for Perl 6&lt;/li&gt;&lt;li&gt;if you have any comments, please post on that&lt;/li&gt;&lt;li&gt;Partcl is still dead&lt;/li&gt;&lt;li&gt;blocking on the ability to build a language from an installed Parrot&lt;/li&gt;&lt;li&gt;we've made some progress on that&lt;/li&gt;&lt;li&gt;there are still things that do not work&lt;/li&gt;&lt;li&gt;most of them have tickets&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Rakudo's blocking on the same thing&lt;/li&gt;&lt;li&gt;Tene is working on getting Rakudo to run in its own HLL&lt;/li&gt;&lt;li&gt;he's blocking on the HLL &lt;code&gt;load_library&lt;/code&gt; problem&lt;/li&gt;&lt;li&gt;I'll have him post to the list and give an update on the ticket&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Nicholas:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Rafael has merged his smart-match branch back into blead&lt;/li&gt;&lt;li&gt;he tried to make smart-matches match ranges&lt;/li&gt;&lt;li&gt;it won't work for various reasons&lt;/li&gt;&lt;li&gt;precedence is the wrong way around for one&lt;/li&gt;&lt;li&gt; &lt;code&gt;$foo ~~ [ 1, 2, [ 3 .. 5 ] ]&lt;/code&gt; won't work either&lt;/li&gt;&lt;li&gt;Perl 5 ranges aren't lazy&lt;/li&gt;&lt;li&gt;smart-match can't interrogate &lt;code&gt;Range&lt;/code&gt; objects lazily&lt;/li&gt;&lt;li&gt;that's why we can't emulate everything from Perl 6&lt;/li&gt;&lt;li&gt;we don't have the low-level infrastructure to do it all&lt;/li&gt;&lt;li&gt;even if we had that infrastructure, there are parsing issues&lt;/li&gt;&lt;li&gt;I don't see that coming in a hurry&lt;/li&gt;&lt;li&gt;if someone implements lazy ranges, maybe someone can add them to smart-match&lt;/li&gt;&lt;li&gt;giving the enjoyment people derive from implementing such things, I'll be surprised if anyone does that&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;c:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;added some optimizations&lt;/li&gt;&lt;li&gt;heading toward the &quot;not really worth doing&quot; kind&lt;/li&gt;&lt;li&gt;fixed some bugs&lt;/li&gt;&lt;li&gt;including a Unicode parsing bug with named parameters and arguments in IMCC&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Nicholas:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;did you write about the abolition of unary equals, Patrick?&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;not yet&lt;/li&gt;&lt;li&gt;I feel badly about that&lt;/li&gt;&lt;li&gt;I need to catch up&lt;/li&gt;&lt;li&gt;there are so many interesting problems to work on&lt;/li&gt;&lt;li&gt;writing is not as interesting as working on code&lt;/li&gt;&lt;/ul&gt;</description>
	<pubDate>Tue, 16 Jun 2009 20:14:44 +0000</pubDate>
</item>
<item>
	<title>Gabor Szabo: Perl 5 to Perl 6 - Scalars</title>
	<guid>http://szabgab.com/blog/2009/06/1245164696.html</guid>
	<link>http://szabgab.com/blog/2009/06/1245164696.html</link>
	<description>&lt;h2&gt;Abstract&lt;/h2&gt;

The first entry of the &lt;a href=&quot;http://szabgab.com/perl6_tricks_and_treats.html&quot;&gt;Perl 6 Tricks and Treats&lt;/a&gt;
newsletter in our quest to switch from Perl 5 to Perl 6. Looking at the scalars.


&lt;p&gt;For the full article visit &lt;a href=&quot;http://szabgab.com/blog/2009/06/1245164696.html&quot;&gt;Perl 5 to Perl 6 - Scalars&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>Tue, 16 Jun 2009 18:04:56 +0000</pubDate>
</item>
<item>
	<title>perl6.announce: Parrot 1.3.0 &quot;Andean Swift&quot; released by Andrew Whitworth</title>
	<guid>http://www.nntp.perl.org/group/perl.perl6.announce/2009/06/msg598.html</guid>
	<link>http://www.nntp.perl.org/group/perl.perl6.announce/2009/06/msg598.html</link>
	<description>On behalf of the Parrot team, I'm proud to announce Parrot 1.3.0&lt;br /&gt;&amp;quot;Andean Swift.&amp;quot; Parrot (http://parrot.org/) is a virtual machine aimed&lt;br /&gt;at running all dynamic languages.&lt;br /&gt;&lt;br /&gt;Parrot 1.3.0 is available on Parrot's FTP site, or follow the&lt;br /&gt;download instructions at http://parrot.org/download.  For those who&lt;br /&gt;would like to&lt;br /&gt;develop on Parrot, or help develop Parrot itself, we recommend using Subversion&lt;br /&gt;on the source code repository to get the latest and best Parrot code.&lt;br /&gt;&lt;br /&gt;Parrot 1.3.0 News:&lt;br /&gt;- Core&lt;br /&gt;  + Optimized parts of the IO system&lt;br /&gt;  + Fixed inheritance hierarchy of FileHandle and Socket PMC types&lt;br /&gt;  + Fixed leaks involving subroutines and Parrot_Context&lt;br /&gt;  + Cleaned up and refactored GC internals, including fixes and optimizations&lt;br /&gt;  + Optimized PMC class manipulations to use type numbers instead of&lt;br /&gt;string names&lt;br /&gt;  + Fixed problems involving hashval calculations in strings&lt;br /&gt;  + Removed unnecessary MULTI dispatches in built-in PMCs&lt;br /&gt;  + Fixed memory leaks involving PMCs that were not properly destroyed&lt;br /&gt;  + Fixed creation of PMCProxy PMCs in correct namespaces&lt;br /&gt;  + Added preliminary Pipe support&lt;br /&gt;  + Fixed cloning of Object PMCs&lt;br /&gt;  + Added root_new opcode&lt;br /&gt;  + Added initial versions of Packfile PMCs with read/write capabilities&lt;br /&gt;- Compilers&lt;br /&gt;  + Fixed several memory leaks in IMCC&lt;br /&gt;  + Updated PCT to use root_new opcode&lt;br /&gt;  + Added support for keyword &amp;quot;self&amp;quot; in NQP&lt;br /&gt;- Documentation&lt;br /&gt;  + Improved and expanded /docs/book&lt;br /&gt;  + Updated project documentation&lt;br /&gt;  + Defined 'experimental' status and procedures in DEPRECATED.pod&lt;br /&gt;- Miscellaneous&lt;br /&gt;  + Cleaned code and improved code-level documentation&lt;br /&gt;  + Various bugfixes, code cleanups, and coding standard fixes&lt;br /&gt;  + Added an experimental compiler library to help use PIR libraries from HLLs&lt;br /&gt;  + Updated OpenGL library and examples to support experimental HLL import&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Many thanks to all our contributors for making this possible, and our sponsors&lt;br /&gt;for supporting this project.  Our next scheduled release is 21 July 2009.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--Andrew Whitworth&lt;br /&gt;</description>
	<pubDate>Tue, 16 Jun 2009 15:25:54 +0000</pubDate>
</item>
<item>
	<title>Herbert Breunung: hello world</title>
	<guid>http://use.perl.org/~perl6doc/journal/39129?from=rss</guid>
	<link>http://use.perl.org/~perl6doc/journal/39129?from=rss</link>
	<description>Hello, this my (sir_lichtkind) second account here to separate the perl 6 related things a bit. Ans since i maintain the module Perl6::Doc this name fits somehow. So may I could be please added to planet perl 6. So what did happen so newsworthy.
&lt;br /&gt;
&lt;br /&gt;
Firstly mberends++ and I translated all 5 &lt;a href=&quot;http://www.perlfoundation.org/perl6/index.cgi?perl_tablets&quot;&gt;perl tablet&lt;/a&gt; appendices.
Especially &lt;a href=&quot;http://www.perlfoundation.org/perl6/index.cgi?perl_lookup_table&quot;&gt;Appendix B&lt;/a&gt;, a sort of perl 6 cheat sheet, becomes valuable since, these tables are scattered around many synopses and the synopses now contain the tests, which is good for implementers, and lang brains but not for newcomer. so lets get ready the Perl tablets soon, even without &lt;a href=&quot;http://www.perlfoundation.org/2009q1_grants_results&quot;&gt;TPF funding&lt;/a&gt;.
&lt;br /&gt;
&lt;br /&gt;
The second thing are my perl 6 tutorial i wrote in last 2 years for &lt;a href=&quot;http://perl-magazin.de/&quot;&gt;$foo&lt;/a&gt;. It is now online (&lt;a href=&quot;http://wiki.perl-community.de/cgi-bin/foswiki/view/Wissensbasis/Perl6Tutorial&quot;&gt;in german&lt;/a&gt;), but i started also &lt;a href=&quot;http://www.perlfoundation.org/perl6/index.cgi?perl_6_tutorial&quot;&gt;this to translate&lt;/a&gt;, help always welcome.
&lt;br /&gt; &lt;br /&gt;
All good things are three. I became &lt;a href=&quot;http://november-wiki.org/&quot;&gt;november&lt;/a&gt; user and started to add content to make some sort of newbefriendly intro into perl 6 worl and projects. Its very early but promising and i found some bugs and quirks, filed feate wishes, so november is now almost usable.
&lt;br /&gt; &lt;br /&gt;
So now you may ask why try to do all at once. No there is much more i currently do in life but honestly all these projects benefit from each other and they simply need to be done.</description>
	<pubDate>Tue, 16 Jun 2009 09:53:09 +0000</pubDate>
</item>
<item>
	<title>chromatic: Perl 6 Design Minutes for 06 May 2009</title>
	<guid>http://use.perl.org/~chromatic/journal/39125?from=rss</guid>
	<link>http://use.perl.org/~chromatic/journal/39125?from=rss</link>
	<description>&lt;p&gt;The Perl 6 design team met by phone on 06 May 2009.  Larry, Allison,
Patrick, Nicholas, and chromatic attended.&lt;/p&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;refactored my phone&lt;/li&gt;&lt;li&gt;refactored various functions&lt;/li&gt;&lt;li&gt; &lt;code&gt;comb&lt;/code&gt; now defaults to matching single characters&lt;/li&gt;&lt;li&gt;a &lt;code&gt;words&lt;/code&gt; method now does what &lt;code&gt;comb&lt;/code&gt; used to do&lt;/li&gt;&lt;li&gt;did some work on &lt;code&gt;pick&lt;/code&gt; &lt;/li&gt;&lt;li&gt;looked at most of the functions in containers to see whether they out to return a &lt;code&gt;List&lt;/code&gt; or a &lt;code&gt;Capture&lt;/code&gt; which returns an &lt;code&gt;Item&lt;/code&gt; &lt;/li&gt;&lt;li&gt;depends on whether the function would ever be used to pull a single thing out&lt;/li&gt;&lt;li&gt;whether people expected it to do the right thing as an &lt;code&gt;Item&lt;/code&gt; &lt;/li&gt;&lt;li&gt; &lt;code&gt;pick&lt;/code&gt; is one of those functions&lt;/li&gt;&lt;li&gt;worked on the semantics of &lt;code&gt;has&lt;/code&gt; &lt;/li&gt;&lt;li&gt;the initializer semantics; the syntax hasn't changed&lt;/li&gt;&lt;li&gt;worked on the relationship between multiple &lt;code&gt;has&lt;/code&gt; if you have multiple attributes&lt;/li&gt;&lt;li&gt;straightened out a mismatch between prefix parsing specification and implementation&lt;/li&gt;&lt;li&gt;turned the term &quot;protoobject&quot; into &quot;type object&quot;&lt;/li&gt;&lt;li&gt;thinking about the notion of braided languages&lt;/li&gt;&lt;li&gt;Perl isn't a single language&lt;/li&gt;&lt;li&gt;also a regexp language, a quoting language, a quasi-quoting language&lt;/li&gt;&lt;li&gt;they hand off to each other&lt;/li&gt;&lt;li&gt;they have to keep track of each other; I call that a &quot;braid&quot;&lt;/li&gt;&lt;li&gt;how you override one language in another&lt;/li&gt;&lt;li&gt;how do you handle regexp language changes from regular Perl, when you're not in the regexp language at the time?&lt;/li&gt;&lt;li&gt;thinking about how to get the derivations to work correctly&lt;/li&gt;&lt;li&gt;when you parse a regexp or a quote&lt;/li&gt;&lt;li&gt;now instead of starting at a language like &lt;code&gt;q&lt;/code&gt;, it starts at the current &lt;code&gt;q&lt;/code&gt;-ish language in your braid&lt;/li&gt;&lt;li&gt;in support of that, I implemented temporization of context variables in &lt;code&gt;gimme5&lt;/code&gt; &lt;/li&gt;&lt;li&gt;used to temporize current braids to a lexical scope&lt;/li&gt;&lt;li&gt;added a block after &lt;code&gt;try&lt;/code&gt; in parsing&lt;/li&gt;&lt;li&gt;it uses that rather than parsing the block as the first argument of a list operator&lt;/li&gt;&lt;li&gt;likewise the other statement prefix operators&lt;/li&gt;&lt;li&gt;added the auxiliary &lt;code&gt;hides&lt;/code&gt; trait&lt;/li&gt;&lt;li&gt;the &lt;code&gt;\c&lt;/code&gt; notation for characters allows any radix of integer inside the list&lt;/li&gt;&lt;li&gt;the &lt;code&gt;\c&lt;/code&gt;, &lt;code&gt;\o&lt;/code&gt;, and &lt;code&gt;\x&lt;/code&gt; notations all parse consistently now&lt;/li&gt;&lt;li&gt;enums are parsed more correctly&lt;/li&gt;&lt;li&gt;they don't give bogus duplicate warnings&lt;/li&gt;&lt;li&gt;if you declare a lexical symbol with &lt;code&gt;::&lt;/code&gt; in it, assumes you're referring to a subpackage of the current lexical scope&lt;/li&gt;&lt;li&gt;means something different from a symbol intended to scan outward&lt;/li&gt;&lt;li&gt;along with the notion of braided languages and derivability, derived languages can add more parser variables (&lt;code&gt;$?foo&lt;/code&gt;) with a virtual function for lookup&lt;/li&gt;&lt;li&gt;avoids clobbering the core definitions&lt;/li&gt;&lt;li&gt;worked on role parameters&lt;/li&gt;&lt;li&gt;they're now in the role's pad, like normal signature parameters&lt;/li&gt;&lt;li&gt;started playing with the &lt;code&gt;YOU_ARE_HERE&lt;/code&gt; stub used to define the effective insertion location of your code into a &lt;code&gt;Setting&lt;/code&gt; &lt;/li&gt;&lt;li&gt;determining which lexical pad to dump as the &lt;code&gt;Setting&lt;/code&gt;'s context for use by other compilation units&lt;/li&gt;&lt;li&gt;did a lot of work on error messsages&lt;/li&gt;&lt;li&gt;some of my &lt;code&gt;||&lt;/code&gt;s suppressed panic messages&lt;/li&gt;&lt;li&gt;more useful error message on the null pattern (&lt;code&gt;//&lt;/code&gt;)&lt;/li&gt;&lt;li&gt;gives a better message if you slurp your control block in the preceding expression&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;had a lot of discussions online&lt;/li&gt;&lt;li&gt;not as much coding as I like&lt;/li&gt;&lt;li&gt;seem to be answering questions for others&lt;/li&gt;&lt;li&gt;quite a bit of work on Rakudo internals refactoring&lt;/li&gt;&lt;li&gt;that'll make it easier to switch it over to be its own HLL in Parrot&lt;/li&gt;&lt;li&gt;moved things around&lt;/li&gt;&lt;li&gt;made a single constant definition we can change when we move it over to its own HLL&lt;/li&gt;&lt;li&gt;also moved all of the Parrot HLL mangling into its own source code files&lt;/li&gt;&lt;li&gt;easy for us to manage there&lt;/li&gt;&lt;li&gt;fixed some bugs&lt;/li&gt;&lt;li&gt;talked with Jonathan about refactoring the P6object implementation&lt;/li&gt;&lt;li&gt;used in Rakudo and PCT for Perl 6 object-like behaviors&lt;/li&gt;&lt;li&gt;he's working on that refactoring now&lt;/li&gt;&lt;li&gt;found and fixed a couple of bugs handling implicit slurpy positionals&lt;/li&gt;&lt;li&gt;made Rakudo's standard IO handles default to UTF-8 encoding&lt;/li&gt;&lt;li&gt;gives people behavior more like they expect&lt;/li&gt;&lt;li&gt;working on changes to the &lt;code&gt;Array&lt;/code&gt; and &lt;code&gt;List&lt;/code&gt; implementation&lt;/li&gt;&lt;li&gt;currently &lt;code&gt;List&lt;/code&gt; inherits from &lt;code&gt;ResizablePMCArray&lt;/code&gt; &lt;/li&gt;&lt;li&gt;we'll change that to contain it&lt;/li&gt;&lt;li&gt;that should clean up a lot of behavior&lt;/li&gt;&lt;li&gt;Rakudo passed the 11,000 spectest mark as of two days ago&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;spent some time on ticket, milestone, and roadmap maintenance&lt;/li&gt;&lt;li&gt;helping other people start or continue their tasks&lt;/li&gt;&lt;li&gt;launched the install PDD out of draft&lt;/li&gt;&lt;li&gt;it doesn't address every question, but I cleaned out all of the inaccuracies&lt;/li&gt;&lt;li&gt;fits our current plan&lt;/li&gt;&lt;li&gt;probably needs more expansion when we figure out the source of some of our problems building Rakudo and Partcl&lt;/li&gt;&lt;li&gt;the general problem is that we've built all of our languages from the build tree, never and installed Parrot&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;c:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;I've been explaning Perl 6 roles on my new weblog&lt;/li&gt;&lt;li&gt;lots of feedback&lt;/li&gt;&lt;li&gt;still lots of explaining to do&lt;/li&gt;&lt;li&gt;also been profiling Parrot and Rakudo startup&lt;/li&gt;&lt;li&gt;Parrot's a lot faster now (cotto and bacek's work on vtable init helped immensely)&lt;/li&gt;&lt;li&gt;Rakudo's getting faster, but it has a ways to go&lt;/li&gt;&lt;li&gt;will keep working on that, but the progress has been decent with little investment&lt;/li&gt;&lt;li&gt;discussed exception handling with Allison&lt;/li&gt;&lt;li&gt;came up with a preliminary design to handle the interior runloop exit there&lt;/li&gt;&lt;li&gt;just syntax to hide tricky semantics&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;when dealing with exceptions, handlers, and returns for subroutines&lt;/li&gt;&lt;li&gt;it'd be nice to force a return from a subroutine higher up in the caller chain&lt;/li&gt;&lt;li&gt;akin to Perl 6's &lt;code&gt;leave&lt;/code&gt; semantics&lt;/li&gt;&lt;li&gt;trying to do that without throwing an exception....&lt;/li&gt;&lt;li&gt;if we do it with exceptions requires every block to have a handler&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;invoke the return continuation several levels back?&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;is that easily doable at this point&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;we have all of the ability for that, but no syntax for it&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;I don't necessarily need syntax for it&lt;/li&gt;&lt;li&gt;the natural approach is to find the appropriate caller&lt;/li&gt;&lt;li&gt;I need to do that anyway&lt;/li&gt;&lt;li&gt;then ask for its &lt;code&gt;ReturnContinuation&lt;/code&gt; &lt;/li&gt;&lt;li&gt;then invoke that with the values I want to return to its caller&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;c:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;makes sense to me&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;that may exist in PIR syntax like that anyway&lt;/li&gt;&lt;li&gt;if the easy invoke doesn't work, use some combination of &lt;code&gt;set_returns&lt;/code&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;not sure if we have in PIR right now the way to ask the caller for its return continuation&lt;/li&gt;&lt;li&gt;you can do it from C&lt;/li&gt;&lt;li&gt;we can add something which does that&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;if I ask for a &lt;code&gt;Sub&lt;/code&gt;'s current context&lt;/li&gt;&lt;li&gt;I could write a method on a sub to do that&lt;/li&gt;&lt;li&gt;it'll be easier and nicer when our contexts are PMCs&lt;/li&gt;&lt;li&gt;as an intermediate case, that would be it&lt;/li&gt;&lt;li&gt;related to that, this might be there too&lt;/li&gt;&lt;li&gt;is there a way for a &lt;code&gt;Sub&lt;/code&gt; to register behavior to execute just before it exits&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;are those like the &lt;code&gt;LEAVE&lt;/code&gt; hooks in Perl 6?&lt;/li&gt;&lt;li&gt;we have a place to store them now&lt;/li&gt;&lt;li&gt;we don't right now have a way of flagging a particular handler to execute at block scope exit&lt;/li&gt;&lt;li&gt;would it make sense to call that an event?&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;it might&lt;/li&gt;&lt;li&gt;before saying what we do and don't have&lt;/li&gt;&lt;li&gt;one piece of this is that there's still a &lt;code&gt;push_action&lt;/code&gt; opcode&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;it never worked&lt;/li&gt;&lt;li&gt;we're removing it&lt;/li&gt;&lt;li&gt;the global stack never synchronized with continuations&lt;/li&gt;&lt;li&gt;it dummied up to work, but it doesn't have the automatic stack cleanup behavior&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;the other possibility is the presence of &lt;code&gt;ONEXIT&lt;/code&gt; or &lt;code&gt;LEAVE&lt;/code&gt; hooks on &lt;code&gt;Sub&lt;/code&gt;s in Parrot&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;do you want all &lt;code&gt;Sub&lt;/code&gt;s to have that&lt;/li&gt;&lt;li&gt;or at runtime would you want to attach a handler to that sub?&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;it might be nice to have that at compile time&lt;/li&gt;&lt;li&gt;I suspect it'll end up being an attached block&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;can we tie that cleanly with other execution pieces?&lt;/li&gt;&lt;li&gt; &lt;code&gt;NEXT&lt;/code&gt; and &lt;code&gt;LAST&lt;/code&gt; etc&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;the biggest difference with &lt;code&gt;LEAVE&lt;/code&gt; is that it's not exception-based&lt;/li&gt;&lt;li&gt;Larry thinks of it as natural to a block&lt;/li&gt;&lt;li&gt;PCT models the rest as exceptional&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Allison:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;it sounds like a handler to store in the local handler list&lt;/li&gt;&lt;li&gt;mark it so that it's clearly not an exception&lt;/li&gt;&lt;li&gt;we have handler flags -- exception, event, etc&lt;/li&gt;&lt;li&gt;we add to the execution code for &lt;code&gt;Sub&lt;/code&gt;s&lt;/li&gt;&lt;li&gt;as it returns or ends, it checks to see if there was a handler&lt;/li&gt;&lt;li&gt;invokes it if so&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;sounds good to me&lt;/li&gt;&lt;li&gt;it's come up if you're thinking about these issues anyway&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Nicholas:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;how useful is MAD that's in Perl 5 blead still?&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;I don't know&lt;/li&gt;&lt;li&gt;it may turn out to be very important&lt;/li&gt;&lt;li&gt;depends on how possible it is to write a decent Perl 5 parser in Perl 6&lt;/li&gt;&lt;li&gt;where &lt;em&gt;decent&lt;/em&gt; is a very peculiar definition meaning &quot;indecent&quot;&lt;/li&gt;&lt;li&gt;this is unknown&lt;/li&gt;&lt;li&gt;for interleaving Perl 5 and Perl 6 on various VMs, some VMs will use a Perl 5 compiler written in Perl 6&lt;/li&gt;&lt;li&gt;that may not be a solution as nice as using the real Perl 5 parser which knows its own idiosyncracies&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;c:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt; &lt;em&gt;sometimes&lt;/em&gt; it does&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;that's the point&lt;/li&gt;&lt;li&gt;I'd hate to have to have to hack it up again&lt;/li&gt;&lt;li&gt;that was a lot of work&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Nicholas:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;it seems to suffer slow bitrot&lt;/li&gt;&lt;li&gt;no one seems to try to keep it up to date&lt;/li&gt;&lt;li&gt;when people change the parser, they don't change it&lt;/li&gt;&lt;li&gt;the question is if people still use it&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;the vision is still to have a Perl 5 to Perl 6 translator&lt;/li&gt;&lt;li&gt;that's been on hold until we have a viable target to translate to&lt;/li&gt;&lt;li&gt;the demand for that will re-arise at some point&lt;/li&gt;&lt;li&gt;if it bitrots, it bitrots&lt;/li&gt;&lt;li&gt;that doesn't bother me as much as if people felt like ripping it out&lt;/li&gt;&lt;li&gt;the way to unbitrot it was roundtripping the test suite and fixing any problems&lt;/li&gt;&lt;li&gt;we'd just go back to doing that again until everything was reannotated the way it needs to be&lt;/li&gt;&lt;li&gt;the standard for when you know you're storing enough information is being able to reproduce it&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;c:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;is there a test target to handle that?&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;I used special scripts to do that&lt;/li&gt;&lt;li&gt;didn't expect other people to maintain that&lt;/li&gt;&lt;li&gt;it's MAD for a reason&lt;/li&gt;&lt;li&gt;nobody's tried to write a Perl 5 parser in Perl 6 yet&lt;/li&gt;&lt;li&gt;it's theoretically possible&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;depending how much fidelity you need for the actual Perl 5, you can get a pretty good way&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;considering how much effort has gone into PPI, you can get a PPI-like result&lt;/li&gt;&lt;li&gt;that only takes you so far though&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Patrick:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;maybe a GSoC project next year would be for someone to start hacking something together with PPI&lt;/li&gt;&lt;li&gt;it'd be a worthwhile project&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;strong&gt;Larry:&lt;/strong&gt; &lt;/p&gt;&lt;ul&gt;
&lt;li&gt;we already have a Perl 5 to Perl 6 translator based on the state of MAD&lt;/li&gt;&lt;/ul&gt;</description>
	<pubDate>Tue, 16 Jun 2009 01:38:38 +0000</pubDate>
</item>
<item>
	<title>Daniel Carrera: Perl 6 and the Josephus problem</title>
	<guid>http://daniel.carrera.bz/?p=1259</guid>
	<link>http://daniel.carrera.bz/2009/06/perl-6-and-the-josephus-problem/</link>
	<description>&lt;h2&gt;The Josephus problem in Perl 6, Python and Ruby&lt;/h2&gt;
&lt;p&gt;In today&amp;#8217;s post, I would like to compare the OOP syntax of Perl 6, Python and Ruby. To this effect, I decided to show you an implementation of the Josephus problem in each language. &lt;a href=&quot;http://en.wikipedia.org/wiki/Josephus_problem&quot;&gt;Wikipedia&lt;/a&gt; describes the Josephus problem:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
There are people standing in a circle waiting to be executed. After the first man is executed, certain number of people are skipped and one man is executed. Then again, people are skipped and a man is executed. The elimination proceeds around the circle (which is becoming smaller and smaller as the executed people are removed), until only the last man remains, who is given freedom. The task is to choose the place in the initial circle so that you survive (are the last one remaining).&lt;/p&gt;
&lt;p&gt;The problem is named after Flavius Josephus, a Jewish historian living in the 1st century. As the legend goes, he and his 40 comrade soldiers were trapped in a cave, surrounded by Romans. They chose suicide over capture and decided that they would form a circle and start killing themselves using a step of three. As Josephus did not want to die, he was able to find the safe place, and stayed alive.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2&gt;Acknowledgement&lt;/h2&gt;
&lt;p&gt;The idea to use the Josephus problem to compare these languages is not my own. The idea comes from &lt;a href=&quot;http://danvk.org/josephus.html&quot;&gt;danvk.org&lt;/a&gt; who used it to compare Perl 5, Python and Ruby. I have copied his Python and Ruby code and I added the Perl 6 code of my own.&lt;/p&gt;
&lt;h2&gt;A quick note&lt;/h2&gt;
&lt;p&gt;I have tried to normalize the code as much as possible, so that you can get a better impression of the OOP syntax in each language. I will not benchmark the code, and I will keep my commentary to a minimum. The idea is that you see the OOP syntax of each language, with minimum influence from me.&lt;/p&gt;
&lt;h2&gt;Writing the class&lt;/h2&gt;
&lt;h3&gt;Perl 6 (tested with &lt;a href=&quot;http://rakudo.org/&quot;&gt;Rakudo&lt;/a&gt;)&lt;/h3&gt;
&lt;pre class=&quot;code&quot;&gt;
&lt;b class=&quot;blue&quot;&gt;class&lt;/b&gt; Person {
	&lt;i class=&quot;grey&quot;&gt;# $. means &quot;public&quot;, &quot;is rw&quot; means it is writable.&lt;/i&gt;
	&lt;b class=&quot;blue&quot;&gt;has&lt;/b&gt; ($.position, $.succ is rw);
	&lt;b class=&quot;blue&quot;&gt;has&lt;/b&gt; $.alive is rw = True;

	&lt;i class=&quot;grey&quot;&gt;# Stringify&lt;/i&gt;
	&lt;b class=&quot;blue&quot;&gt;method&lt;/b&gt; Str() {
		&lt;span class=&quot;green&quot;&gt;&quot;Person $.position, &quot;&lt;/span&gt; ~ ($.alive ?? &quot;alive&quot; !! &quot;dead&quot;)
	}
	&lt;i class=&quot;grey&quot;&gt;# Create a linked chain of people.&lt;/i&gt;
	&lt;b class=&quot;blue&quot;&gt;method&lt;/b&gt; createChain($n) {
		&lt;b class=&quot;blue&quot;&gt;return&lt;/b&gt; self &lt;b class=&quot;blue&quot;&gt;unless&lt;/b&gt; $n &gt; 0;
		$.succ = Person.new(position =&gt; $.position + 1);
		$.succ.createChain($n-1);
	}
	&lt;i class=&quot;grey&quot;&gt;# Kill every nth person. Stop killing if I'm the last one.&lt;/i&gt;
	&lt;b class=&quot;blue&quot;&gt;method&lt;/b&gt; kill($pos is rw, $n, $remaining is rw) {
		&lt;b class=&quot;blue&quot;&gt;return&lt;/b&gt; $.succ.kill($pos, $n, $remaining) &lt;b class=&quot;blue&quot;&gt;if&lt;/b&gt; !$.alive;
		&lt;b class=&quot;blue&quot;&gt;return&lt;/b&gt; self &lt;b class=&quot;blue&quot;&gt;if&lt;/b&gt; $remaining == 1;

		&lt;b class=&quot;blue&quot;&gt;if&lt;/b&gt; $pos == $n {
			$.alive = False;
			$pos = 0;
			$remaining -= 1;
		}
		$.succ.kill($pos+1,$n, $remaining);
	}
}
&lt;/pre&gt;
&lt;h3&gt;Python (tested with 2.5.2)&lt;/h3&gt;
&lt;pre class=&quot;code&quot;&gt;
&lt;b class=&quot;blue&quot;&gt;class&lt;/b&gt; Person:
	&lt;i class=&quot;grey&quot;&gt;# Initialize&lt;/i&gt;
	&lt;b class=&quot;blue&quot;&gt;def&lt;/b&gt; __init__(self,pos):
		self.position = pos
		self.alive = True

	&lt;i class=&quot;grey&quot;&gt;# Stringify&lt;/i&gt;
	&lt;b class=&quot;blue&quot;&gt;def&lt;/b&gt; __str__(self):
		status = &lt;span class=&quot;green&quot;&gt;&quot;alive&quot;&lt;/span&gt; &lt;b class=&quot;blue&quot;&gt;if&lt;/b&gt; self.alive &lt;b class=&quot;blue&quot;&gt;else&lt;/b&gt; &lt;span class=&quot;green&quot;&gt;&quot;dead&quot;&lt;/span&gt;
		&lt;b class=&quot;blue&quot;&gt;return&lt;/b&gt; &lt;span class=&quot;green&quot;&gt;&quot;Person #%d, %s&quot;&lt;/span&gt; % (self.position, status)

	&lt;i class=&quot;grey&quot;&gt;# Create a linked chain of people.&lt;/i&gt;
	&lt;b class=&quot;blue&quot;&gt;def&lt;/b&gt; createChain(self,n):
		&lt;b class=&quot;blue&quot;&gt;if&lt;/b&gt; n &gt; 0:
			self.succ = Person(self.position+1)
			&lt;b class=&quot;blue&quot;&gt;return&lt;/b&gt; self.succ.createChain(n-1)
		&lt;b class=&quot;blue&quot;&gt;else&lt;/b&gt;:
			&lt;b class=&quot;blue&quot;&gt;return&lt;/b&gt; self

	&lt;i class=&quot;grey&quot;&gt;# Kill every nth person. Stop killing if I'm the last one.&lt;/i&gt;
	&lt;b class=&quot;blue&quot;&gt;def&lt;/b&gt; kill(self,pos,n,remaining):
		&lt;b class=&quot;blue&quot;&gt;if&lt;/b&gt; not self.alive:
			&lt;b class=&quot;blue&quot;&gt;return&lt;/b&gt; self.succ.kill(pos,n,remaining)
		&lt;b class=&quot;blue&quot;&gt;if&lt;/b&gt; remaining == 1:
			&lt;b class=&quot;blue&quot;&gt;return&lt;/b&gt; self
		&lt;b class=&quot;blue&quot;&gt;if&lt;/b&gt; pos == n:
			self.alive = False
			pos = 0
			remaining -= 1
		&lt;b class=&quot;blue&quot;&gt;return&lt;/b&gt; self.succ.kill(pos+1,n,remaining)
&lt;/pre&gt;
&lt;h3&gt;Ruby (tested with 1.8.7)&lt;/h3&gt;
&lt;pre class=&quot;code&quot;&gt;
&lt;b class=&quot;blue&quot;&gt;class&lt;/b&gt; Person
	&lt;i class=&quot;grey&quot;&gt;# Accessor and mutator methods&lt;/i&gt;
	attr_reader :position, :succ, :alive
	attr_writer :position, :succ, :alive

	&lt;i class=&quot;grey&quot;&gt;# Initialize&lt;/i&gt;
	&lt;b class=&quot;blue&quot;&gt;def&lt;/b&gt; initialize(pos)
		@position = pos
		@alive = true
	&lt;b class=&quot;blue&quot;&gt;end&lt;/b&gt;
	&lt;i class=&quot;grey&quot;&gt;# Stringify&lt;/i&gt;
	&lt;b class=&quot;blue&quot;&gt;def&lt;/b&gt; to_s
		&lt;span class=&quot;green&quot;&gt;&quot;Person \##@position, #{@alive ? 'alive' : 'dead'}&quot;&lt;/span&gt;
	&lt;b class=&quot;blue&quot;&gt;end&lt;/b&gt;
	&lt;i class=&quot;grey&quot;&gt;# Create a linked chain of people.&lt;/i&gt;
	&lt;b class=&quot;blue&quot;&gt;def&lt;/b&gt; createChain(n)
		&lt;b class=&quot;blue&quot;&gt;return&lt;/b&gt; self &lt;b class=&quot;blue&quot;&gt;unless&lt;/b&gt; n &gt; 0
		@succ = Person.new(@position + 1)
		@succ.createChain(n-1)
	&lt;b class=&quot;blue&quot;&gt;end&lt;/b&gt;
	&lt;i class=&quot;grey&quot;&gt;# Kill every nth person. Stop killing if I'm the last one.&lt;/i&gt;
	&lt;b class=&quot;blue&quot;&gt;def&lt;/b&gt; kill(pos,n,remaining)
		&lt;b class=&quot;blue&quot;&gt;return&lt;/b&gt; @succ.kill(pos,n,remaining) &lt;b class=&quot;blue&quot;&gt;if&lt;/b&gt; !@alive
		&lt;b class=&quot;blue&quot;&gt;return&lt;/b&gt; self &lt;b class=&quot;blue&quot;&gt;if&lt;/b&gt; (remaining == 1)

		&lt;b class=&quot;blue&quot;&gt;if&lt;/b&gt; pos == n
			@alive = false
			pos = 0
			remaining -= 1
		&lt;b class=&quot;blue&quot;&gt;end&lt;/b&gt;
		@succ.kill(pos+1,n,remaining)
	&lt;b class=&quot;blue&quot;&gt;end&lt;/b&gt;
&lt;b class=&quot;blue&quot;&gt;end&lt;/b&gt;
&lt;/pre&gt;
&lt;h2&gt;Comments&lt;/h2&gt;
&lt;p&gt;All three classes are straight forward, and almost exactly the same size. Perl 6 is a bit shorter, but the differences are insignificant:&lt;/p&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;10&quot; cellspacing=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;th&gt;Perl 6&lt;/th&gt;
&lt;th&gt;Python&lt;/th&gt;
&lt;th&gt;Ruby&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lines of code*&lt;/td&gt;
&lt;td&gt;23&lt;/td&gt;
&lt;td&gt;25&lt;/td&gt;
&lt;td&gt;27&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Characters*&lt;/td&gt;
&lt;td&gt;546&lt;/td&gt;
&lt;td&gt;578&lt;/td&gt;
&lt;td&gt;549&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;&lt;span class=&quot;grey&quot;&gt;* Not including comments.&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;note&quot;&gt;&lt;b class=&quot;red&quot;&gt;Note:&lt;/b&gt; A reader mentioned that a better way to do Ruby is to replace &amp;#8220;attr_reader&amp;#8221; and &amp;#8220;attr_writer&amp;#8221; by a single &amp;#8220;attr_accessor&amp;#8221;. With this change, Ruby is the shortest by character count.&lt;/div&gt;
&lt;p&gt;There are things I could have done to make each language shorter, but my goal was to make each code sample clear and legible. Besides, you shouldn&amp;#8217;t pick a language because you can save 3 lines of code. It makes more sense to see if you like the syntax and the over-all &amp;#8220;feel&amp;#8221; of the language, and that is a much more personal decision.&lt;/p&gt;
&lt;p&gt;On a &lt;b&gt;personal&lt;/b&gt; note, I don&amp;#8217;t like the Python syntax as much&amp;#8230; passing &amp;#8220;self&amp;#8221; explicitly, double underscores&amp;#8230; it feels a bit hackish, but that&amp;#8217;s just me. In turn, I like the Ruby and Perl 6 syntax. I can&amp;#8217;t decide which I like better. Both look very clean and very clear.&lt;/p&gt;
&lt;h2&gt;Using the classes&lt;/h2&gt;
&lt;p&gt;Finally, this is how you would use these classes:&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Perl 6&lt;/b&gt;&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;
&lt;b class=&quot;blue&quot;&gt;my&lt;/b&gt; $orig = 40;
&lt;b class=&quot;blue&quot;&gt;my&lt;/b&gt; $nth = 3;

&lt;b class=&quot;blue&quot;&gt;my&lt;/b&gt; $first = Person.new(position =&gt; 1);
&lt;b class=&quot;blue&quot;&gt;my&lt;/b&gt; $last = $first.createChain($orig-1);
$last.succ = $first;

&lt;b class=&quot;blue&quot;&gt;my&lt;/b&gt; $winner = $first.kill(1,$nth,$orig);
&lt;b class=&quot;blue&quot;&gt;say&lt;/b&gt; &lt;span class=&quot;green&quot;&gt;&quot;Winner: &quot;&lt;/span&gt;, $winner;
&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;Python&lt;/b&gt;&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;
orig = 40
nth = 3

first = Person(1)
last = first.createChain(orig-1)
last.succ = first

winner = first.kill(1,nth,orig)
&lt;b class=&quot;blue&quot;&gt;print&lt;/b&gt; &lt;span class=&quot;green&quot;&gt;&quot;Winner: &quot;&lt;/span&gt;, winner
&lt;/pre&gt;
&lt;p&gt;&lt;b&gt;Ruby&lt;/b&gt;&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;
orig = 40
nth = 3

first = Person.new(1)
last  = first.createChain(orig-1)
last.succ = first

winner = first.kill(1,nth,orig)
&lt;b class=&quot;blue&quot;&gt;puts&lt;/b&gt; &lt;span class=&quot;green&quot;&gt;&quot;Winner: &quot;&lt;/span&gt; + winner.to_s
&lt;/pre&gt;</description>
	<pubDate>Fri, 12 Jun 2009 15:35:31 +0000</pubDate>
</item>

</channel>
</rss>
