<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>blogs.perl.org</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/" />
    <link rel="self" type="application/atom+xml" href="http://blogs.perl.org/atom.xml" />
    <id>tag:blogs.perl.org,2009-10-07://1</id>
    <updated></updated>
    <subtitle>There&apos;s more than one way to blog it.</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 4.38</generator>

<entry>
    <title>amber smalltalk web site creation javascript abstraction fun! FREE</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/likewilt/2013/06/6-free-books-on-forth.html" />
    <id>tag:blogs.perl.org,2013:/users/likewilt//1983.4806</id>

    <published>2013-06-20T00:49:16Z</published>
    <updated>2013-06-20T00:54:43Z</updated>

    <summary>http://amber-lang.net/...</summary>
    <author>
        <name>likewilt</name>
        <uri>http://www.enidpublicschools.org/education/components/scrapbook/default.php?sectionid=1</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/likewilt/">
        <![CDATA[<p>http://amber-lang.net/</p>]]>
        
    </content>
</entry>

<entry>
    <title>Wirth&apos;s law</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/likewilt/2013/06/wirths-law.html" />
    <id>tag:blogs.perl.org,2013:/users/likewilt//1983.4805</id>

    <published>2013-06-20T00:28:34Z</published>
    <updated>2013-06-20T00:28:48Z</updated>

    <summary>Wirth&apos;s law is a computing adage made popular by Niklaus Wirth in 1995.[1][2] It states that &quot;software is getting slower more rapidly than hardware becomes faster.&quot;...</summary>
    <author>
        <name>likewilt</name>
        <uri>http://www.enidpublicschools.org/education/components/scrapbook/default.php?sectionid=1</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/likewilt/">
        <![CDATA[<p>Wirth's law is a computing adage made popular by Niklaus Wirth in 1995.[1][2] It states that "software is getting slower more rapidly than hardware becomes faster."</p>]]>
        
    </content>
</entry>

<entry>
    <title>El Diablo Blanco on getbig and speaking your mind and taking a stand and why survivor stinks</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/likewilt/2013/06/el-diablo-blanco-on-getbig-and-speaking-your-mind-and-taking-a-stand-and-why-survivor-stinks.html" />
    <id>tag:blogs.perl.org,2013:/users/likewilt//1983.4804</id>

    <published>2013-06-20T00:26:36Z</published>
    <updated>2013-06-20T00:27:19Z</updated>

    <summary>http://www.getbig.com/boards/index.php?topic=482444.0...</summary>
    <author>
        <name>likewilt</name>
        <uri>http://www.enidpublicschools.org/education/components/scrapbook/default.php?sectionid=1</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/likewilt/">
        <![CDATA[<p>http://www.getbig.com/boards/index.php?topic=482444.0</p>]]>
        
    </content>
</entry>

<entry>
    <title>some ada aws web opinions using ada and postgresql</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/likewilt/2013/06/some-ada-aws-web-opinions-using-ada-and-postgresql.html" />
    <id>tag:blogs.perl.org,2013:/users/likewilt//1983.4803</id>

    <published>2013-06-20T00:14:58Z</published>
    <updated>2013-06-20T00:16:52Z</updated>

    <summary>https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.ada/esCZvxbYBfY...</summary>
    <author>
        <name>likewilt</name>
        <uri>http://www.enidpublicschools.org/education/components/scrapbook/default.php?sectionid=1</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/likewilt/">
        <![CDATA[<p>https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.ada/esCZvxbYBfY</p>]]>
        
    </content>
</entry>

<entry>
    <title>squatting on continuity hmmm</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/likewilt/2013/06/squatting-on-continuity-hmmm.html" />
    <id>tag:blogs.perl.org,2013:/users/likewilt//1983.4802</id>

    <published>2013-06-20T00:05:22Z</published>
    <updated>2013-06-20T00:06:21Z</updated>

    <summary>looks like this could be awesome https://metacpan.org/module/BEPPU/Squatting-0.81/lib/Squatting/On/Continuity.pm...</summary>
    <author>
        <name>likewilt</name>
        <uri>http://www.enidpublicschools.org/education/components/scrapbook/default.php?sectionid=1</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/likewilt/">
        <![CDATA[<p>looks like this could be awesome</p>

<p>https://metacpan.org/module/BEPPU/Squatting-0.81/lib/Squatting/On/Continuity.pm</p>]]>
        
    </content>
</entry>

<entry>
    <title>le bron is cheat NBA letting him win 2013 title</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/likewilt/2013/06/le-bron-is-cheat-nba-letting-him-win-2013-title.html" />
    <id>tag:blogs.perl.org,2013:/users/likewilt//1983.4801</id>

    <published>2013-06-20T00:03:03Z</published>
    <updated>2013-06-20T00:04:17Z</updated>

    <summary>ginolbi hacked in last play no call and what was up with clock at 00:37? ton of action and clock stopped at liek 00:20 ? left liek game shoulda been over or someone didnt turn on clock...</summary>
    <author>
        <name>likewilt</name>
        <uri>http://www.enidpublicschools.org/education/components/scrapbook/default.php?sectionid=1</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/likewilt/">
        <![CDATA[<p>ginolbi hacked in last play</p>

<p>no call</p>

<p>and what was up with clock at 00:37?</p>

<p>ton of action and clock stopped at liek 00:20 ? left liek game shoulda been over or someone didnt turn on clock</p>]]>
        
    </content>
</entry>

<entry>
    <title>Being nice to colleagues with git pre-commit hooks</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/ovid/2013/06/being-nice-to-colleagues-with-git-pre-commit-hooks.html" />
    <id>tag:blogs.perl.org,2013:/users/ovid//11.4800</id>

    <published>2013-06-19T13:25:25Z</published>
    <updated>2013-06-19T13:46:04Z</updated>

    <summary>For my current contract I&apos;m doing a huge amount of testing on a system that is very fun to hack on. I&apos;ve also been given a lot of rope leeway in how I test. Thus, I use Test::Most quite heavily,...</summary>
    <author>
        <name>Ovid</name>
        <uri>http://www.overseas-exile.com/</uri>
    </author>
    
    <category term="git" label="git" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="testing" label="testing" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/ovid/">
        <![CDATA[<p>For my current contract I'm doing a huge amount of testing on a system that is very fun to hack on. I've also been given a lot of <strike>rope</strike> leeway in how I test. Thus, I use <a href="http://search.cpan.org/dist/Test-Most/">Test::Most</a> quite heavily, but I've a tiny problem:</p>

<pre><code>use Test::Most 'die';
</code></pre>

<p>That <em>should</em> halt the test file at first failure, a feature I use quite a bit when developing to ensure that test failures don't scroll past when I'm actively hacking on code. However, when I added subtests to <code>Test::Builder</code> a few years ago, I made sure that a fatal failure in a subtest would cause the subtest to fail, but not the entire test program. Well, darn. That means <code>use Test::Most 'die'</code> doesn't quite do what I want it to do in this case.</p>

<p>Being pragmatic, I did the simplest thing which can possibly work. I used the testing equivalent of weapons of mass destruction:</p>

<pre><code>use Test::Most 'bail';
</code></pre>

<p>Thus, <em>any</em> test failure will cause the test <strong>suite</strong> to bail out, immediately, no questions asked! I don't mind this behavior at all when I'm hacking on a single test program, but I don't want to commit that, so I must remember to remove that before I commit.</p>

<p>Well, of course I committed that; the more manual steps you make anyone take, the more likely they are to forget one. Time to make sure I don't do that again.</p>
]]>
        <![CDATA[<p>One of the lovely features of <code>git</code> is how easy it is to modify its behavior at various stages. In this case, I didn't want to commit my 'bail' hack, so I wrote the following and saved it as <code>.git/hooks/pre-commit</code>:</p>

<pre><code>#!/bin/bash

RESULT=$(git grep -l 'Test::Most.*bail' t | wc -l)
if [ $RESULT -ne 0 ]; then
    echo -e "\e[01;31m$0 failed. Cannot commit:\e[0m" &gt;&amp;2
    git grep 'Test::Most.*bail' t
    exit 1
fi
exit 0
</code></pre>

<p>For this tiny hack, I check to see if I've committed my nuclear option and if I have, I get output similar to this:</p>

<pre><code>$ git commit
.git/hooks/pre-commit failed. Cannot commit:
t/import/merger.t:use Test::Most 'bail';
t/import/parser_errors.t:use Test::Most 'bail';
</code></pre>

<p>I knew about <code>parser_errors.t</code> having 'bail' because I added that for testing my pre-commit hook, but I <em>didn't</em> know that <code>merger.t</code> had the same problem!</p>

<p>I'm sure my colleagues would have been most unhappy had I merged this to integration.</p>

<p>Next up is stopping myself from committing <code>$DB::single = 1;</code>.</p>
]]>
    </content>
</entry>

<entry>
    <title>MVC - A Personal History</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/jim_schueler/2013/06/mvc---a-personal-history.html" />
    <id>tag:blogs.perl.org,2013:/users/jim_schueler//1963.4799</id>

    <published>2013-06-19T00:36:00Z</published>
    <updated>2013-06-19T01:52:23Z</updated>

    <summary>I shared this story with a potential employer a couple weeks ago, who apparently was unimpressed. Notwithstanding, it&apos;s all true. Literary criticism might be the next best step. In 2001, Arthur Andersen Business Consulting went out of business. And I...</summary>
    <author>
        <name>Jim Schueler</name>
        <uri>http://pl2sql.tqis.com/</uri>
    </author>
    
    <category term="webdevelopermvc" label="web developer MVC" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/jim_schueler/">
        <![CDATA[<p><em>I shared this story with a potential employer a couple weeks ago, who apparently was unimpressed.  Notwithstanding, it's all true.  Literary criticism might be the next best step.</em></p>

<p>In 2001, Arthur Andersen Business Consulting went out of business.  And I lost the best job I ever had.  Clearly Enron was a significant factor, but importantly, AABC ran out of money to fund their war with Andersen Consulting/Accenture.  Almost immediately, I was contacted by a friend/colleague, Jeff:  He was launching a startup and needed an IT Director.  Essentially, my job was to develop the technology his company would resell.</p>

<p>My salary lasted as long as it took to set up a web server.  Jeff was an instinctive entrepeneur.  After receiving so many inquiries from web developers, he redefined his business model.  He bought a nice suit, leased an expensive car, wiggled his way into the right offices, and got contracts to build websites.  Then he resold those contracts and pocketed a 80-90% profit.  In those days, a web developer was anyone who owned a copy of Dreamweaver.  And everyone expected to become a millionaire: Web pages cost $50-$100 apiece.  Revisions were similarly priced.  Developers expected $25,000 to build out a retail website with 500 products.  And revisions usually doubled the quoted contract.   After a couple years, the business model was becoming unsustainable.</p>

<p>There were already lots of database backed CMS's, I'd homebrewed one myself.  The economy was shit, I had a sick kid, and I managed to convince Jeff to rehire me and put me in charge of production.  Afterwards, designers only got paid for designing (crazy huh?) instead of charging $60-$80 per hour for cutting and pasting content.  But the resulting collaboration platform had to accomodate quite bit of hostility.</p>

<p>A few years after this startup failed trying to float too many juggling balls, I came accross the term MVC, and it immediately resonated- because I understood the challenge of a collaboration between designers (now called UI specialists), content aggregators, and programmers, each satisfying perfectly arbitrary requirements.  Morever, the nature of the web-interface product sets very high expectations for malleability.  In practice, a change request should only go to one of the 3 teams without affecting the other two.</p>

<p>I rolled my solution out 8 years ago, and still host a dozen or so legacy implementations.<br />
Now I'm basically out of the website business.  But as time allows, I'm applying new technologies to accomodate this fundamental objective that still seems relevant.</p>

<p>Am I the only skeptic?  Any solution can be arbitrarily defined in terms of three haphazardly assigned designations- a fact not lost on marketers and hypesters.  I'd prefer to convince potential employers that MVC is an objective and philosophy that needs to be applied in practice, not just a bullet point on a spec sheet.</p>

<p>Any other thoughts?<br />
</p>]]>
        
    </content>
</entry>

<entry>
    <title>First inchstone.</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/pawel_murias/2013/06/first-inchstone.html" />
    <id>tag:blogs.perl.org,2013:/users/pawel_murias//1978.4795</id>

    <published>2013-06-17T20:01:50Z</published>
    <updated>2013-06-17T20:11:39Z</updated>

    <summary>I have started hacking on my GSoC project to create a JavaScript backend for NQP (a Perl 6 dialect), which will be grown into a full one for Rakudo in the future. Today I have unbitrotted the existing code at...</summary>
    <author>
        <name>Paweł Murias</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/pawel_murias/">
        <![CDATA[<p>I have started hacking on my GSoC project to create a JavaScript backend for NQP (a Perl 6 dialect), which will be grown into a full one for Rakudo in the future.<br />
Today I have unbitrotted the existing code at https://github.com/pmurias/rakudo-js by handling QAST::Var's with decl set to "static" (variables that don't change at runtime) the same as ones with "var" (normal ones). As such I have completed the first of 15 inchstones ;)</p>]]>
        
    </content>
</entry>

<entry>
    <title>Unicode is 20++ years old and still a problem</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/helmut_wollmersdorfer/2013/06/unicode-is-20-years-old-and-still-a-problem.html" />
    <id>tag:blogs.perl.org,2013:/users/helmut_wollmersdorfer//1969.4793</id>

    <published>2013-06-17T17:16:24Z</published>
    <updated>2013-06-17T17:33:49Z</updated>

    <summary>Just did a quick hack to read out product data from an old shop site and import it into a new one: - wget -r - File::Find - Mojo::Dom for parsing - Text::CSV::Slurp for the result After 11 minutes running...</summary>
    <author>
        <name>Helmut Wollmersdorfer</name>
        
    </author>
    
    <category term="perl" label="Perl" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="unicode" label="Unicode" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/helmut_wollmersdorfer/">
        <![CDATA[<p>Just did a quick hack to read out product data from an old shop site and import it into a new one:</p>

<p>- wget -r<br />
- File::Find<br />
- Mojo::Dom for parsing<br />
- Text::CSV::Slurp for the result</p>

<p>After 11 minutes running for 14 K pages I experienced the bad surprise:</p>

<p>One file had non-ASCII characters in its name and File::Find does not use char-mode. I forgot about this. Text::CSV::Slurp crashed.</p>

<p>Why the hell are there so many CPAN modules still ignoring Unicode?</p>]]>
        
    </content>
</entry>

<entry>
    <title>Marpa v. Parse::RecDescent: a rematch  </title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/jeffrey_kegler/2013/06/marpa-v-parserecdescent-a-rematch.html" />
    <id>tag:blogs.perl.org,2013:/users/jeffrey_kegler//63.4794</id>

    <published>2013-06-17T14:15:58Z</published>
    <updated>2013-06-17T14:21:49Z</updated>

    <summary> [ This is cross-posted from the Ocean of Awareness blog. ] The application In a recent post, I looked at an unusual language which serializes arrays and strings, using a mixture of counts and parentheses. Here is an example: A2(A2(S3(Hey)S13(Hello, World!))S5(Ciao!)) The language is of special interest for comparison against recursive descent because, while simple, it requires procedural parsing -- a purely declarative BNF approach will not work. So it&apos;s a chance to find out if Marpa can play the game that is recursive descent&apos;s specialty. The previous post focused on how to use Marpa to mix procedural and declarative parsing together smoothly, from a coding point of view. It only hinted at another aspect: speed. Over the last year, Marpa has greatly improved its speed for this kind of application. The latest release of Marpa::R2 now clocks in almost 100 times faster than Parse::RecDescent for long inputs. The benchmark LengthSeconds Marpa::R2 Marpa::XS Parse::RecDescent 1000 1.569 2.938 13.616 2000 2.746 7.067 62.083 3000 3.935 13.953 132.549 10000 12.270 121.654 1373.171 Parse::RecDescent is pure Perl, while Marpa is based on a parse engine in a library written in hand-optimized C. You&apos;d expect Marpa to win this race and it did....</summary>
    <author>
        <name>Jeffrey Kegler</name>
        <uri>http://www.jeffreykegler.com</uri>
    </author>
    
    <category term="marpa" label="Marpa" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="parser" label="parser" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="parsing" label="parsing" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/jeffrey_kegler/">
        <![CDATA[<p> [ This is <a href="http://jeffreykegler.github.io/Ocean-of-Awareness-blog/individual/2013/06/vs-prd-round-2.html">cross-posted from the Ocean of Awareness blog</a>. ]
<h3>The application</h3>
<p>
      In
      <a href="http://jeffreykegler.github.io/Ocean-of-Awareness-blog/individual/2013/06/mixing-procedural.html">
      a recent post</a>,
      I looked at an unusual language which serializes arrays and strings,
      using a mixture of counts and parentheses.  Here is an example:
    </p>
<blockquote><pre>
A2(A2(S3(Hey)S13(Hello, World!))S5(Ciao!))
</pre></blockquote>
    <p>
      The language is of special interest for comparison
      against recursive descent
      because, while simple, it requires procedural
      parsing -- a purely declarative BNF approach will not work.
      So it's a chance to find out if Marpa can play the game that is recursive descent's
      specialty.
      </p>
      <p>
      <a href="http://jeffreykegler.github.io/Ocean-of-Awareness-blog/individual/2013/06/mixing-procedural.html">
      The previous post</a>
      focused on how to use Marpa to mix
      procedural and declarative parsing together smoothly,
      from a coding point of view.
      It only hinted at another aspect: speed.
    Over the last year, Marpa has greatly improved its speed for this kind of application.
      The latest release of Marpa::R2 now clocks in almost 100 times faster than Parse::RecDescent for long inputs.
    </p>
    <h3>The benchmark</h3>
    <table align="center" cellpadding="5" border="1" width="100%">
      <tbody><tr><th rowspan="2">Length</th><th colspan="3">Seconds</th></tr>
        <tr>
          <th>Marpa::R2</th>
          <th>Marpa::XS</th>
          <th>Parse::RecDescent
          </th></tr>
        <tr><td>1000
          </td><td align="center">1.569
          </td><td align="center">2.938
          </td><td align="center">13.616
          </td></tr>
        <tr><td>2000
          </td><td align="center">2.746
          </td><td align="center">7.067
          </td><td align="center">62.083
          </td></tr>
        <tr><td>3000
          </td><td align="center">3.935
          </td><td align="center">13.953
          </td><td align="center">132.549
          </td></tr>
        <tr>
          <td>10000
          </td><td align="center">12.270
          </td><td align="center">121.654
          </td><td align="center">1373.171
          </td></tr>
      </tbody></table>
    <p>Parse::RecDescent is pure Perl, while Marpa is based on a parse
      engine in a library written in
      hand-optimized C.
      You'd expect Marpa to win this race and it did.
    </p>
    <p>
      And it is nice to see that the changes from Marpa::XS to Marpa::R2 have paid off.
      Included in the table are the Marpa numbers from my
      2012 benchmark of Marpa::XS.
      Marpa::R2 has a new interface
      and an internal lexer,
      and now beats Marpa::XS by a factor of up to 10.
      </p>
      <p>
      While the benchmarked language is ideally suited to show recursive descent to
      advantage, the input lengths were picked to emphasize Marpa's strengths.
      Marpa optimizes by doing a lot of precomputation,
      and is written with long inputs in mind.
      Though these days, a 500K source,
      longer than the longest tested, would not exactly set a new industry record.
    </p>
    <h3>To learn more</h3>
    <p>
      There are fuller descriptions of the language in
      <a href="http://blogs.perl.org/users/polettix/2012/04/parserecdescent-and-number-of-elements-read-on-the-fly.html">
        Flavio's post and code</a>,
      <a href="http://jeffreykegler.github.io/Ocean-of-Awareness-blog/individual/2013/06/mixing-procedural.html">
      and my recent post on how to write a parser for this language</a>.
      I talk more about the benchmark's methodology in
      <a href="http://jeffreykegler.github.io/Ocean-of-Awareness-blog/individual/2012/04/marpa-v-parserecdescent-some-numbers.html">
      my post on the 2012 benchmark</a>.
    </p>
    <p>
      <a href="https://metacpan.org/module/Marpa::R2">Marpa::R2
        is available on CPAN</a>.
      A list of my Marpa tutorials can be found
      <a href="http://jeffreykegler.github.io/Ocean-of-Awareness-blog/metapages/annotated.html#TUTORIAL">
        here</a>.
      There is
      <a href="http://marpa-guide.github.io/chapter1.html">
        a new tutorial by Peter Stuifzand</a>.
      <a href="http://jeffreykegler.github.com/Ocean-of-Awareness-blog/">
        The Ocean of Awareness blog</a>
      focuses on Marpa,
      and it has
      <a href="http://jeffreykegler.github.io/Ocean-of-Awareness-blog/metapages/annotated.html">an annotated guide</a>.
      Marpa also has
      <a href="http://jeffreykegler.github.com/Marpa-web-site/">a web page</a>.
      For questions, support and discussion, there is a
      Google Group:
      <code>marpa-parser@googlegroups.com</code>.
      Comments on this post can be made there.
    </p>]]>
        
    </content>
</entry>

<entry>
    <title>Post Every Day</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/jt_smith/2013/06/post-every-day.html" />
    <id>tag:blogs.perl.org,2013:/users/jt_smith//242.4792</id>

    <published>2013-06-17T12:00:04Z</published>
    <updated>2013-06-17T12:00:04Z</updated>

    <summary>A couple years ago I ran a conference called YAPC, and I challenged myself to write a blog post every single day for a year about that conference. It annoyed a few people, but it taught me a valuable lesson...</summary>
    <author>
        <name>JT Smith</name>
        <uri>http://www.plainblack.com/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/jt_smith/">
        <![CDATA[<p>A couple years ago I ran a conference called <a href="http://www.yapcna.org">YAPC</a>, and I challenged myself to write a blog post every single day for a year about that conference. It annoyed a few people, but it taught me a valuable lesson about marketing&#8230;that daily touch point is important. If you run a blog, a Facebook page, or a Twitter account, you should attempt to post something to it every day. It makes it more interesting for the people that follow you. It keeps them coming back. And if you&#8217;re super busy like me, feel free to queue up some posts so that you don&#8217;t have to actually be there every day. </p>

         <p>[From <a href="http://plainblackguy.tumblr.com">my blog</a>.]</p>

    ]]>
        
    </content>
</entry>

<entry>
    <title>Perl 5 Porters Weekly: June 10-16, 2013</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/perl_5_porters_summaries/2013/06/perl-5-porters-weekly-june-10-16-2013.html" />
    <id>tag:blogs.perl.org,2013:/users/perl_5_porters_summaries//1504.4791</id>

    <published>2013-06-17T07:33:59Z</published>
    <updated>2013-06-17T07:35:32Z</updated>

    <summary>Welcome to Perl 5 Porters Weekly, a summary of the email traffic of the perl5-porters email list. Topics this week include: [PATCH] use dots - allow &apos;.&apos; instead of &apos;-&gt;&apos; everywhere and concat with &apos;~&apos; NWCLARK TPF grant April report...</summary>
    <author>
        <name>Perl 5 Porters Summaries</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/perl_5_porters_summaries/">
        <![CDATA[<p>Welcome to Perl 5 Porters Weekly, a summary of the email traffic of the
perl5-porters email list.</p>

<p>Topics this week include:</p>

<ul>
<li>[PATCH] use dots - allow '.' instead of '->' everywhere and concat with '~'</li>
<li>NWCLARK TPF grant April report</li>
<li>I made t/podcheck.t less sensitive and fixed various pod issues</li>
<li>perl needs safer implicit close</li>
<li>An observation: Short- vs. long-term benefits</li>
<li>[PATCH] Add an API to attach a signature string to a CV</li>
<li>Perl experiments</li>
</ul>
]]>
        <![CDATA[<p><strong>[PATCH] use dots - allow '.' instead of '->' everywhere and concat with '~'</strong></p>

<p>During his lightning talk on the last day at YAPC, Chip Salzenburg mentioned he'd
just finished a patch to use dots instead of the arrow for method dispatch and 
hash traversal.  The <a href="http://www.nntp.perl.org/group/perl.perl5.porters/2013/06/msg202840.html">patch</a> was formally submitted the P5P just after I had
finished posting my summary.  Throughout the week a lively and opinionated
discussion about the patch occurred until Ricardo made the call on Friday night
about whether to ship this or not.  <a href="http://www.nntp.perl.org/group/perl.perl5.porters/2013/06/msg203116.html">He wrote</a>:</p>

<blockquote>
  <p>Initially, I said I was leaning toward applying this because of popular
acclaim.  It would have been more accurate to say that I wanted to avoid a lot
of angry email.  I don't want to make decisions based on fear, because then
whoever screams loudest wins.</p>

<p>I don't think dots.pm would be good for perl, and am not going to ship it in
5.20.</p>
</blockquote>

<p>Stevan Little spoke for many when he tweeted:</p>

<blockquote class="twitter-tweet"><p>.<a href="https://twitter.com/OvidPerl">@OvidPerl</a> and as much as I would have loved to see it, I know that <a href="https://twitter.com/rjbs">@rjbs</a>++ is right <a href="https://twitter.com/search?q=%23sometimesamansgottadowhatamansgottado&amp;src=hash">#sometimesamansgottadowhatamansgottado</a></p>&mdash; Stevan Little (@stevanlittle) <a href="https://twitter.com/stevanlittle/statuses/345619037394460673">June 14, 2013</a></blockquote>

<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

<p><a href="http://www.nntp.perl.org/group/perl.perl5.porters/2013/06/msg202840.html">Read the whole thread</a></p>

<p><strong>NWCLARK TPF grant April report</strong></p>

<p>Nicholas Clark filed his TPF grant report for April; a great read to keep up with
the vital things the grant pays for.</p>

<p><a href="http://www.nntp.perl.org/group/perl.perl5.porters/2013/06/msg202877.html">Read the report</a></p>

<p><strong>I made t/podcheck.t less sensitive and fixed various pod issues</strong></p>

<p>There's been a long-running mostly civil exchange about a commit
made a few weeks ago about a pod check test. RJBS stepped in and <a href="http://www.nntp.perl.org/group/perl.perl5.porters/2013/06/msg202942.html">wrote
in part</a>:</p>

<blockquote>
  <p>I feel like this situation is flying (with excruciating slowness) off the
handle.</p>

<p>[...]</p>

<p>[P]ushing a change like this, when there is probably going to be some
disseent, especially from those who have already done
work on the code, is going to have a cost in morale.</p>

<p>[...]</p>

<p>I believe the solution to "too much petty bickering" is "better
discussions," not preemptive commits.  The latter leads to bad feelings and
edit wars, not a culture of teamwork and peer review.</p>
</blockquote>

<p><a href="http://www.nntp.perl.org/group/perl.perl5.porters/2013/05/msg202132.html">Read the thread</a></p>

<p><strong>perl needs safer implicit close</strong></p>

<p>One of the things Ricardo Signes mentioned in his YAPC talk "Postcards from the Edge"
was that he wanted to see Perl gain a safer implicit close in 5.20.  This week
he posted a message to that effect on the P5P list.</p>

<p><a href="http://www.nntp.perl.org/group/perl.perl5.porters/2013/06/msg202962.html">Read the thread</a></p>

<p><strong>An observation: Short- vs. long-term benefits</strong></p>

<p>Steffen Mueller posted a short note about some of the criticism on the 
"." vs "->" patch because some of the reactions were that a change like
this has no short term benefit to the language.</p>

<p><a href="http://www.nntp.perl.org/group/perl.perl5.porters/2013/06/msg203057.html">Read the message</a></p>

<p><strong>[PATCH] Add an API to attach a signature string to a CV</strong></p>

<p>Peter Martini asked the P5P list to review his patch to the magic API.</p>

<p><a href="http://www.nntp.perl.org/group/perl.perl5.porters/2013/06/msg203111.html">Read the thread</a></p>

<p><strong>Perl experiments</strong></p>

<p>RJBS has been posting all of the experiments. Here's a collection of the
messages:</p>

<ul>
<li><a href="http://www.nntp.perl.org/group/perl.perl5.porters/2013/06/msg203131.html">experimental: backtracking control verbs</a></li>
<li><a href="http://www.nntp.perl.org/group/perl.perl5.porters/2013/06/msg203129.html">experimental: (?{...}) and (??{...})</a></li>
<li><a href="http://www.nntp.perl.org/group/perl.perl5.porters/2013/06/msg203128.html">experimental: lvalue subroutines</a></li>
<li><a href="http://www.nntp.perl.org/group/perl.perl5.porters/2013/06/msg203089.html">experimental: the :pop and :win32 pseudolayers</a></li>
<li><a href="http://www.nntp.perl.org/group/perl.perl5.porters/2013/06/msg203084.html">experimental: "our $attribute :unique"</a></li>
<li><a href="http://www.nntp.perl.org/group/perl.perl5.porters/2013/06/msg203082.html">experimental: "long doubles still don't work on solaris" ???</a></li>
</ul>
]]>
    </content>
</entry>

<entry>
    <title>SelfLoader and things I&apos;ve learned writing/using a debugger</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/rockyb/2013/06/selfloader-and-things-ive-learned-writingusing-a-debugger.html" />
    <id>tag:blogs.perl.org,2013:/users/rockyb//1443.4790</id>

    <published>2013-06-17T05:30:51Z</published>
    <updated>2013-06-19T12:08:12Z</updated>

    <summary></summary>
    <author>
        <name>rockyb</name>
        
    </author>
    
    <category term="selloaderbegindebuggerdeveltrepan" label="SelLoader BEGIN debugger Devel::Trepan" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/rockyb/">
        

        <![CDATA[<h2>A Subtly that become Readily Apparent Using a Debugger</h2>

<p>In both using and writing a debugger one can learn some unexpected and subtle things about the a programming language. And these can have some subtle effects.</p>

<p>Consider this Perl program:</p>

<pre><code>sub five() { return 5; };
print five(), "\n";
</code></pre>

<p>It's not so different from the corresponding Ruby program:</p>

<pre><code>def five(); return 5; end
print five(), "\n";
</code></pre>

<p>Or the corresponding Python program for matter:</p>

<pre><code>def five(): return 5;
print five();
</code></pre>

<p><em>Note: I have modified the programs to be perhaps a little less idiomatic with respect punctuation, parenthesis, semicolons and even the "print" statement used in each language to emphasize how similar each really is.</em></p>

<p>If you run each in a debugger for each language and you'll
immediately see a difference between Perl versus Ruby and Python.</p>

<p>In Perl, the first line you stop at is the second line with "print" in
it. In Ruby and Python you stop at the <em>first</em> line. Why?</p>

<p>In Python and Ruby, functions add themselves at run time. So in Ruby
and Python when you are stopped at that first line, the function
<em>five()</em> hasn't been defined yet. In Perl, we say that the function is
registered at "compile time". What are the implications?</p>

<p>Well here's one mistake I used to make before understanding this. I
like to have demo code at the bottom of my modules. And one way to do
this is:</p>

<pre><code>package MyModule
...

unless (caller()) {
   # demo code section.
}
1; # to make require/use happy
</code></pre>

<p>Inside the demo code section, I might want to have some helper
functions. For example I sometimes want to turn the response of a
function into a nice string I can print, perhaps booleans to "yep" and
"nope". When the program is loaded as a module, I don't need these functions.</p>

<p>When I was learning Perl, I used to write:</p>

<pre><code>...
unless (caller()) {
   # demo code section.
   sub ack { $_[0] ? 'yep' : 'nope' };
   ... ack(MyModule::does_this()) ...
}
</code></pre>

<p>Thinking that by putting that <em>sub</em> inside the <em>if</em>, it would only get
define when I was demoing the code like it would if this were Python
or Ruby. Nope. That function is defined regardless. In Perl, the way
one would get a the function conditionally defined would be to <em>eval</em> it:</p>

<pre><code>unless (caller()) {
   eval "sub ack { $_[0] ? 'yep' : 'nope' } ";
   ...
</code></pre>

<p>And if you are writing and using a debugger for one of these languages
it is significant in another way. Going back to the <em>five()</em>
example. Suppose I'm stopped at the beginning of the program, say the
stock python debugger, <em>pdb</em>, &mdash; but it is true for other other Python
debugger as well. If I try to run <em>five()</em>, I'll get a <code>NameError</code> saying
that 'five' is not defined. Because it isn't yet! Step over that line
and low and behold one can then call that function in Python or Ruby.</p>

<p>Now both Ruby and Python <em>do</em> distinguish compile time from run
time. If you have a syntax error in your program, that will be noticed
at "compile" time in all 3 languages. What's different is exactly what
things are normally done at compile time and what's normally done at
run time. Ruby tends to do things later than both Python and Perl
here.</p>

<p>But is the separation between compile and run time really all that
distinct in Perl? Well..., no.</p>

<p>First we've seen that I can run <em>eval()</em> to delay until run time
something that would otherwise happen at compile time. But it works
the other way around too: one can also run arbitrary Perl code at
"compile" time! That's what's done inside <em>BEGIN</em> blocks.</p>

<p><a href="http://perldoc.perl.org/functions/use.html">Perl's <em>use</em></a>  command is exactly equivalent to:</p>

<pre><code> BEGIN { require Module; Module-&gt;import( LIST ); }
</code></pre>

<h2>SelfLoader</h2>

<p>With the above explanation out of the way, let me come back to a
problem I had. I was debugging a Perl version of GNU Readline called
<a href="https://metacpan.org/module/Term::ReadLine::Perl5">Term::ReadLine::Perl5 </a> the other day. It uses <a href="http://perldoc.perl.org/SelfLoader.html">SelfLoader</a>.</p>

<p><em>SelfLoader</em> allows subroutines to get loaded at run time. This I guess
trades off possibly a little bit of space if the routine isn't used at
the expense of extra loading time at run time when the routine <em>does</em>
get loaded. Perhaps this was useful in the days of your when memory
was much more constrained in the days when DOS had a maximum of 64K
without a memory extender installed. If this sounds like mumbo jumbo,
well it was kind of silly. The point is nowadays, I don't really know
that is that beneficial, but I'd be interested to hear of situations
where it is useful.</p>

<p>The important thing about <em>SelfLoader</em> and debuggers is that since there
is an eval that happens at run-time to insert subroutines, most
debuggers can't show you were you are when you trace into one of these
routines. With the recent release 0.49 of <a href="https://metacpan.org/module/Devel::Trepan">Devel::Trepan</a>, I've now
fixed that.</p>

<p>And in doing so I learned another trick which was the point of this
blog.</p>

<p>I was trying to figure out how to slighly modify the behavior of
<em>SelfLoade</em>r, and came across the following trick: if one inserts a code
reference into the <em>@INC</em> array, that code will get called when looking
for an unloaded module in either a via <em>use</em> or <em>require</em>. And when
running a debugger at the outset, the debugger often gets loaded in first!
See my <a href="http://www.perlmonks.org/?node_id=1037710">perlmonks query</a> for my musings on this problem.</p>

<p>I don't do this yet, but this also allows me the possibility of tracing <em>use</em> statements that get called which I've also always wanted.</p>

<p>For a simple hook that will show you how to trace <em>use</em> statements, try this:</p>

<pre><code>BEGIN {
    unshift @INC, \&amp;use_hook;
};

sub use_hook {
    my ($coderef, $filename) = @_; # $coderef is \&amp;use_hook
    print "Looking for use of", $filename, "\n";
    # caller() can be used to find out who needs $filename

    # I don't want the standard SelfLoader.pm
    if ($filename eq 'SelfLoader.pm') {
        # pull in my replacement of SelfLoader
    }
}
</code></pre>
]]>
    </content>
</entry>

<entry>
    <title>A decade in CPAN toolchain</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/aristotle/2013/06/toolchain-decade.html" />
    <id>tag:blogs.perl.org,2013:/users/aristotle//15.4789</id>

    <published>2013-06-16T15:28:51Z</published>
    <updated>2013-06-16T23:45:12Z</updated>

    <summary>Dave Cross: I’m not going to object to Module::Build leaving the core. I’m sure there are good reasons, I just wish I knew what they are. I am, however, slightly disappointed to find that Schwern was wrong ten years ago...</summary>
    <author>
        <name>Aristotle</name>
        <uri>http://plasmasturm.org/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/aristotle/">
        <![CDATA[<p><cite><a href="http://perlhacks.com/2013/06/removing-modules-from-core/" title="Removing Modules from Core">Dave Cross</a></cite>:</p>

<blockquote cite="http://perlhacks.com/2013/06/removing-modules-from-core/"><p>I’m not going to object to Module::Build leaving the core. I’m sure there are good reasons, I just wish I knew what they are. I am, however, slightly disappointed to find that Schwern was wrong ten years ago and that ExtUtils::MakeMaker wasn’t doomed.</p></blockquote>

<p>Schwern <em>wasn’t</em> wrong and MakeMaker <em>remains</em> doomed all these years later. It’s still around only because there hasn’t been anything to take its place. Module::Build looked like it was going to be that usurper – but didn’t work out.</p>

<p>Note that the reason that, between EUMM and M::B, M::B is the one leaving the core, is that EUMM is necessary to build the core and M::B is not. The reason for that is that no one bothered to port the existing MakeMaker-dependent infrastructure to Module::Build. And that never happened because M::B never gained the necessary features (XS support, mainly) fast enough for anyone to want to – because it wasn’t sufficiently much better than EUMM for anyone to want it enough to add the features.</p>

<p><em>However</em>, EUMM is about as marginally maintained nowadays as M::B. <em>Both</em> are doomed, though their type of doomedness is one that’s accompanied by remarkable staying power. (Break-the-CPAN status tends to have that effect.) RJBS is on record that, should EUMM ever become unnecessary to building the core, it will make its exit stage left much the same as M::B is making now.</p>

<p>So… what happened?</p>
]]>
        <![CDATA[<p>In short, M::B never truly delivered on its promises. The idea behind M::B was to make it easier for authors to customize the jobs that EUMM was used for:</p>

<ol>
<li>helping with packing distributions for release</li>
<li>performing the build and installation</li>
</ol>

<p>Customising EUMM was difficult because it required writing code to generate bits of Makefile. (Worse: portable Makefile. Which implies: portable shell.) And how do you make several EUMM extensions cooperate in hooking into the right bits of EUMM to do their job? Not well.</p>

<p>Thus suggested itself the premise of M::B: ditch <code>make</code> – write the entire thing in Perl, where it’s easy to write portable code. Other than that? Follow the design of EUMM so the tools can continue to work the same way.</p>

<p>Now, when these jobs – managing the release process, and managing the build+installation process – are entrustred to <code>make</code>, it is quite reasonable to put them together in a single Makefile – otherwise you have to fight <code>make</code>. (If your first thought for such a task goes to <code>make</code>, then splitting the Makefile probably isn’t even going to occur to you.) And in order to abstract away common Makefile code between distributions, it is quite reasonable to write a library for generating this single Makefile. Therefore, the entire design of EUMM, in which a script generates another script that contains all the functionality needed by both the author and the user of a module, follows logically from reliance on <code>make</code>.</p>

<p>But M::B? Its premise was to ditch <code>make</code>, yet it otherwise copied this design verbatim. The central constraint driving the design vanished, yet M::B remained beholden to it – merely replacing generated Makefiles with generated Perl programs.</p>

<p>(OK, that is a big “merely”. Let us take a moment here to acknowledge how much of an improvement that alone is.)</p>

<p>The consequence of that is, among many things, that in M::B – just as in EUMM –, customizations must be made indirectly, within the first script which generates the other script. <em>You cannot write plugins that provide extra functionality directly</em>. In M::B, much like EUMM, you have to write code that cooperates with the generator of the other script such that the generated script ends up containing the functionality you want. M::B improves on EUMM primarily by not making you generate portable Makefiles, as well as by giving you better hooks into the generation process. The ultimate shape its architecture took, however, is rather strangely factored and unreasonably difficult to extend in a composable fashion, for many of the same reasons that EUMM’s is. M::B is much easier than EUMM to extend in minor ways, yet it suffers the same low ceiling.</p>

<p>This failure of reimagination left a vacuum for some tool to fill.</p>

<p>And there things remained for quite a long time.</p>

<p>Now they have changed: Dist::Zilla and friends have taken the stage. All tools of this type abandon the generated-code architecture (thus making them far easier to extend directly) as well as any aspirations to the build process (thus making it much less costly to use CPAN modules within them and in plugins, plus making it much easier for authors to adopt them – essentially taking them out of the toolchain). That road led straight into an explosion of plugins on CPAN like nothing there ever was for M::B.</p>

<p>Meanwhile, they can boilerplate an installer for a distribution, based on either EUMM or M::B, making the distinction moot. And so EUMM sticks around. Its throne remains up for grabs but a challenger has yet to appear. I think there is a number of reasons for this, but the major one is that few people actually care to do clever things during build and installation: for most authors, simply shipping a default <code>Makefile.PL</code> (preferrably, by letting Dist::Zilla spit it out) is all they need. That means that while authors mostly don’t need EUMM per se (because anything that can do the basic job will do), they also have no finding-an-alternative itch to scratch, even as the tools shamble on in life support mode.</p>

<p>EUMM was not displaced so much as disrupted.</p>

<p>M::B failed to break EUMM’s dominance because it never offered anything fundamentally better, but Dist::Zilla and friends simply sidestepped the issue and made it irrelevant. The old tools live on, relegated to a marginal role.</p>

<p>It would just still be nice if we could get rid of EUMM someday.</p>

<p>And at this point, it should be noted that M::B braved many of the obstacles waiting for whoever was going to try to displace EUMM. The establishment of <code>configure_requires</code> it motivated was the prerequisite for its very ejection from core. M::B succeeded in just about every aspect – except its core value proposition, bitter though that is. Thus, even as M::B-the-module failed, M::B-the-effort was a resounding success, and <a href="http://www.dagolden.com/index.php/2140/paying-respect-to-modulebuild/" title="David Golden: Paying respect to Module::Build">the ecosystem has a lot to thank that effort for</a>.</p>

<p>In a sense, then, M::B’s failure was its greatest success: though it only dented EUMM’s dominance, it created the conditions to break it. A recent example is the specification of a communication protocol between CPAN shells and distribution installer scripts, which has opened the door for any number of alternative installers to make their entrance. There is at least one contender already, Module::Build::Tiny, even though that one is expressly not looking to be <em>it</em> – nor probably has to be. (Nevertheless: it just added basic support for building XS!)</p>

<p>Maybe something will happen in due time.</p>

<hr />

<p>(Thanks to Joel Berger, Tatsuhiko Miyagawa, David Golden and Ricardo Signes for reading drafts of this.)</p>

<p>P.S.: I deliberately omitted all discussion of Module::Install in this article. While it played a role in all these developments, conceptually it was on an evolutionary sideline of its own that does not ultimately affect the aspects of the matter that I wanted to concentrate on.</p>
]]>
    </content>
</entry>

<entry>
    <title>LacunaWax</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/jt_smith/2013/06/lacunawax.html" />
    <id>tag:blogs.perl.org,2013:/users/jt_smith//242.4788</id>

    <published>2013-06-16T12:00:04Z</published>
    <updated>2013-06-17T09:04:47Z</updated>

    <summary> Jonathan Barton made this super cool new client for the Lacuna Expanse, that allows you to automate a lot of functions in the game, to make massive empire management easier. ...</summary>
    <author>
        <name>JT Smith</name>
        <uri>http://www.plainblack.com/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/jt_smith/">
        <![CDATA[<p><img alt="image" src="http://media.tumblr.com/ca15f9c0c1f95e6a4905886a0a9b213f/tumblr_inline_modbezozLq1qz4rgp.png"/></p>

<p>Jonathan Barton made this <a href="http://tmtowtdi.github.io/LacunaWaX/">super cool new client</a> for the <a href="http://www.lacunaexpanse.com">Lacuna Expanse</a>, that allows you to automate a lot of functions in the game, to make massive empire management easier. </p>]]>
        <![CDATA[<p>This is what Jonathan had to say about it when I asked him:</p>
<blockquote>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>LacunaWaX is a wxperl app.  I&#8217;ve compiled a regular Windows installer (using Cava Packager, which is pretty nice if you&#8217;ve never played with it), so normal people can use some of the features that have historically been for &#8220;scripters&#8221; only.<br/><br/></div>
But the installer isn&#8217;t totally necessary.  It&#8217;s definitely the format I concentrate on, but I run it as a Perl program rather than the installed .exe on both Windows and Ubuntu.  Takes some setting up of modules, and getting wxperl installed is generally a bit more of a challenge than just &#8220;cpan wxperl&#8221;, but it&#8217;s certainly do-able.<br/><br/>Anyway, to the screenshots:<br/><br/></div>
Intro screen:<br/>  <a href="http://screencloud.net/v/oEtu"><a href="http://screencloud.net/v/oEtu">http://screencloud.net/v/oEtu</a></a></div>
&#8230;the two connect buttons stay disabled until you use the Edit&#8230; Preferences menu to enter your credentials.<br/><br/></div>
Post login screen:<br/> <span class="Apple-style-span"><a href="http://screencloud.net/v/dtYv"><a href="http://screencloud.net/v/dtYv">http://screencloud.net/v/dtYv</a></a></span><br/><br/></div>
Planet glyphs manager panel:<br/>  <a href="http://screencloud.net/v/e6qk"><a href="http://screencloud.net/v/e6qk">http://screencloud.net/v/e6qk</a></a></div>
Just today I added a new control under &#8220;Push Selected Glyphs&#8221; to allow you to decided to keep a number of glyphs on the planet - so you can keep a few on your mission planet so you have them when missions requiring glyphs show up.  I just haven&#8217;t pushed that change yet.<br/><br/></div>
Space Station Propositions panel:<br/> <span class="Apple-style-span"><a href="http://screencloud.net/v/1BIi"><a href="http://screencloud.net/v/1BIi">http://screencloud.net/v/1BIi</a></a></span><br/><br/></div>
That same panel while a vote is being pushed through:<br/>  <span class="Apple-style-span"><a href="http://screencloud.net/v/kPrr"><a href="http://screencloud.net/v/kPrr">http://screencloud.net/v/kPrr</a></a></span><br/><br/></div>
Help documentation browser with Apache Lucy search:<br/>  <a href="http://screencloud.net/v/jP4K"><a href="http://screencloud.net/v/jP4K">http://screencloud.net/v/jP4K</a></a></div>
The docs are just HTML; the user can edit existing or create new pages as desired.  Delete the search index directory (instructions on this are in the Help docs itself) and re-run LacunaWaX to re-create it and index your new files.<br/><br/><br/></div>
If you&#8217;re interested, and you&#8217;ve got a Windows machine lying around, the installer works like any other Windows installer -<a href="http://tmtowtdi.github.io/LacunaWaX/"><a href="http://tmtowtdi.github.io/LacunaWaX/">http://tmtowtdi.github.io/LacunaWaX/</a></a><br/><br/></div>
<p>If you don&#8217;t have a Windows machine and want to play with it anyway, you can grab the source from the repo: <a href="https://github.com/tmtowtdi/LacunaWaX"><a href="https://github.com/tmtowtdi/LacunaWaX">https://github.com/tmtowtdi/LacunaWaX</a></a> - grab v1.14.2 (the tag) - I think that&#8217;s identical to master right now, but I was on a bit of a bughunt and a fight with the Windows registry the last couple days and the end result is that I&#8217;m not 100% positive what state master is in right now.</p>
</blockquote>

         <p>[From <a href="http://plainblackguy.tumblr.com">my blog</a>.]</p>
]]>
    </content>
</entry>

<entry>
    <title>Stop Talking About Perl</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/jt_smith/2013/06/stop-talking-about-perl.html" />
    <id>tag:blogs.perl.org,2013:/users/jt_smith//242.4787</id>

    <published>2013-06-15T12:00:04Z</published>
    <updated>2013-06-15T12:00:04Z</updated>

    <summary>I couldn&#8217;t agree more with Genehack&#8217;s &#8220;Stop Talking About Perl&#8221; talk at YAPC this past week. We spend so much time venting hot air. That&#8217;s not going to attract new users. Instead, we need to build cool stuff. Whether you&#8217;re...</summary>
    <author>
        <name>JT Smith</name>
        <uri>http://www.plainblack.com/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/jt_smith/">
        <![CDATA[<p>I couldn&#8217;t agree more with Genehack&#8217;s &#8220;Stop Talking About Perl&#8221; talk at YAPC this past week. We spend so much time venting hot air. That&#8217;s not going to attract new users. Instead, we need to build cool stuff. Whether you&#8217;re into building cool new ecosystems like Moose, Dist::Zillla, and Plack, or if you&#8217;re into building cool new apps like Lacuna and The Game Crafter, building cool stuff and talking about that is the way to get people excited about your language. </p>
<p>Actions beat words every single time. </p>

         <p>[From <a href="http://plainblackguy.tumblr.com">my blog</a>.]</p>

    ]]>
        
    </content>
</entry>

<entry>
    <title>Don&apos;t copy &quot;use autodie&quot; in every module</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/vyacheslav_matjukhin/2013/06/dont-copy-use-autodie-in-every-module.html" />
    <id>tag:blogs.perl.org,2013:/users/vyacheslav_matjukhin//310.4786</id>

    <published>2013-06-14T22:05:00Z</published>
    <updated>2013-06-14T22:27:41Z</updated>

    <summary> You pay a constant price in your app&apos;s starting performance for each time you use autodie;. Here&apos;s a quick benchmark: $ time perl -E &apos;say &quot;package X$_; use autodie qw(:all);&quot; for 1..100;&apos; | perl real 0m1.482s user 0m1.431s sys...</summary>
    <author>
        <name>Vyacheslav Matyukhin</name>
        <uri>http://berekuk.ru</uri>
    </author>
    
    <category term="autodie" label="autodie" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/vyacheslav_matjukhin/">
        <![CDATA[<p>
You pay a constant price in your app's starting performance for each time you <code class="none" style="color: #468847">use autodie;</code>.
</p><p>
Here's a quick benchmark:
<pre><code>$ time perl -E 'say "package X$_; use autodie qw(:all);" for 1..100;' | perl

real	0m1.482s
user	0m1.431s
sys	0m0.047s
</code></pre>
</p><p>
Compare with Moose:
<p>
<pre><code>$ time perl -E 'say "package X$_; use Moose;" for 1..100;' | perl

real	0m0.343s
user	0m0.328s
sys	0m0.016s
</code></pre>
</p>
<p>
It doesn't get much better without <code class="none" style="color: #468847">qw(:all)</code>:
<pre><code>$ time perl -E 'say "package X$_; use autodie;" for 1..100;' | perl

real	0m1.212s
user	0m1.169s
sys	0m0.047s
</code></pre>
</p><p>
But it gets significantly better if you import only a small number of functions:
<pre><code>$ time perl -E 'say "package X$_; use autodie qw(open close);" for 1..100;' | perl

real	0m0.175s
user	0m0.166s
sys	0m0.011s
</code></pre>
</p>
<p>
Basically, you pay for each function you import, once per function instance, in each module, again and again. That's different from, for example, Moose, where 99% of importing performance hit is on first <code class="none" style="color: #468847">use</code>, when perl compiles all the code, and then each subsequent <code class="none" style="color: #468847">import()</code> is almost free. Due to this, if your app has many modules, autodie can easily become the biggest bottleneck in its starting performance.
</p>
<p>
So, it's a bad idea to add <code class="none" style="color: #468847">use autodie qw(:all)</code> thoughtlessly to your boilerplate, in addition to <code class="none" style="color: #468847">use strict; use warnings; use 5.0xx;</code>. If you do need to use autodie, it might be a good idea to explicitly list all functions you want to replace.
</p>
<p>
PS: I don't know why it should be that way. I know <a href="https://metacpan.org/source/PJF/autodie-2.19/Changes#L12">autodie 2.18</a> does more caching and is significantly faster than previous versions, but it still doesn't cache much, apparently.
<p>
PPS: This post was brought to you by <a href="http://questhub.io/realm/perl/quest/51b0a7c3f82b88cd7f00005a">questhub</a>, as usual :)
</p>]]>
        <![CDATA[<script type="text/javascript">  var _gaq = _gaq || [];  _gaq.push(['_setAccount', 'UA-35747472-3']);  _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script>]]>
    </content>
</entry>

<entry>
    <title>I&apos;m back!</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/zak_b_elep/2013/06/im-back.html" />
    <id>tag:blogs.perl.org,2013:/users/zak_b_elep//901.4783</id>

    <published>2013-06-14T08:08:02Z</published>
    <updated>2013-06-14T08:11:20Z</updated>

    <summary>Fast forward to mid 2013. I last wrote about some checksum one-liner, and it was also pretty much among the last few Perl things I did that year before getting distracted by $WORK (again.) Now is the time to change...</summary>
    <author>
        <name>Zak B. Elep</name>
        <uri>https://zakame.net</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/zak_b_elep/">
        <![CDATA[<p>Fast forward to mid 2013.  I last wrote about some checksum one-liner, and it was also pretty much among the last few Perl things I did that year before getting distracted by $WORK (again.)</p>

<p>Now is the time to change that ;)</p>]]>
        
    </content>
</entry>

<entry>
    <title>Video Encoding Modules?</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/timm_murray/2013/06/video-encoding-modules.html" />
    <id>tag:blogs.perl.org,2013:/users/timm_murray//1522.4785</id>

    <published>2013-06-14T18:00:22Z</published>
    <updated>2013-06-14T18:14:59Z</updated>

    <summary>I&apos;m putting the final touches on UAV::Pilot v0.3, which will have a better event-driven API and support control through Joysticks and (maybe) Wiimotes. This brings me to the point on the ROADMAP I&apos;ve been dreading: handling the video stream. The...</summary>
    <author>
        <name>Timm Murray</name>
        
    </author>
    
    <category term="cpan" label="cpan" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="encoding" label="encoding" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="video" label="video" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/timm_murray/">
        <![CDATA[<p>I'm putting the final touches on <a href="https://github.com/frezik/UAV-Pilot">UAV::Pilot</a> v0.3, which will have a better event-driven API and support control through Joysticks and (maybe) Wiimotes.</p>

<p>This brings me to the point on the <a href="https://github.com/frezik/UAV-Pilot/blob/master/ROADMAP">ROADMAP</a> I've been dreading: handling the video stream. The Parrot AR.Drone v2 sends an h.264 stream over the network. I can save this to a file easily enough, I suppose, but decoding and displaying the stream in real-time (probably to an SDL window) seems like an obvious thing to want to do.</p>

<p>However, the only CPAN module I've found for any kind of video encoding is <a href="https://metacpan.org/module/ALLENDAY/FFmpeg-6036/FFmpeg.pm">FFmpeg</a>, and it only supports reading from a file or URI, not an open network stream.</p>

<p>Does anybody know of another option out there? I can write the bindings to a C library myself, but I'd prefer to avoid it.</p>]]>
        
    </content>
</entry>

<entry>
    <title>New And Improved: Bloomd::Client</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/damien_dams_krotkine/2013/06/new-and-improved-bloomdclient.html" />
    <id>tag:blogs.perl.org,2013:/users/damien_dams_krotkine//96.4784</id>

    <published>2013-06-14T13:56:25Z</published>
    <updated>2013-06-14T15:11:38Z</updated>

    <summary>cross-posted from dams blog New And Improved: Bloomd::Client thanks to @yenzie for the picture :P...</summary>
    <author>
        <name>Damien &quot;dams&quot; Krotkine</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/damien_dams_krotkine/">
        <![CDATA[<p><i>cross-posted from <a href="http://damien.krotkine.com">dams blog</a></i></p>

<h1>New And Improved: Bloomd::Client</h1>

<p><img src="/users/damien_dams_krotkine/images/val_approuve.png" alt="New and Improved!" title="I borrowed the image from @yenzie -
 hope you don't mind, Yannick !" /></p>

<p><em>thanks to @yenzie for the picture :P</em></p>]]>
        <![CDATA[<h2>Bloom filters</h2>

<p><a href="http://en.wikipedia.org/wiki/Bloom_filter">Bloom filters</a> are statistical data
structures. The most common use of them is to consider them as buckets. In one
bucket, you add elements. Once you've added a bunch of elements, it's ready to
be used.</p>

<p>You use it by presenting it yet an other element, and it'll be able to say
almost always if the element is already in the bucket or not.</p>

<p>More precisely, when asking the question <em>"is this element in the filter ?"</em>, if it
answers <strong>no</strong>, then you are sure that it's <strong>not</strong> in there. If it answers <strong>yes</strong>,
then there is a <strong>high probability</strong> that it's there.</p>

<p>So basically, you never have false negatives, but you can get a few false
positives. The good thing is that depending on the space you allocate to the
filter, and the number of elements it contains, you know what will be the
probability of having false positives.</p>

<p>The <strong>huge</strong> benefit is that a bloom filter is very small, compared to a hash
table.</p>

<h2>bloomd</h2>

<p>At work, I replaced a heavy Redis instance ( using 60g of RAM) that was used primarily as a
huge hash table, by a couple of bloom filters ( using 2g ). For that I used
<a href="https://github.com/armon/bloomd">bloomd</a>, from <em>Armon Dadgar</em>. It's light,
fast, has enough features, and the code looks sane.</p>

<p>All I needed was a Perl client to connect to it.</p>

<h2>Bloomd::Client</h2>

<p>So I wrote <a href="https://metacpan.org/module/Bloomd::Client">Bloomd::Client</a>. It is a light
client that connects to bloomd using a regular INET socket, and speaks the
simple ASCII protocol (very similar to Redis' one) that bloomd implements.</p>

<pre><code>    use Bloomd::Client;
    my $b = Bloomd::Client-&gt;new;

<p>    my $filter = 'test_filter';<br />
    $b-&gt;create($filter);<br />
    my $hash_ref = $b-&gt;info($filter);</p>

<p>    $b-&gt;set($filter, 'u1');<br />
    if ($b-&gt;check($filter, 'u1')) {<br />
      say "it exists!"<br />
    }<br />
</code></pre></p>

<p>When you use bloomd it usually means that you are in a high availibility
environment, where you can't get stuck waiting on a socket, just because
something went wrong. So Bloomd::Client implements non-blocking timeouts on the
socket. It'll die if bloomd didn't answer fast enough or if something broke.
That allows you to incorporate the bloomd connection in a retry strategy to try
again later, or fallback to another server...</p>

<p>To implement such a strategy, I recommend using
<a href="https://metacpan.org/module/Action::Retry">Action::Retry</a>. There is a blog
post about it <a href="http://damien.krotkine.com/2013/01/21/new-module-actionretry.html">here</a> :)</p>

<p>dams.</p>]]>
    </content>
</entry>

<entry>
    <title>Mistake in Chapter 7. References ( Page : 233 )</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/veeranna_halannavar/2013/06/mistake-in-chapter-7-references-page-233.html" />
    <id>tag:blogs.perl.org,2013:/users/veeranna_halannavar//1975.4782</id>

    <published>2013-06-14T11:54:36Z</published>
    <updated>2013-06-14T11:56:30Z</updated>

    <summary>Sir, In the free document for beginners, http://www.perl.org/books/beginning-perl/.. There is a mistake in chess game program at declaration part (not related to perl but Chess). i.e in Chapter 7. References ( Page : 233 ) Now it is, my @back...</summary>
    <author>
        <name>Veeranna Halannavar</name>
        
    </author>
    
    <category term="httpwwwperlorgbooksbeginningperl" label="http://www.perl.org/books/beginning-perl/.." scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/veeranna_halannavar/">
        <![CDATA[<p>Sir,<br />
  In the free document for beginners, http://www.perl.org/books/beginning-perl/.. There is a mistake in chess game program at declaration part (not related to perl but Chess).</p>

<p>i.e in Chapter 7. References ( Page : 233 )</p>

<p>Now it is,<br />
my @back = qw(R N B Q K N B R);<br />
But it has to be,<br />
my @back = qw(R N B Q K B N R);</p>

<p>That is : Chess pieces must be placed like mirror image for pieces R, N and B..</p>

<p>Left side : R N B<br />
Right side: B N R</p>]]>
        
    </content>
</entry>

<entry>
    <title>Chicago.PM New Website! New Meetup URL! New Presentations Project!</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/preaction/2013/06/chicagopm-new-website-new-meetup-url-new-presentations-project.html" />
    <id>tag:blogs.perl.org,2013:/users/preaction//398.4781</id>

    <published>2013-06-14T00:57:24Z</published>
    <updated>2013-06-14T01:01:37Z</updated>

    <summary>Lots of news for the Chicago.PM group! We&apos;ve got a new Chicago.PM website, powered by Github, up at http://chicago.pm.org. The website is completely editable via Github using the Octopress system. We hope to start sharing resources about Perl on our...</summary>
    <author>
        <name>preaction</name>
        
    </author>
    
        <category term="chicago.pm" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="meetup" label="meetup" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="presentations" label="presentations" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/preaction/">
        <![CDATA[<p>Lots of news for the Chicago.PM group! We've got a <a href="http://chicago.pm.org">new Chicago.PM website</a>, powered by <a href="http://github.com">Github</a>, up at <a href="http://chicago.pm.org">http://chicago.pm.org</a>. The website is completely editable via Github using the <a href="http://octopress.org">Octopress</a> system. We hope to start sharing resources about Perl on our website, increasing the exposure of the good tutorials and learning sites.</p>
]]>
        <![CDATA[<p>In addition to the new website, we've changed our Meetup URL, so <a href="http://meetup.com/ChicagoPM">the Chicago.PM Meetup group</a> is now at <a href="http://meetup.com/ChicagoPM">http://meetup.com/ChicagoPM</a>.</p>

<p>Finally, with our new website, we're starting a project to help teach some topics with more depth, to help fill in the gaps between the beginner's materials and writing useful, maintainable code using the best CPAN has to offer. We've started <a href="http://github.com/ChicagoPM">the Chicago.PM Github Organization</a>, where we will be developing presentations that can be used freely by anyone wishing to learn more about Perl, or wanting to teach others about Perl. The presentations and the code inside is licensed under the same terms as Perl itself, so if you can use Perl, you can use and edit the presentations to suit your needs.</p>

<p>The first presentation we're releasing is about <a href="https://github.com/ChicagoPM/Command-Line-Apps">building command-line applications in Perl</a>. I've given this presentation twice now, to excellent reviews. There is still some content that can be added to make it a more robust presentation (especially in the <a href="App::Cmd">http://metacpan.org/release/App-Cmd</a> section), but it's a good talk on going from "Just read my first Perl book and my first Linux book" to "Wielding Perl to build command-line applications."</p>

<p>We hope to build more presentations of this type in the future, as well as other learning materials as time goes on. Let us know if you want to help!</p>
]]>
    </content>
</entry>

<entry>
    <title>Perl and self flagellation...</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/rlauer/2013/06/perl-and-self-flagellation.html" />
    <id>tag:blogs.perl.org,2013:/users/rlauer//1843.4780</id>

    <published>2013-06-13T14:29:32Z</published>
    <updated>2013-06-13T17:22:19Z</updated>

    <summary>What&apos;s wrong with Perl 5. Nothing. What&apos;s wrong with non-&quot;Modern Perl&quot;? Nothing. I get the impression from the Perl community sometimes that if you aren&apos;t using Moose you&apos;re not a real Perl programmer. The notion of Modern Perl to me...</summary>
    <author>
        <name>rlauer</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/rlauer/">
        <![CDATA[<p>What's wrong with Perl 5.  Nothing.  What's wrong with non-"Modern Perl"?  Nothing.</p>

<p>I get the impression from the Perl community sometimes that if you aren't using Moose you're not a real Perl programmer.  The notion of Modern Perl to me is a bit amusing.</p>

<p>While I am in agreement with all of the attempts to create best practices and standardization around Perl programming and protect programmers from themselves SOMETIMES, it's a bit of an oxymoron to use standardization (of programming  techniques anyway) with Perl.  After all, the language that embraces the TIMTOWTDI mantra can hardly throw devotees out of the tent that don't want anything to do with heavyweight additions to their favorite language.</p>]]>
        <![CDATA[<p>More power to all the Moose developers and it's great that you can create a framework (in Perl) that morphs Perl into...something unrecognizable at times that folks find useful, but here's my point.</p>

<p>Are C programmers lamenting the fact that their language has been left behind on the dust bin of history?  Nope.  Last I heard, C still has an important role and plenty of highly competent people using it to solve problems. Not EVERY problem, but lot's of problems. </p>

<p>Seems to me that Perl 5 should be embraced in a similar way.  It solves a lot of problems.  Maybe not every problem.  Perhaps a huge project that requires that all developers be put in straight jackets and live within a constrained, highly protective environment is just not a good fit for Perl and one should look at languages that are designed for that use case rather than morphing Perl into Java or the next OO...fill in the blank with a pithy name...language.</p>

<p>My first car was a 1969 Red VW Beetle.  The heater was busted and perpetually on.  The heat came out of a vent in the floor and burned my feet.  I had to stuff a big tube sock in the vent.  I put in a quart of oil at every fill up too.  One day I saw a VW on the road and saw that someone had smacked a Rolls Royce grill on the front. Wow! Cool!  Then it hit me.  Why not just buy a Rolls Royce?</p>

<p>As a manager of Perl developers in a relatively small Perl shop (~12 developers) I loathe the guy that sneaks Object::InsideOut into a project to write a 400 line Perl script that essentially updates a database.  I have no patience for programmers that want to show the world how smart they are while creating code that only they can maintain.  It would be great if God created all programmers with the aptitude of the folks on these blogs, but as a hiring manager, I can tell you there are more folks that struggle with POP5 (plain old Perl 5) than there are Moose/Mouse/Moo-men (sorry persons).</p>

<p>Before I'm burned at the stake by Moose-folk defending their territory, let me reiterate I applaud the effort to see how far you can stretch Perl.  While I don't find that morphing Perl into Modern Perl makes sense (to me) and would never pay the penalty associated that always follows when you try to bang a square peg into a round hole, I don't have to.  I can still use POP5 and feel good about it.</p>

<p>So, rather than continuing to walk in circles in a self-flagellating ritual reminiscent of Monty Python and the Holy Grail, why not just take Stuart Smalley's approach and let's all just do a daily affirmation.</p>

<p>"I'm a Perl 5 programmer and I'm good enough, I'm smart enough, and gosh darn it people like me!"</p>

<p><img alt="stuartSmalley.jpg" src="http://blogs.perl.org/users/rlauer/stuartSmalley.jpg" width="430" height="337" class="mt-image-none" style="" /></p>

<p>Perl 5 has a place solving problems, just as C does.  If I want a Rolls Royce, I'll buy a Rolls Royce.<br />
</p>]]>
    </content>
</entry>

<entry>
    <title>Slideshow: Graphviz and Friends</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/ron_savage/2013/06/slideshow-graphviz-and-friends.html" />
    <id>tag:blogs.perl.org,2013:/users/ron_savage//297.4779</id>

    <published>2013-06-13T05:16:01Z</published>
    <updated>2013-06-13T05:19:38Z</updated>

    <summary>Last night I gave a talk to the Melbourne Perl Mongers, on AT&amp;T&apos;s Graphviz, and the Perl wrappers available, specifically including Marpa. It&apos;s not really complete with a voice-over, but it might encourage people to investigate further. Cheers...</summary>
    <author>
        <name>Ron Savage</name>
        <uri>http://savage.net.au/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/ron_savage/">
        <![CDATA[<p>Last night I gave <a href="http://savage.net.au/Ron/html/graphviz2.talk/">a talk</a> to the Melbourne Perl Mongers, on AT&T's Graphviz, and the Perl wrappers available, specifically including <a href="https://metacpan.org/release/Marpa-R2">Marpa</a>.</p>

<p>It's not really complete with a voice-over, but it might encourage people to investigate further.</p>

<p>Cheers</p>]]>
        
    </content>
</entry>

<entry>
    <title>A little nicer way to use smartmatch on perl 5.18</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/mike_b/2013/06/a-little-nicer-way-to-use-smartmatch-on-perl-518.html" />
    <id>tag:blogs.perl.org,2013:/users/mike_b//986.4776</id>

    <published>2013-06-12T23:24:40Z</published>
    <updated>2013-06-12T13:48:05Z</updated>

    <summary>Of course as Perl developers we all love new features, don&apos;t we? So the moment we could work with perl 5.10 we all started using smartmatch, right? If not for the only reason it allows us to write elegant code...</summary>
    <author>
        <name>Mike B</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/mike_b/">
        <![CDATA[<img alt="5998623964_f1a4023855_n.jpg" src="http://blogs.perl.org/users/mike_b/2013/06/12/5998623964_f1a4023855_n.jpg" class="mt-image-right" style="float: right; margin: 0 0 20px 20px;" height="160" width="240" /><p>Of course as Perl developers we all love new features, don't we?</p>

<p>So the moment we could work with perl 5.10 we all started using smartmatch, right? If not for the only reason it allows us to write elegant code like this:</p>

<pre>use v5.10.1;
@array = qw ( Thom Jonny Colin Ed Phil );
say "I found Phil!" if 'Phil' ~~ @array;
</pre>

<p>But now we have perl 5.18 and some of the ideas of smartmatch turned out to be a little too smart, and so we now consider it an experimental feature. So even code like this, when executed on a 5.18 perl, gives warnings:</p>

<pre>Smartmatch is experimental at smart.pl line 3.
I found Phil!
</pre>

<p><a href="http://www.effectiveperlprogramming.com/2013/06/experimental-features-now-warn-reaching-back-to-v5-10/">brian d foy wrote</a> about how to stop these warnings, but it's not pretty:</p>

<pre>no warnings 'experimental::smartmatch';
</pre>

<p>This works under perl 5.18 but gives nasty error messages under older perls:</p>

<pre>Unknown warnings category 'experimental::smartmatch' at smart.pl line 3.
BEGIN failed--compilation aborted at smart.pl line 3.
</pre>

<p>so the 'best' way to do it is like below:</p>

<pre>no if $] &gt;= 5.017011, warnings =&gt; 'experimental::smartmatch';
</pre>

<p>Ugly, right? That is why Leon Timmermans created <a href="https://metacpan.org/module/experimental">experimental</a>, a CPAN module that allows you to simply write:</p>

<pre>use experimental 'smartmatch';</pre>

<p>That's much better! I can remember that, and it's readable. I hope you like it as much as I do!</p>

<p>Of course this does not alleviate the problem that smartmatch is now considered experimental, which means that its implementation is probably going to change in upcoming perls.</p>
<div><br /></div>]]>
        

    </content>
</entry>

<entry>
    <title>Reducing Freshman &quot;Flunk-Outs&quot; in Purdue Engineering Classes</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/mark_leighton_fisher/2013/06/reducing-freshman-flunk-outs-in-purdue-engineering-classes.html" />
    <id>tag:blogs.perl.org,2013:/users/mark_leighton_fisher//541.4777</id>

    <published>2013-06-12T15:56:14Z</published>
    <updated>2013-06-12T16:01:34Z</updated>

    <summary>The Purdue Mechanics Freeform Classroom, introduced by Charles Krousgrill, implements a set of changes in the early Mechanical Engineering classes to reduce &quot;freshman flunk-outs&quot;. Especially in Purdue Engineering programs, there are many classes with large numbers of students (80+) in...</summary>
    <author>
        <name>Mark Leighton Fisher</name>
        
    </author>
    
    <category term="freeformclassroom" label="freeformclassroom" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="freshmanflunkouts" label="freshmanflunkouts" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="markleightonfisher" label="markleightonfisher" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="purdue" label="purdue" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="purduemechanicsfreeformclassroom" label="purduemechanicsfreeformclassroom" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/mark_leighton_fisher/">
        <![CDATA[<p>The <a href="http://www.purdue.edu/newsroom/releases/2013/Q1/new-teaching-approach-boosts-learning-for-engineering-students.html">Purdue Mechanics Freeform Classroom</a>, introduced by Charles Krousgrill, implements a set of changes in the early Mechanical Engineering classes to reduce "freshman flunk-outs". Especially in Purdue Engineering programs, there are many classes with large numbers of students (80+) in their freshman and sophomore year. Because of these class sizes, getting the personal attention many freshmen (and some sophomores) need is difficult -- adding the interactive textbook (a "lecturebook"), comment-enabled course blog, and instructional videos as the Purdue Mechanics Freeform Classroom has done reduces the D-F-W (withdraw) rate to 5% from 20%, thereby turning the C-D-F-W students into B students.. (Alas, the number of A students stays the same-- but the C-D-F-W rate is now 1 in 20 rather than 1 in 5.)</p>

<p>This is a substantial improvement to early Engineering education, well worth taking a look at.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Pinto Users, Please Stand Up!</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/jeff_thalhammer1/2013/06/pinto-users-please-stand-up.html" />
    <id>tag:blogs.perl.org,2013:/users/jeff_thalhammer1//1559.4775</id>

    <published>2013-06-12T16:02:17Z</published>
    <updated>2013-06-12T08:25:44Z</updated>

    <summary>A local company has been experimenting with Pinto for a couple weeks and they asked me to come chat with them. So I met some of their developers yesterday and we talked about how Pinto might improve their build process....</summary>
    <author>
        <name>Jeffrey Ryan Thalhammer</name>
        <uri>https://metacpan.org/author/THALJEF</uri>
    </author>
    
    <category term="cpan" label="CPAN" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="pinto" label="Pinto" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/jeff_thalhammer1/">
        <![CDATA[<p>A local company has been experimenting with <a href="http://metacpan.org/module/Pinto">Pinto</a> for a couple weeks and they asked me to come chat with them.  So I met some of their developers yesterday and we talked about how Pinto might improve their build process.  The conversation was great and we learned a lot from each other.</p>

<p>But when they asked me "who uses Pinto?" I didn't have a good answer.  I can show them all the <a href="http://github.com/thaljef/Pinto">forks on GitHub</a>, or tell them how many times <a href="http://getpinto.stratopan.com">getpinto.stratopan.com</a> has been hit, or list all the <a href="https://www.crowdtilt.com/campaigns/specify-module-version-ranges-in-pint">crowdfunding contributors</a>, but none of that really answers their question.</p>

<p>The simple truth is, I don't really know who uses Pinto.  The CPAN infrastructure just doesn't provide a way of counting -- let alone identifying -- who uses a module.  But it is a perfectly reasonable thing for any Perl developer to ask.  Adopting a new development tool like Pinto can require a significant investment of time and energy, and investments always have some amount of risk.  So its only natural to wonder who else is shouldering those risks.</p>

<p>The next time someone asks me who uses Pinto, I want to have a better answer for them.  If you use Pinto, please stand up and be counted by leaving a comment here with the name of your company (or client).  Or better still, write a blog post about where and how you use Pinto and I'll gladly link to it from the brand new <a href="http://blog.stratopan.com">Stratopan blog</a>.</p>

<p>¡Viva Pinto! </p>]]>
        
    </content>
</entry>

<entry>
    <title>Just Build Something</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/jt_smith/2013/06/just-build-something.html" />
    <id>tag:blogs.perl.org,2013:/users/jt_smith//242.4778</id>

    <published>2013-06-12T12:00:03Z</published>
    <updated>2013-06-12T12:00:03Z</updated>

    <summary>A lot of people think that there is some magic to starting your own business. There&#8217;s not. Just make something cool, and sell it. Then you&#8217;re in business. Also, don&#8217;t worry about getting all your paperwork ducks in a row...</summary>
    <author>
        <name>JT Smith</name>
        <uri>http://www.plainblack.com/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/jt_smith/">
        <![CDATA[<p>A lot of people think that there is some magic to starting your own business. There&#8217;s not. Just make something cool, and sell it. Then you&#8217;re in business. Also, don&#8217;t worry about getting all your paperwork ducks in a row before you start to create your product. Build your product and then determine if it&#8217;s worthy of a business. Just build something already. Why are you still reading this? Get to work.</p>

         <p>[From <a href="http://plainblackguy.tumblr.com">my blog</a>.]</p>

    ]]>
        
    </content>
</entry>

<entry>
    <title>Announcing Perl::Critic::Policy::Variables::ProhibitUnusedVarsStricter</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/tom_wyant/2013/06/announcing-perlcriticpolicyvariablesprohibitunusedvarsstricter.html" />
    <id>tag:blogs.perl.org,2013:/users/tom_wyant//506.4774</id>

    <published>2013-06-12T03:57:26Z</published>
    <updated>2013-06-12T04:02:24Z</updated>

    <summary>The subject Perl-Critic policy is an alternate implementation of the core policy Variables::ProhibitUnusedVariables. My implementation attempts to do a more thorough job of finding unused variables. The details of the policy can be found at Perl-Critic-Policy-Variables-ProhibitUnusedVarsStricter. My purpose here is...</summary>
    <author>
        <name>Tom Wyant</name>
        
    </author>
    
    <category term="perlcritic" label="perlcritic" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/tom_wyant/">
        <![CDATA[<p>The subject <a href="http://search.cpan.org/dist/Perl-Critic/">Perl-Critic</a> policy is an alternate implementation of the core policy <code>Variables::ProhibitUnusedVariables</code>. My implementation attempts to do a more thorough job of finding unused variables.</p>

<p>The details of the policy can be found at <a href="http://search.cpan.org/dist/Perl-Critic-Policy-Variables-ProhibitUnusedVarsStricter/">Perl-Critic-Policy-Variables-ProhibitUnusedVarsStricter</a>. My purpose here is more to discuss why the policy exists in the form it does.</p>]]>
        <![CDATA[<p>Once upon a time there was something called <code>warnings::unused</code>. This was an XS module that required the code under analysis to be actually run. This has since been retracted, or at least I can find nothing by that name in CPAN.</p>

<p>There is also a <code>Perl-Critic</code> policy, <code>Variables::ProhibitUnusedVariables</code>. This is "safe" in the sense that no code has to be run, but it is also a fairly simple policy, which by design and intent prefers false negative results to false positives.</p>

<p>It seems to me that in the absence of <code>warnings::unused</code> something more comprehensive should be out there, and embedding the tool in the <code>Perl-Critic</code> framework seems like the logical thing to do.  But because the more aggressive analysis makes false positives more likely, this policy should <strong>not</strong> be in the core.</p>

<p><code>ProhibitUnusedVarsStricter</code> currently exists only as a development release, which I consider to be <strong>alpha</strong> code. I plan to keep it there for a month or so, so people can bang on it and give feedback, and so I can (if need be) freely jerk it around in response to that feedback. The feedback can be any way you can get it to me. For public discussion I can't think of any better alternative than a reply to this blog.</p>]]>
    </content>
</entry>

<entry>
    <title>Office Hours For Pinto: MWF from 16:00 to 18:00 (UTC)</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/jeff_thalhammer1/2013/06/office-hours-for-pinto-mwf-from-1600-to-1900-utc.html" />
    <id>tag:blogs.perl.org,2013:/users/jeff_thalhammer1//1559.4771</id>

    <published>2013-06-11T04:10:53Z</published>
    <updated>2013-06-10T19:47:08Z</updated>

    <summary>Time management has never been my best skill. The only way that I manage to get anything done is by making daily TODO lists for myself. But I&apos;m still easily distracted by E-mails, Twitter, and IRC. I get such a...</summary>
    <author>
        <name>Jeffrey Ryan Thalhammer</name>
        <uri>https://metacpan.org/author/THALJEF</uri>
    </author>
    
    <category term="pinto" label="Pinto" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/jeff_thalhammer1/">
        <![CDATA[<p>Time management has never been my best skill.  The only way that I manage to get anything done is by making daily TODO lists for myself.  But I'm still easily distracted by E-mails, Twitter, and IRC.  I get such a huge thrill from seeing people use Pinto that I can't resist immediately responding to any inquiries or comments that come across my screen.</p>

<p>But I really need to buckle down and get some things done.  The crowd-funded features for <a href="http://metacpan.org/module/Pinto">Pinto</a> and the beta of <a href="http://stratopan.com">Stratopan</a> are my highest priorities for this summer.  To meet my goals, I need to give myself clear time boundaries.  Otherwise, I risk spending half the day pouncing on the F5 key.</p>

<p>So starting this week, I will hold office hours for Pinto on Mondays, Wednesdays, and Fridays between 16:00 and 18:00 (UTC).  During those hours, I'll dedicate myself to answering your e-mails about Pinto, responding to <a href="http://github.com/thaljef/Pinto/issues">issues</a>, and participating in the #pinto channel on <a href="http://irc.perl.org">IRC</a>.</p>

<p>Of course, you can still <a href="mailto:thaljef@cpan.org">reach me</a> outside of those hours, it just might take a little longer to get a response.  Thanks for understanding.</p>]]>
        
    </content>
</entry>

<entry>
    <title>My Virtual YAPC::NA 2013</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/joel_berger/2013/06/my-virtual-yapcna-2013.html" />
    <id>tag:blogs.perl.org,2013:/users/joel_berger//1022.4770</id>

    <published>2013-06-11T01:53:59Z</published>
    <updated>2013-06-10T19:24:25Z</updated>

    <summary>Last year I had the joy of experiencing my first YAPC, it was YAPC::NA in Madison, WI, which is just up the road from me in Chicago. Sadly this year YAPC::NA was much further away and I, having recently defended...</summary>
    <author>
        <name>Joel Berger</name>
        <uri>https://github.com/jberger</uri>
    </author>
    
        <category term="Perl Love" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/joel_berger/">
        <![CDATA[<p>Last year I had the joy of experiencing my first YAPC, it was YAPC::NA in Madison, WI, which is just up the road from me in Chicago. Sadly this year YAPC::NA was much further away and I, having recently defended my Ph.D. thesis, could not afford the time nor cost to attend. While people (most notably Peter Rabbitson (aka riba, aka ribasushi)) offered to help me attend (he with the excess of his own funding drive), finding a job was of greater concern.</p>

<p>That said, I ended up having a great YAPC::NA. I have to extend massive thank the conference organizers for again providing streaming video of the conference talks. I was able to watch an incredible number of talks, learning many new things and seeing many Perlers who I have only known by name (several of whom were not at last year&#8217;s YAPC::NA). I even got two shout-outs from speakers!! (squee)</p>

<p>A complement to the video streams was the #yapc channel on IRC. We virtual attendees developed quite a rapport. Much as in real life I have a hard time leaving a group of friends, talking long beyond when I intended to leave. Sure enough, as those in the channel may attest, our conversations often lasted long after I said that I was leaving.</p>

<p>If there was a small silver lining to not attending live, being able to converse during a presentation was a new and interesting way to absorb the material (ie. &#8220;links here&#8221;, or &#8220;see my example there&#8221;, or &#8220;has anyone tried this with X&#8221;). I even once got a question passed to a live attendee to be asked of the speaker.</p>

<p>I was very saddened to not be able to attend this year, but the videos and #yapc made it almost feel like I was there. A few comments. I would have been happy to contribute a few dollars to defray some of the costs, perhaps a donation link or &#8220;virtual attendee&#8221; category might be considered; though I hope that videos continue to be free to watch, more for the newbie&#8217;s sake. Also when Barbie made his call to &#8220;submit talk reviews&#8221; I was sad that virtual attendees are not able to do so; he has heard my plea and has offered to consider this in the future.</p>

<p>As <a href="http://blog.brentlaabs.com/2013/06/thanking-perl-community-for-awesome-yapc.html">Brent Laabs so eloquently put it</a>, &#8220;Truly, Perl&#8217;s community is it&#8217;s greatest strength.&#8221; Of course, I hope to be able to attend future YAPCs (not just NA) in person, but virtual attendance is an experience which helps to boost the community beyond just those who can attend. Congratulations to the YAPC::NA organizers, it was a great event, even for those not present! </p>
]]>
        

    </content>
</entry>

<entry>
    <title>detroit.pm.org</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/jim_schueler/2013/06/detroitpmorg.html" />
    <id>tag:blogs.perl.org,2013:/users/jim_schueler//1963.4769</id>

    <published>2013-06-10T23:11:54Z</published>
    <updated>2013-06-10T23:20:00Z</updated>

    <summary>There used to be a detroit.pm.org. And after Stevan Little&apos;s keynote last week, Perl- The Detroit of Scripting Languages, I made some inquiries about resurrecting it... Maybe specifically with the intention of hosting YAPC :). So far, the local response...</summary>
    <author>
        <name>Jim Schueler</name>
        <uri>http://pl2sql.tqis.com/</uri>
    </author>
    
    <category term="detroitperllittle" label="Detroit Perl Little" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/jim_schueler/">
        <![CDATA[<p>There used to be a detroit.pm.org.  And after Stevan Little's keynote last week, <em>Perl- The Detroit of Scripting Languages</em>, I made some inquiries about resurrecting it... Maybe specifically with the intention of hosting YAPC :).</p>

<p>So far, the local response has been positive.  As long as I don't step on any toes here.  In so many ways, Perl and Detroit are the best of all possible worlds.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Mixing procedural and declarative parsing gracefully</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/jeffrey_kegler/2013/06/mixing-procedural-and-declarative-parsing-gracefully.html" />
    <id>tag:blogs.perl.org,2013:/users/jeffrey_kegler//63.4768</id>

    <published>2013-06-10T15:13:02Z</published>
    <updated>2013-06-10T15:18:01Z</updated>

    <summary> [ This is cross-posted from the Ocean of Awareness blog. ] Declarative and procedural parsing A declarative parser takes a description of your language and parses it for you. On the face of it, this sounds like the way you&apos;d want to go, and Marpa offers that possibility -- it generates a parser from anything you can write in BNF and, if the parser is in one of the classes currently in practical use, that parser will run in linear time. But practical grammars often have context-sensitive parts -- features which cannot be described in BNF. Nice as declarative parsing may sound, at least some procedural parsing can be a necessity in real-life. In this post, I take a problem for which procedural parsing is essential, and create a fast, short solution that mixes procedural and declarative. The application This is a sample of the language: A2(A2(S3(Hey)S13(Hello, World!))S5(Ciao!)) It describes strings in nested arrays. The strings are introduced by the letter &apos;S&apos;, followed by a length count and then, in parentheses, the string itself. Arrays are introduced by the letter &apos;A&apos; followed by an element count and, inside parentheses, the array&apos;s contents. These contents are a concatenated series of...</summary>
    <author>
        <name>Jeffrey Kegler</name>
        <uri>http://www.jeffreykegler.com</uri>
    </author>
    
    <category term="marpa" label="Marpa" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="parser" label="parser" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="parsing" label="parsing" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/jeffrey_kegler/">
        <![CDATA[<p> [ This is <a href="http://jeffreykegler.github.io/Ocean-of-Awareness-blog/individual/2013/06/mixing-procedural.html">cross-posted from the Ocean of Awareness blog</a>. ]</p>
<h3>Declarative and procedural parsing</h3>
    <p>A declarative parser
      takes a description of your language and parses it
      for you.
      On the face of it, this sounds like the way you'd want
      to go,
      and Marpa offers that possibility -- it generates
      a parser from anything you can write in BNF and,
      if the parser is in one of the classes currently in
      practical use,
      that parser will run in linear time.
    </p>
    <p>
      But practical grammars often have context-sensitive parts --
      features which cannot be described in BNF.
      Nice as declarative parsing may sound,
      at least
      <b>some</b>
      procedural parsing
      can be a necessity
      in real-life.
      In this post, I take a problem for which procedural
      parsing is essential,
      and create a fast, short solution that
      mixes procedural and declarative.
    </p>
    <h3>The application</h3>
    <p>This is a sample of the language:
    </p>
    <blockquote>
      <pre>
A2(A2(S3(Hey)S13(Hello, World!))S5(Ciao!))
</pre>
    </blockquote>
    <p>
      It describes strings in nested arrays.
      The strings are introduced by the letter 'S', followed by a length count and then,
      in parentheses, the string itself.
      Arrays are introduced by the letter 'A' followed by an element count and, inside parentheses, the
      array's contents.
      These contents are a concatenated series of strings and other arrays.
      I call this a Dyck-Hollerith language because it
      combines
      <a href="http://en.wikipedia.org/wiki/Hollerith_constant">
        Hollerith constants</a>
      (strings preceded by a count),
      with balanced parentheses
      (what is called
      <a href="http://en.wikipedia.org/wiki/Dyck_language">
        a Dyck language</a>
      by mathematicians).
    </p>
    <p>
      The language is one I've dealt with before.
      It is apparently from "real life", and is described more fully
      in
      <a href="http://blogs.perl.org/users/polettix/2012/04/parserecdescent-and-number-of-elements-read-on-the-fly.html">
        a blog post by
        Flavio Poletti</a>.
      Several people, Gabor Szabo among them, prodded me to show how
      <a href="http://jeffreykegler.github.com/Marpa-web-site/">
        Marpa</a>
      would do on this language.
      I did this
      <a href="http://jeffreykegler.github.io/Ocean-of-Awareness-blog/individual/2012/04/marpa-v-parserecdescent-some-numbers.html">a year ago, using Marpa's previous version, Marpa::XS</a>.
      The result was well-received and quite satisfactory.
    </p>
    <p>
      This time around, I used
      Marpa's latest version, Marpa::R2,
      and its new interface, the SLIF.
      The solution presented here was
      much easer to write,
      and will be easier to read.
      It is also several times faster.
    </p>
    <h3>The code</h3>
    <p>The full code for this example is in
      <a href="https://gist.github.com/jeffreykegler/5745272">
        a Github gist</a>.
      In what follows, I will assume the reader is
      interested in the ideas.
      Details of the interface,
      along with more detail-oriented tutorials,
      can be found
      <a href="https://metacpan.org/module/Marpa::R2">
        in Marpa's documentation</a>.
      Other tutorials are
      on
      <a href=http://jeffreykegler.github.io/Ocean-of-Awareness-blog/">
        the Ocean of Awareness blog</a>,
      and on
      <a href="http://marpa-guide.github.io/index.html">
        the Marpa Guide,
        a new website</a>
      being
      built due to the generosity of Peter Stuifzand
      and Ron Savage.
    </p>
    <h3>The DSL</h3>
    <p>First off, let's look at the declarative part.
      The core of the parser is the following lines,
      containing the BNF for the language's top-level structure.
    </p>
    <blockquote>
      <pre>
my $dsl = &lt;&lt;'END_OF_DSL';
# The BNF
:start ::= sentence
sentence ::= element
array ::= 'A' &lt;array count&gt; '(' elements ')'
    action =&gt; check_array
string ::= ( 'S' &lt;string length&gt; '(' ) text ( ')' )
elements ::= element+
  action =&gt; ::array
element ::= string | array
</pre>
    </blockquote>
    <p>Details of this syntax are in Marpa's documentation,
      but it's a dialect of EBNF.
      Adverbs like
      <tt>action =&gt; semantics</tt>
      tell Marpa what the semantics will be.
      The default (which will be set below) is for a rule to return its first child.
      <tt>::array</tt>
      semantics tell Marpa to return all every
      <tt>element</tt>
      of
      <tt>elements</tt>
      in an array.
      And
      <tt>check_array</tt>
      is the name of a function providing
      the semantics, as will be seen below.
    </p>
    <p>
      Single-quoted strings are looked for literally in the input.
      In the
      <tt>string</tt>
      declaration,
      you'll note some parentheses which are not in quotes.
      The unquoted parentheses are part of the Marpa DSL's own syntax,
      telling Marpa to "hide" the parenthesized symbols from the
      semantics.
      Here, the effect is that
      <tt>text</tt>
      is treated by the semantics as if it
      were the "first" symbol.
    </p>
    <p>Marpa's SLIF provides a lexer for the user,
      and this Marpa-internal lexer will handle most
      of the symbols in this example.
      The single-quoted strings we saw in the BNF are actually instructions
      to the internal lexer.
      The next lines tell Marpa how to recognize
      <tt>&lt;array count&gt;</tt>
      and
      <tt>&lt;string length&gt;</tt>.
    </p><blockquote>
      <pre>
&lt;array count&gt; ~ [\d]+
&lt;string length&gt; ~ [\d]+
text ~ [\d\D]
END_OF_DSL
</pre>
    </blockquote>
    <p>
      <tt>&lt;array_count&gt;</tt>
      and
      <tt>&lt;string length&gt;</tt>
      are both declared to be a series of digits.
      <tt>text</tt>
      is a stub.
      The length of
      <tt>text</tt>
      depends on the numeric value of
      <tt>&lt;string length&gt;</tt>, and dealing with that is beyond the power of
      the BNF.
      When it comes time to count out the symbols needed for
      <tt>text</tt>,
      we will hand control over to an external lexer.
      For the purposes of Marpa's lexer,
      <tt>text</tt>
      is described
      as a single character of any kind.
      Marpa's internal scanner uses a longest tokens match algorithm,
      and since we don't want the internal scanner to read
      <tt>text</tt>
      lexemes,
      describing
      <tt>text</tt>
      and other purely external lexemes
      as single characters is the right thing to do.
    </p>
    <p>Now comes the weld between declarative and procedural ...
    </p>
    <blockquote>
      <pre>
:lexeme ~ &lt;string length&gt; pause =&gt; after
:lexeme ~ text pause =&gt; before
</pre>
    </blockquote>
    <p>These two statements tell Marpa that
      <tt>&lt;string length&gt;</tt>
      and
      <tt>&lt;text&gt;</tt>
      are two lexicals at which Marpa's own parsing should "pause",
      handing over control to external procedural parsing logic.
      In the case of
      <tt>&lt;string length&gt;</tt>,
      the pause should be after it is read.
      In the case of
      <tt>&lt;text&gt;</tt>
      the pause should be before.
      What happens during the "pause", we will soon see.
    </p>
    <h3>Starting the parse</h3>
    <p>Next follows the code to read the DSL,
      and start the parser.
    </p><blockquote>
      <pre>
my $grammar = Marpa::R2::Scanless::G-&gt;new(
    {   action_object  =&gt; 'My_Actions',
        default_action =&gt; '::first',
        source         =&gt; \$dsl
    }
);

my $recce = Marpa::R2::Scanless::R-&gt;new( { grammar =&gt; $grammar } );
</pre>
    </blockquote>
    <p>The previous lines tell Marpa that when its semantics
      are provided by a Perl closure, it is to look for that closure in a package called
      <tt>My_Actions</tt>.
      The default semantics are
      <tt>::first</tt>, which means simply pass the value of
      the first RHS symbol of a rule upwards.
    </p>
    <h3>The main loop</h3>
    <p>We saw our input above:</p>
    <blockquote>
      <pre>
$input = 'A2(A2(S3(Hey)S13(Hello, World!))S5(Ciao!))';
</pre>
    </blockquote>
    <p>The block of code which follows is the main loop through the parse, including
      all the procedural parsing logic.
      Below, I will pull this
      procedural parsing logic out of the loop
      for separate examination.
    </p>
    <p>
      Here the
      <tt>$recce-&gt;read()</tt>
      method performs the first read
      and sets up the input string.
      The interior of the loop is entered whenever Marpa "pauses".
      Once the procedural parsing logic is done, Marpa resumes with
      the
      <tt>$recce-&gt;resume()</tt>
      call.
      Throughout,
      <tt>$pos</tt>
      is used to track the current character
      in the input stream.
      The loop ends when
      <tt>$pos</tt>
      is after the last character of
      <tt>$input</tt>.
    </p>
    <blockquote>
      <pre>
my $last_string_length;
my $input_length = length $input;
INPUT:
for (
    my $pos = $recce-&gt;read( \$input );
    $pos &lt; $input_length;
    $pos = $recce-&gt;resume($pos)
    )
{
    my $lexeme = $recce-&gt;pause_lexeme();
    die q{Parse exhausted in front of this string: "},
        substr( $input, $pos ), q{"}
        if not defined $lexeme;
    my ( $start, $lexeme_length ) = $recce-&gt;pause_span();
    if ( $lexeme eq 'string length' ) {
        $last_string_length = $recce-&gt;literal( $start, $lexeme_length ) + 0;
        $pos = $start + $lexeme_length;
        next INPUT;
    }
    if ( $lexeme eq 'text' ) {
        my $text_length = $last_string_length;
        $recce-&gt;lexeme_read( 'text', $start, $text_length );
        $pos = $start + $text_length;
        next INPUT;
    } ## end if ( $lexeme eq 'text' )
    die "Unexpected lexeme: $lexeme";
} ## end INPUT: for ( my $pos = $recce-&gt;read( \$input ); $pos &lt; $input_length...)
</pre>
    </blockquote>
    <h3>The procedural parsing</h3>
    <p>In this language,
      we need the procedural parsing logic to count the
      <tt>text</tt>
      strings properly.
      This is done in a very direct way.
      First we pull the count from
      <tt>&lt;string length&gt;</tt>:
    </p><blockquote>
      <pre>
    if ( $lexeme eq 'string length' ) {
        $last_string_length = $recce-&gt;literal( $start, $lexeme_length ) + 0;
        $pos = $start + $lexeme_length;
        next INPUT;
    }
</pre>
    </blockquote>
    <p>
      Above, we used
      <tt>pause_span()</tt>
      to set
      <tt>$start</tt>
      and
      <tt>$lexeme_length</tt>
      to the start and length of the lexeme that
      Marpa's internal scanner found.
      Passed to
      <tt>$recce-&gt;literal()</tt>, these two values
      return the "literal" string value of the lexeme, which will
      be the ASCII representation of a decimal number.
      We convert it to numeric, salt it away in
      <tt>$last_string_length</tt>,
      and set
      <tt>$pos</tt>
      to the location just after the
      <tt>&lt;string length&gt;</tt>
      lexeme.
    </p>
    <blockquote>
      <pre>
    if ( $lexeme eq 'text' ) {
        my $text_length = $last_string_length;
        $recce-&gt;lexeme_read( 'text', $start, $text_length );
        $pos = $start + $text_length;
        next INPUT;
    } ## end if ( $lexeme eq 'text' )
</pre>
    </blockquote>
    <p>Now we come to counting out the characters for the
      <tt>text</tt>
      lexeme.
      Recall that in the case of
      <tt>text</tt>, we pause
      <b>before</b>
      the lexeme, which means it will not have been read yet.
      With
      <tt>$recce-&gt;lexeme_read()</tt>, we tell Marpa
      that we want the next lexeme
    </p>
    <ul>
      <li>to be of type
        <tt>text</tt>,
      </li>
      <li>to start at the already decided
        <tt>$start</tt>
        position, and
      </li>
      <li>
        to be of the length that
        we saved in
        <tt>$last_string_length</tt>.
      </li>
    </ul>
    <p>
      We also set
      <tt>$pos</tt>
      to be just after the
      end of the lexeme.
    </p>
    <p>We've focused on the string lengths, but the Dyck-Hollerith language has
      a count of the number of elements in its array.
      Marpa's BNF-driven parsing logic has no trouble
      determining the number of elements from the array contents,
      and it does not need the count.
      What to do with it?
    </p>
    <blockquote>
      <pre>
package My_Actions;
</pre>
    </blockquote>
    <blockquote>
      <pre>
sub check_array {
    my ( undef, undef, $declared_size, undef, $array ) = @_;
    my $actual_size = @{$array};
    warn
        "Array size ($actual_size) does not match that specified ($declared_size)"
        if $declared_size != $actual_size;
    return $array;
} ## end sub check_array
</pre>
    </blockquote>
    <p>Recall that Marpa promised special semantics for the
      <tt>array</tt>
      rule
      in its DSL.
      Here they are.
      The first parameter to Marpa's semantic closures is a per-parse variable, here unused.
      The rest are the values of the RHS symbols, in order.
      We only care about the second (for
      <tt>&lt;array count&gt;</tt>),
      and the fourth (for
      <tt>elements</tt>).
      We determine a
      <tt>$declared_size</tt>
      from
      <tt>&lt;array count&gt;</tt>;
      and an
      <tt>$actual_size</tt>
      by looking at the array referenced by
      <tt>$array</tt>.
      If these differ, we choose to warn the user.
      Depending on your purposes,
      anything from ignoring the issue
      to throwing a fatal error may be equally or more reasonable.
    </p>
    <h3>The result of the the parse</h3>
    <p>And now we are ready to take the result of the parse.
    </p><blockquote>
      <pre>
my $result = $recce-&gt;value();
die 'No parse' if not defined $result;
</pre>
    </blockquote>
    <h3>For more about Marpa</h3>
    <p>The techniques described apply to problems considerably
      larger than the example of this post.
      Jean-Damien Durand is using them to create
      <a href="https://github.com/jddurand/MarpaX-Languages-C-AST">
        a C-to-AST tool</a>.
      This
      takes C language and converts it to an AST,
      following the C11
      specification carefully.
      The AST can then be manipulated
      as you wish.
    </p
    <p><p>
      <a href="https://metacpan.org/module/Marpa::R2">Marpa::R2
        is available on CPAN</a>.
      A list of my Marpa tutorials can be found
      <a href="http://jeffreykegler.github.io/Ocean-of-Awareness-blog/metapages/annotated.html#TUTORIAL">
        here</a>.
      There is
      <a href="http://marpa-guide.github.io/chapter1.html">
        a new tutorial by Peter Stuifzand</a>.
      <a href="http://jeffreykegler.github.com/Ocean-of-Awareness-blog/">
        The Ocean of Awareness blog</a>
      focuses on Marpa,
      and it has
      <a href="http://jeffreykegler.github.io/Ocean-of-Awareness-blog/metapages/annotated.html">an annotated guide</a>.
      Marpa also has
      <a href="http://jeffreykegler.github.com/Marpa-web-site/">a web page</a>.
      For questions, support and discussion, there is a
      Google Group:
      <code>marpa-parser@googlegroups.com</code>.
      Comments on this post can be made there.
    </p>]]>
        
    </content>
</entry>

<entry>
    <title>Files -  MadMongers (Madison Perl Mongers) (Madison, WI) - Meetup</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/jt_smith/2013/06/files---madmongers-madison-perl-mongers-madison-wi---meetup.html" />
    <id>tag:blogs.perl.org,2013:/users/jt_smith//242.4767</id>

    <published>2013-06-10T12:00:03Z</published>
    <updated>2013-06-10T12:00:03Z</updated>

    <summary>Files - MadMongers (Madison Perl Mongers) (Madison, WI) - Meetup: I’ve uploaded my presentations from YAPC::NA 2013 to the MadMongers presentation repository.  [From my blog.]...</summary>
    <author>
        <name>JT Smith</name>
        <uri>http://www.plainblack.com/</uri>
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/jt_smith/">
        <![CDATA[<a href="http://www.meetup.com/madmongers/files/">Files -  MadMongers (Madison Perl Mongers) (Madison, WI) - Meetup</a>: <p>I’ve <a href="http://www.meetup.com/madmongers/files/">uploaded my presentations</a> from <a href="http://www.yapcna.org">YAPC::NA</a> 2013 to the <a href="http://www.madmongers.org">MadMongers</a> presentation repository. </p>

         <p>[From <a href="http://plainblackguy.tumblr.com">my blog</a>.]</p>

    ]]>
        
    </content>
</entry>

</feed>
