koschei's Journal http://use.perl.org/~koschei/journal/ koschei'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:06:45+00:00 pudge pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 koschei's Journal http://use.perl.org/images/topics/useperl.gif http://use.perl.org/~koschei/journal/ A Personal Reaction http://use.perl.org/~koschei/journal/16138?from=rss <p> <a href="http://www.powells.com/portal/ComputerBooks.html">Reading, Writing, 'Rithmetic</a> by Michael Swaine:</p><blockquote><div><p>[...] In that same September issue [of <cite>Summer Reading</cite>], Gregory Wilson reviewed the book <cite>Code Reading</cite>. I had a personal reaction to the book [...].</p></div> </blockquote><p>That sounds painful. A doctor should be consulted immediately!</p> koschei 2003-12-03T06:20:42+00:00 books Five shiny Perl modules http://use.perl.org/~koschei/journal/16093?from=rss <p>I've uploaded 5 dists to PAUSE for CPAN in the past few hours. (Note that the links below won't work accurately for a little while yet --- have to wait for search.cpan.org to sync.)</p><ol> <li> <a href="http://search.cpan.org/dist/DateTime-Format-IBeat">DateTime-Format-IBeat 0.16</a>: nothing interestingly new. Just some better test coverage.</li><li> <a href="http://search.cpan.org/dist/DateTime-Format-Builder">DateTime-Format-Builder 0.78</a>: multigroup Dispatch fix.</li><li> <a href="http://search.cpan.org/dist/WWW-Yahoo-Groups">WWW-Yahoo-Groups 1.91</a>: removed decoding and fixed some bugs reported by tbone, and mentions <a href="http://books.perl.org/book/209">Spidering Hacks</a> (thanks Andy!).</li><li> <a href="http://search.cpan.org/dist/PHP-Strings">PHP-Strings 0.24</a>: a worrying joke.</li><li> <a href="http://search.cpan.org/dist/WWW-Mechanize-Cached">WWW-Mechanize-Cached 1.23</a>: because Mech now supports it and URI now supports it, and I didn't want it just lying around doing nothing.</li></ol><p>Share and enjoy!</p><p> <small>(In case you are wondering, my initial version numbers for things are indeed semi-random, typically being based on the day of the month when I started writing the module; additionally, I skip versions ending in noughts due to a bug in my build process that I've been too [wrong] lazy to fix, thus the previous Yahoo module was 1.89, not 1.90)</small> </p> koschei 2003-12-01T12:53:51+00:00 modules full text perl faq searching http://use.perl.org/~koschei/journal/15974?from=rss <p>I wanted to find a particular FAQ entry, so I thought: why not have full text searching?</p><p>So I added it. And optional case sensitivity.</p><p>It's <a href="http://dellah.org/perl/faq/">very nice</a>, even if I do say so myself.</p> koschei 2003-11-24T09:24:44+00:00 journal faq.perl.org search http://use.perl.org/~koschei/journal/15939?from=rss <p>Actually, the subject is a lie.</p><p>Google, for some reason, isn't indexing faq.perl.org.</p><p>On IRC, I tend to point people to the FAQ a fair bit. The problem is that <tt>`perldoc -q flub`</tt> will given them the answer that's in their version of the FAQ.</p><p>I'm used to a newer version of the FAQ.</p><p>So I could point them to <a href="http://faq.perl.org/">faq.perl.org</a>. But that's a pain as it has no search.</p><p>So: <a href="http://dellah.org/perl/faq/">I wrote my own</a>. Code is there too, if anyone is that interested =)</p><p>As with so many of my little projects, there is a grand plan: I'd like the FAQ to be easier for people to contribute to. So, later, editing.</p><p>Also need to write something to quickly generate appropriate URLs while in irc. Or something.</p> koschei 2003-11-22T13:43:26+00:00 journal Dune Emperor, Perl and Spidering Hacks http://use.perl.org/~koschei/journal/15174?from=rss <p>I've had a fun few hours. I was getting bored playing the default Dune Emperor maps so decided to get some more from dune2k.com. However, they're big files and I'm on a slow connection. So I wrote some Perl to sort out their nonsensical URLs, parse their web pages and download the map files. I even use a progress bar in LWP (courtesy <a href="http://iain.truskett.id.au/SpideringHacks">Spidering Hacks</a>).</p><p>While waiting for an initial few maps to download I decided to write up my programs, explaining what they do and, well, really I'm just showing them off because I like them.</p><p>So, first we have <a href="http://iain.truskett.id.au/FindingEmperorMaps">the program to parse the pages and work out what to download</a>, and then we have <a href="http://iain.truskett.id.au/FetchingEmperorMaps">the program to do the download with the cool progress bar</a>.</p><p>Please read and enjoy =) I'm off to enjoy some Harkonnen death.</p> koschei 2003-10-11T16:09:42+00:00 journal Solving CPAN ftp proxy problems in perl http://use.perl.org/~koschei/journal/15129?from=rss <p>With perl 5.8 having libnet as standard and the generally appalling state of firewalls and default configurations, it can be irritating when CPAN spends 5 minutes trying Net::FTP when if it had tried, say, wget it would have been over quickly.</p><p> <a href="http://nntp.x.perl.org/group/perl.perl5.porters/73929">Quick solution:</a> </p><blockquote><div><p> <tt>'dontload_hash' =&gt; { 'Net::FTP' =&gt; 1 },</tt></p></div> </blockquote><p>in your <tt>CPAN/Config.pm</tt> (or wherever you keep your config)</p><p>The docs don't elaborate on it much so I guess I'll have to submit a patch to the firewall section.</p><blockquote><div><p> <tt>&nbsp; dontload_hash&nbsp; &nbsp; &nbsp; anonymous hash: modules in the keys will not be<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;loaded by the CPAN::has_inst() routine</tt></p></div> </blockquote> koschei 2003-10-09T04:10:11+00:00 cpan Perl References - 5 second tutorial, courtesy coraline http://use.perl.org/~koschei/journal/14713?from=rss <blockquote><div><p> <tt> foreach @{$arrayref}<br> keys %{$hashref}<br> length ${$scalarref}<br> note the pattern, so you don't have trouble with hashrefs later</tt></p></div> </blockquote><p>(noted here for my future reference when I write about refs)</p> koschei 2003-09-15T10:57:07+00:00 journal Regular Expression Pocket Reference (perl, ruby and vim) http://use.perl.org/~koschei/journal/14627?from=rss <p>I'm disappointed in the vi/vim part of "<a href="http://www.oreilly.com/catalog/regexppr/">Regular Expression Pocket Reference</a>" (new from ORA). It's not very thorough. It does, at least, mention vim and list some of its more common bits of syntax, but it doesn't go far enough. It doesn't provide a full summary of the vim's regex options. Which is a shame because, out of the flavours covered by the book, it's the most different. The others are all more or less the same with minor quirks.</p><p>A vim reference should at least try to cover it all. That said, vim has excellent builtin help (<tt><nobr> <wbr></nobr><a href="http://vim.sourceforge.net/htmldoc/pattern.html">:help regex</a> </tt>), I was just hoping for a more complete reference on paper, in a nice little book.</p><p>On the other hand, the perl section didn't seem too bad (note that I'm the guy who contributed <a href="http://dellah.org/pod/perlreref.html">perlreref</a> to 5.8.1). Points of interest: gives a nice reference to the Unicode properties (I think Perl's docs is missing a nice comprehensive list, expecting you to look elsewhere); it notes the different return values of the operators/functions in scalar vs list contexts; isn't aware of the changes in Perl to make <tt>$`</tt>, <tt>$&amp;</tt>, and <tt>$'</tt> faster (though the outer two are only faster in a blead compiled with copy-on-write (as far as I can see); the composite unicode properties to character class equivalent mapping is somewhat more enthusiastic; the references don't mention a lot of the perl docs that I do; doesn't mention the \p{IsSpacePerl}. Other than that, quite good =)</p><p>Also, it doesn't cover Ruby regex, which have some amusing quirks of their own (in particular, the meanings applied to<nobr> <wbr></nobr><tt>/s</tt> and<nobr> <wbr></nobr><tt>/m</tt>, and the way Perl's<nobr> <wbr></nobr><tt>/m</tt> is on by default, thus meaning <tt>^</tt> and <tt>$</tt> are often the wrong thing to use).</p><p>Meanwhile, I've been collecting links and such for various regex related bits and have put a wiki page up on <a href="http://iain.truskett.id.au/?RegEx">the topic</a> in <a href="http://iain.truskett.id.au/">my kwiki</a>.</p> koschei 2003-09-10T13:56:10+00:00 books XML vs TeX http://use.perl.org/~koschei/journal/14593?from=rss <p> <a href="http://www.artima.com/intv/readxmlP.html">Elliotte Rusty Harold</a>:</p><blockquote><div><p>And certainly XML is easier to use than TeX.</p></div> </blockquote><p>Huh?</p> koschei 2003-09-09T04:30:59+00:00 journal My perl svn repository http://use.perl.org/~koschei/journal/14031?from=rss <p>My Perl svn repository is available via</p><blockquote><div><p>http://dellah.org/svn/perl/</p></div></blockquote><p>As it's svn, it's also <a href="http://dellah.org/svn/perl/">a happily valid web page</a>. I'm currently in the process of transferring my CVS repository to svn, with all the perl bits ending up at that URL. Feel free to check stuff out (it's not just my modules), and <a href="http://iain.truskett.id.au/?PatchesWelcome">Patches are Welcome</a>. There isn't free commit access though.</p> koschei 2003-08-10T14:46:12+00:00 journal DateTime::Format::Builder 0.76 http://use.perl.org/~koschei/journal/14030?from=rss <blockquote><div><p> <tt>The uploaded file<br> <br>&nbsp; &nbsp; DateTime-Format-Builder-0.76.tar.gz<br> <br>has entered CPAN as<br> <br>&nbsp; file: $CPAN/authors/id/S/SP/SPOON/DateTime-Format-Builder-0.76.tar.gz<br>&nbsp; size: 81462 bytes<br>&nbsp; &nbsp;md5: b33b496586a517a405b59e6628dbecac<br> <br>Changes for 0.76 (10 Aug 2003)<br>&nbsp; &nbsp;- Fallthrough example and test added.<br>&nbsp; &nbsp;- Quick parser added to simplify fallthrough stuff.<br>&nbsp; &nbsp;- Rejigged internals to allow for on_fail argument to<br>&nbsp; &nbsp; &nbsp;multi-parsers.</tt></p></div> </blockquote><p>This is my most complex module. Every time I change it I fear for my sanity. Thankfully these latest changes will lead to me being able to simplify a lot of the code.</p><ul> <li> <a href="http://search.cpan.org/dist/DateTime-Format-Builder">See it on CPAN</a> (whenever the next sync is)</li><li> <a href="http://cpan.japh.org/?DateTime::Format::Builder">"My Favourite Modules Wiki"</a> </li></ul> koschei 2003-08-10T14:43:19+00:00 journal perlreref http://use.perl.org/~koschei/journal/14029?from=rss <p> <i>(original at <a href="http://iain.truskett.id.au/?PerlReRef">my bliki</a> [ghastly term])</i> </p><p> perlreref is a quick regex reference that brings together the gist of the disparate regex docs, thus giving people a single place to look if they just want to check something quickly. </p><p> I've thrown it around on irc and on the perl documentation list and taken suggestions. I gave it to p5p, and it's now in bleadperl. </p><p> There's a <a href="http://dellah.org/perlreref.html">search.cpan.org-alike HTML version</a> and <a href="http://dellah.org/perlreref.pod">the raw pod</a>. </p><ul> <li> <a href="http://nntp.perl.org/group/perl.perl5.porters/79572">79572</a> - Announcement <ul> <li> <a href="http://nntp.perl.org/group/perl.perl5.porters/79720">79720</a> - First onlist reply</li> <li> <a href="http://nntp.perl.org/group/perl.perl5.porters/79906">79906</a> - Note from Rafael saying it's in blead! <ul> <li> <a href="http://nntp.perl.org/group/perl.perl5.porters/79909">79909</a> - My reply with amendments. <ul> <li> <a href="http://nntp.perl.org/group/perl.perl5.porters/79910">79910</a> - Applied, with tweaks</li> </ul></li> </ul></li> </ul></li> </ul> koschei 2003-08-10T14:38:02+00:00 journal search.cpan.org tricks http://use.perl.org/~koschei/journal/13493?from=rss <p> Some search.cpan.org tricks: </p><p> Given a dist: DateTime::Format::HTTP </p><p> These are all the same page: </p><ul> <li> <a href="http://search.cpan.org/dist/DateTime-Format-HTTP">http://search.cpan.org/dist/DateTime-Format-HTTP</a></li> <li> <a href="http://search.cpan.org/author/SPOON/DateTime-Format-HTTP">http://search.cpan.org/author/SPOON/DateTime-Format-HTTP</a></li> <li> <a href="http://search.cpan.org/~spoon/DateTime-Format-HTTP">http://search.cpan.org/~spoon/DateTime-Format-HTTP</a></li> <li> <a href="http://search.cpan.org/~spoon/DateTime-Format-HTTP-0.34">http://search.cpan.org/~spoon/DateTime-Format-HTTP-0.34</a></li> </ul><p> And to go straight to the module's docs: </p><ul> <li> <a href="http://search.cpan.org/perldoc?DateTime::Format::HTTP">http://search.cpan.org/perldoc?DateTime::Format::HTTP</a></li> </ul><p> Fun. Wonder if there are any others. </p><p> <i>[<a href="http://iain.truskett.id.au/?SearchCpanTricks">original post and comments</a>]</i> </p> koschei 2003-07-17T04:51:14+00:00 journal search.cpan.org (not regarding the colour) http://use.perl.org/~koschei/journal/13426?from=rss <p> <a href="/~djberg96/">djberg96</a> mentioned today:</p><blockquote><div><p>sigh...why do they do soundex matching on cpan? it's pointless</p></div> </blockquote><p>Which makes me think: If the source were available someone could write <a href="/~gbarr/">gbarr</a> a new search, could demonstrate its use and then, hopefully, persuade <a href="/~gbarr/">gbarr</a> to use it.</p> koschei 2003-07-14T02:37:05+00:00 cpan how many places can one register at http://use.perl.org/~koschei/journal/11721?from=rss <p>Well, now <a href="http://www.advogato.org/person/Spoon/">I'm at Advogato</a> too. Guess I can also not maintain a regular journal there too =)</p><p>BTW: follow <a href="http://www.advogato.org/person/Spoon/">that link</a> and certify me, please. I'd like to be able to at least reply to articles =)</p> koschei 2003-04-18T12:26:55+00:00 journal tbray's java bsearch - ruby and then perl? http://use.perl.org/~koschei/journal/11189?from=rss <p>It's surprising how easily and quickly <a href="http://www.tbray.org/ongoing/When/200x/2003/03/22/Binary">Java code</a> can be turned into Ruby code.</p><blockquote><div><p> <tt>class Array<br>&nbsp; def bsearch ( target )<br>&nbsp; &nbsp; high = self.length<br>&nbsp; &nbsp; low = -1<br>&nbsp; &nbsp; while high - low &gt; 1<br>&nbsp; &nbsp; &nbsp; probe = (high + low) / 2<br>&nbsp; &nbsp; &nbsp; if self[probe] &gt; target<br>&nbsp; &nbsp; high = probe<br>&nbsp; &nbsp; &nbsp; else<br>&nbsp; &nbsp; low = probe<br>&nbsp; &nbsp; &nbsp; end<br>&nbsp; &nbsp; end<br>&nbsp; &nbsp; if low == -1 || self[low] != target<br>&nbsp; &nbsp; &nbsp; return -1<br>&nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; return low<br>&nbsp; &nbsp; end<br>&nbsp; end<br> <br>&nbsp; def bsearch_dups ( target )<br>&nbsp; &nbsp; high = self.length<br>&nbsp; &nbsp; low = -1<br>&nbsp; &nbsp; while high - low &gt; 1<br>&nbsp; &nbsp; &nbsp; probe = (high + low) / 2<br>&nbsp; &nbsp; &nbsp; if self[probe] &lt; target<br>&nbsp; &nbsp; low = probe<br>&nbsp; &nbsp; &nbsp; else<br>&nbsp; &nbsp; high = probe<br>&nbsp; &nbsp; &nbsp; end<br>&nbsp; &nbsp; end<br>&nbsp; &nbsp; if high == self.length || self[high] != target<br>&nbsp; &nbsp; &nbsp; return -1<br>&nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; return high<br>&nbsp; &nbsp; end<br>&nbsp; end<br> <br>&nbsp; def range ( floor, ceiling )<br> <br>&nbsp; &nbsp; answer = []<br> <br>&nbsp; &nbsp; # work on floor<br>&nbsp; &nbsp; high = self.length<br>&nbsp; &nbsp; low = -1<br>&nbsp; &nbsp; while high - low &gt; 1<br>&nbsp; &nbsp; &nbsp; probe = (high + low) / 2<br>&nbsp; &nbsp; &nbsp; if self[probe] &lt; floor<br>&nbsp; &nbsp; low = probe<br>&nbsp; &nbsp; &nbsp; else<br>&nbsp; &nbsp; high = probe<br>&nbsp; &nbsp; &nbsp; end<br>&nbsp; &nbsp; end<br>&nbsp; &nbsp; answer[0] = low<br> <br>&nbsp; &nbsp; # work on ceiling<br>&nbsp; &nbsp; high = self.length<br>&nbsp; &nbsp; low = -1<br>&nbsp; &nbsp; while high - low &gt; 1<br>&nbsp; &nbsp; &nbsp; probe = (high + low) / 2<br>&nbsp; &nbsp; &nbsp; if self[probe] &gt; ceiling<br>&nbsp; &nbsp; high = probe<br>&nbsp; &nbsp; &nbsp; else<br>&nbsp; &nbsp; low = probe<br>&nbsp; &nbsp; &nbsp; end<br>&nbsp; &nbsp; end<br>&nbsp; &nbsp; answer[1] = high<br> <br>&nbsp; &nbsp; return answer<br>&nbsp; end<br> <br>end</tt></p></div> </blockquote><p>No doubt it could be written more clearly, but even with the basic translation it's nicer than the Java version. For a start, the routines are now methods on Arrays. Damn sensible place to keep them, although I'm sure several of the 4 readers of this post will disagree (including myself depending on the phase of the moon).</p><p>Secondly, it's type free.[1] This is a good thing.</p><p>Thirdly, think about this code in Perl. What would be written differently? Would you be tempted to have another parameter, a comparator? What would you do about the difference between comparing strings and numbers?</p><p>Enough of this for now.</p><p>[1] I'm sure there's a better, or more correct, term ('independent', 'agnostic', something), but I don't know it. Feel free to comment it.</p> koschei 2003-03-24T01:29:53+00:00 journal Authors from packages http://use.perl.org/~koschei/journal/10961?from=rss <p>No, it doesn't handle every file extension. Nor every package. Nor does it take parameters. Yes, you have to modify the source to make it do anything useful for <b> <i>you</i> </b>. No, I'm not particularly concerned. Just thought someone might be amused by it =)</p><p>For something more useful: <a href="http://perl.dellah.org/DateTime-Format-Excel-latest.tar.gz">DateTime::Format::Excel</a> (<a href="http://perl.dellah.org/DateTime-Format-Excel-latest.ict">docs</a>).</p><blockquote><div><p> <tt>#!/usr/bin/perl -w<br>use strict;<br>use YAML;<br>use PerlIO::gzip;<br> <br>my $packages = do {<br>&nbsp; &nbsp; my %packages;<br>&nbsp; &nbsp; open my $pkgs_fh, '&lt;:gzip',<br>&nbsp; &nbsp; &nbsp; &nbsp; 'minicpan/modules/02packages.details.txt.gz'<br>&nbsp; &nbsp; &nbsp; &nbsp; or die "Cannot open pkgs: $!\n";<br>&nbsp; &nbsp; while (&lt;$pkgs_fh&gt;)<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; $packages{$2} = $1 if m[ ^ \S+ \s+ \S+ \s+<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[A-Z]/[A-Z][A-Z]/([A-Z]+)/(\S+)(?:\.(?:tar\.gz|zip))<br>&nbsp; &nbsp; &nbsp; &nbsp; $ ]x;<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; close $pkgs_fh;<br>&nbsp; &nbsp; \%packages;<br>};<br> <br>print "Read the details of ".(keys %$packages)." packages.\n";<br> <br>my %authors;<br> <br>while (&lt;DATA&gt;)<br>{<br>&nbsp; &nbsp; chomp;<br>&nbsp; &nbsp; printf "%30.30s =&gt; %s\n", $_, $packages-&gt;{$_};<br>&nbsp; &nbsp; push @{ $authors{ $packages-&gt;{$_} } } , $_;<br>}<br> <br>print Dump(\%authors);<br> <br>__DATA__<br>Acme-Hello-0.02<br>Apache-Filter-1.022<br>B-Generate-1<nobr> <wbr></nobr>.06<br>Class-Container-0.10<br>Crypt-SKey-0.06<br>HTML-SimpleParse-0.11<br>Module-Build<nobr>-<wbr></nobr> 0.16<br>Test-Signature-1.03<br>Text-WikiFormat-0.6<br>Thesaurus-0.21<br>WWW-SherlockSea<nobr>r<wbr></nobr> ch-0.14<br>WWW-Shorten-1.5.6<br>WWW-Yahoo-Groups-1.7.7<br>XML-RSS-Aggregate-0.02<br>opt<nobr>i<wbr></nobr> mize-0.03<br>types-0.05</tt></p></div> </blockquote> koschei 2003-03-09T13:35:56+00:00 cpan Books, books, books. http://use.perl.org/~koschei/journal/10871?from=rss <p>I'm a slacker. I really am. I've been working on the <a href="http://books.perl.org/">books.perl.org</a> site for a <a href="http://archive.develooper.com/books-workers@perl.org/msg00035.html">number of months</a> now. I'm closer to getting it to where I like it, but have some problems.</p><p>Number 1 is: page design. It's great, except for the actual <a href="http://books.perl.org/book/171">book page</a>. I've had one <a href="http://books.perl.org/tabs/book/147">suggestion</a> for an alternate design. [1] But that only affects the outside material, not the actual page content.</p><p>&nbsp;</p><p>Suggestions welcome.</p><p>&nbsp;</p><p>Also, there's the data front. Need lots of data in the system. We have basic details of 95 books. 8 of those also have blurbs and such. Most are categorised <em>somehow</em>. And I've got a mozilla bookmark folder containing another 20-30 books to be added; mental notes of another dozen.</p><p>Shame XML::Simple broke. There goes my nice 'grab details from Amazon.com when adding a book' feature.</p><p>&nbsp;</p><p>Covers are another fun thing. Currently, we've misappropriated most of them. We have permission from a number of publishers to put up whatever we like, which is nice. However that still entails <strong>getting</strong> nice images. Mostly using Amazon.com images currently, and they're somewhat crap.</p><p>&nbsp;</p><p>[1] Yes, the tabs don't actually <em>work</em> yet. Mockup rather than proof of concept.</p> koschei 2003-03-04T00:08:04+00:00 journal This was done just to determine something. http://use.perl.org/~koschei/journal/8028?from=rss <p>All will become clear, later.</p> koschei 2002-09-26T12:47:36+00:00 journal Journal poster number 9 http://use.perl.org/~koschei/journal/7791?from=rss <blockquote><div><p> <tt>#!/usr/bin/perl -w<br>use strict;<br>use WWW::UsePerl::Journal;<br> <br>my $subject = &lt;&gt;;<br>chomp $subject;<br>my $entry = join( '', &lt;&gt; );<br> <br>my $j = WWW::UsePerl::Journal-&gt;new('fred');<br>$j-&gt;login('xxxx');<br>$j-&gt;postentry(<br>&nbsp; &nbsp; title =&gt; $subject,<br>&nbsp; &nbsp; text =&gt; $entry,<br>);</tt></p></div> </blockquote><p> <em>[updated with petdance's changed]</em> </p> koschei 2002-09-18T01:27:11+00:00 journal WWW::Shorten, and interfaces. http://use.perl.org/~koschei/journal/7765?from=rss <p>There's a reasonable number of those URL shortening services out now. And, irritatingly, they don't all provide the same interface. TinyURL, Shorl, SnipURL and MASL will all generate a code. NotLong will suggest one (preemptively, I might add, rather than after, thus allowing you to set something pertaining to the URL in question). Qwer, you set up front (although I must admit I haven't gone further with Qwer: doesn't work in lynx).</p><p>SnipURL allows you to 'restrict' access. Shorl lets you have a password. SnipURL lets you register and have your snurls be attributed to your account. SnipURL and Qwer let you edit your URLs.</p><p>All in all, my interface in WWW::Shorten is breaking =) Have to make a new one [keeping the old for backwards compatibility of course]. I just have to remember: keep them all as much alike as I can, and keep the simple case simple.</p> koschei 2002-09-17T00:46:55+00:00 journal Just like everyone else http://use.perl.org/~koschei/journal/7746?from=rss <p>Mostly so I can play with all sorts of aggregation presenting a unified journal,<br>I've sortof taken my journal to <a href="http://ouroboros.anu.edu.au/feed/spoon">here</a>.</p><p>All perl stuff will still be posted here, mind you. Non Perl stuff there. Perl stuff will<br>also appear there. For those interested: it's a Mason based Blosxom =)</p> koschei 2002-09-16T06:56:55+00:00 journal Lerp and PWL http://use.perl.org/~koschei/journal/7645?from=rss <p>Woohoo! "Perl and LWP" has arrived in Australia. And I've bought it.</p> koschei 2002-09-10T06:33:16+00:00 journal MRE2 http://use.perl.org/~koschei/journal/7581?from=rss <p>Woohoo! It's finally arrived in Australia. And I've bought it! And it's lovely!</p> koschei 2002-09-07T01:28:10+00:00 journal WWW::Shorten (hi davorg) http://use.perl.org/~koschei/journal/7388?from=rss <p><em>(started as a reply to <a href="/~davorg/">davorg</a>'s <a href="/~davorg/journal/7387">journal</a> entry)</em></p><p>I used to send friends 'useless links of the day'. Sometimes amusing, sometimes not. Usually either interesting, useless, or some combination. Occasionally useful ones crept through. These would be disseminated via ICQ or Jabber.</p><p>I found I was getting quite a few though, so started a page on my web page. Then I could have an archive, and organise them to some degree.</p><p>Not a blog in the sense of journalling, just links. What I can now do, is have a button in Galeon (or whatever browser I'm using on the day), be looking at a page, and click on the button. The button brings up a page that lets me attach a comment or two, a title, and then it can email the link away.</p><p>The page in question is a Mason component. Happily uses Cache::FileCache to store the URLs, both in their original form and in Shorl keyword and password form. The Shorl part keeps URLs short in emails, and Shorl also logs hits. (That said, I used to have the web page of links go through a modified <a href="/~merlyn">merlyn</a> <a href="http://www.stonehenge.com/merlyn/WebTechniques/col25.html">script (from WebTechniques)</a> and thus had statistics that way.)</p><p>Future expansion (assuming I get around to it) will see things like sending a weekly digest, sending via Jabber/IRC. And stuff. Naturally, this is all done for my own edification and enlightenment rather than any practical purpose.</p><p>So, from little concepts, fun things grow.</p><p>But, yes, it does look very easy to create such a URL shortening service. (Just think, purl or scribot could have their own; if they haven't already.) It is, after all, just a mapping of URLs to keys and back again.</p><p><b>Arbitrary semi-historical note</b>: <a href="http://makeashorterlink.com/">MASL</a> was first, iirc. Then <a href="http://tinyurl.com/">TinyURL</a> which has/had shorter links (not just from the domain name. Then <a href="http://shorl.com/">Shorl</a> which allows you to see how many times a given URL was accessed, and uses more memorable keys.</p><p>(Iain/Koschei/Spoon/ict/something different every day)</p> koschei 2002-08-29T11:28:42+00:00 journal Good news, bad news. http://use.perl.org/~koschei/journal/7252?from=rss <p> <b>Good news</b> <br> I convinced XS to le tme export a string with NULs in it. Of course, I had to push it onto the stack myself, but nevertheless I'm happy I worked it out =) Would've seriously hindered <tt>tai_pack()</tt> otherwise. </p><p> <b>Bad news</b> <br> The machine which collects my mail, and serves my websites, and other assorted things developed a disc fault the other day when some idiot turned it off without shutting it down.<br> Unfortunately, I didn't notice it had disc faults until the disc was semi-corrupted. As of today, the disc map is hosed. (Regrettably, there wasn't anything much I could do with it in the meantime to fix it; it's not a convenient machine, geographically speaking.)<br> Thankfully, I had some backups (albeit not too recent with the exception of the web part), and the machine also had two drives (one for / and one for<nobr> <wbr></nobr>/home --- it's the / one that's buggered).<br> So I guess I'll be spending part of the weekend reinstalling the system. Joy.<br> Oh, and it's the machine that the books site was on, so that's definitely going to be a bit delayed until I get the machine up and running. (Although the stuff is on the good drive, it's hard to get stuff off it until I'm physically with the machine and can take it out.) </p><p> <i>(Idiots--)</i> </p> koschei 2002-08-23T00:48:21+00:00 journal XS Time::TAI64 http://use.perl.org/~koschei/journal/7158?from=rss <p>Well, I have the straight implementation of libtai as an XS module. Very dull and it will just let you export various sets of functions. All very procedural.</p><p>So, now to redefine it into a lovely OO style thing, since OO fits it nicely.</p><p>And I must say, <cite>Extending and Embedding Perl</cite> is lovely. I've never gotten very far using <i>perlxs</i> and <i>perlxstut</i>, but with this book, I have a sensibly functioning module. Woohoo! <i>(Jenness++; <a href="/~simon/">Simon</a>++)</i> </p><p>Oh, and more tests. Natch. <i>(petdance++)</i> </p> koschei 2002-08-19T07:21:07+00:00 journal The wireless net http://use.perl.org/~koschei/journal/6850?from=rss <p>I've just read <a href="/~cwest/">Casey</a>'s article on <a href="http://www.oreillynet.com/pub/a/wireless/2002/08/01/highway_lan.html">his highway wireless LAN</a> (a fun read), and I just thought: if <em>many</em> cars had wireless capability, and many had routing capability as well, then you'd not have a problem surfing the net during the daily gridlock.</p><p>Have a few base stations in strategic locations, have the various cars routing (network) traffic and you'd have something usable, right?</p> koschei 2002-08-02T00:59:59+00:00 journal Irregualr Perl Monking http://use.perl.org/~koschei/journal/6529?from=rss <p>Woo: I used Perlmonks for once.</p><p>With any luck I'll get an answer to my question regarding <a href="http://perlmonks.org/index.pl?node_id=183919">runtime variables and runtime attributes</a>.</p> koschei 2002-07-22T02:29:42+00:00 groups Happy Birthday to me. http://use.perl.org/~koschei/journal/6377?from=rss <p>Now I just need to convince my gf that 23 is not "old".</p> koschei 2002-07-16T03:18:28+00:00 journal