jhorwitz's Journal http://use.perl.org/~jhorwitz/journal/ jhorwitz's use Perl Journal 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:14:49+00:00 pudge pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 jhorwitz's Journal http://use.perl.org/images/topics/useperl.gif http://use.perl.org/~jhorwitz/journal/ My last post http://use.perl.org/~jhorwitz/journal/32503?from=rss After several fruitful years on <code>use Perl;</code>, I'm merging my journal with my web site, <a href="http://www.smashing.org/jeff">smashing.org</a>. Hopefully my friends and fans will subscribe to the RSS feed on smashing.org so they can continue reading my nonsense uninterrupted. I'll still be lurking around here to comment on others' nonsense though! <p> <code>exit(0); # stage right</code></p> jhorwitz 2007-02-25T21:36:10+00:00 journal Fold me you will! http://use.perl.org/~jhorwitz/journal/32218?from=rss I think I found this on Digg...took me a while, as the instructions consisted of only diagrams and a few sparse hints every few steps...in Spanish! A nice addition to my collection. <p> <a href="http://www.smashing.org/gallery/v/origami/100_1326.JPG.html">Jedi Master Yoda</a></p> jhorwitz 2007-01-20T23:58:19+00:00 journal Linux kernel logging http://use.perl.org/~jhorwitz/journal/31571?from=rss I'm having a hard time believing this, but it appears that the Linux kernel does not log ENOSPC errors in the VFS layer. <p> This means i can't monitor kernel logs for "no space left on device" or "file system full" type errors (userland processes still report it though). I guess I took this feature for granted with Solaris, so I was surprised when I didn't see any logs on my Linux boxes when I filled up a file system. And no, I didn't fill up the file system containing the logs -- I'm not that senile yet.<nobr> <wbr></nobr>;-) </p><p> Time to write a kernel patch. Unless someone proves me wrong...and I hope they do.</p> jhorwitz 2006-11-10T19:40:11+00:00 journal RAID and backups http://use.perl.org/~jhorwitz/journal/29884?from=rss Your RAID configuration is only as good as your controller. The LSI card in my sixgeeks.org server crapped out over a period of several weeks, taking two drives with it, fortunately not at the same time. But it did take the entire bus down randomly during these failures, sending me down to the datacenter several times a week. DOH! <p> After replacing the bad disks and the card (all under warranty), I did see some data corruption, so I reinitialized the RAID config, reloaded the server, and restored from backups. I'm happy to report that all is well again. </p><p> Moral of the story? RAID does not protect you from data loss -- only backups can do that. Take it from a career sysadmin.<nobr> <wbr></nobr>:)</p> jhorwitz 2006-06-12T20:07:17+00:00 journal New toy http://use.perl.org/~jhorwitz/journal/29708?from=rss Mmm...shiny new 30 GB iPod. My old Zen Nomad served me well, but it was time for an upgrade. jhorwitz 2006-05-25T13:24:05+00:00 journal extproc_perl 2.50 http://use.perl.org/~jhorwitz/journal/29254?from=rss I'm happy (and relieved) to announce the release of extproc_perl 2.50, the first release in almost two years! Get it <a href="http://www.smashing.org/extproc_perl">here</a>. <ul> <li>new spec parser using Parse::RecDescent</li> <li>relinking is no longer needed for new procedures</li> <li>"create_wrapper" removed in favor of "create_extproc"</li> <li>cleaned up source code formatting</li> <li>new testing infrastructure with better coverage</li> <li>changed some default configuration options in Makefile</li> </ul><p> The elimination of the relink step for new procedures is a big win, and the test suite has been a thorn in my side for years. But all is well now! Now to update the users guide...</p> jhorwitz 2006-04-07T20:23:49+00:00 journal I'm back, baby! http://use.perl.org/~jhorwitz/journal/28370?from=rss After a long unannounced hiatus, I'm back, hacking away once again. My excuse for being away so long? Complete and utter burnout. Too many things going on at work and home, and there was no time for code. I'm sure many of you have had the same experience. <p> My New Year's resolution is to catch up with everything Parrot and Pugs so I can push mod_parrot along. Hopefully I didn't miss too much, but I know better...</p> jhorwitz 2006-01-16T15:53:41+00:00 journal Interview http://use.perl.org/~jhorwitz/journal/28338?from=rss A looooong time ago, Sean Hull interviewed me about my involement with Oracle and open source software for an article he was writing. While OTN didn't publish the article, he's posted it on his site <a href="http://www.oracleopensource.com/archives/2006/01/oracle_open_sou_1.html">here</a>. It's actually a nice reminder to me just how long it's been since I've worked on extproc_perl! jhorwitz 2006-01-13T16:03:34+00:00 journal Where I've been lately http://use.perl.org/~jhorwitz/journal/26910?from=rss Some of you may have noticed I haven't been on IRC, coding or journaling lately. In addition to work taking over my life for a while, I took August off to rebuild my front walk and landing. A grueling process to do by yourself, but worth it. Pictures <a href="http://www.smashing.org/gallery/walkway">here</a>. Life is now slowly returning to normal. jhorwitz 2005-09-28T12:30:45+00:00 journal Moving right along http://use.perl.org/~jhorwitz/journal/26330?from=rss The <a href="http://www.smashing.org/mod_parrot">mod_parrot</a> <a href="http://www.sixgeeks.org/mailman/listinfo/modparrot-dev">list</a> has seen a bunch of new subscribers and is becoming fairly chatty as of late. This is good news, as we now have a nicely sized group of talented people contributing both code and ideas. Maybe this project will actually make some sort of impact.<nobr> <wbr></nobr>:) jhorwitz 2005-08-17T18:21:37+00:00 journal mod_parrot 0.3 http://use.perl.org/~jhorwitz/journal/26048?from=rss I'm pleased to announce the release of mod_parrot 0.3. The most notable changes include support for all apache hooks, autogeneration of request_rec methods, and a mod_pugs proof of concept. It also supports both the new (leo-ctx5) and old calling conventions. <p> You can download it <a href="http://www.smashing.org/mod_parrot">here</a>, or from subversion at http://svn.perl.org/parrot-modules/mod_parrot. If you decide to try it, please use a recent svn revision of parrot -- things change quickly around here! </p><p> Changes from 0.2: </p><ul> <li>Support for Parrot 0.2.2 (geeksunite)</li> <li>Support new Parrot calling conventions (still backwards compatible)</li> <li>Autogeneration of request_rec methods</li> <li>All Apache hooks are implemented</li> <li>The init file is no longer required to be PBC</li> <li>Include a very simple mod_pugs proof of concept, with tests</li> <li>ParrotTrace now accepts flags that are passed Parrot's trace facility</li> <li>Parrot*Handler takes an optional language specifier</li> <li>Use parrot-config.imc to fetch parrot configuration</li> <li>Configure.pl no longer requires Apache::Test</li> <li>ModParrot::NCI::backtrace returns a backtrace string</li> <li>New APR::Table class</li> <li>New Apache::RequestRec methods: <ul> <li>notes (returns APR::Table object)</li> <li>main</li> <li>prev</li> <li>next</li> <li>status</li> </ul></li> </ul> jhorwitz 2005-08-02T23:22:09+00:00 journal Almost at 0.3 http://use.perl.org/~jhorwitz/journal/25770?from=rss mod_parrot development has been moving along at an almost Pugs-like pace* this past week, moving us ever closer toward our next release, 0.3. Almost all Apache hooks have been implemented (only filters are missing), and right now I'm working on some new examples. The coolest one is a minimal version of mod_rewrite written in PIR using PGE. Funky! <p> On another note, particle has joined the fun and will be helping to port mod_parrot to Windows. More power to him.<nobr> <wbr></nobr>:) </p><p> Also, thanks to <a href="/~geoff/journal">Geoff</a> for integrating Parrot support into Apache::Test. Now we can write true server side tests. Drinks all around! </p><p> <i>* Developing at the speed of Pugs is an asymptotic process -- it can be approached, but never truly reached.<nobr> <wbr></nobr>;-)</i></p> jhorwitz 2005-07-18T18:26:31+00:00 journal There, here, there, here, there and back again http://use.perl.org/~jhorwitz/journal/25443?from=rss Finally back in Philly after YAPC. Had a great time. But Wednesday was not a great day to travel along the eastern seaboard. Matt and Heather were kind enough to drive Geoff and myself to the airport from the hotel. After a lot of traffic, we got there around 5 I think -- 3 hours before our flight left at 8. When we got to the ticket counter, the agent said our flight had been canceled due to weather, and there was another one boarding *now* that we were now booked on. So we rush over to customs, but the line was predictably long. After making it through and getting to the gate, we'd missed our flight by 10 minutes. So we were booked on *another* flight, which was supposed to have left earlier, but was now delayed until...8:00 -- right back where we started! On the way to the gate we saw Havana Mike and Jerry Gay, who we'd said our goodbyes to at the hotel. Mike was delayed too, so we went up and grabbed some dinner. <p> Back at the gate, our flight had been pushed back to at least 8:30. At 8:00 the gate agent announced that they were unsure when our plane would be released, so they were bringing back another flight to Philly that had been sitting on the runway for 3 hours, and kicking off all the connecting passengers who were going to miss their flights anyway. So we got yet another set of boarding passes and headed across the terminal to the other gate. </p><p> As the local Philly passengers got off the plane to stretch a bit, we saw Jim Wismer from Philly.pm. Turns out the flight sitting on the runway for 3 hours was the one we missed by 10 minutes. Ouch! </p><p> A few minutes before boarding the gate agents noticed an unattended piece of luggage a few feet from me. As we were boarding, they cleared the row of seats. In the jetway a security guard came up the stairs from the ground with a bomb sniffing dog! But that's the last I saw of it, as we were now stepping onto the plane. Shortly after we took off, finally heading back home. </p><p> When it was all said and done, we arrived in Philadelphia an hour behind schedule. That was *way* too much work for only getting in an hour late!</p> jhorwitz 2005-06-30T15:15:49+00:00 journal I am lambda, hear me code http://use.perl.org/~jhorwitz/journal/24558?from=rss Found my lambda-fu today and made my first significant contribution to Pugs: eval_parrot. This lets Pugs execute arbitrary IMC code and enabled Autrijus to add a Parrot backend to Pugs. This project gets more interesting every day. <p> Anyway, that's my good deed for the day. Now for some dinner...</p> jhorwitz 2005-05-05T22:23:47+00:00 journal YAPC http://use.perl.org/~jhorwitz/journal/24495?from=rss Just booked everything for YAPC. Sadly, I was shut out of both OSCON and YAPC with my talk proposals, but I'm heading up to Toronto anyway and having a damn good time!<nobr> <wbr></nobr>:) jhorwitz 2005-05-02T20:35:06+00:00 journal mmmm...pugs goodness http://use.perl.org/~jhorwitz/journal/24410?from=rss Actingly quickly on a feature request, Autrijus resurrected the Parrot backend for Pugs and implemented subroutines in a matter of hours. That means objects (or lack thereof) are the only thing standing in the way of mod_pugs. <p> However, with subroutine support, I can now create a very minimal proof-of-concept mod_pugs that just spews content instead of interacting with the Apache API directly. This will also give me the chance to create the framework for mod_pugs so it's ready once objects are. </p><p> Progress is a good thing!</p> jhorwitz 2005-04-27T20:14:56+00:00 journal Fortune for you, Mr. Dallas http://use.perl.org/~jhorwitz/journal/23994?from=rss Seen in my fortune cookie on Thursday: <p> <cite> You have an unusual equipment for success, use it properly. </cite></p> jhorwitz 2005-04-03T15:27:08+00:00 journal mod_parrot 0.2 released http://use.perl.org/~jhorwitz/journal/23887?from=rss Get your mod_parrot <a href="http://www.smashing.org/mod_parrot">here</a>. <ul> <li>Formal support for Parrot 0.1.2 "Phoenix"</li> <li>New handlers: authz, access, open_logs</li> <li>Added test to detect mod_parrot NCI signatures in parrot</li> <li>Implement HLL layer for language specific handler wrappers</li> <li>PIR HLL handler passes request_rec as first argument to Parrot handler</li> <li>Replaced global per-process context with thread-safe context pool</li> <li>New Apache::RequestRec methods: <ul> <li>hostname</li> <li>user</li> </ul></li> <li>log severity constants in Apache::Constants</li> <li>more design documentation, updated examples</li> </ul> jhorwitz 2005-03-28T17:49:25+00:00 journal $self-&gt;recover or die; http://use.perl.org/~jhorwitz/journal/23788?from=rss I've been exremely sick these past few weeks with a nasty stomach virus and various complications, but this week I'm finally feeling closer to 100% than I've felt in a long time. I couldn't eat much more than two full meals over the course of a week and half, and even though I dropped a few pounds I was looking to lose anyway, it's not a diet I recommend. <p> I've completely ignored my projects like mod_parrot while I was sick, and now it's time to get back on track. I eased into things yesterday by attending the philly perlmongers social outing, which was fun, and it was just good to be out of the house! </p><p> Anyway, time to get back to work. It's nice to be able to concentrate on something other than my poor digestive system for once!</p> jhorwitz 2005-03-22T16:14:36+00:00 journal die if $address =~ /box/; http://use.perl.org/~jhorwitz/journal/23400?from=rss My cell phone finally died last night and by some miraculous alignment of the planets, today was the first day I was eligible for a free upgrade phone. So I go to order my new phone on Verizon's site, and as part of the last step, I enter my shipping address. It bombs out, saying they can't deliver to a P.O. box. Um, I live on a street, not a P.O. box! <p> After retrying 2 or 3 times, I realized what was happening. My street name is Boxford, and some idiot programmer decided that anything with the string "box" in it was a P.O. box. Brilliant! </p><p> Anyway, instead of taking hours to explain this problem to some customer service rep who doesn't deal with website problems, I went to the nearest Verizon store and got my phone there. I ended up paying $20 more for an accessory package (car charger, etc.) that was cheaper online, but I'll be writing Verizon to complain about that. </p> jhorwitz 2005-02-26T19:27:25+00:00 journal Developers Developers Developers Developers http://use.perl.org/~jhorwitz/journal/23139?from=rss While I have been swamped with $DAYJOB these past few weeks, to my surprise there has been quite a bit of activity on the <a href="http://www.smashing.org/mailman/listinfo/modparrot-dev">mod_parrot development list</a>. It's a really tiny community right now, but I'm already getting patches for new handlers and bug fixes, and good advice from <a href="/~geoff">Geoff</a>, who gives us the view from the mod_perl/Apache world. All this gives the development process a much needed kick in the rear, and gives me that warm, fuzzy feeling about the project. Then again, a few beers gives me that same feeling, so take it for what it's worth.<nobr> <wbr></nobr>;-) jhorwitz 2005-02-11T14:45:31+00:00 journal Powerbook http://use.perl.org/~jhorwitz/journal/23088?from=rss My buddy Tom just got one of the shiny new 1.67 GHz 15" Powerbooks. I'm actually using him as my guinea pig -- if he really likes it, I'm gonna get one. I was an Apple guy in the '90s, so I'm looking forward to getting back to my roots.<nobr> <wbr></nobr>:) jhorwitz 2005-02-08T19:06:17+00:00 journal Apache::Test++ http://use.perl.org/~jhorwitz/journal/23018?from=rss <a href="/~geoff">Geoff</a> just showed me a neat Apache::Test trick. If you're testing an Apache module with Apache::Test, you can run a debugger on the httpd process automatically with this line:<blockquote><div><p> <tt>t/TEST -debug=gdb -breakpoint=somebreakpoint</tt></p></div> </blockquote><p>I've been running GDB manually up to this point, so this is a big time saver. Apache::Test just continues to earn brownie points with me.</p> jhorwitz 2005-02-04T15:44:19+00:00 journal Subversion http://use.perl.org/~jhorwitz/journal/22534?from=rss I've moved the mod_parrot source over to the perl.org Subversion repository, thanks to <a href="http://use.perl.org/~robrt">Robert's</a> smooth conversion. I've never used Subversion before, so I'm hoping this is a positive learning experience. And from what I hear, it should be. jhorwitz 2005-01-02T22:55:03+00:00 journal article http://use.perl.org/~jhorwitz/journal/22431?from=rss My <a href="http://www.perl.com/pub/a/2004/12/22/mod_parrot.html">mod_parrot article</a> is finally up on perl.com. Enjoy! jhorwitz 2004-12-23T14:39:42+00:00 journal Mandelbrot http://use.perl.org/~jhorwitz/journal/22305?from=rss I wanted to show off something snazzy with mod_parrot, so check out the ASCII Mandelbrot browser, written as a mod_parrot handler. You can find it on my <a href="http://www.smashing.org/mod_parrot">mod_parrot page</a>. There are likely memory leaks in both Parrot and mod_parrot, so we'll see how long this lasts! jhorwitz 2004-12-14T14:48:44+00:00 journal mod_parrot 0.1 http://use.perl.org/~jhorwitz/journal/21709?from=rss mod_parrot 0.1 is now available <a href="http://www.smashing.org/mod_parrot">here</a>. Major new features include authentication handlers, a bunch of new methods to support authentication, access to Apache constants (OK, DECLINED, HTTP_UNAUTHORIZED, etc.) and a test suite. jhorwitz 2004-11-04T15:02:06+00:00 journal Cross pollination http://use.perl.org/~jhorwitz/journal/21513?from=rss For my birthday tomorrow I'm heading up to NYC for, of all things, the <a href="http://www.nyphp.org/">New York PHP group</a> meeting. <a href="http://use.perl.org/~geoff">Geoff</a> and <a href="http://www.shiflett.org/">Chris</a> are giving a talk that I don't want to miss. Afterwards I plan on partaking in the local drinking customs to celebrate, as I'll probably be all geeked out by that time.<nobr> <wbr></nobr>:) jhorwitz 2004-10-25T23:10:06+00:00 journal Parrot authentication handlers http://use.perl.org/~jhorwitz/journal/21436?from=rss You can now write Apache authentication handlers in Parrot (release pending). Behold, a handler that accepts any basic authentication with a password of 'squawk': <p> In handler.imc:</p><blockquote><div><p><nobr> <wbr></nobr><tt>.namespace [ 'MyAuthHandler' ]<br> <br>.sub _handler<br>&nbsp; &nbsp;<nobr> <wbr></nobr>.local pmc r<br>&nbsp; &nbsp;<nobr> <wbr></nobr>.local pmc ap_const<br>&nbsp; &nbsp;<nobr> <wbr></nobr>.local string pw<br>&nbsp; &nbsp;<nobr> <wbr></nobr>.local int status<br> <br>&nbsp; &nbsp; find_global ap_const, 'Apache::Constants', 'ap_constants'<br> <br>&nbsp; &nbsp; # get the request_rec object<br>&nbsp; &nbsp; find_type $I0, 'Apache::RequestRec'<br>&nbsp; &nbsp; r = new $I0<br> <br>&nbsp; &nbsp; # decline if not the initial request<br>&nbsp; &nbsp; $I1 = r.'is_initial_req'( )<br>&nbsp; &nbsp; if $I1 != 1 goto auth_declined<br> <br>&nbsp; &nbsp; (status, pw) = r.'get_basic_auth_pw'( )<br> <br>&nbsp; &nbsp; if pw != 'squawk' goto auth_failure<br>&nbsp; &nbsp; $I0 = ap_const['OK']<br>&nbsp; &nbsp; goto auth_return_status<br> <br>auth_failure:<br>&nbsp; &nbsp; $I0 = ap_const['HTTP_UNAUTHORIZED']<br>&nbsp; &nbsp; goto auth_return_status<br> <br>auth_declined:<br>&nbsp; &nbsp; $I0 = ap_const['DECLINED']<br>&nbsp; &nbsp; goto auth_return_status<br> <br>auth_return_status:<br>&nbsp; &nbsp;<nobr> <wbr></nobr>.pcc_begin_return<br>&nbsp; &nbsp; &nbsp; &nbsp;<nobr> <wbr></nobr>.return $I0<br>&nbsp; &nbsp;<nobr> <wbr></nobr>.pcc_end_return<br>.end</tt></p></div> </blockquote><p>In httpd.conf:</p><blockquote><div><p> <tt>ParrotLoad<nobr> <wbr></nobr>/tmp/handler.pbc<br>&lt;Directory<nobr> <wbr></nobr>/usr/local/apache2/htdocs/parrot/private&gt;<br>&nbsp; &nbsp; ParrotAuthenHandler MyAuthHandler<br>&nbsp; &nbsp; AuthType Basic<br>&nbsp; &nbsp; AuthName "Parrot Test"<br>&nbsp; &nbsp; Require valid-user<br>&lt;/Directory&gt;</tt></p></div> </blockquote> jhorwitz 2004-10-20T18:11:34+00:00 journal New book and freshmeat nonsense http://use.perl.org/~jhorwitz/journal/21371?from=rss Found my <i>Solaris Systems Programming</i> book by my front door yesterday evening. I can't say enough good things about it -- it reads like a tutorial, but makes a great reference as well. I could have used this book ten years ago! Great job, Rich Teer. <p> In other news, <a href="http://freshmeat.net/">Freshmeat</a> has posted an <a href="http://freshmeat.net/articles/view/1339/">editorial</a> on where Perl 6 is heading. Now, I've had my doubts about the Perl 6 language and its insatiable need for verbage and strange new operators. All these extra things don't bother me though, as long as we can improve the core language and have "real" objects, exceptions, and other goodies that Perl 5 is missing. Oh yeah, let's not forget XS either. *shudder* But the author just didn't do his research here, and makes several completely unfounded claims. I feel your pain, but get your facts straight before posting to a forum like Freshmeat, buddy.</p> jhorwitz 2004-10-16T15:45:39+00:00 journal