HollyKing's Journal http://use.perl.org/~HollyKing/journal/ HollyKing'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:29:22+00:00 pudge pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 HollyKing's Journal http://use.perl.org/images/topics/useperl.gif http://use.perl.org/~HollyKing/journal/ Fame and Riches Step 1 http://use.perl.org/~HollyKing/journal/34698?from=rss <p>What is step one? Contributing to <a href="http://search.cpan.org/">CPAN</a> of course.</p><p>I had been thinking about writing some myself but Mark has created a fine set of programs. My only wish was to have them read the <a href="http://aws.amazon.com/">AWS</a> parameters from a config file. So I added the ability to read the settings using <a href="http://search.cpan.org/~jstenzel/Getopt-ArgvFile-1.11/ArgvFile.pm">Getopt::ArgvFile</a> and sent a patch to Mark. He accepted my patch and now that he's posted his module to CPAN I have achieved the first step of my plans.</p><p>Last weekend I went away to <a href="http://www.deerharbor.org/">Deer Harbor</a> on <a href="http://www.orcasisland.org/">Orcas Island</a>. The private cottage, hot tub and view were wonderful. I took advantage of the lack of phones, television and internet access to focus on finishing Math::IntervalNumber. The code is done. The documentation has been written. I plan on polishing the test suite and releasing the module this week. That's step two.</p><p>Step three? I'm not sure. Maybe Math::SurrealNumber.</p> HollyKing 2007-10-16T21:10:55+00:00 journal Better way to call fe(set|get)round? http://use.perl.org/~HollyKing/journal/33640?from=rss <p>I'm still here. Changing jobs and living locations made me put some things to the side for a while. Still a bit of shift can't keep me down.</p><p>I have a need to call fegetround() and fesetround() to control how floating point operations are rounded. I've written up what I've found and my questions in a<a href="http://www.perlmonks.org/?node_id=624129">PerlMonks post</a>, but why not get a few more eyeballs to look at it?</p> HollyKing 2007-06-29T19:21:43+00:00 journal I'm sold! http://use.perl.org/~HollyKing/journal/28822?from=rss <p>While working on <tt>Math::Interval</tt> I wrote a few tests to validate that everything was working correctly. After fixing my typos in the<nobr> <wbr></nobr>.t files I was delighted to discover a few errors in my code. I say I was delighted because it was much easier to track them down now than later.</p><p>As a bonus using <a href="http://search.cpan.org/~pjcj/Devel-Cover-0.55/lib/Devel/Cover.pm">Devel::Cover</a> I have a nicely formatted report that shows the code that was missed by my testing so that I can add a few more tests to make sure that all code paths are correct.</p><p>Thank you everyone who wrote these modules!</p> HollyKing 2006-02-28T04:04:38+00:00 journal Interval Computation Module Design http://use.perl.org/~HollyKing/journal/28751?from=rss <p>Greetings!</p><p>I have a need to perform some <a href="http://www.cs.utep.edu/interval-comp/">Interval Computations</a> for one of my projects. Since I was unable to find a module on CPAN I'm going to have to write my own. I would like to upload my module to CPAN so the next lucky stiff doesn't have to repeat my effort. Having never written a module for CPAN before I wanted to get some feedback about my plans before diving too deep. I know there are many answers so I'm not looking for the one true way, but some advice from those who've gone before me.</p><p>In this context an interval is a new type of number like a complex number. They can be added, subtracted, multiplied and divided. We can define exponentation, trigonometric functions and a whole host of other functions.</p><p>For my application an interval represents a value with a known amount of error. The interval <code>[4, 6]</code> means that the real answer is somewhere between 4 and 6, but we don't know exactly where. Because floating point calculations aren't exact, the results of interval calculations are rounded out by rounding the lower bound down and the upper bound up to the next representable numbers. The end result gives you a lower and upper bound that contain the real answer.</p><p>Here is an example of some basic operations on the intervals <code>x = [1, 4]</code> and <code>y = [9, 12]</code>:</p><p> <code>x + y = [1 + 9, 4 + 12] = [10, 16]</code> </p><p> <code>x - y = [1 - 12, 9 - 4] = [-11, 5]</code> </p><p> <code>x * y = [ min(1 * 4, 1 * 12, 4 * 9, 4 * 12), max(1 * 9, 1 * 12, 4 * 9, 4 * 12)] = [9, 48]</code> </p><p> <code>x / y = { magic Perl code involving reciprocals and checking for division by zero } = [ 1/12, 4/9 ]</code> </p><p>First, I was thinking of calling my module <code>Math::Interval</code>. That name captures the purpose and isn't unweildy. Another option was <code>Number::Interval</code> since intervals can be a new type of number like complex numbers. If you were looking for a module to perform interval calculations where would you expect to find it?</p><p>Next, my plan is to create a class that encapsulates construction and some validation while most of the interface would be contained in functions. For example to add two intervals the user would call <code>Math::Interval::add(iv1, iv1)</code> which would return the result as an interval. Would it be better to put everything inside the class? I know that this would increase potential naming conflicts if people just imported the entire namespace. Code like <code>$arg1-&gt;add($arg2)</code> looks wrong to me.</p><p>Thanks for any pointers and suggestions!</p> HollyKing 2006-02-21T03:21:23+00:00 journal Once more into the breach... http://use.perl.org/~HollyKing/journal/26355?from=rss <p>Without warning yesterday I was fired from my job. Joy. So after 5 years I'm updating that resume and searching job sites. Unlike the last time I was looking for work my wife has a good job and we'll still have health insurance. So I've been thinking about going back to contracting.</p><p>How is the contracting market in Portland these days?</p> HollyKing 2005-08-18T16:45:32+00:00 journal I'm alive! http://use.perl.org/~HollyKing/journal/25880?from=rss <p>I haven't written here in a while. I have quite the reason but let's just say that I've had a pretty crappy year so far. Things are looking up now and I'm getting excited about OSCON next week. Yay!</p><p>I hope to see some of you again and meet a lot of new people.</p> HollyKing 2005-07-25T20:56:14+00:00 journal Sigh... http://use.perl.org/~HollyKing/journal/24959?from=rss <p>As the only Linux using Perl developer at my office I'm used to explaining what I do and why it's valuable to my co-workers who don't understand my job. I don't mind and I've made some real progress getting out the message. At least I thought I had...</p><p>This morning I walk in wearing my <a href="http://www.gnu.org/gear/Happy-tshirt.html">Happy Hacking</a> t-shirt that was purchased from the <a href="http://www.gnu.org/">FSF</a> booth at last year's <a href="http://conferences.oreillynet.com/os2005/">OSCON</a>. As I was walking through the cafeteria I was greeted by someone who added, "Whoah! I wouldn't wear that shirt here. That's against corporate policy." Perplexed, I stopped and asked how my shirt violated any policy. I'm sure that you all can guess his reasons. I took a few minutes to educate him about the differences between hacking and cracking and how the word existed long before computers, then went on my merry way to work.</p><p>The reason this bothers me so much is that I work for a company in the security industry. The products we develop block virus attacks, trojans, cracking and all sorts of other nasty stuff. I would expect that people working in the realm would know something of the terminology and culture. Sigh.</p> HollyKing 2005-05-31T16:15:12+00:00 journal What to do when I'm sick and can't sleep... http://use.perl.org/~HollyKing/journal/24908?from=rss <p>After lying in bed for 90 minutes last night I gave up and went to the office. Since I wasn't sleeping I decided to do something useful. I read the first few sections of <a href="http://www.pragmaticprogrammer.com/ppbook/index.shtml">The Pragmatic Programmer</a>. I even went as far as working all the exercises in the sections I read.<nobr> <wbr></nobr>;)</p><p>I'm tired as hell but I feel pretty damn good about working toward my goals.</p> HollyKing 2005-05-27T15:48:36+00:00 journal undef $foo != !defined $foo http://use.perl.org/~HollyKing/journal/24015?from=rss <p>I blame a lack of sleep and caffeine.</p><p>This morning I was convinced that undef returned true if its parameter was defined. I don't have any reason or excuse, but I stared at that section of code for far too long trying to figure out why it wasn't working. Falling back to <a href="http://catb.org/~esr/jargon/html/R/RTFM.html">RTFM</a> it was easy to see my mistake.</p><p>Sigh.</p> HollyKing 2005-04-04T23:18:33+00:00 journal Pay No Attention to the Daemon Behind the Curtain http://use.perl.org/~HollyKing/journal/23891?from=rss <p>Thanks to <a href="http://use.perl.org/~autarch">autarch</a> I was able to use Subversion at work to make some progress. The basic functions work and doesn't seem to leak, although this is the first Perl program I've written that runs for any length of time so I hesitate to say for sure.</p><p>Before I unleash this on the world here's an list of items to finish:</p><ul> <li>Create a control script that will allow the daemon to start and stop during system startup and shutdown.</li><li>Add the ability to run as a user/group other than root/root.</li><li>Write documentation. I'll freely admit this is my least favorite part, but it needs to be done<nobr> <wbr></nobr>.</li></ul><p>There are quite a few more items on my todo list, but these are the ones I think should be done to create a preview release.</p> HollyKing 2005-03-28T19:44:29+00:00 journal A bit of progress... http://use.perl.org/~HollyKing/journal/23647?from=rss <p>Well I didn't get a chance to read some of PP like I had hoped over the weekend. I usually read right before going to bed, but I've found out that if I read non-fiction I can't sleep as I lie there and ponder what I've just read. I'll have to make some time earlier in the night to get through the book. Probably right after I get home from work, because that's a good time to pause for the day.</p><p>I did complete most of the other tasks I had set for myself over the weekend. Subversion, Bugzilla and a "coming soon" web page are all in place. I setup the repository and even checked in a skeleton of the project code. Soon, I'll be able to flesh out the code and the project will be underway.</p><p>This morning at the office I found one small problem with Subversion. I'm able to use the repository from my home network, but I keep getting a password prompt when I try from my work system. I have a couple ideas of what the problem might be, which are:</p><ul> <li>I have SSH working from work to hollyking.org and use it to read my email throughout the day. One problem might be that at work the user account is 'bleber' while at home it's 'brendan.' With SSH I just specify brendan@hollyking.org and it works, but with svn using the --username switch didn't help. I'll have to experiment a bit to see if the username is the problem.</li><li>The other, more likely, possibility is that the port that 'svn checkout svn+ssh...' is blocked at the corporate firewall.</li></ul><p>I wish that I was receiving some kind of error message from Subversion. Just asking for a password doesn't give me any idea where things might be breaking down. I guess that's where mailing list archives, IRC and turning up the verbosity settings help.</p><p>There is some Perl related content coming, I promise. I just have to get the pre-requisites out of the way.<nobr> <wbr></nobr>;)</p> HollyKing 2005-03-14T22:07:39+00:00 journal Things To Do http://use.perl.org/~HollyKing/journal/23590?from=rss <p>I sure haven't documented much of a journey here, have I? Let's just say I've been busy. Work has been really busy. I got married. (Thanks, Ovid!) I found out I'm going to be a father.</p><p>Last month I had an <a href="http://www.livejournal.com/users/hollyking/100904.html">epiphany</a> that showed me how far I had fallen from my goals. I've spent quite a bit of time examining how I spend my time and where changes are necessary. I'm going to cut out some of the time I spend gaming (but WoW is so shiny!) and use the time to read and work on a project to scratch a personal itch.</p><p>For reading my stack is going to start out with:</p><ol> <li> <a href="http://www.pragmaticprogrammer.com/">The Pragmatic Programmer</a> </li><li> <a href="http://www.oreilly.com/catalog/perlsysadm/">Perl for System Administration</a> </li><li> <a href="http://www.amazon.com/exec/obidos/ASIN/1590592123/002-8784842-8012823">Automating UNIX and Linux Administration</a> </li></ol><p>To get my project rolling I need to finish a few tasks, which are:</p><ol> <li>Setup Subversion on hollyking.org</li><li>Setup Bugzilla on hollyking.org</li><li>Setup a project page on hollyking.org</li><li>Examine <a href="http://search.cpan.org/~jwied/Net-Daemon-0.38/lib/Net/Daemon.pm">Net::Daemon</a>, <a href="http://search.cpan.org/~ehood/Proc-Daemon-0.03/Daemon.pm">Proc::Daemon</a> &amp; other <a href="http://search.cpan.org/">CPAN </a> modules to extract information about writing daemons in Perl.</li></ol><p>I'm sure more books and tasks will come up, but this is a good list to get started.</p> HollyKing 2005-03-10T19:46:44+00:00 journal And so it begins... http://use.perl.org/~HollyKing/journal/20176?from=rss Last week I attended OSCON here in Portland. I was very inspired by talks from Damian Conway, David Rumsey, Freeman Dyson and others during the week. I've started this journal to record my progress in Perl. Whee! HollyKing 2004-08-01T22:28:36+00:00 journal