Tuesday, March 30, 2010

March LA Mongers Recap

Another excellent mongers! Thanks to the MANY who showed up!

Tommy's talk on "git your ~" was interesting and detailed. It was interesting enough to pull Randall out of the woods to come debate. I wish I could have paid closer attention, but I was busy answering the door and dealing with the pizza dude and taking Simba(my new puppy) on an impromptu walk.

During the downtime/discussion time after git and pizza, I had enough time to make a lightning talk on Dist::Zilla. The CPAN authors in the crowd all seemed to have the same reaction of "awesome, that will make releasing modules so much more painless." I didn't even get to the point of showing git interaction or autopost-to-cpan plugins. We had some nice crowd participation (thanks Simba).

Excellent spirited discussion during the unstructured q&a / free chat portion. We are a fun group. Sorry I had to rush everyone out at 11, but Simba is not one to be kept waiting. See you again next month!

I'll update when we get the slides up.

Monday, March 22, 2010

Convert::Binary::C

I stumbled across a new module this morning, Convert::Binary::C. The premise is simple and clever: rather than manually maintaining pack/unpack statements to read/write data from C structs, use this module to parse the c header files and create the pack/unpack routines for you. Oh and it takes into account compiler settings too. For the Win!

I don't have anything to use this in right now. But when I do? Blammo!

DESCRIPTION ^

Convert::Binary::C is a preprocessor and parser for C type definitions. It is highly configurable and supports arbitrarily complex data structures. Its object-oriented interface has pack and unpack methods that act as replacements for Perl's pack and unpack and allow to use C types instead of a string representation of the data structure for conversion of binary data from and to Perl's complex data structures.

Actually, what Convert::Binary::C does is not very different from what a C compiler does, just that it doesn't compile the source code into an object file or executable, but only parses the code and allows Perl to use the enumerations, structs, unions and typedefs that have been defined within your C source for binary data conversion, similar to Perl's pack and unpack.

Beyond that, the module offers a lot of convenience methods to retrieve information about the C types that have been parsed.

March Los Angeles Perl Mongers

Are we really having a meeting on Wednesday?

I see I updated la.pm.org ot list Wed Mar 24. However I haven't planned anything yet. Need to listen to that voicemail from Tommy, hopefully it's him saying his presentation is ready.

I need to see if I can still reserve CTU and get approval for offsite people. We had an "incident" with some random people wandering around and now my event is in limbo. Annoying.

Thursday, March 18, 2010

POD is not literate programming

I frequently come across assertions that POD, Perl's documentation system, is an example of `Literate Programming'. [...] But POD is not literate programming.

Why is this important? POD is a really good idea. But literate programming is an even better idea. Perl has a long history of borrowing good ideas from elsewhere. If we go around thinking that POD is literate programming when it isn't, that'll lead us to disregard literate programming when we hear about it. ``Oh, I already know what that is,'' we'll say. But we don't know what it is, and since it's such an excellent idea, it would be a shame if we missed out on it just because we thought we already knew what it was.

--Mark-Jason Dominus, March 20, 2000.

MJD wrote this quick article for perl.com ten(10) years ago this week. Where have we come since?

We have some slightly more flexible POD systems. I'm using Pod::Weaver with Dist::Zilla (via Dist::Zilla::Plugin::PodWeaver )to post-process my modules to move the POD around.

This lets me write in pseudo POD with tags like =method which will then be gathered and turned into appropriate sorted =over, =item entries and all the POD put together after the __END__ block. Pod::Loom looks like a similar system, which also has a Dist::Zilla plugin.

This is a much more fun and interesting way to write my POD, but this is still not literate programming. I want a weaver that will stitch together a nice TeX output suitable for a journal. That would be HOT.

Friday, March 12, 2010

NYC! PAR::Packer!

For a city that never sleeps, morning sure rolls around early in Manhattan
--me
I'm spending a week back in NYC. James is getting married on Sunday! It's been too long since my last visit, I almost forgot the feeling of awesomatude.

Working out of the RubiconProject:NYC office is reinvigorating me. It's so small and full of energy. There are only like 11 desks (soon to be 13). Think particle in a box. Eating lunch around the big round table is very familial. 16th and 7th ave is a nice location with big windows and high ceilings. Last night I walked to Union SQ, the east village, and west village and meat packing district. Mike B keeps the office running smoothly and puts on a solid music mix. Len's got 5 client facing meetings today, it's great to see that kind of flow in the pipeline. zoom!

Waking up at 9am local (6am brain time) is taking an interesting toll on my ability to concentrate on code. Recognizing this I'm working on different problems like using pp to produce a self contained perl script to simplify pushing to the hadoop cluster. I eventually pushed through the biggest hurdle which was ... not verifying my initial conditions.

Turns out someone had some strange code in a standard location that conflicted with the local modules on the box I was using for the build. Private namespace collision 3 names deep? Really? That and DBD::mysql didn't get included into the PAR and/or .pl even with the -B flag to pp. I just forced a yum update install perl-DBD-mysql install on all the target boxes to bring in mysql, DBI and DBD:::mysql ( which is supposed to be in our base builds), and now it's working.

pp is in the PAR::Packer distribution. Give it a spin if you ever need to bundle up an app with all its modules as one bundle. Outputs any of PAR, self contained .pl, or self contained binary that doesn't require perl to be locally installed.

Thursday, March 4, 2010

perlmonks

You gained 7 experience points. Maybe you should blog about it.
--perlmonks.org
Hey, when was the last time you were at Perlmonks.org? Go answer some questions, it'll remind you why you love perl so much.

Here I answer a fun classic unix programming question: How do I change settings in my shell from a program?, with the general answer of "no." Has anyone actually gone through the windy path I mention of manually poking into the memory space of the parent shell to change settings? Totally Grody, yet it'd be awesome in its peversity.

Division by zero isn't impossible, it's just really really hard
-- old blacker hovse quote about the Division by Zero suit (tm).

OK GO at LACMA

IgniteLA was fun on Monday. The final presentation by Syynlabs (aka Mindshare.la) about their new Video for OK GO really stole the show.

On Friday, LACMA will be hosting the "West Coast Premiere" of the video. OK Go will be on hand and do a live acoustic set. It's a benefit for the LACMA Muse program. I'll be there, will you? Get your $22 tickets now.

PS. The next MindShare is Thursday March 18th. Buy your tix now!