Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of Corion (7288)

Sunday November 26, 2006
03:12 PM

Alien::Imager has escaped

Alien::Imager has escaped onto my Perl repository. 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 recompile command will then recompile Imager with the added libraries.

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.

Configuring Imager was greatly simplified by Imager allowwing environment variables for all of the relevant parameters to Makefile.PL. If your module requires configuration during the Makefile.PL or build phase, please consider supporting environment variables so that external scripts can set up the environment and then install your script through CPAN.

Sunday November 05, 2006
06:12 PM

SocialText tryout / VMWare image

One reason I'm playing around with VMWare Player is to try out SocialText in a virtual machine to play around with it instead of ruining a perfectly good machine+Perl installation by the bazillion prerequisites it has.

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.

Next try was on Debian Sarge using the Debian-provided packages - this didn't work, because Debian doesn't provide the recent enough versions.

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 (Apache::Constants::OK wasn't autoloaded in the tests, but why?). Test::Base needed to be installed afterwards manually. The Socialtext package didn't make test for me, but maybe that was because I didn't have apache-perl installed but only apache. After installing the apache-perl package and fiddling around with PostgreSQL, it all now seems to work and has been compressed into a clean, 400MB virtual machine image.

The Perl script I used to automate the installation onto the Debian VM currently lives at http://datenzoo.de/pub/install-opentext.txt . I'd also publish the VMWare image, but it's 400MB and I don't have that kind of bandwidth...

So, hints as how to reduce the size of a VMWare image (like recipes for using dd to make a harddisk image more compressible) are welcome.

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 :).

05:49 PM

"Answer file" for Debian netinstall CDs

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.

For Debian, I've only found the gigantic moloch that is FAI, 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 maybe the http:// URL of a Perl script to run afterwards.

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 .iso for each instance ...

Tuesday October 17, 2006
03:08 PM

Zaphod progress - v0.02, the second generation is now live

I've made a major step forward in Zaphod 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:

  1. Session support - more than one document can now be edited
  2. Document paste - you can now paste a document for editing
  3. Session autosave/recovery - if I restart the server, all sessions survive
  4. Simplified representation of changes - the changes are now just triplets (offset, old, new), which makes handling and merging incredibly more easier in both, Perl and Javascript
  5. Some tests, courtesy of JSAN

The features that didn't make it into this release:

  1. Bookmarks in the document are there, but don't get updated properly when another user changes the document
  2. Document download

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.

The source code is "out there", on my Perl repository, at least until I release it onto CPAN. It's free for the taking, as in "same terms as Perl".

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 :)

Update: 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.

02:30 PM

Modules shipping with a broken Module::Install

That's what I like about non-broken installers. Class::Inspector comes with Module::Install 0.62, which is broken. The trick to still install it is as follows:

  1. Install Module::Install (0.64 at this time)
  2. Delete the inc/ directory in the Class-Inspector-1.62/ directory
  3. Run perl -w Makefile.PL once to bootstrap Module::Install
  4. Run perl -w Makefile.PL && make && make install to install the package.

Thanks to Audrey for making this so painless

Thursday October 05, 2006
06:47 AM

CPAN-mail " Perl-Freelancer needed" spam

I got some spam by a German company (Online Microsystems) seeking a freelancer today. I gave them a call and educated them about jobs.perl.org, which they actually were really happy to learn about.

I didn't find the page with the rules what's fit for posting on jobs.perl.org and what's not though. Still, if it's not fit for posting on jobs.perl.org, I don't want to hear about it via my CPAN mail address either.

03:25 AM

Zaphod progress

(This is the second incarnation because I only previewed, and didn't post ...)

The next incarnation of Zaphod is progressing nicely. The move away from complicated actions ("insert character", "insert line", "split line", ...) 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 split_line and join_line obsolete.

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.

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:

  1. Bookmarks will smoke out the bugs in the code which applies remote changes.
  2. They provide additional navigation.
  3. They provide an interesting way to automate document review, for example a Perl::Critic bot or a parser for /TODO (.*)/ or /XXX (.*)/ 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.

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.

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.

Saturday September 23, 2006
04:45 PM

And now for something completely different

Lest this blog becomes too technical, here are some panoramic pictures I took on a trip with my motorbike through the Alps (and no, I'm neither of the guys on the pictures).

04:34 PM

Alien:: modules have escaped

I've just uploaded some Alien:: modules onto my Perl modules webpage. They aren't really fit for a CPAN release yet, mostly because I've only tested them on Win32 and geared them mostly for nmake and MSVC (7), but they are there, and comments (or adopters) are welcome.

  1. Alien::Zlib - this is a fork of Kane's Alien::Zlib, because his version doesn't build/work on Win32, and I need ::Zlib as a prerequisite for other Alien:: modules, which his API doesn't provide.
  2. Alien::Iconv - the iconv library, the second prerequisite to Alien::XML::LibXML
  3. Alien::XML::LibXML - the libxml2 library, packaged so that it can be used in theory to install XML::LibXML and XML::LibXML::Common via CPAN. The Makefile.PL of XML::LibXML and XML::LibXML::Common need to be patched, the patched versions are included.
  4. Alien::Libjpeg - libjpeg, as usable for Imager
  5. Alien::Giflib - giflib, as usable for Imager
  6. Alien::Libpng - libpng, as usable for Imager

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 Makefile.PL and the external libraries are then installed below the module.

Friday September 22, 2006
04:33 PM

First Post!

I've decided to write here a bit about Zaphod, which is to become a collaborative text editor. The version currently at datenzoo.de 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.

Also, I will pimp some modules here that are up for adoption / CPAN release, like most of the stuff at http://corion.net/perl-dev.