rodi's Journalhttp://use.perl.org/images/topics/useperl.gifhttp://use.perl.org/~rodi/journal/
Perl Advent?http://use.perl.org/~rodi/journal/31129?from=rss
<p>Advent is a happy time around the Brunton household. To begin with, it means Christmas is coming. I'm a big fan of Christmas. Each Sunday of Advent, we invite a couple friends over and have dinner. Maybe light a candle on the Advent wreath.</p><p>But this year... this year it's looking like it may be the biggest Advent *ever*! And not just because we have babies in the house now. Tucked away at the end of his State of the Onion is the following tidbit from one Mr. Larry Wall:</p><blockquote><div><p>"Now, anyone who has been following along at home knows that we never, ever promise a delivery date for Perl 6. Nevertheless, I can point out that many of us hope to have most of a Perl 6 parser written in Perl 6 by this Christmas."</p></div>
</blockquote><p>Can it be?</p><p>Every time someone logs in to #perl6 and asks "when will it be done?" (this happens a couple times a week), there is always a collective cheer from the crowd of LambdaCamels hanging out there:</p><blockquote><div><p>CHRISTMAS!</p></div>
</blockquote><p>But nobody will ever say which Christmas.</p><p>Until now.</p><p>Perl 6 Advent anyone? I'm thinking</p><ul> <li>Old Testament readings (Perl &lt;=5)</li><li>New Testament readings (Perl 6)</li><li>An Epistle (Synopses?)</li><li>And some Psalms (Perl poetry)</li></ul><p>This is not to mention Apocrypha, Apocalypses, and Exegesese. Maybe when it's all done, we'll turn it into the Perl Catechism.</p>rodi2006-09-26T17:26:35+00:00perl6User dug Read This (or, Cellular Automata for Kicks in 6)http://use.perl.org/~rodi/journal/30995?from=rss
<tt>A while back, I sent my little brother (user dug) some Perl 5 scripts that render simple cellular automata to a terminal.&nbsp; I thought he'd ignored me entirely until he publicly prodded me to see the Perl 6 versions I was (allegedly) working on.<br><br>Well, the module is checked into Pugs (Automata::Cellular), and here's a sample script:<br><br>use v6-alpha;<br>use Automata::Cellular;<br>my Automata::Cellular $ca<nobr> <wbr></nobr>.= new(:rule_number&lt;30&gt;);<br>say "Rule Number $ca.rule.rule_number()\n$ca.rule.pretty()\n$ca.prettystate()";<br>while ( $ca++ ) { say $ca.prettystate() }<br>1;<br><br>With output:<br><br>Rule Number 30<br>... becomes<nobr> <wbr></nobr>.<br>..x becomes x<br>.x. becomes x<br>.xx becomes x<br>x.. becomes x<br>x.x becomes<nobr> <wbr></nobr>.<br>xx. becomes<nobr> <wbr></nobr>.<br>xxx becomes<nobr> <wbr></nobr>.<br><br>Stage 1:<nobr> <wbr></nobr>...............x...............<br>Stage 2:<nobr> <wbr></nobr>..............xxx..............<br>Stage 3:<nobr> <wbr></nobr>.............xx..x.............<br>Stage 4:<nobr> <wbr></nobr>............xx.xxxx............<br>Stage 5:<nobr> <wbr></nobr>...........xx..x...x...........<br>Stage 6:<nobr> <wbr></nobr>..........xx.xxxx.xxx..........<br>Stage 7:<nobr> <wbr></nobr>.........xx..x....x..x.........<br>Stage 8:<nobr> <wbr></nobr>........xx.xxxx..xxxxxx........<br>Stage 9:<nobr> <wbr></nobr>.......xx..x...xxx.....x.......<br><br>I found the Perl 6 object model powerful, the interfaces easy to use.&nbsp; For example, I overloaded the "++" operator using a method like this:<br><br>method prefix:&lt;++&gt; {<br>&nbsp; ## increment the state<br>}<br><br>Wow!<br><br>Adding an accessor to the class was even easier.&nbsp; I didn't even read any documentation- I just tried it, and it worked.&nbsp; Inside the class or role, just say something like:<br><br>has $.foo;<br><br>If you want something to type into Pugs, try this:<br><br>class a { has $.b }; my a $c<nobr> <wbr></nobr>.= new(:b&lt;foo&gt;); $c.b()<br><br>Yes, you really did just build a class called "a", create a new class a object, and use the "b" accessor.&nbsp; Wow.<br><br>So dug, now you know why I have become a citizen of Perl after ten years.&nbsp; Moose!</tt>rodi2006-09-14T16:56:39+00:00perl6A Citizen of Perl (or, In Praise of Audrey T)http://use.perl.org/~rodi/journal/30985?from=rss
<p>I confess that I am, and have long been, a Perl resident alien. I have used Perl 3, 4 and 5 professionally for over a decade, beginning in tech support in Seattle, ending in application development in DC. But I have done so without ever becoming a citizen of Perl. I have never released anything on CPAN or participated in mailing lists and IRC. I have not written in a use.perl.org journal, and I have not attended a YAPC. I have just hacked away Perl in solitude, even when part of a development team.</p><p>But back in July, that all changed.</p><p>"I wonder," I thought, "how the various Perl 6 projects are coming along?"</p><p>So I svn'ed myself a copy of parrot and pugs (this was before #perl6 people converted me to SVK), and proceeded to build.</p><p>I built parrot first- though I ended up falling back to the tarball, never getting my bleeding edge checkout to compile all the way through.</p><p>Then I built Pugs. Ah, beautiful Pugs.</p><p>I think it was about ten seconds later that I was pasting some code from one of the Synopses into Pugs.</p><p>Lo and behold! It didn't work.</p><p>Not easily discouraged, I logged on to #perl6, and asked if I was doing something wrong.</p><p>Within ten minutes, I had a commit bit. If you have one, you know how easy this is to get, but if you don't you probably think it's a pretty big honor, like I did at the time.</p><p>Within a week, I had written several tests and updated several more test files.</p><p>Within a month, I had written my first Perl 6 script (ext/ca_wolfram.pl, if you have a Pugs repository handy).</p><p>Within two months, I had made small contributions to Pugs itself (added sprintf("%b",... to Prelude.pm, changed meta to META in Pugs.Prim, etc.).</p><p>I even asked a question on perl6-language.</p><p>And Larry-Frikkin-Wall-Himself actually responded. Larry Wall! To me!</p><p>Just this week, I have added Automata::Cellular version 0.1 to the Pugs repository.</p><p>And today... today I am writing a use.perl.org journal.</p><p>How did this all happen? Why the sudden change?</p><p>Well, I logged on to #perl6, and asked my question. In retrospect, it was kind of a dumb question, and I probably didn't ask it as nicely as I might have. But instead of being met with ridicule, silence, or any other unwelcoming derision, I was summarily informed that I had found an unimplemented feature.</p><p>Audrey then asked me for my email address, which I gave her.</p><p>She sent me a commit bit, told me to add myself to AUTHORS (what?!), and to then submit a test.</p><p>And now, on this day, I find myself a citizen of Perl. May there always, and forever be, more than one way to do it.</p>rodi2006-09-13T18:53:26+00:00perl6