jsmith's Friends' Journals http://use.perl.org/~jsmith/journal/friends/ jsmith's Friends' use Perl Journals en-us use Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners. 2012-01-25T02:25:19+00:00 pudge pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 jsmith's Friends' Journals http://use.perl.org/images/topics/useperl.gif http://use.perl.org/~jsmith/journal/friends/ ah, dreams... http://use.perl.org/~Matts/journal/40130?from=rss <p>I just woke from a dream where it was rjbs' birthday and we got him an onion cake. Only the person who made the cake misunderstood, and instead of a cake shaped like an onion he cooked it WITH onions in it.</p><p>Bizarro.</p> Matts 2010-01-26T10:31:17+00:00 journal Time::Piece test failures on Win32 http://use.perl.org/~Matts/journal/40129?from=rss <p>Can someone with Time::Piece test failures on Win32 please contact me offlist? I have a proposed patch I'd like to test, but no Win32 perl to test it on.</p> Matts 2010-01-25T23:23:53+00:00 journal Warning compiling perl stuff on Snow Leopard http://use.perl.org/~Matts/journal/40075?from=rss <p>I've searched but can't find any reference to this...</p><p>Compiling IO::KQueue on Snow Leopard I get the following warning:</p><blockquote><div><p> <tt>KQueue.xs: In function 'XS_IO__KQueue_kevent':<br>KQueue.xs:71: warning: format not a string literal and no format arguments</tt></p></div> </blockquote><p>Yet that line is just:</p><blockquote><div><p> <tt>&nbsp; &nbsp; Newxz(ke, max_events, struct kevent);</tt></p></div> </blockquote><p>Which seems to me pretty standard perl, and no format strings involved (though Newxz expands quite a few macros).</p> Matts 2010-01-04T22:13:57+00:00 journal Perl Oasis 2010: Schedule Posted http://use.perl.org/~perigrin/journal/40050?from=rss <p>The Perl Oasis team would like to announce <a href="http://perloasis.org/opw2010/schedule">the Schedule</a> has been posted for Perl Oasis 2010. We have 15 speakers from 3 continents giving 9 hours of talks, culimating in a keynote by the Enlightened Perl Organisation Secretary Mark Keating (mdk).</p><p>Perl Oasis is a one day workshop focusing on Modern Enlightened Perl. The workshop this year is held January 16th at the Four Points Sheraton in Orlando Florida. Workshop registration costs $20 USD for non-students, and $10 USD for students. Every one is welcome to attend regardless of race, creed, ethnicity, gender, or preference of language (There are even PHP people speaking!)</p> perigrin 2009-12-24T07:10:54+00:00 journal Perl Oasis 2010: Discount Hotel Rates End http://use.perl.org/~perigrin/journal/39944?from=rss <p>November 25th is the last day for the Perl Oasis special Group Rate. The rate is $75 USD / night for what according to other sources is a $135-$150 / night hotel room.</p><p>Perl Oasis is a one day workshop in Orlando Florida focusing on Modern Enlightened Perl. This year we have speakers from three continents, and the entire Perl spectrum speaking. The Call for Speakers is still open so you can <a href="http://perloasis.org/opw2010/newtalk">submit your talk as</a> well!</p><p> <a href="http://perloasis.org/opw2010/news/518">http://perloasis.org/opw2010/news/518</a></p> perigrin 2009-11-25T01:48:30+00:00 journal still kicking after 7 years... http://use.perl.org/~geoff/journal/39105?from=rss apparently, the <a href="http://www.modperlcookbook.org/">mod_perl cookbook</a> appears in <a href="http://www.youtube.com/watch?v=HyxIrfjla88">the new Cracker video</a>. thanks to <a href="http://use.perl.org/~perigrin/">perigrin</a> for the discovery. geoff 2009-06-09T17:38:25+00:00 journal Early Komodo Edit review http://use.perl.org/~Matts/journal/39063?from=rss <p>Recently I started using Komodo Edit (the free version of Komodo IDE). This is an early review, of having used it for my work for about a week, which isn't really enough to know whether I'll be sticking with it, but it's a good start. I started to get a bit tired of the limitations of TextMate - an editor I like, and paid for, but the v2 which they keep hinting at seems to never be coming, and it has some short-falls which I find very annoying.</p><p>ActiveState actually asked me to do a review of Komodo IDE a while ago and I never got around to it, so I never got a free license key from them. Maybe they'll read this<nobr> <wbr></nobr>;-)</p><p>This review is of using it on my MacBook (non-pro) 2.4Ghz, 4GB Ram.</p><p>The Good<br>========</p><p>Generally it has everything I'm looking for:</p><p>- all documents in tabs<br>- mostly the right keystrokes for everything (i.e. it's not VI or Emacs, though I believe it has vi emulation for the die-hards) - I only had to fix Cmd-[ and Cmd-] for indent/deindent.<br>- open over scp/sftp.<br>- syntax highlighting seems to just work (haven't found any flaws yet, though Perl can be tricky that way!).<br>- shows line numbers, folds, etc in a nice way<br>- autoindent mostly works well<br>- macros in Javascript/Python make it VERY flexible<br>- "show current file changes" (before you save) is an AWESOME feature, and loads them into the proper "diff" window<br>- macros even allow you to access that diff window, so writing some macros to access our version control system (AccuRev - don't ask!) was relatively straightforward for a non-Javascript coder like myself<br>- macro output looks like it'll be easy enough to write a Prove/Test.pm runner</p><p>The Missing<br>===========</p><p>There are always things missing in editors, usually things I've experienced elsewhere that I'd love to see replicated:</p><p>- I *love* textmate's ability to re-indent code when I paste it in, at the correct current level.<br>- I wish open over sftp would allow me to open a whole directory (i.e. treat it like a temporary project)<br>- I wish I could open a directory instead of have to create a project.<br>- I wish tabs would double over instead of flow off the side (as an option) as I tend to keep a lot of files open<br>- I wish the project pane would highlight the current file/tab instead of the last file I double clicked on<br>- Documentation of the macro stuff is a bit weak, though the forums are good for help on this (I haven't posted, but the search has helped a lot, and most posts seem to get a reply).</p><p>The Buggy/Broken Bits<br>=====================</p><p>- There's sometimes an oddness with macros - sometimes I edit them and the edits don't "take" - restarting fixes this.<br>- Can be a TINY bit slow. I'm on a fast mac, so I suspect this would be much worse on my G4 laptop.<br>- The find options seem a bit odd to me - there's multiple locations for "find" - in the toolbar and in a separate window, be nice if it were unified and accessible with Cmd-F<br>- Open over sftp seemed a bit fragile and has hung on me once</p><p>Overall though, I like it. I'm not really sure what Komodo IDE could add over and above this, I suspect it'll just come with a lot of cool plugins and macros that do clever things...</p><p>I'll maybe post more on this if I keep using it.</p> Matts 2009-06-02T00:05:35+00:00 journal Perl on LLVM http://use.perl.org/~Matts/journal/38786?from=rss <p>There was recently <a href="http://www.nntp.perl.org/group/perl.perl5.porters/2009/04/msg145425.html">some talk</a> on p5p about getting perl up and running on the <a href="http://llvm.org/">LLVM</a>. This was following the recent excitement from the Python crowd about the <a href="http://arstechnica.com/open-source/news/2009/03/google-launches-project-to-boost-python-performance-by-5x.ars">Unladen Swallow</a> project, and less so, the <a href="http://www.macruby.org/blog/2009/03/28/experimental-branch.html">MacRuby Experimental Branch</a>.</p><p>So following that post I decided to see how easy/hard it was to get to the first stage - getting perl compiled and running with clang, the llvm gcc-like compiler.</p><p>It wasn't too hard (a lot of <a href="http://xkcd.com/303/">compiling</a>). After I got everything running I first ran perlbench, which looked reasonably promising:</p><blockquote><div><p> <tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;gcc&nbsp; &nbsp; llvm<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;---&nbsp; &nbsp; ----<br>arith/mixed&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp; 86<br>arith/trig&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp; 86<br>array/copy&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp;101<br>array/foreach&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp; 92<br>array/index&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp; 93<br>array/pop&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp; 96<br>array/shift&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp; 95<br>array/sort-num&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp; 89<br>array/sort&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp;101<br>call/0arg&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp;102<br>call/1arg&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp; 89<br>call/2arg&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp; 75<br>call/9arg&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp; 89<br>call/empty&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp; 87<br>call/fib&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp; 90<br>call/method&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp; 98<br>call/wantarray&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp; 89<br>hash/copy&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp; 95<br>hash/each&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp; 94<br>hash/foreach-sort&nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp; 97<br>hash/foreach&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp; 91<br>hash/get&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp; 91<br>hash/set&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp; 89<br>loop/for-c&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp; 86<br>loop/for-range-const&nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp;111<br>loop/for-range&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp;116<br>loop/getline&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp; 96<br>loop/while-my&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp; 94<br>loop/while&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp; 96<br>re/const&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp; 86<br>re/w&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp; 89<br>startup/fewmod&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp; 95<br>startup/lotsofsub&nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp; 93<br>startup/noprog&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp;101<br>string/base64&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp; 89<br>string/htmlparser&nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp; 92<br>string/index-const&nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp; 81<br>string/index-var&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;100&nbsp; &nbsp; &nbsp;108<br>string/ipol&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp;103<br>string/tr&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp; 86<br> &nbsp; <br>AVERAGE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100&nbsp; &nbsp; &nbsp; 93</tt></p></div> </blockquote><p>So next step was to try some more real-world code. I took 41k non-spam mails and ran SpamAssassin on them (using the mass-check tool), with no network tests enabled, and a HTML::Parser also compiled with LLVM (and gcc, in the gcc instance).</p><p>Results of the timings:</p><blockquote><div><p> <tt>GCC:<br> &nbsp; <br>real&nbsp; &nbsp; 40m56.599s<br>user&nbsp; &nbsp; 64m44.586s<br>sys&nbsp; &nbsp; 0m59.644s<br> &nbsp; <br>LLVM:<br> &nbsp; <br>real&nbsp; &nbsp; 45m38.831s<br>user&nbsp; &nbsp; 71m14.218s<br>sys&nbsp; &nbsp; 1m20.882s</tt></p></div> </blockquote><p>So rather less promising.</p><p>Still, an interesting start - see the original link for information on where it needs to go from here. I think this might have a lot of mileage if the actual internals were ported to LLVM style code. If someone is interested in picking up this project, and maybe being paid for it, please get in touch.</p> Matts 2009-04-09T17:57:03+00:00 journal What a Moose programmer would think... http://use.perl.org/~perigrin/journal/38749?from=rss <p>So I&#8217;ve been integrating Ash Berlin&#8217;s work on making <a href="http://search.cpan.org/dist/MooseX-POE">MooseX::POE</a> work with <a href="http://search.cpan.org/dist/MooseX-Declare">MooseX::Declare</a>. One of the things I came across was that the <code>method</code> keyword didn&#8217;t work as I expected.</p><p>I figured that something like:</p><p> <code>class Counter { use MooseX::POE; method START { $self-&gt;yield('increment_counter'); } event 'counter' =&gt; method { $self-&gt;counter($self-&gt;counter + 1); }; } </code> </p><p>would DWIM. But currently a <code>method</code> without a parameter list is slightly undefined. It happens to default to the same as an empty parameter list (ie <code>method ($self:) {<nobr> <wbr></nobr>... }</code>) but Florian and Ash both agreed that perhaps that wasn&#8217;t the best choice. To my mind I think that the right choice is that <code>method {<nobr> <wbr></nobr>... }</code> should be the equivlent of <code>method ($self, @_) {<nobr> <wbr></nobr>... }</code>. That is it should alias the invocant and pass through the rest of the args as a slurpy array.</p><p>Then tonight I was reading the <a href="http://use.perl.org/~chromatic/journal/38748">Perl 6 Design Minutes for 26 March 2009</a> and found the following:</p><blockquote><div><p>Patrick: </p><ul> <li>if you have a method declared without a parameter list, does it get @_ like a sub, or no parameters?</li> </ul><p>Larry: </p><ul> <li>I've been thinking it comes in the same way Perl 5 does it</li> <li>hadn't bothered to try to think about it the other way</li> </ul><p>Patrick: </p><ul> <li>Rakudo assumes @_</li> </ul><p>Larry: </p><ul> <li>but it leaves out the invocant</li> <li>that's the difference</li> <li>I haven't decided</li> <li>it's further from what a Perl 5 programmer might expect</li> <li>but it might be more useful</li> </ul></div> </blockquote><p>I think it&#8217;s closer to what a Perl 5 Moose programmer expects than Larry thinks.</p><p>UPDATED: upon talking with Ash I've clarified what I meant to say. Never blog while tired.</p> perigrin 2009-04-04T00:44:31+00:00 journal WebKit-- # breaks Catalyst::Controller::REST http://use.perl.org/~perigrin/journal/38524?from=rss <p>WebKit is has a broken Accept header, it puts text/xml and application/xml<br>first which breaks Catalyst::Action::REST&#8217;s default configuration and makes<br>the idea of being able to dispatch html/xhtml different from XML difficult at<br>best.</p><p>The reason it turns out is that the webkit developers <a href="https://bugs.webkit.org/show_bug.cgi?id=9572">cargo-culted from</a><br>Firefox, and someone in 2007 provided a <a href="https://bugs.webkit.org/show_bug.cgi?id=12296">patch</a>. The<br>response to the patch is &#8220;buh buh Firefox is doing it!&#8221;. When I tried to<br>add the comment below I discovered that their bugzilla required me to log in<br>and didn&#8217;t appear to have an option for OpenID. Because I&#8217;m loath to create<br><em>yet another</em> account to file a single comment on a bug I&#8217;ve included the text<br>here:</p><blockquote><div><p>Firefox (3.1 beta 2 at least) is no longer sending this Accept headers.</p><p> &nbsp; &nbsp; </p><p>Currently writing a REST-ful interface that renders XML different from<br> &nbsp; &nbsp; XHTML/HTML at the same URI is difficult (requires us to browser sniff and do<br> &nbsp; &nbsp; we really want to go back to that?) because Webkit based browsers will all<br> &nbsp; &nbsp; send then wrong Accept headers first. I actually ran into this while writing<br> &nbsp; &nbsp; an app that targets Android/iPhone and I had to disable my XML rendering code<br> &nbsp; &nbsp; (luckily it was a stub and not a required feature).</p><p> &nbsp; &nbsp; </p><p>Last the logic &#8220;Firefox does this&#8221; is a fallacy that I thought most people<br> &nbsp; &nbsp; were taught better by their mothers at an early age &#8230; if Firefox were to<br> &nbsp; &nbsp; jump off a bridge should WebKit too?</p></div></blockquote> perigrin 2009-02-21T23:17:06+00:00 journal Dakar http://use.perl.org/~Matts/journal/38317?from=rss <p>Just want to publicly say congratulations to my brother-in-law Quin for coming <a href="http://www.automobilsport.com/dakar-2009-rally-quin-evans-yorkshire-driver-tollefsen-fourth-overall---39722.html">fourth overall</a> in this year's grueling Dakar rally. An amazing achievement for a non-factory team.</p> Matts 2009-01-19T15:10:00+00:00 journal Perl Oasis: Schedule, Soirees, and Sponsor! http://use.perl.org/~perigrin/journal/38285?from=rss <p>We released our <a href="http://perloasis.org/opw2009/schedule">schedule</a> last weekend and we're a little behind on announcing it. Actually we're a little behind on everything right now, things are hectic. Please note the after-workshop Party!</p><p>Not on the schedule is a speaker's dinner on Friday Night, so if you're a speaker please know that you're welcome to attend, contact us for details on when and where.</p><p>Finally we're happy to announce that <a href="http://www.activestate.com/komodo/?utm_campaign=perloasis&amp;utm_medium=logo&amp;utm_source=perloasis&amp;utm_content=komodo&amp;utm_term=komodo">ActiveState</a> has donated some prizes for the Workshop Party Saturday night. Plans on how those will be given away will be announced Saturday. We look forward to having you all attend!</p> perigrin 2009-01-14T07:12:40+00:00 journal Perl Oasis Last Call for Talks http://use.perl.org/~perigrin/journal/38112?from=rss <p>Just a reminder,</p><p>The Perl Oasis deadline for Talk Submissions is tonight (December 17th) at Midnight (11:59pm) Eastern Time.</p><p>Please if you're thinking about submitting a talk, do so. It will make organizing the conference schedule much easier. The URL for talk submissions is http://perloasis.org/opw2009/newtalk</p><p>Thanks</p> perigrin 2008-12-17T20:08:07+00:00 journal One Week Left for Perl Oasis CfS http://use.perl.org/~perigrin/journal/38065?from=rss <p>There is only one week left in the Perl Oasis Call for Speakers. The last call<br>for speakers is December 17, 2009. Several speakers have already submitted<br>proposals and been accepted, but there is still room for more speakers. Please<br>submit soon so we can organize the schedule as quickly as possible. Talk<br>submissions can be made at <a href="http://perloasis.org/opw2009/newtalk">the</a><br>ACT site.</p><p>Perl Oasis is a one day workshop on January 17, 2009 focusing on Practical<br>Perl for Business. It is hosted by the Orlando Perl Mongers, and will be at<br>the Ramada Gateway Hotel, in Kissimmee Florida. For more information please<br>visit <a href="http://perloasis.org/">http://perloasis.org/</a>.</p> perigrin 2008-12-11T03:10:56+00:00 journal Perl Oasis - Keynote and Venue http://use.perl.org/~perigrin/journal/37939?from=rss <p>Just posted to the <a href="http://perloasis.org/">Perl Oasis Website</a>: </p><p>The Orlando Perl Mongers are pleased to announce the choice of our Keynote Speaker. <a href="http://perloasis.org/opw2009/user/2747">Mike Whitaker (Penfold)</a> will be flying in from the UK to give a keynote on <a href="http://www.enlightenedperl.org/">Enlightened Perl</a>. </p><p>Also the Venue for the conference has been chosen. The conference will be at </p><p> <a href="http://www.ramadagateway.com/">The Ramada Gateway</a> <br> 7470 Highway 192 West<br> Kissimmee, FL 34747<br> (800) 327-9170</p><p>There are rooms available at the Ramada, just tell them you're with the Perl Foundation. </p><p>We hope to see you there!</p> perigrin 2008-11-25T15:36:58+00:00 journal Does this exist? http://use.perl.org/~perigrin/journal/37828?from=rss <p>So I was writing a package similar to DBIx::Class::Schema::Loader which creates a tree of related packages. I realized that making a directory tree from a package name is a common problem between the two and I went to look to see how Schema::Loader did it, and eek<nobr> <wbr></nobr>... there has to be a better way.</p><p>Before I release Devel::GeneratePackagePath does anybody know if the lazyweb got there first?</p> perigrin 2008-11-08T04:14:55+00:00 journal Perl Oasis 2009 - Call for Speakers http://use.perl.org/~perigrin/journal/37813?from=rss Attention Speakers! The Perl Oasis Workshop 2009 will be held in Orlando, on January 17th . We will have two tracks (advanced and beginner), and we expect approximately 100 participants. We will also try to arrange a hackaton on the Sunday after the conference. This workshop's topic is "Practical Perl for Business". We're interested in hearing about your talks on these topics: <ul> <li> Perl Success Stories</li> <li> Modern use of Perl</li> <li> Good testing practices using Perl</li> <li> Your Favorite Topic? (systems administration / life sciences / web development)</li> </ul><p> We accept these presentation types: </p><ul> <li> Short Talks (20 minutes)</li> <li> Standard Talks (40 minutes)</li> </ul><p> To submit a proposal for a talk/presentation, please register your proposed title and an abstract on http://www.perloasis.org/opw2009/newtalk. Submissions are due midnight (23:59 EST) on December 17th 2008. Submitters will be notified within two weeks whether or not their talks have been accepted. If your proposal is accepted, you will be expected to confirm within 48 hours that you in fact will give the talk; otherwise, your slot may be given to someone else. If you have something which does not fit the formats listed please feel free to contact us anyway and we will evaluate it. Please include the following with your abstract(s): </p><ul> <li> A little information about yourself (and possibly an link to an image of your choosing - preferably of yourself).</li> <li> The expected minimum level of knowledge of your target audience (Beginner, Intermediate, Advanced)</li> <li> An indication of the length of the presentation.</li> <li> A listing of any requirements you might have for doing your presentation. We will try to accommodate your request. Projectors and internet connection will be available for all talks.</li> </ul><p> If possible, please include a link to your slides/paper ready for online publishing. The files are also accepted just after talk ends, so we can include any last minute modifications. We may take the liberty of filming presentations. If you are not interested in being filmed during your presentation, please let us know in advance. We cannot offer much for your lecture, except: </p><ul> <li> Free admittance</li> <li> A chance to meet a lot of Perl people</li> </ul><p> If you have any special requests which have to do with fee and payment please contact us at info@perloasis.org. If you have any questions at all, please don't hesitate to contact us info@perloasis.org.</p> perigrin 2008-11-06T04:09:37+00:00 journal Perl Unsafe Signals http://use.perl.org/~Matts/journal/37798?from=rss <p>This is just to document (and place in google) how to do unsafe signals in recent perls without loading a non-core library to do it:</p><blockquote><div><p> <tt>&nbsp; &nbsp; use POSIX qw(SIGALRM);<br>&nbsp; &nbsp; my $timeout = 30;<br>&nbsp; &nbsp; my $sigset = POSIX::SigSet-&gt;new(SIGALRM);<br>&nbsp; &nbsp; my $action = POSIX::SigAction-&gt;new(<br>&nbsp; &nbsp; &nbsp; &nbsp; sub {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # re-install alarm in case we were in an internal eval{} block<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alarm($timeout);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; die "timeout working on: " . (caller(1))[1] . "\n";<br>&nbsp; &nbsp; &nbsp; &nbsp; },<br>&nbsp; &nbsp; &nbsp; &nbsp; $sigset,<br>&nbsp; &nbsp; &nbsp; &nbsp; &amp;POSIX::SA_NODEFER, # turns off safe signals<br>&nbsp; &nbsp; );<br>&nbsp; &nbsp; POSIX::sigaction(SIGALRM, $action);<br>&nbsp; &nbsp; my $prev_alarm = alarm($timeout);<br> &nbsp; <br>&nbsp; &nbsp; eval {<br>&nbsp; &nbsp; &nbsp; &nbsp; # long running code here<br>&nbsp; &nbsp; };<br>&nbsp; &nbsp; my $err = $@;<br>&nbsp; &nbsp; alarm($prev_alarm);<br>&nbsp; &nbsp; if ($err) {<br>&nbsp; &nbsp; &nbsp; &nbsp; if ($err !~<nobr> <wbr></nobr>/timeout working on:/) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; die $err; # propogate this error<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; # process the timeout<br>&nbsp; &nbsp; }</tt></p></div> </blockquote><p>This is written for alarms, which TBH is probably where you really need it, since the regexp engine can get its knickers in a twist and not fire your alarm until the heat death of the universe, but the code will work for other types of signals too.</p><p>And yes, I know there are modules on CPAN for this, such as the excellent and very simple Perl::Unsafe::Signals, but sometimes another module isn't an option. I also know the code is a bit flawed in that the second installation of the alarm doesn't do the right thing (it should install at as $timeout - (time - $start_time)), so feel free to fix it yourself.</p> Matts 2008-11-03T20:39:10+00:00 journal Perl Oasis http://use.perl.org/~perigrin/journal/37772?from=rss <p>The Orlando Perl Mongers are pleased to announce the Perl Oasis Workshop (aka Orlando Perl Workshop) on January 17, 2009. This is a one day workshop with a focus on Perl solving Business Problems. The website (<a href="http://perloasis.org/">http://perloasis.org</a>) is live, the venue (<a href="http://www.ramadagateway.com/">http://www.ramadagateway.com</a>) is booked, all we need now are the people! </p><p>Being that we are in Orlando, and that our venue is within a mile of the Disney Main Gates, we are hoping to have a very Family Friendly conference. If you have suggestions and ideas for events you'd like to see please get in touch with us. We hope to see you there!</p> perigrin 2008-10-31T13:29:21+00:00 journal Missing in ACTion http://use.perl.org/~perigrin/journal/37720?from=rss <p>Has anybody seen the ACT (http://act.mongueurs.net/) maintainers, It's been over two weeks since I started asking about how to make the Perl Oasis (http://www.perloasis.org) workshop go live, and the last 5 emails have gone off never to be heard from again. I'm also starting to hear from others that they're having issues with SVN and updating files on their live sites.</p><p>Has anybody seen Eric Cholet(Echo)? Should we send out a search party to his last known coordinates?</p><p>UPDATE:</p><p>BooK has responded on the ACT mailing list saying it as I feared. Real Life has gotten him. Also I don't want to imply that SVN is broken for *everyone*. I've just heard reports from one specific group of people who were having issues, but since their workshop is before mine I figured it behooved me to help figure out what's going on. Thank you for those who have responded.</p> perigrin 2008-10-23T14:40:55+00:00 journal Orlando.PM Social Tonight http://use.perl.org/~perigrin/journal/37661?from=rss <p>Just a reminder tonight is our first Social meeting at 7pm. We're meeting Downtown tonight, at the Harp and Celt.</p><p>To quote Charles (who chose the venue):<br>---</p><p>I have chosen The Celt (the bar portion of The Harp and Celt) downtown.</p><p>http://www.harpandcelt.com/TheCelt.html</p><p>This is a small Irish bar that has food and drinks. I have eaten there, the food is good. It is also close to a few other places if we want to migrate. Nearby there is Crooked Bayou, Central Station Pub, AKA Lounge, Casey's, Cleo's, Suite B, and is only a block away from Wall Street Plaza. There is a garage you can park in on Central between Magnolia and Rosalind or you can hunt around for a free spot. Parking should be free in any metered parking spot.</p><p>----</p> perigrin 2008-10-14T13:27:10+00:00 journal More Ubiquity http://use.perl.org/~perigrin/journal/37300?from=rss <p>So I&#8217;ve been playing with <a href="http://wiki.mozilla.org/Labs/Ubiquity">ubiquity</a> some more. Because all of the code runs in chrome:// space in firefox, you get to run as a first class citizen on the computer. Unfortunately this means if you want to do anything fun you need to deal with XPCOM.</p><p>Tonight I stole some code from <a href="http://developer.mozilla.org/En/Code_snippets:Running_applications">developer.mozilla.org</a> and came up with the following (only works/tested on a Mac):</p><p><code><br>function system(cmd, args) {<nobr> <wbr></nobr>// create an nsILocalFile for the executable<br> &nbsp; &nbsp; &nbsp; &nbsp; var file = Components.classes["@mozilla.org/file/local;1"]<nobr> <wbr></nobr>.createInstance(Components.interfaces.nsILocalFile);<br> &nbsp; &nbsp; &nbsp; &nbsp; file.initWithPath(cmd);<nobr> <wbr></nobr>// create an nsIProcess<br> &nbsp; &nbsp; &nbsp; &nbsp; var process = Components.classes["@mozilla.org/process/util;1"]<nobr> <wbr></nobr>.createInstance(Components.interfaces.nsIProcess);<br> &nbsp; &nbsp; &nbsp; &nbsp; process.init(file);<nobr> <wbr></nobr>// Run the process.<nobr> <wbr></nobr>// If first param is true, calling thread will be blocked until<nobr> <wbr></nobr>// called process terminates.<nobr> <wbr></nobr>// Second and third params are used to pass command-line arguments<nobr> <wbr></nobr>// to the process.<br> &nbsp; &nbsp; &nbsp; &nbsp; process.run(false, args, args.length);<br>}</code></p><p><code>CmdUtils.CreateCommand({<br> &nbsp; &nbsp; name: "say",<br> &nbsp; &nbsp; takes: {"your shout": noun_arb_text},<br> &nbsp; &nbsp; preview: function( pblock, theShout ) {<br> &nbsp; &nbsp; &nbsp; &nbsp; pblock.innerHTML = "Will echo: " + theShout.text;<br> &nbsp; &nbsp; },<br> &nbsp; &nbsp; execute: function( theShout ) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; system('/usr/bin/say', [theShout.text]);<br> &nbsp; &nbsp; },<br>})<br></code></p><p>This will run text-to-speech on whatever test you input (either via typing or that is selected in the browser) by using the <code>say</code> command on OSX. The important part though is not what it does, it is what it <em>can do</em>. This opens up all of CPAN to Ubiquity.</p><p>I think I&#8217;m gonna have some fun now.</p> perigrin 2008-08-29T03:38:59+00:00 journal Ubiquity http://use.perl.org/~perigrin/journal/37284?from=rss <p>So <a href="https://wiki.mozilla.org/Labs/Ubiquity">Ubiquity</a> was released today. This is the mozilla developers take on <a href="http://docs.blacktree.com/quicksilver/what_is_quicksilver">QuickSilver</a> a popup sort of GUI version of the command line. I have to say Ubquity is slick as hell. I installed it this morning and in between work tasks I wrote out two quick and simple search scripts, and then set them up to <a href="http://chris.prather.org/verbs/">distribute online</a>. Note you can subscribe to my commands as a feed, and as I update them &#8230; <em>you</em> get the updates too. </p><p>The commands are written in Java script as chrome applications so they have full access to the harddrive &#8230; this is good and bad and the developers claim that in version 0.02 they&#8217;ll have a Web of Trust for the code setup. </p><p>All in all color me very impressed on a first date.</p> perigrin 2008-08-27T20:00:21+00:00 journal Dear lazyweb http://use.perl.org/~Matts/journal/37269?from=rss <p>How do you get your iPhone 3G wallpaper onto the "Home" or "Applications" screen? There's a screenshot of this on the iphonefaq web site, but my "Wallpaper" just seems to apply to the iPhone "lock" page.</p> Matts 2008-08-25T16:23:58+00:00 journal Net::Twitter and Identi.ca FTW! http://use.perl.org/~perigrin/journal/36956?from=rss <p>So ct, the guy behind <a href="http://search.cpan.org/dist/Net-Twitter/">Net::Twitter</a> totally thought ahead when he wrote the library and set it up so that you could set the api[url|host|realm] for authentication &#8230; so in case there was ever a twitter clone that supported the same API &#8230; things would <em>just work</em>.</p><p> <a href="http://identi.ca/">Identi.ca</a> just rolled out support for the Twitter API. Things <em> <a href="http://laconi.ca/Main/Libraries">just work</a><nobr> <wbr></nobr></em>.</p> perigrin 2008-07-18T19:37:18+00:00 journal The Perl Oasis http://use.perl.org/~perigrin/journal/36648?from=rss <p>So tonight was the <a href="http://orlando.pm.org/">Orlando Perl Monger&#8217;s</a> meeting again. Sadly the scheduled speaker had to cancel at the last minute leaving the floor open for us to talk about &#8230; The Perl Oasis Workshop. </p><p>Tonight we decided to go ahead and start planning on a workshop in mid January here in sunny Orlando. &#8216;If a hundred people are silly enough to go to <a href="http://frozen-perl.org/">Minnesota in February</a> I bet a bunch to show up to Orlando in January!&#8217; The theme will be Practical Perl, with much more to come as the details get fleshed out. </p> perigrin 2008-06-11T04:17:40+00:00 journal Maybe found an email client... http://use.perl.org/~Matts/journal/36632?from=rss <p>I'm currently testing GyazMail. It's a little slow at pulling the messages from the IMAP server, but apart from that appears to do everything I want, and my desktop is no longer grinding along at snails pace.</p> Matts 2008-06-09T17:49:19+00:00 journal Trying Thunderbird (on Mac) again... http://use.perl.org/~Matts/journal/36623?from=rss <p>I hate mail clients. Really there's no good one I've found yet.</p><p>Yesterday I got sick of Mail.app spinning disk for no good reason whatsoever. Yes OK, so I have an IMAP system with several gigs of mail in it, but pine copes just fine with it. When Mail.app is chugging I can run fs_usage and see that it's just a blur of "Mail" entries.</p><p>So first I tried Opera Mail. That's OK-ish, but it's so integrated with the browser that it doesn't obey your default browser setting for links, and had a number of other weaknesses that I couldn't live with (like it didn't like hierarchical folders in IMAP).</p><p>Then I thought I'd give Thunderbird another go. I actually use this as my PC mail client when I'm forced to use Windows, so I figured I'd give it a go.</p><p>My mail client has to be able to do a few things that I've become used to:</p><p>1) Sort threads by most-recent-arrival. This is absolutely critical - why would I want a new mail arriving to be attached to a thread WAY up in my scrolly view? Now <a href="http://micropipes.com/code/threadbubble/">ThreadBubble</a> promises some of this, but it requires you sort by Date and not arrival time - which is utterly broken since so many systems produce incorrect dates on mails, that when I enabled it there were a bunch of completely out of order threads at the bottom of my subject pane. Plus it didn't seem to entirely work. For what it's worth, the feature I want is a <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=262319">more than 3 year old bug</a> in Thunderbird, and not even due for 3.0a1.</p><p>Oh, and if it could do Mail.app's method of grouping by thread but just showing in arrival order that would be bliss (alpine now offers this).</p><p>2) Integration with iCal and calendar invites from my windows-using colleagues.</p><p>3) Cope with going offline without nagging. Due to my VPN/Firewall situation at work, things regularly disconnect, so it needs to cope with that without nagging. This is currently a showstopper with me for thunderbird.</p><p>4) Good fast search. For some bizarre reason Mail.app's Tiger version removed the "Subject or Sender" search. Now you have to choose which you want. That's simply not efficient. Thunderbird's is nice. But their full text search isn't fast. Integration with Spotlight would be good, but the support for doing that in Thunderbird is buggy, apparently.</p><p>5) Nice drag and drop UI - this makes it easier for me to drag missed spam into the right folders (they are categorised into "regular spam", "foreign" and "nigerian", so having to type these folder names every time (a-la pine) is a pain.</p><p>6) Support for a mixed proxy environment. I have two accounts, one requires a SOCKS5 proxy (that can go up and down all the time) the other doesn't require a proxy.</p> Matts 2008-06-08T14:24:45+00:00 journal Why I am Passionate About Perl http://use.perl.org/~perigrin/journal/36475?from=rss <p>brian d. foy was asking for information about <a href="http://use.perl.org/~brian_d_foy/journal/36356">&#8220;Why People Are Passionate About Perl&#8221;</a> for his keynote. I posted this originally to my <a href="http://chris.prather.org/">own site</a> but decided to save brain some google juice and repost here.</p><p> <strong> <em>The person who introduced me to Perl showed me that&#8230;</em> </strong> </p><p>Nobody actually introduced me to Perl. I found it on my own. In 1996 when you had finished learning HTML and CSS and wanted to have a job in the industry Perl was pretty much the best choice because most of the web apps back then were written in it. Things have changed, but Perl was my first serious attempt at learning a programming language.</p><p> <strong> <em>I first starting using Perl to&#8230;</em> </strong> </p><p>Find a job that didn&#8217;t suck. I succeeded but it took a while.</p><p> <strong> <em>I kept using Perl because&#8230;</em> </strong> </p><p>Well I didn&#8217;t. I went to VB and then to Pascal cause that&#8217;s what the Computer Science department was taught in, but I came back to Perl because I wanted to do web development. The biggest reason I came back to Perl was a job where the project was being ported from Cold Fusion to Java, and I was hired to install WebSphere on the target platform. The platform used Perl for all of the configuration managment. After 3 days of trying to get Websphere installed, I asked if I could try porting ot mod_perl, after a week I had more done than they&#8217;d had done in Java and the rest was history.</p><p> <strong> <em>I can&#8217;t stop thinking about Perl&#8230;</em> </strong> </p><p>Because after 10 years it is the way I think about programming. Perl has warped the way I think so that I naturally think the way it flows. This has improved a bit since I discovered <a href="http://moose.perl.org/">Moose</a>. I think that I can better express my ideas to others because of the new found clarity, but the fact remains that I still think first in Perl and then translate to whatever else I&#8217;m writing.</p><p> <strong> <em>I&#8217;m still using Perl because&#8230;</em> </strong> </p><p>Happily I&#8217;m paid to write Perl for a living. I&#8217;ve worked damn hard to make sure that continues to be true because I hate working in a place where I can&#8217;t give my full effort.</p><p> <strong> <em>I get other people to use Perl by&#8230;</em> </strong> </p><p>JFDI. Write code, release it, tell others about it. You can&#8217;t force people to something just because you love it. You can only show them how enthusiastic it has made you, and show them how it solves your problems. Hopefully they catch on, or at least stay out of your way.</p><p> <strong> <em>I also program in &#8230; and &#8230;, but I like Perl better since&#8230;</em> </strong> </p><p>I&#8217;ve worked in Java, PHP, VB (ASP and Straight VB), Pascal, etc. I like Perl because it (mostly) lets me express the idea or algorithm rather than forcing the idea or algorithm to express the language. The hardest part of re-learing Java after having worked in Perl for several years was realizing that you had do to things the way Java decided, not the way that they most naturally were expressed. With ASP and PHP the fact was I constantly felt I had to write around holes in the language. </p> perigrin 2008-05-20T14:43:23+00:00 journal I'd do it... http://use.perl.org/~Matts/journal/36447?from=rss <p>If I were asked to speak at google I'd ask for this too:</p><p><div class="quote"><p>I simply ask Google to change a few lines of code, you know, couple of minor alterations, nothing truly significant. That way, he said, anytime anybody in the world Googles, &#8220;photography,&#8221; they get sent to my website.</p></div><p>From: <a href="http://www.joemcnally.com/blog/2008/05/16/google/">http://www.joemcnally.com/blog/2008/05/16/google/</a></p><p>Nothing much. Just a few lines of code. No speaker's fee.<nobr> <wbr></nobr>:-)</p> Matts 2008-05-17T02:59:46+00:00 journal