Corion's Journal Corion'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:23:52+00:00 pudge Technology hourly 1 1970-01-01T00:00+00:00 Corion's Journal Alien::Imager has escaped <p> <tt>Alien::Imager</tt> has escaped onto my <a href="">Perl repository</a>. With it, I can (almost) automatically install Imager with JPEG and PNG support on Win32, provided a suitable C environment is available. A pending patch to CPAN allowing a parameter to the <tt>recompile</tt> command will then recompile Imager with the added libraries.</p><p>I could not get Giflib to compile nicely on Windows, and I could not get Tifflib to play nice too, so these two are missing from the Imager build.</p><p>Configuring Imager was greatly simplified by Imager allowwing environment variables for all of the relevant parameters to <tt>Makefile.PL</tt>. If your module requires configuration during the <tt>Makefile.PL</tt> or build phase, please consider supporting environment variables so that external scripts can set up the environment and then install your script through CPAN.</p> Corion 2006-11-26T20:12:16+00:00 journal SocialText tryout / VMWare image <p>One reason I'm playing around with VMWare Player is to try out <a href="">SocialText</a> in a virtual machine to play around with it instead of ruining a perfectly good machine+Perl installation by the bazillion prerequisites it has.</p><p>First, I tried the installation on Debian Sarge (3.1r3) via CPAN - that just didn't work. SOAP::Lite fails its tests for some dark reason. Without a local CPAN mirror, the installation will take ages.</p><p>Next try was on Debian Sarge using the Debian-provided packages - this didn't work, because Debian doesn't provide the recent enough versions.</p><p>Next try was on Debian Etch, the testing release that is soon to become the stable release of Debian. After adding the Socialtext repository to the list of repositories to hit, the only minor snag was that SOAP::Lite needed to be force-installed, as it failed its tests without indication as to why (<tt>Apache::Constants::OK</tt> wasn't autoloaded in the tests, but why?). Test::Base needed to be installed afterwards manually. The Socialtext package didn't <tt>make test</tt> for me, but maybe that was because I didn't have <tt>apache-perl</tt> installed but only <tt>apache</tt>. After installing the <tt>apache-perl</tt> package and fiddling around with PostgreSQL, it all now seems to work and has been compressed into a clean, 400MB virtual machine image.</p><p>The Perl script I used to automate the installation onto the Debian VM currently lives at <tt> <a href=""></a> </tt>. I'd also publish the VMWare image, but it's 400MB and I don't have that kind of bandwidth...</p><p>So, hints as how to reduce the size of a VMWare image (like recipes for using <tt>dd</tt> to make a harddisk image more compressible) are welcome.</p><p>Socialtext itself looks quite slick once it's running - but it needs a lot of RAM too, as the kernel killed some tasks with 256MB RAM available to it when the page update daemon was running and the machine load went up to 16. But it has a wiki, a blog and commentary features - so all that's missing is a mailing list and chat and you have your closed usergroup forum<nobr> <wbr></nobr><tt>:)</tt>.</p> Corion 2006-11-05T23:12:15+00:00 journal "Answer file" for Debian netinstall CDs <p>As I'm currently toying around with VMWare Player (another blog entry), I'm looking for a convenient way to automate the generation of my Debian virtual machines. The Debian setup seems to be very inconveniently automatable - for Windows, there is the concept of an "answer file", which you generate once with all the answers for a setup and which you can then put onto a floppy disk and the installer will pick up all the answers from there and ask the open questions.</p><p>For Debian, I've only found the gigantic moloch that is <a href="">FAI</a>, which is far too big and far too unwieldly, when all I want to do is to specify one or two new users to create, some additional Debian packages to download, and <i>maybe</i> the <tt>http://</tt> URL of a Perl script to run afterwards.</p><p>So, I'm asking the lazyweb, if somebody has a convenient way to supply the answers to the Debian setup without too much hassle, as a floppy disk (image) or maybe as a small (Perl) webserver or whatever. I'd pretty much prefer not to create a separate<nobr> <wbr></nobr><tt>.iso</tt> for each instance<nobr> <wbr></nobr>...</p> Corion 2006-11-05T22:49:28+00:00 journal Zaphod progress - v0.02, the second generation is now live <p>I've made a major step forward in <a href="">Zaphod</a> development. The version 2 with much simpler change handling is now online. Not all features made it into the release - I skipped on some features in favour of actually releasing something. The features of the new release are:</p><ol> <li>Session support - more than one document can now be edited</li><li>Document paste - you can now paste a document for editing</li><li>Session autosave/recovery - if I restart the server, all sessions survive</li><li>Simplified representation of changes - the changes are now just triplets <tt>(offset, old, new)</tt>, which makes handling and merging incredibly more easier in both, Perl and Javascript</li><li> <a href="">Some tests</a>, courtesy of <a href="">JSAN</a> </li></ol><p>The features that didn't make it into this release:</p><ol> <li>Bookmarks in the document are there, but don't get updated properly when another user changes the document</li><li>Document download</li></ol><p>But then, I'll have something for the next release. Now it's refactoring time to cut down the leftover code from the other incarnations, and look into frameworks to replace my own crufty code. Maybe this is a good situation to look at Catalyst on the Perl side and one of the JS libraries, like Prototype. On the other hand, Prototype is documented even less than my own hackery. </p><p> The source code is "out there", on <a href="">my Perl repository</a>, at least until I release it onto CPAN. It's free for the taking, as in "same terms as Perl".</p><p>This is the first code where I have my doubts about using an unrestrictive license because this code might actually be worth something for a business, but on the other hand, if somebody actually manages to turn this into a working business without me being involved, I'll be pretty amazed<nobr> <wbr></nobr><tt>:)</tt> </p><p> <b>Update:</b> I think it will only work with IE6 and FireFox 1.0.x, or at least FireFox 1.5. If you want to help with porting it to other browsers, like Safari or whatnot, your help and patches are appreciated.</p> Corion 2006-10-17T20:08:36+00:00 journal Modules shipping with a broken Module::Install <p>That's what I like about non-broken installers. <a href="">Class::Inspector</a> comes with <tt>Module::Install</tt> 0.62, which is broken. The trick to still install it is as follows:</p><ol> <li>Install Module::Install (0.64 at this time)</li><li>Delete the <tt>inc/</tt> directory in the <tt>Class-Inspector-1.62/</tt> directory</li><li>Run <tt>perl -w Makefile.PL</tt> once to bootstrap Module::Install</li><li>Run <tt>perl -w Makefile.PL &amp;&amp; make &amp;&amp; make install</tt> to install the package.</li></ol><p>Thanks to Audrey for making this so painless</p> Corion 2006-10-17T19:30:18+00:00 journal CPAN-mail " Perl-Freelancer needed" spam <p>I got some spam by a German company (Online Microsystems) seeking a freelancer today. I gave them a call and educated them about <a href=""></a>, which they actually were really happy to learn about.</p><p>I didn't find the page with the rules what's fit for posting on and what's not though. Still, if it's not fit for posting on, I don't want to hear about it via my CPAN mail address either.</p> Corion 2006-10-05T11:47:32+00:00 journal Zaphod progress <p>(This is the second incarnation because I only previewed, and didn't post<nobr> <wbr></nobr>...)</p><p>The next incarnation of <a href="">Zaphod</a> is progressing nicely. The move away from complicated actions ("insert character", "insert line", "split line",<nobr> <wbr></nobr>...) towards a simplified one-action style of triples (offset, old_text, new_text) has greatly improved the maintainability of the code, as the handling on the Javascript side of things has become much simpler. I also had to move away from the line based approach to a document to a buffer based approach where the whole document is stored as one string, but that made even more specialized functions like <tt>split_line</tt> and <tt>join_line</tt> obsolete. </p><p>I've added session management to the server, so there is now the possibility to edit more than one document. Adding sessions also meant adding more cruft, like a page to see all active sessions, adding an API call to set the session's name and adding Javascript to modify the session's name. Another step was to enforce utf8 everywhere on input and output - at least now, umlauts work. Input methods for Chinese or Cuneiform are to be determined. Pasting a document also works now, by displaying a textarea entry and polling it for changes while the user pastes the new document into it.</p><p>Publishing the second incarnation is currently blocked by one feature I want to add, "bookmarks", that is, marked positions within the document between which the user(s) can jump around. Bookmarks are the stepping stone for a lot of interesting features and bugfixes: </p><ol> <li>Bookmarks will smoke out the bugs in the code which applies remote changes.</li><li>They provide additional navigation.</li><li>They provide an interesting way to automate document review, for example a Perl::Critic bot or a parser for<nobr> <wbr></nobr><tt>/TODO (.*)/</tt> or<nobr> <wbr></nobr><tt>/XXX (.*)/</tt> items can add these as bookmarks automatically to maintain in-document to-do lists. This will necessitate some additions like bookmark categories and/or more text for each bookmark, and a way to tick off items from the bookmark list, but these come later.</li></ol><p>After the second public release, I have to look at existing and externally maintained Javascript libraries to manipulate the DOM UI to clean up some of the cruft that has accumulated on the Javascript side of things. Another, unrelated step is the support of Perlbal - currently, the server runs under HTTP::Server::Simple, in a non-forking fashion, but as each client hits the server at least once per second, this will not scale properly. The Perlbal infrastructure might come in handy here, as there are no CPU-intensive tasks that could block the server.</p><p>I hope I find the time during the weekend to publish the second incarnation. The source code release and/or svn repository are also on my list, but a bit lower on priority.</p> Corion 2006-10-05T08:25:11+00:00 journal And now for something completely different <p>Lest this blog becomes too technical, here are some <a href="">panoramic pictures</a> I took on a trip with my motorbike through the Alps (and no, I'm neither of the guys on the pictures).</p> Corion 2006-09-23T21:45:26+00:00 journal Alien:: modules have escaped <p>I've just uploaded some Alien:: modules onto <a href="">my Perl modules webpage</a>. They aren't really fit for a CPAN release yet, mostly because I've only tested them on Win32 and geared them mostly for <tt>nmake</tt> and MSVC (7), but they are there, and comments (or adopters) are welcome.</p><ol> <li> <tt>Alien::Zlib</tt> - this is a fork of Kane's Alien::Zlib, because his version doesn't build/work on Win32, and I need<nobr> <wbr></nobr>::Zlib as a prerequisite for other Alien:: modules, which his API doesn't provide.</li><li> <tt>Alien::Iconv</tt> - the iconv library, the second prerequisite to <tt>Alien::XML::LibXML</tt> </li><li> <tt>Alien::XML::LibXML</tt> - the libxml2 library, packaged so that it can be used in theory to install XML::LibXML and XML::LibXML::Common via CPAN. The <tt>Makefile.PL</tt> of XML::LibXML and XML::LibXML::Common need to be patched, the patched versions are included.</li><li> <tt>Alien::Libjpeg</tt> - libjpeg, as usable for Imager</li><li> <tt>Alien::Giflib</tt> - giflib, as usable for Imager</li><li> <tt>Alien::Libpng</tt> - libpng, as usable for Imager</li></ol><p>All modules follow the same concept that Jos laid out with his Alien::Zlib release. The complete steps of downloading and building the external library are done from within <tt>Makefile.PL</tt> and the external libraries are then installed below the module. </p> Corion 2006-09-23T21:34:34+00:00 journal First Post! <p>I've decided to write here a bit about <a href="">Zaphod</a>, which is to become a collaborative text editor. The version currently at <tt></tt> is the old v1, which basically works but has major design flaws. The reworked v2 will go online soonish, to allow others to chime in with better frameworks, browser compatibility etc.</p><p>Also, I will pimp some modules here that are up for adoption / CPAN release, like most of the stuff at <a href=""></a>.</p> Corion 2006-09-22T21:33:09+00:00 journal