triv's Journal triv'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:22:45+00:00 pudge Technology hourly 1 1970-01-01T00:00+00:00 triv's Journal Cygwin/Windows Gurus Needed <p>There is some hazy areas in <a href="">Net::DNS</a>. Neither I nor the original author have access to a windows machine, and there are some questions that we need to get answered. See this <a href="">RT ticket</a> for the background.</p><p> Basically, the questions are: </p><ul> <li>Does IO::Select work correctly on windows (and cygwin for that matter, though it appears that it does)?</li><li>Does using UPD for sending and receiving DNS packets work properly on windows? I'm rather sure it should.</li><li>Does IO::Socket::INET's Timeout parameter work correctly on windows?</li></ul><p>Net::DNS is used behind the scenes in several popular perl applications (SpamAssassin comes to mind). Net::DNS needs to run better on windows, and I can't do that without people's help. So if you know the answers to those questions, or you have the means to find out, please <a href="">contact me</a>.</p> triv 2003-12-02T02:36:04+00:00 journal Random Things <p>I keep a <a href="">livejournal</a> that I update much more often. Perhaps I should merge this with that. Or maybe get a copy of moveable type going....</p><p>I really wish that BBEdit had syntax highlighting for Mason components. I looked into doing it myself, but I quickly became scared of the idea. Maybe I can hire someone that knows how to write those things to make a Mason one.</p><p> I had a thought that Time::tm objects should have an overloaded stringify that return something like <tt>scalar localtime</tt>. I couldn't think of an efficient way to do it, though localtime has the dirty little secret of just doing an indirect sprintf to create that string... hrrrm...</p> triv 2002-11-30T18:50:29+00:00 journal BBEdit BBEdit has long been my favorite program of any category. Version 7.0 has some pretty nice CVS integration features. I just wish I could put a newline in the log message when I do a commit. I email barebones, and they said they would at that to the next version. I suppose that's enough to keep me using BBEdit<nobr> <wbr></nobr>;). triv 2002-11-17T21:05:55+00:00 journal Patches <p>I have a minor pet peeve.</p><p>Someone writes a really cool patch with includes a cool features that I want in my module. However, in the notes for the patch you'll get something like this (I'm totally making this up, no real people were harmed in the creation of this rant):</p><blockquote><div><p> <i>Here's my patch to make Foo transactions non-blocking if you're running under ithreads. I also reorganized the test suite so that it makes more sense.</i></p></div> </blockquote><p> Linus was right on one point; short, concise patches are best. I didn't realize that till I started being the person that accepted the patches, not the person sending them.</p> triv 2002-11-08T08:52:51+00:00 journal Ummm?! Someone just sent me a rather long rant complaining that Net::DNS requires parrot. Logic as follows: <ol> <li>Net::DNS requires Test::More</li><li>If you search for <a href=";query=Test%3A%3AMore">Test::More on</a>, the 8th result (also the result directly below the correct result) is parrot.</li><li>Therefore, Net::DNS requires parrot.</li></ol><p> With some pride, I announce that I have released the first mainstream module for perl6.<nobr> <wbr></nobr>:-D</p> triv 2002-10-04T11:29:28+00:00 journal POE can do everything, POE6 will do more or err.... <p>I had the moment of light the other day. I was playing around with the project and Casey and myself are currently working on, an asynchronous credit card processor in POE. Clouds parted, trumpets sang, and POE suddenly made sense to me. Sessions are like threads, components are like little magic boxes, and the kernel is god of this little world. Good fun. </p><p>The processor was pretty simple, we just hacked up Buisness::OnlinePayment::AuthorizeNet to use LWP instead of Net::SSLeay, that way we can pass a HTTP::Request object that Buisness::OnlinePayment::AuthorizeNet generates to POE::Component::Client::HTTP and then send the HTTP::Response object back to Buisness::OnlinePayment::AuthorizeNet. CPAN baby, <i>CPAN!</i> Name another language where you can build an asynchronous creditcard processor in a day!</p><p>I also noticed that<nobr> <wbr></nobr><tt>//</tt> is not feeling well in bleedperl. Due to the nature of the perl syntax, the tokenizer doesn't ways know if you mean<nobr> <wbr></nobr><tt>//</tt> in the err sense, or<nobr> <wbr></nobr><tt>//</tt> in the regex sense. This means that <tt>my $foo = shift<nobr> <wbr></nobr>// 0;</tt> does not work. I personally think it is fine for <tt>shift &lt; 5</tt> not to work, but a large number of people are going to expect that they can just use<nobr> <wbr></nobr><tt>//</tt> like <tt>||</tt>.</p><p>The thread on p5p regarding this has stopped with Larry saying that they just avoiding the problem by making<nobr> <wbr></nobr><tt>//</tt> only the err operator in perl6, it is not a valid regex.</p> triv 2002-08-10T06:25:17+00:00 journal Quote of the Day From Schwern, on p1p: <p> <i>No syntax changes. perl5-porters is ten years down, first swirling vortex on your left.</i> </p> triv 2002-08-04T19:54:07+00:00 journal Mr West! <p>I know nothing about POE, but I feel I should. Luckily <a href="/~cwest/">Casey</a> is going to be coming out to my place to work on projects, and he does! There's a slight PITA factor with this, as I found out today that Net::SSLeay and OS X do not play well together. Just have to fiddle with it on the FreeBSD machine.</p><p>Ohhh... and we hired Casey too.<nobr> <wbr></nobr>;-)</p> triv 2002-08-04T04:58:55+00:00 journal Progress I've been working on getting Net::DNS::RR::new_from_string faster (new version is first):<blockquote><div><p> <tt>timethis 100000:&nbsp; 0 wallclock secs ( 0.75 usr +&nbsp; 0.00 sys =&nbsp; 0.75 CPU) @ 133333.33/s (n=100000)<br>timethis 100000:&nbsp; 3 wallclock secs ( 2.65 usr +&nbsp; 0.00 sys =&nbsp; 2.65 CPU) @ 37735.85/s (n=100000)</tt></p></div> </blockquote> triv 2002-07-18T12:08:49+00:00 journal Apartment evilness <p>My apartment's air connditioning seems to have died. Hopefully tomorrow it will get fixed, but until then I have found a few fans and gotten some airflow going. Until this gets fixed, I have a feeling that real work will be interupted. Ahh well, I need to catch up on real life, non-geeky stuff anyways.</p><p>There will be a new version of Net::DNS out soon, as soon as I rewrite Net::DNS::RR::new_from_string() to not use $'. Matts found a patch to do this a while back, but it's sloooow. Slinging arrays around is not always faster than just using $'. I have a gut feeling that just using a regex to do all the work in one shot is best. Ditch the loop all together.</p> triv 2002-07-03T02:57:27+00:00 journal mod_perl on OS X I was at Jesse's talk on RT today, which was cool, and I got in a conversation with pudge about mod_perl and OS X. In talking to people it became clear that I was kinda rare in getting it to work right. So here's how I did it, and it was really really simple: <ol> <li>You'll need to the developer tools, both the old 10.1 tools and the more recent ones worked for me.</li><li> <a href="">Build perl 5.6.1</a> </li><li>Get the mod_perl sources, unpack, etc... etc...</li><li>Then just configure the source tree the "<a href="">Flexible Way</a>".</li></ol><p> All and all, it is pretty simple. I've been using it for about 6 months now without any problems. Things should get even better once 5.8.0 matures, as it is even more OS X friendly.</p> triv 2002-06-27T03:04:26+00:00 journal Damian I'm in the break for Damian's cool Perl6 talk. I'm getting excited about perl6, though I still have some reservations. The regex syntax sounds really powerful, maybe a little too powerful. triv 2002-06-26T20:51:02+00:00 journal tibook badness <p>my brand-spanking-new tibook doens't seem to like picking up wireless connections. At all. Period. I've given up on it. I was so mad at it during Jessie's RT talk, that I slammed the screen shut and stared at it. </p><p> <i>Stupid Thing</i> </p><p>So I'm using cat 5. I'm the guy with the length of blue cat5 that Larry almost tripped over, right off the stage during Damian's talk.</p> triv 2002-06-26T19:04:02+00:00 journal mod_perl and OS X <p>I just discovered that I'm kinda rare for having got mod_perl to work on OS X. Funny thing is that I've been doing most of my devel for dyn on my OS X box, running a whole copy of the system.</p><p>In other news, I played around with the patch on Net::DNS that Matts found. It's slower than the old code. Fudge!</p> triv 2002-06-26T16:05:11+00:00 journal The saga continues <p>Got activeperl installed on XP under Virtual PC. Installed nmake, installed Net::DNS. Can't reproduce the bug. (The bug being the Net::DNS::Resolver doesn't get the right IP for the local recursive DNS server.)</p><p>However, the bug report was for windows 2000. So I install w2k, activeperl, nmake, and Net::DNS. And... <i>I can't reproduce the darn bug!</i> </p><p>On the plus side I had an epiphany last night about how Net::DNS::Resolver should be reorganized. Right now it's very monolithic, with lots of the "copy and paste" code reuse methodology.</p><p>I don't have the details plained out, I have to wade though the code and figure those out, but here is my plan:</p><p>Net::DNS::Resolver keeps the same interface, it's for setting options, building packets to be sent, and getting the results of sending those packets. Interally, it uses Net::DNS::Connection::UDP or Net::DNS::Connection::TCP classes, instead of Net::DNS::Resolver::send_tcp() or Net::DNS::Resolver::send_udp(). To keep the options going back and forth nicely, I'm leaning towards some sort of options object, but that's not in stone.</p><p>I'm thinking that Net::DNS::Connection will be a super class of Net::DNS::Connection::UDP and TCP. The super class will be smart and try UDP first, and then use TCP if you run into packet fragmentation. (Or if you're doing a AXFR....)</p><p>I currently have in peices scattered around my home directory. I'm also working on Text::ReflowEmail. But that's a <i>whole</i> other story.</p> triv 2002-06-24T17:27:02+00:00 journal Virtual PC I have virtual PC with windows XP on my mac. I mainly use it for seeing how websites render on windows, and things like that. I figure this is a perfect way to test Net::DNS. So I install activeperl on it. Hangs halfway though the install. Tried 3 times. jordan's <a href="/;cid=9898">suggestion of finding a windows maintainer</a> is sounding better and better. triv 2002-06-23T07:11:14+00:00 journal Ackk.. Net::DNS on windows seems to have issues. I guess this means I need to <i>run</i> windows. I hate that. triv 2002-06-22T08:46:46+00:00 journal Timmahhh! <p>Tim (krellis) is visiting. First night he's in, we decide to get the cool VoIP phone working. Networks hijinks!!</p><p>I had a DSL with all my machines NATed behind one of those magical Netgear 'router' thingys. Now, the phone talks to the controller thing, and the controller tries to talk back to the IP the phone has. In this case, the controller is trying to talk to, the internal IP. Enter network hijinks.</p><p>We setup one of my freebsd machines to do the PPPoE magic, and run NAT for me. so far so good, when we set up a IP tunnel, so that my interal 192.168.0/24 can talk to the office $something/27 directly.</p><p>Plugged in the phone, and poof. I have a Massachusetts phone at my apartment in Lansing, Michigan. I feel so l33t.</p> triv 2002-06-21T17:30:36+00:00 journal I hate sun <p>The <a href="">Net-DNS</a> homepage was, until last night hosted on a Sun X1 at dyn's ithaca server farm. All was well. Then, we notice, hey... sodium (the box's name) thinks it's July 8th.</p><p>We fix the time, it drifts off by a day or so in a few minutes. Something is clearly not right with the thing. Our solaris guy reboots the box, what the heck. It works for windows.</p><p>Later that night, I try to log into the darned thing. It's not up. I ask the solaris guy, "Yeah, it didn't come back up".</p><p>Around this point I realize, that the only complete copy of the site was on sodium, and that I had bits and peices on other machines, but that's it. Luckily google's cache had some missing stuff, and I just can generate the docs from the distrabution in one line. Copied the tarballs from cpan, and things were looking good again.</p><p>I really don't want to do that again.</p> triv 2002-06-20T20:08:04+00:00 journal Party! <b> <i> <a href="">PARTY!</a> </i> </b> triv 2002-06-18T21:24:12+00:00 journal Bugs... <p>So there's this guy, lets call him <tt>$guy</tt>. <tt>$guy</tt> emails me about this bug in Net::DNS. This is good, I quite like fixing bugs, that's why I maintain the damned thing! So I'm going though <tt>$guy</tt>'s example, and notta. I can't reproduce it. I walk though the code.... what <tt>$guy</tt> is describing <i>can't</i> happen. I'm confused.</p><p>In other news I just got back from hanging out with Tim (krellis) in Mass. Had a good time, wrote a chunk of a credit card payment system. Taint checking is your friend. Taint checking <i>is</i> your friend.</p> triv 2002-06-17T05:22:16+00:00 journal CPAN grumbles I seem to have the worst luck with CPAN. I recently released Net::DNS 0.22, cause 0.21 had a pretty big bug that basically broke TSIG completely. Naturally, I want to get this new version out and to the user's of Net::DNS ASAP. has the most recent version, but for some reason some of the mirrors don't seem to have it. <a href="">value click</a> has it, but <a href=""></a> does not (which is the download link that search.cpan gives). In about another day I'm going to start emailing people, at that point it will have been 4 days. triv 2002-06-09T03:36:36+00:00 journal Doh! A big bug was found in Net::DNS that broke TSIG. Basically the RR type =&gt; number hash was horribly, horribly broken. 0.22 is all good<nobr> <wbr></nobr>:). triv 2002-06-06T22:08:30+00:00 journal Older Perls If there's one thing as a module author I wish there was, it would be a clear refernce to the changes in the different versions of perl and the core modules. I know about perldelta and such, but it's a big list. Maybe a clever search engine or something. Ever try to get a clear cut answer on what features of MakeMaker you can depend on? Ever wonder if <tt>Symbol::qualify_to_ref()</tt> is working on 5.4.0? You know that bind() on a UDP socket can' t be used to set the local address on port under perl 5.00503 and FreeBSD-4? The list goes on, and I have a headache. triv 2002-06-05T05:52:57+00:00 journal Pause SSL and IE 5 for OS X You can't use pause and HTTPS wth IE for Mac OS X. Very annoying. Anyways, got Net::DNS 0.21 out the door. Also rewrote how dyn's system sends email. I now have a SQL based, object oriented, mail templating system that sends mail with Net::SMTP. <strong>w00t</strong>. triv 2002-06-03T22:16:41+00:00 journal Do or do not, there is no try <p>I took one of those silly quiz things, this one on what kind of Jedi you would be. <a href="">Here is</a> what I got.</p><p>This got me thinking just how much I want <i>The Empire Strikes Back</i> on DVDs. I think I hate Lucas more for not releasing episodes 4 though 6 on DVD than for episode one. I really want those DVDs! Ahh well, Fellowship of the Ring will on DVD before we know it.</p> triv 2002-06-02T12:04:02+00:00 journal $mod_perl::VERSION++ I took the oppertunity of the new mod_perl release to upgrade all of dyn's machines. Though this process I discovered that one of the machine's (the only one without a rebuilt OS) perl's doesn't have binary compatibilty with the rest. Turns out it was compiled before we installed everything off our compile box, and had 5.005 binary compatibility turned on. Funny that. triv 2002-06-02T05:38:33+00:00 journal Amazon++ I ordered a Eddy Izzard CD and a DVD a while back from amazon. 3 weeks later, it's shipped, but I still haven't gotten it. Email amazon, they fedex me another set of what I ordered. Amazon++ (c: triv 2002-05-31T08:12:32+00:00 journal Tomorrow <p>Well, it's come down to the biggest hockey game to go to detroit in the last 10 years. Game 7, Detroit vs. Colorodo. Winner takes all, yadda yadda yadda...</p><p>In other words, a darn good excuse to ditch work early, and head to the pub.</p> triv 2002-05-31T04:34:41+00:00 journal Any one know? <p>100 points to anyone that can figure out what the code in my last entry was for<nobr> <wbr></nobr>:-).</p> triv 2002-05-29T20:39:18+00:00 journal