Older blog entries for LotR (starting at number 10)

ianmacd seems to think Ruby's missing_method is a unique feature. I think it's more likely it was borrowed from Perl:


sub main::AUTOLOAD { my ($method, $data, %attrs) = ($AUTOLOAD, @_); my ($tag) = $method =~ /.*::(\w+)/g; my $attr_str; foreach my $key (keys %attrs) { $attr_str .= sprintf (" %s='%s'", $attrs{$key}); } return sprintf ("<%s%s>%s</%s>", $tag, $attr_str, $data, $tag); }

print &a ('Google', href => 'http://www.google.com'), "\n"; print &ul(&li('item1') . &li('item2') . &li('item3')), "\n";

Of course, TMTOWTDI, and ianmacd already mentions CGI.pm, which does the same thing, only more robustly.

Another module is quite useful if you want to edit your html tree at some point after creating it, HTML::Element. An example of how to create a tree with it, and print it:

use HTML::Element;

my $foo = HTML::Element->new_from_lol ( ['p', ['a', {href => 'http://www.google.com'}, 'Google' ], ['ul', map ['li', $_], qw(item1 item2 item3) ], ], );

print $foo->as_HTML;

Posted through the XML-RPC interface from Perl

grr. I *HATE* stupid bugs caused by mindless copy-n-paste "coding"

Stop scaring us, mtearle

mathieu, stop complaining about not having a life, and enjoy what you're doing some more. Sounds like a fine life from what's in your diaries to me.

in other news, Reefknot is proving to be much hacking fun (see?). Must do C stuff again, all this Perl is making my C memory rusty :(

SeaDragons: if you want to be certified, post some information about yourself

(what) is Ximian thinking?!?

woo Got my GUADEC ticket!

Hmm, long time no entry

Been working on mooonsooon in my do-nothing-for-days-and-then-start-working-like-crazy-for-a-while mode :)
The framework is going pretty well. most of it seems to be sortof working, now I just need to clean up everything properly and stuff like that.
I also just updated to the newest bonobo, which was less of a pain than I feared :) thanks to Nat for the script

I've been following the recent infobot development discussions, and with possible new features like factoid trust, better interbot communications and the removal of the irc dependency, it might be cool to write an office-assistant sortof interface to it. Add a factpack to every application, and you can ask questions, and get pretty good answers. With a central bot, people could even improve the factpack on the fly.

Wow, the lxr code is a lot nicer than the old stuff. I was working on getting some more color into the output when someone pointed me to the new version, so I checked that out. It works with an RDBMS now (although you can still use db). The developers are working with Postgresql, but since I already had mysql installed, I tried to get it to work with that.

Sent patch to the mailing-list after I succeeded. Now I'm thinking about how to best encapsulate the functionality of lxr in some bonobo component thingie, so my development environment will provide it's editor with a nice way to get those click-to-go-to-the-function-defitition thingies, etc.

Am also thinking it might be cool to add a table with RDP links in there, so while browsing gtk+/gnome code, you'll be able to look up what that function does with just one click.

1 older entry...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!