tinman's Journal http://use.perl.org/~tinman/journal/ tinman'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:19:16+00:00 pudge pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 tinman's Journal http://use.perl.org/images/topics/useperl.gif http://use.perl.org/~tinman/journal/ voodoo http://use.perl.org/~tinman/journal/26760?from=rss <p>I was trying to wrap my head around a small Tk UI I was whipping up for a project. This is a RPC app, but I was just doing the UI part inbetween writing a few documents.</p><p>On my Windows machines, I have ActivePerl 5.8.2 and 5.8.6 respectively. I tried the following:</p><blockquote><div><p> <tt>print "You pressed $distroNames[$down-&gt;[0]] \n";</tt></p></div> </blockquote><p>and it passed. No warnings, no errors. I was running with -w and use strict as usual.</p><p>The server-daemon was being written by someone else. He was working on Debian Sarge; with a packaged Perl 5.8.4. On <b>that</b> machine, the code above fails. Can't use a string literal.. </p><p>Enclosing the inner arrayref dereference in single quotes fixes it in Debian. Either way, my ActivePerl installs didn't care. What gives?</p><p>Also, an aside but I can't believe I hadn't discovered Frontier::RPC before I was shown its' many wonders in that application. Now I'm left wondering how many times I reinvented that particular wheel instead of just checking CPAN.</p> tinman 2005-09-17T16:13:47+00:00 journal greasemonkey has flaws http://use.perl.org/~tinman/journal/25804?from=rss <p>It's probably old news by now.. but Greasemonkey has serious, potentially fatal security flaws. The dev blog entry is <a href="http://greaseblog.blogspot.com/2005/07/mandatory-greasemonkey-update.html">here</a>. </p><p>Having said that though, it's still possible (although not recommended, certainly) to use the old Greasemonkey safely. If a script isn't injected into a page, it can't be exploited. So, making sure scripts <b>only</b> execute on explicitly added pages (instead of using wildcarded includes) is one option.</p><p>Another, more obvious option is to install the update. And live without the fancy gm_ namespaced functions for a while.</p><p>Unless the specific sites that I use Greasemonkey for are compromised, I think I'm fairly safe. Famous last words? Maybe</p> tinman 2005-07-20T10:42:05+00:00 journal borked wireless and other things http://use.perl.org/~tinman/journal/23540?from=rss <p>I've discovered a few things (quirks, if you will) about Ubuntu and laptops. I've just taken the plunge and added the Debian unstable repositories. So now my distro is a weird hybrid of Ubuntu and Debian/SID. </p><p>The newer ACPI tools and acpid fix some of the problems with monitoring, but on the whole, acpi is pretty much a dead beastie. For a laptop, that's not particularly good news, since I don't get any battery alerts and have to count the hours/minutes since I booted (or have the laptop suddenly shut down with no warning). </p><p>For some inexplicable reason, wireless refuses to work in Linux. Well, no. Let me qualify that. Wireless works, just that put in a WEP key of <i>any</i> size and it won't work. I've tried most of the standard fiddling with iwconfig and cousins, even edited the network interfaces, but nope. Encrypted wlan is a no-no. </p><p>Hmm. What else. The new XFCE 4.2 is tasty. But it won't run properly on the standard Ubuntu. Cardbus services seem to be a on again off again proposition. if I auto eth0, it takes nearly a minute to figure out a DHCP address, so I've resorted to leaving it off and explicitly turning on networking when I need it. Not very convenient, but considering how many times I boot to and fro, it's a timesaver. Upgrading to kernel 2.6.10 borked my soundcard and I haven't figured out why yet. </p><p>Remind me why I'm going through all this instead of running a perfectly reasonable Windows XP ? Because even with all of the hassle, I'm still<nobr> <wbr></nobr>... somehow<nobr> <wbr></nobr>... more productive on the Linux bootup than I am on Windows. I suspect that upgrading my command shell to something like <a href="http://www.jpsoft.com/">4NT</a> might solve a few of the Windows woes, though. Am I just <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0672326140/qid=1110230398/sr=8-1/ref=pd_csp_1/102-2909144-2528126?v=glance&amp;s=books&amp;n=507846">an apologist</a> ? Someone who applauds the dancing bear routine? Maybe.</p> tinman 2005-03-07T21:14:32+00:00 journal ubuntu http://use.perl.org/~tinman/journal/23214?from=rss <p>Been running it for about a week or two now. It's nice and neat. I dislike most of it's default options, but that's just me and I used Synaptic to pull in the ones I wanted. Hardware support on the laptop was dodgy, at best, but that's hardly a Ubuntu specific problem. It's more like a Linux wide issue with ACPI, "smart" batteries and the like. </p><p> <a href="http://backports.ubuntuforums.org/">Ubuntu backports</a> is a nice addition though. I got myself the new Bluefish, the new kernel and a bunch of other goodies (a recent <a href="http://www.xfce.org/">xfce</a>! *drool*) from there. No problems at all. Overall, Ubuntu makes a nice alternative to the usual Fedora, Mandrake, Suse distros and it seems to have most of the basic stuff done right. And trying out Gnome for the first time since I abandoned it in disgust four years ago (1.4) was educational.</p> tinman 2005-02-16T12:35:32+00:00 journal heresy http://use.perl.org/~tinman/journal/22972?from=rss <p>My latest exploration of alternative languages takes me <a href="http://www.jython.org/">here</a>... Why o why is Perl not easier to embed ? *sigh* in Java, at least.</p> tinman 2005-02-01T22:00:51+00:00 journal a notebook ? http://use.perl.org/~tinman/journal/22351?from=rss <p>W00t! Work (well, the research budget) allows me to get a cheap and nasty laptop for work. It's actually a desktop thinly veiled as a portable computer. In fact, it's got a bigger and better processor than any of my current desktops. </p><p>So, it's going to overheat, it's probably going to give me several successive hernias' trying to carry it around, and it's in all probability, going to make me envy the rich guys with superslim Toshibas and Vaios. </p><p>But... I still feel damn good.</p> tinman 2004-12-17T15:53:48+00:00 journal say wha ? http://use.perl.org/~tinman/journal/21199?from=rss <p>Palm released the <a href="http://www.palmone.com/us/products/handhelds/tungsten-t5/">T-5</a>. Not amazing, but I was definitely considering an upgrade when this struck me.. </p><p>The T-5 uses <b>flash memory</b>. You know, the sort that has limited write/erase cycles. And they apparently have their OS and all the software installed on it ? How long do they expect the fancy flash memory to last ? one year ? less ? and it costs $400. I think I'll keep my existing Palm and buy a 256mb thumbdrive. </p><p>Am I missing something obvious or do they expect people to toss their PDA out after one year or two ? And it seems to <b>require</b> RealPlayer being installed on the desktop. To which I reply: hell,no. That just ain't gonna happen. </p><p>If this is the upgrade path I'm being offered, I will seriously start considering PocketPC. I cringe when I think of it now, but I will consider it. Thanks for nothing, PalmOne.</p> tinman 2004-10-05T12:31:34+00:00 journal when I get money, I buy books ... http://use.perl.org/~tinman/journal/21090?from=rss if I have any left over, I buy other things, like food and clothes<nobr> <wbr></nobr><a href="http://www.nocturnis.net/articles/genwod/default/2004/July/439/page1.html">...</a> <p> <a href="http://www.amazon.co.uk/exec/obidos/tg/detail/-/0740721135/ref=pd_sim_books_1/026-8703911-3804459?v=glance&amp;s=books">The Complete Far Side</a> is available in the UK. *drools* </p><p>It's nearly &#163;70, which is a bit steep. But it's got all the cartoons ever published. Aargh, starving studentship is terrible at times, I tell ya.</p> tinman 2004-09-28T10:47:32+00:00 journal charging towards the finish line http://use.perl.org/~tinman/journal/20988?from=rss <p>interesting but perhaps obvious... when I really get into something, everything else, including keeping track of time goes out of the window. I've missed this level of absorbtion in something for a while now..Most of these days are spent writing thesis pages, drawing pretty graphs and diagrams and generally being busy. </p><p>Wondering about abandoning the Win32 desktop when I finish the thesis. I've used Windows as my primary desktop for all save 18 months of my computing experience thus far. I use Linux as a server, I am comfortable enough using a desktop in Linux to comment about KDE and Gnome; though I prefer XFCE. But recently, I've been taking stock of what software I will miss in moving fulltime to Linux. Turns out, there is less to miss than I previously imagined. Of course, I'd still need a dualboot to play games, but, but, but<nobr> <wbr></nobr>... tempting. Having a nice usable and programmable command shell is certainly a huge plus.</p> tinman 2004-09-21T18:04:00+00:00 journal burn out ? http://use.perl.org/~tinman/journal/20562?from=rss <p>It's strange. For the past few weeks, I've been curiously incapable of concentrating for more than a few minutes on code. I am in thesis writing mode, which for me is different from coding mode (if that even made sense to you). </p><p>Been trying to muster up the energy to do some coding on the side and it's just not working out. Maybe it's the bad hayfever that has been dogging me since the start of summer. I don't know. Becoming mildly alarmed. Maybe it's just sloth. That, I can both understand and identify with... entertaining all theories, no matter how whacky or wild they are.. Maybe I need to do something that seems new to me, like learn O'Caml as I've been promising myself for the past few years.</p> tinman 2004-08-25T14:17:19+00:00 journal IMAP http://use.perl.org/~tinman/journal/20453?from=rss <p>Had this interesting hack today, where my supervisor gave me a mbox file filled with (a few thousand) mail from conference participants and I needed to tag who had replied to him and who (out of a list) hadn't. </p><p>He expected me to sit down and compile a spreadsheet with neat tick marks. I was given the rest of the week to do it. *cough* I did a quickie search on CPAN and found <a href="http://search.cpan.org/~cwest/Net-IMAP-Simple-0.95/lib/Net/IMAP/Simple.pm">Net::IMAP::Simple</a>. Of course, there is also the wonderful <a href="http://search.cpan.org/author/JMCNAMARA/Spreadsheet-WriteExcel-2.03/lib/Spreadsheet/WriteExcel.pm">Spreadsheet::WriteExcel</a>. 30 minutes later<nobr> <wbr></nobr>... </p><p>Done. </p><p>No cookie ? Ok. More work ? *loong pause* Ok.</p> tinman 2004-08-18T18:26:41+00:00 journal SQLite 3 http://use.perl.org/~tinman/journal/20118?from=rss has released another beta. and MattS has already ported DBD::SQLite to work with v3. <p>Can I ask for any more than this ? Woot.</p> tinman 2004-07-28T23:09:52+00:00 journal postponed.. http://use.perl.org/~tinman/journal/19910?from=rss Unfortunately, due to a tragic turn of events, the visiting researcher I was supposed to collaborate with won't be turning up here after all. His father in law has been diagnosed with a terminal illness, so obviously he's not in any mood for work. I hope he hears good news in the near term at least, the long term prognosis isn't at all good. <p>In the meantime, that means that London socializing will probably begin in August, instead of July. I'm still cranking away at the research work.</p> tinman 2004-07-18T13:30:31+00:00 journal knoppix and liveCDs.. http://use.perl.org/~tinman/journal/19604?from=rss <p>I noticed with more than a little dismay that <a href="http://www.knoppix.org/">Knoppix</a> had decided to drop LaTex support in their latest version of the liveCD. Since I wanted to carry around a liveCD to pop into any random machine and work on my thesis while I'm on holiday in London, a bit of searching for an alternative ensued this afternoon. </p><p>The result: <a href="http://dirk.eddelbuettel.com/quantian.html">Quantian</a>, a Knoppix based LiveCD distro specifically targetted to scientific and mathematical types..just what I needed. They even carry Kile. Woot!.</p> tinman 2004-06-30T20:10:10+00:00 journal cookies!! http://use.perl.org/~tinman/journal/19524?from=rss <p>In the same vein as <a href="http://www.holovaty.com/code/gmail.py">Gmail.py</a>, I'm trying to make a Perl interface to Gmail. In fact, it will probably be a straight port. Inexplicably, I'm finding the same problem that an anonymous poster discovered... Win32 cookie handling or URL handling seems to be borked in Python. The Python script works fine in Cygwin and on my Mandrake box, but doesn't in Win32. </p><p>Ha, thought I. Perl has consistent behaviour between platforms.. well, <a href="http://www.perldoc.com/perl5.8.0/pod/func/fork.html">sorta</a>. Turns out that I get the same (incorrect)response in Perl as in Python. Head scratching time. Set the UserAgent to Linux (just in case they were checking). Nope. Not that either. </p><p> <b>Update</b>: It's not cookies. I examined headers from both Cygwin and Win32 versions. Sheesh. Maybe it's line endings or something equally embarassing? <br> <b>Yet another update:</b> For some reason, the last call to grab the javascript from the server unsticks the session, but only on Win32. Maybe it's time to watch some HTTP packets fly by..hmm. Bleargh. I do begin to wish that Perl had something like Python's SimpleCookie interface. (sacrilege, did I just say that ? I must be sleepier than I thought)</p> tinman 2004-06-27T05:35:28+00:00 journal httpunit http://use.perl.org/~tinman/journal/19475?from=rss <p>In a proof of concept for writing a better crawler, I noticed that lots of javascript content and dynamically generated links are lost. Cast around a bit and found the Perl module <a href="http://search.cpan.org/~claesjac/JavaScript-0.52/JavaScript.pod">Javascript</a> an interface to libjs </p><p>Then, I stumbled on <a href="http://httpunit.sourceforge.net/index.html">HTTPUnit</a>, an all singing, all dancing Javascript aware (they say there are limitations, of course) Unit testing framework. It's for Java, but it looks so promising that I think I will give it a shot on some link hiding site soon (perhaps this weekend ?)</p> tinman 2004-06-24T20:50:44+00:00 journal perl vs python shootout http://use.perl.org/~tinman/journal/19418?from=rss <p>A friend (rediscovered recently from Orkut, of all places) is learning Python. I introduced him to Golfing. He tells me about his cool script which scans Symantec's web page and downloads the latest update automatically. I golf it down to fewer lines. Now, the challenge is on. </p><p>This is fun, because there is absolutely no "my language rulez if I do it in fewer lines" feeling (ok, maybe there is a little). It's all to make both of us discover our respective languages a bit better. If I remember correctly, Python doesn't do regexes as part of the language (you have to use a Java like compile, match syntax) and Python also doesn't have CPAN. I intend to exploit those two advantages to the hilt *grins evilly*</p> tinman 2004-06-22T08:59:38+00:00 journal we are all individuals. http://use.perl.org/~tinman/journal/19371?from=rss <p>From no Gmail and Orkut two days ago to being in both.. Why ? I don't know. I am still futzing around Orkut (never been in one of this type of community sites before). Many many thanks to Adrian for his Gmail invite. You rock and I owe you<nobr> <wbr></nobr>:) I didn't need it in the end, the friend I mentioned earlier sent his invite as he saw my mail. </p><p>I see some familiar places in Orkut (perlmonks is represented, hahaha and I recognize some of the faces there).. "I hate Java" is amusing. Looks like there is plenty to watch here..A bit surprised at the amount of information that Orkut wants to know on registration, but I guess that's quite normal. </p><p>A drastic step forward for me though.. this Orkut business. I've tried reasonably hard to keep my online persona completely separate from my real name, work and so on. It seems a bit awkward now to let that veil of secrecy go.. </p><p>PS: <i>omg, <b>chaoticset</b>, you look nothing like how I imagined you. I was gaping when I saw your profile pic in a posting.</i></p> tinman 2004-06-19T12:53:55+00:00 journal it's not heaven.. it's nirvana..! http://use.perl.org/~tinman/journal/19272?from=rss <p>As per my longstanding policy of buying *only* 2nd hand CDs, that means that I sometimes lose out on stuff I'd really like to listen to.. </p><p>But I just got my hands on a couple of Nirvana albums, the earlier stuff ("Nevermind" and "Muddy banks") from a guy who was selling his CD collection before moving out.. his loss, my fortune.. Hope my cube-mates in the department don't mind (muted) Nirvana the rest of this week<nobr> <wbr></nobr>;)</p> tinman 2004-06-15T20:36:25+00:00 journal it's that time again.. http://use.perl.org/~tinman/journal/19259?from=rss <p>Firefox update mania<nobr> <wbr></nobr>:) It seems that the wonderful idea of using update.mozilla.org to validate extensions has met with a small problem. Bandwidth. The site has fallen over, it gets up, gets hit on the head again by the hordes of people rushing to update their extensions and falls over again. rinse, repeat. </p><p>If anyone needs a mirror, I found <a href="http://www.extensionsmirror.nl/index.php">this link</a> in the Firefox forums. It's slow too, but at least it will split the load a bit.</p> tinman 2004-06-15T09:31:52+00:00 journal what's the fuss about anyway ? http://use.perl.org/~tinman/journal/19256?from=rss <p>You know the word is spreading when I got an offer of a GMail invite from a friend this morning.. He's not into tech at all, he's a doctor (well, an intern. Almost a doc). He had heard about GMail, he had wheedled an invite from somewhere and now he got a bunch of invites himself. </p><p>Which brought me to the question: I don't have an account.. I wasn't sure if I needed one anyway and I would prefer to run my own server/domain instead. I already have a Yahoo account (or two or three, each at a hundred megs). Do I need this ? Yeah, a gig of space would be nice, but people don't regularly send me large attachments anyway. My life isn't settled enough to go through the mechanics of getting server space somewhere (still belong to the starving student category). Even more puzzling is Orkut.. umm. </p><p>Ok, if I think about it, I WOULD like to see exactly what is so cool about the Javascript/DHTML UI that the GMail people have cooked up. I have *very rarely* seen Javascript used to actually make life easier, and most of the time, it ends up horribly breaking my usual browse patterns (makes the "back button" useless, makes bookmarking useless etc etc). Strange. Maybe I take him up on the offer (if it's still available).</p> tinman 2004-06-15T08:27:26+00:00 journal done!.. and done! http://use.perl.org/~tinman/journal/19117?from=rss <p>Phew. My life, which was mostly on hold while I got two papers done, can now resume. </p><p>For extra bonus points, I am trying to think of a name for a person who "finishes" one paper 3 weeks ahead of schedule and then does nothing till 2 days before deadline.. and THEN (yes, only then) discovers that part of the experiments are yet undone. Aaargh. (Anyone knows<nobr> <wbr></nobr>.... you can call me that, I won't mind.. It can't be as rude as the names I've called myself when I made that discovery) </p><p>I think I need sleep. Lots and lots and lots of it.</p> tinman 2004-06-06T22:01:30+00:00 journal Nutch .. http://use.perl.org/~tinman/journal/18763?from=rss <p>Somewhat sizeable argument going on in the <a href="http://www.nutch.org/">Nutch</a> mailing list right now about <a href="http://www.mozdex.com/">Mozdex</a>, the OSS search engine. Some Nutch folks are peeved because they think Mozdex isn't giving them enough credit for using their software. </p><p>I am still wondering about how Mozdex are going to make back the cost of the bandwidth in the first place. I am sure it must cost quite a bit to crawl and handle queries. What do they get out of it ? (They say they will serve advertising.. but err, isn't that sorta old ? Does that even make enough money ? )</p> tinman 2004-05-14T20:11:47+00:00 journal dizzy.. http://use.perl.org/~tinman/journal/18762?from=rss <p>Too many papers to write.. must<nobr> <wbr></nobr>... sleep. But I can't, because all the deadlines are looming and I need to pad up that (as yet non existent) publications list. </p><p>And the forecasts for the next few days is awesome too. Bright sunshine, warm weather, 16 hours of daylight.. and I am stuck in a cramped, airless office, staring at the blue sky through the skylight and tapping away at the keyboard. <br> <i>Don't mind me, I just wanted to vent</i></p> tinman 2004-05-14T20:06:33+00:00 journal xtris.. http://use.perl.org/~tinman/journal/18632?from=rss <p>Another guy in the department introduced me to xtris, we play it inbetween work and I suck at it. Bleargh. </p><p>I managed to actually sort out part of the classloader. Whatever else you want to call Java, they are organized. Not exactly organized in the Perl sense, but things seem a bit more predictable to me than when I first started out. I no longer spend irrational moments wishing I was doing the same job in Perl.. is that just getting used to a language or is it growing up in general? Maybe a bit of both<nobr> <wbr></nobr>:)</p> tinman 2004-05-05T19:21:44+00:00 journal dynamic loading.. http://use.perl.org/~tinman/journal/18610?from=rss <p>Some experiments with classloaders and reflection to keep me occupied this week. I do have other work to finish, but having written an eval style plugin system in Perl ages ago, I was curious to see how Java implements it. </p><p>A bit tricky, but seems ok, so far. </p><p>Also figured out LaTex, well, some parts of it, at least. I like it. I don't think it will ever completely replace Open Office or Word for me, but I am reasonably fast in writing things without referring to the markup references. Ultimately, I just used Cygwin and tossed specialized GUI editors out. My supervisor was trying to egg me onto using Emacs. <i>scowl</i>. Never!</p> tinman 2004-05-04T13:58:32+00:00 journal am I that geeky? http://use.perl.org/~tinman/journal/18577?from=rss <p>I was asked by my sister to "mind the house" while they go on a month long holiday with the kids. Since I hadn't much time to explore London when I came here, I agreed without thinking too much about it.. and remembered I'm supposed to be doing this Masters over here.. </p><p>Since they're not very techie peeps, I started ferreting around for a laptop or something so I could work there. When I told my sister this, I got the following priceless comment.. </p><p> <i>Oh, don't worry. I know you can't stay away from a computer for that long.. I fixed up a laptop and broadband for you while we're not here</i>. </p><p>I'm torn between gratitude and horror.</p> tinman 2004-05-02T01:33:24+00:00 journal words to live by... http://use.perl.org/~tinman/journal/18526?from=rss <p>English <a href="http://www.hulver.com/scoop/story/2004/4/27/92738/8615">pub etiquette</a>. Darn straight I need it. </p><p>I need to write papers, finish polishing and bugfixing software and various other research work. Instead, what am I doing? organizing people in the department to play network games after hours. Priorities, priorities...</p> tinman 2004-04-28T12:07:27+00:00 journal localization ala Skynet? http://use.perl.org/~tinman/journal/18496?from=rss <p>How do I put this diplomatically ? Is it worth dragging in a dictionary and doing a best-guess translation from one language to another for an internationalization project ? I think not. Someone else thinks otherwise and wants me to attempt it. </p><p>My argument: internationalization is a one off thing. You'd probably expend far less effort just translating the strings/resources manually than writing a dictionary lookup and making it machine learn words in different languages. It's sort of inventing a problem because you like the solution of automated dictionary generation, maybe. </p><p>I've also somehow managed to squeeze in reading the Ender series in the past few months. Now it's technically summer, I can stroll around the countryside without reading huddled up near a heater.</p> tinman 2004-04-26T19:31:09+00:00 journal more testing .. and parsers http://use.perl.org/~tinman/journal/18371?from=rss <p>I didn't reply to the comments I got to my earlier journal entry, but thank you <b>cbrandtbuffalo</b> and <b>chromatic</b>. I eventually ripped out the subs as suggested, simply because I badly wanted the speed increase the refactoring would have given me. I hope to try out <i>caller</i> (hadn't heard of it before) and eventually make it a module. It's habit, I guess. It's second nature to run JUnit tests for me now, but I still hesitate (or rather, put off) running unit tests for Perl code. As an aside, I also went *<b>whoa, <i>the</i> chromatic replied my post</b> *goggle eyed* </p><p>I'm an idjit, my copy of Data Munging is back home and I never thought to bring it with me. It's got a nifty chapter on Parse::RecDescent and I think I am finally ready to really grok what davorg is trying to say. Spent much of the last week trying to wrap my brain around Antlr and JavaCC to solve a lingustics problem. I didn't succeed, but I experimented enough to understand <i>why</i> I didn't; which is good enough for me.</p> tinman 2004-04-17T22:36:39+00:00 journal