Archive for June, 2011

$self =~ s/Symfony/Dancer/

Thursday, June 30th, 2011

Notice anything different about my site? No? Good, this means that the transition went smooth. I rewrote the engine that my website runs on from Symfony to Perl Dancer.

You might remember that I introduced the Symfony-based engine less than six months ago, so why the switch? Well, back when I launched it, I kind of felt that it might not last very long — mostly because Symfony was just a better-than-nothing choice. For years, my website was running on an ugly framework-wannabe solution that I developed myself. By the way, if you ever get the same idea, consider this advice:

(source: gojko.net)

By the time I finally decided to rebuild it, Symfony just happened to be around — I had a Symfony project coming up and thought it might be good to first get familiar with the framework on a smaller task. I started working on the rewrite, and I quickly got the feeling that Symfony is just too big for the purpose of running a small website like this — I only needed a tiny subset of its numerous features. All in all, it felt way too heavy. But, I really wanted to replace the old engine, so I still went with it.

As for Dancer, I first heard of it about a year ago and I knew I was going to give it a try at some point. Why? Two reasons:

  1. It’s a micro framework, which is much better suited for simple sites than a full-blown MVC framework
  2. It’s Perl, dammit!

So, two weekends of enjoyable hacking, and here it is — my website running on Perl. More precisely, it’s a Perl/PHP hybrid, as the blog is still powered by WordPress. But, the blog engine is feeding its output to the Dancer application, so everything you see is processed by Perl.

ImgAreaSelect 0.9.8

Saturday, June 18th, 2011

It has been just three days since the previous release of imgAreaSelect, and I’m already here with a new version! How’s that for short release cycles? But seriously, I screwed up a bit with the last release. There was a problem with the implementation of scaling which limited the area available for selection on scaled images, and it somehow went unnoticed during testing. Anyway, version 0.9.8 fixes it.

Thanks to Martin Fowler for catching this issue.

ImgAreaSelect 0.9.7

Tuesday, June 14th, 2011

ImgAreaSelect 0.9.7 has just been released. It’s a few days later than I originally anticipated, as I bumped into some problems with the automated tests. Well, I guess with a dozen browsers, some running on virtual machines, some compiled from source code, I can’t expect things to be easy. Anyways, the significant changes in this version are:

  • The minWidth/minHeight/maxWidth/maxHeight options now respect scaling
  • There is a new API method, cancelSelection(), which cancels the current selection (as the name suggests)

Big thanks to everyone who provided feedback, especially to Loa and Greg.

With each new version, I spend some time making sure the plugin code is as small as possible — after all, the project home page states “the packed version is less than 8 KB”, and I want to keep it that way. But, the packed code for this release was initially about 40 bytes more than 8 KB, so I had to do some refactoring. By changing a few regular expressions, I managed to get it down to 8191 bytes, which happens to be exactly one byte less than 8 KB. That’s a close call, but, hooray, my statement still holds true!

  • Archives

  • Categories

  • Meta

  • Latest Tweets


    Warning: Illegal string offset 'last_access' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 334

    Warning: Illegal string offset 'time_limit' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 334

    Warning: Illegal string offset 'last_access' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 336

    Warning: Illegal string offset 'twitter_api' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 234

    Warning: Illegal string offset 'user_token' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 262

    Warning: Illegal string offset 'user_secret' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 263

    Warning: Illegal string offset 'consumer_key' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 264

    Warning: Illegal string offset 'consumer_secret' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 265

    Warning: Illegal string offset 'twitter_username' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 270

    Warning: Illegal string offset 'show_retweets' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 272

    Warning: Illegal string offset 'exclude_replies' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 275

    Warning: Illegal string offset 'twitter_data' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 282

    Warning: Illegal string offset 'twitter_data' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 350

    Warning: Illegal string offset 'twitter_data' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 351
    Twitter outputted an error:
    .
    Warning: Illegal string offset 'time_format' in /usr/local/www/odyniec.net/public/blog/wp-content/plugins/twitget/twitget.php on line 484
  • Follow odyniec on Twitter