MVC - A Personal History

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.

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.

First inchstone.

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 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 ;)

Unicode is 20++ years old and still a problem

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 for 14 K pages I experienced the bad surprise:

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.

Why the hell are there so many CPAN modules still ignoring Unicode?

Marpa v. Parse::RecDescent: a rematch

[ 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's a chance to find out if Marpa can play the game that is recursive descent'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

Post Every Day

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 about marketing…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’re super busy like me, feel free to queue up some posts so that you don’t have to actually be there every day. 

[From my blog.]

Perl 5 Porters Weekly: June 10-16, 2013

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 '.' instead of '->' everywhere and concat with '~'
  • NWCLARK TPF grant April report
  • I made t/podcheck.t less sensitive and fixed various pod issues
  • perl needs safer implicit close
  • An observation: Short- vs. long-term benefits
  • [PATCH] Add an API to attach a signature string to a CV
  • Perl experiments

SelfLoader and things I've learned writing/using a debugger

A decade in CPAN toolchain

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 and that ExtUtils::MakeMaker wasn’t doomed.

Schwern wasn’t wrong and MakeMaker remains 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.

LacunaWax

image

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. 

Don't copy "use autodie" in every module

You pay a constant price in your app's starting performance for each time you use autodie;.

Here's a quick benchmark:

$ time perl -E 'say "package X$_; use autodie qw(:all);" for 1..100;' | perl

real	0m1.482s
user	0m1.431s
sys	0m0.047s

Compare with Moose:

$ time perl -E 'say "package X$_; use Moose;" for 1..100;' | perl

real	0m0.343s
user	0m0.328s
sys	0m0.016s

It doesn't get much better without qw(:all):

$ time perl -E 'say "package X$_; use autodie;" for 1..100;' | perl

real	0m1.212s
user	0m1.169s
sys	0m0.047s

But it gets significantly better if you import only a small number of functions:

$ time perl -E 'say "package X$_; use autodie qw(open close);" for 1..100;' | perl

real	0m0.175s
user	0m0.166s
sys	0m0.011s

I'm back!

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 that ;)

Video Encoding Modules?

I'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'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.

However, the only CPAN module I've found for any kind of video encoding is FFmpeg, and it only supports reading from a file or URI, not an open network stream.

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.

Stop Talking About Perl

I couldn’t agree more with Genehack’s “Stop Talking About Perl” talk at YAPC this past week. We spend so much time venting hot air. That’s not going to attract new users. Instead, we need to build cool stuff. Whether you’re into building cool new ecosystems like Moose, Dist::Zillla, and Plack, or if you’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. 

Actions beat words every single time. 

[From my blog.]

New And Improved: Bloomd::Client

cross-posted from dams blog

New And Improved: Bloomd::Client

New and Improved!

thanks to @yenzie for the picture :P

Mistake in Chapter 7. References ( Page : 233 )

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 = qw(R N B Q K N B R);
But it has to be,
my @back = qw(R N B Q K B N R);

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

Left side : R N B
Right side: B N R

Chicago.PM New Website! New Meetup URL! New Presentations Project!

Lots of news for the Chicago.PM group! We'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 website, increasing the exposure of the good tutorials and learning sites.

Slideshow: Graphviz and Friends

Last night I gave a talk to the Melbourne Perl Mongers, on AT&T's Graphviz, and the Perl wrappers available, specifically including Marpa.

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

Cheers

A little nicer way to use smartmatch on perl 5.18

5998623964_f1a4023855_n.jpg

Of course as Perl developers we all love new features, don'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 like this:

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

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:

Smartmatch is experimental at smart.pl line 3.
I found Phil!

Reducing Freshman "Flunk-Outs" in Purdue Engineering Classes

The Purdue Mechanics Freeform Classroom, 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.)

This is a substantial improvement to early Engineering education, well worth taking a look at.

Pinto Users, Please Stand Up!

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. The conversation was great and we learned a lot from each other.

But when they asked me "who uses Pinto?" I didn't have a good answer. I can show them all the forks on GitHub, or tell them how many times getpinto.stratopan.com has been hit, or list all the crowdfunding contributors, but none of that really answers their question.

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.