• Skip to site navigation
  • Skip to content
  • Skip to sidebar
  • Skip to footer
  • Go to archive page
Shadowmaster’s Lair
  • Home
  • Projects
  • Articles
  • About
  • Contact
  • Blog

Rei 2 Feeds: Behind the scenes

Thursday, April 21, 2011

Just today I completed an initial, working implementation of an XML feeds reader in the Rei 2 IRC Bot framework. This implementation was pushed into master and I later tagged Rei 2 version 0.2.8, which will be eventually deployed on the shikadibot production instance, once this new shiny feature has seen enough testing and appears to be stable enough.

Thus my nearly 12 hours long coding spree culminates.

There were various design issues I faced when developing the feeds reader functionality. I already came across inefficiencies inherent to the legacy single-threaded model for SVN bot functionality found in Shikadibot 0314 and reimplemented in Rei 2; it’s not directly feasible to listen and respond to interactive events from an IRC connection socket while waiting for a reply that might never arrive from a SVN server. In the feeds reader case, more complications arise from the need to download and parse multiple documents from different remote servers in quick succession.

Rei 2 is still bound to the Irssi IRC client, and will remain so for a good while until the new S2 state tracker is completed. The current situation is by no means bad as it allows me to concentrate my efforts on the bot’s outermost functionality layer, but the dependence on a non-native (i.e. C as opposed to Perl) backend places several constraints on what can be done in Rei 2.

Instead of resorting to threads — a possibility that I still don’t dare test with Irssi+Perl — I ideated a convoluted mechanism taking advantage of child processes and a simple caching strategy. Rei 2 forks its own helper daemon (rei2-feeds-worker.pl) when loaded (not necessarily always at Irssi’s startup!). This assistant simply fetches all XML feeds in the background every once in a while, and saves them to disk at a special location in the configuration dir — no more, no less. Meanwhile, Rei 2 sets up timed events to trap into the feeds processor and quickly work with what’s in the local on-disk cache.

Theoretically, this model could be extended to other Rei 2 modules, the SVN bot code being a particularly attractive candidate. It could be possible to either fork more unique helpers in the background, or somehow merge them all into another modular application. Either way, I’m not strongly interested on messing with the design right now other than researching more optimal mechanisms to monitor cache activity — inotify comes to mind.

• • •

For testing purposes, Rei2 on freenode already tracks the Wesnoth-UMC-Dev frontpage aggregator feed in #wesnoth-umc-dev and the Wesnoth.org’ Off-Topic forum posts feed in #wesnoth-offtopic. There’s also a duplicate feed of this very blog competing against one of my earliest private-use modules which has been reporting blog posts and Twitter updates in ##shadowm nearly since Rei 2’s inception. I’m meant to port the latter two to the new model soon-ish.

To celebrate this rather important milestone, I’ve updated the Rei 2 IRC Bot project page in this site as well with some new information.

Posted in IRC, Miscellaneous, Personal, Projects, Rei 2 IRC Bot, Software at 00:56 UTC | No comments

Cats, rainbows, and stars, oh my

Monday, April 18, 2011

I don’t know what’s the worst (or best) part: that HTML 5 is being used for this kind of gimmicks, or the fact that there’s people who are entertained by a gray cat who shits rainbows while flying- er, running across the universe with a pop tart glued to its back. Does that make sense? No. Does it need to make sense? No — this is the Internet, after all.

Feel free to click the links, but don’t blame me if your score in future IQ tests drops by a significant amount as a consequence.

Protip: nyan.cat works best with Google Chrome. Firefox 4 and Opera 11.10 miss the rainbow animation for some reason, on Linux at least. Not that I care, really.

Posted in Miscellaneous, Software, Web browsers, Web design at 20:10 UTC | 1 comment

Firefox 4 gets a clue, plus Bonus Track

Saturday, April 16, 2011

Apparently the people at Mozilla finally decided to give their last Firefox release a try on a Linux/Gtk+ configuration other than Ubuntu 10.10’s default, or some diligent user reported to them how awful the new interface looks to the rest of the world who’s not using Windows. In any case, I seem to be receiving new builds through their beta channel, and a few hours ago I got my hands on Firefox 4.0.1 “beta” build 1, whatever that means.

The following picture should speak by itself: (Hint: look between the Firefox button and the toolbar.)

Firefox 4.0.1 toolbar comparison

Before switching to Mozilla Firefox 4’s builds from the Nightly (Minefield) channel some time around mid-2010, I used to follow closely the blog of one of the Debian Iceweasel maintainers, from which I got goodness such as updates on the status of Iceweasel 3.6 for Debian Sid/Squeeze in Experimental, that I used for a while.

There’s a little piece of customization advice for Iceweasel/Firefox 4.0 users posted around January that I overlooked until now.

Turns out that this night after Firefox 4.0.1’s update, I decided that the “Firefox button” should match the Oxygen window decoration in style — because I’m that crazy. I took the ~/.mozilla/firefox/<session>/chrome/userChrome.css modifications from the blog post and played around with various combinations until I produced something marginally uniquer.

Firefox 4.0.1 customization screenshot
#appmenu-toolbar-button > .toolbarbutton-text {
  /* oxygen "carved" effect */
  text-shadow: 0px 1px 0px white;
  /* bold */
  font-weight: bold;
}

I am actually afraid of messing around with the many possibilities of XUL/CSS styling further, lest I spend the rest of the month producing my own full-fledged Firefox theme. The fact that I can handle CSS makes this all the more worrisome.

Posted in Miscellaneous, Software, Web browsers, Web design at 06:08 UTC | No comments

Web browsers and UI design divergence

Thursday, April 7, 2011

Web browsers break any established GUI design molds and this is no news for us. It was a necessity to create new controls (also known as widgets) in the ’90s when the Web was still a new, unknown thing and no common consensus on how users should interact with it existed. However, with time this practice has lost some of its technical grounds to become more of a profitable marketing strategy used by giants such as Mozilla and Microsoft to create distinct looks for their products.

Opera 11 screenshot Google Chrome screenshot
Firefox 4 screenshot Konqueror screenshot

Above we can see four browsers I personally consider major players in the GNU/Linux ecosystem in particular. From left to right, top to bottom in descending order of wheel reinvention and UI differentiation, we have: Opera 11 (???), Google Chrome 10 (GTK+), Mozilla Firefox 4.0 (XUL/GTK+) and Konqueror (KDE/Qt4) from KDE SC 4.4.

At the lower end, we have Konqueror, which has been designed to blend in with its parent application suite, the KDE desktop environment, so it uses a common visual design instead of inventing its own. At the top there’s Opera, a cross-platform browser that is not part of any specific suite and attempts to keep a consistent internal look between different operating systems, resulting in various reimplemented controls with different, custom functionality and a visual design unique to this software product.

In the middle we have Google Chrome and Mozilla Firefox, which have chosen to use the GTK+ toolkit to avoid reimplementing too much and concentrate on their actual business, that is, web browsing. But something’s horribly off about these two.

In Google Chrome’s case, we have a default, “Classic” theme that presents the user with the distinctive Chromium look and feel but keeps the standard GTK+ application design for modal dialogs. Embedded input controls in web pages such as checkboxes and unstyled command buttons appear to be rendered by a custom engine using Chrome’s own ideas of what a widget should look like. As Chrome belongs in the GTK+ territory like all of the GNOME desktop environment, this makes it really stand out as an individual application that behaves and looks like nothing native to GNOME or other GTK+-based environments. As an alternative, we can choose to use the “GTK+ theme” in the application’s preferences, which does nothing but switch the color scheme to respect the user’s desktop preferences a bit and fallback to GTK+’s icon paths for some (not all!) toolbar buttons.

This so-called “GTK+ theme” keeps the hideous low-contrast, Chrome-style scrollbar in the web page view area as well, basically mocking users who would hope for some desktop consistency and accessibility by choosing this option.

Mozilla Firefox provides an interesting case. Powered by the XULRunner framework, it aims to blend in with every one of its target platforms, using native Windows controls on Windows and GTK+ as a backend on Linux. However, someone didn’t get the memo with the main window’s tab bar, and instead of native GTK+ versions we get awful customized tabs that do not respect the user’s chosen GTK+ engine. It seems that in Firefox 4’s particular case the developers intended to achieve something closer to Opera in design, which worked in Windows, but didn’t get completed for Linux — probably due to time constraints and lack of volunteers to do the grunt work required in the coding area. Firefox 4 in Linux currently barely resembles the original mock-ups. (To their credit, those mock-ups showcase a really elegant — if somewhat unoriginal — design that is too unfortunately missing in the RTM builds.)

The current strategy appears to be all too profitable right now for these people to abandon it. We’ll probably just see more development in the GUI design department from web browser vendors than operating systems and desktop environments in the near future.

Posted in Miscellaneous, Software, Web browsers at 04:26 UTC | No comments

Quod erat demonstrandum

Friday, April 1, 2011

In an unexpected turn of events, the flight was cancelled at the last minute due to a rather confusing brawl between International police agents and ophidians aboard the aircraft.

After having been caught sitting on a toilet in middle of a M 8.8 earthquake, I can only thank the gods for not putting me into a similarly embarrassing situation on a flying vehicle filled with these scaly creatures.

But that’s out of the matter now. This episode is over and thanks to my new-found aversion to airplanes, I think we can safely say that I’m here to stay.

Happy April Fools, people!

Posted in Miscellaneous, Personal at 22:14 UTC | 1 comment

So long, Wesnoth.org forums

Friday, April 1, 2011

It’s official now. As someone with a keen eye for forum changes already noticed, Gambit is replacing me as the Wesnoth.org forum admin, effective now.

There are various circumstances that led to this decision, including my traveling to France tomorrow, and Gambit’s competence and great ability to bear with high work load (much better than mine anyway).

I am sure that this change won’t disrupt regular activity in any way whatsoever.

I’ll follow up with some notes on the forum’s history later.

Happy April Fools, people!

Posted in Miscellaneous, Personal, Software, Wesnoth at 00:43 UTC | 1 comment
Page 1 of 1, totaling 6 entries
‹ April ’11 ›
Mo Tu We Th Fr Sa Su
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30  
  • Recent posts
  • Archives
  • RSS/XML RSS 1.0
  • RSS/XML RSS 2.0
  • Atom/XML Atom 1.0
  • RSS/XML Comments
Twitter: @shikadilord
  • On the other hand, the practical results are beautiful.1 day ago
  • You know you have jumped the shark when your commit advertises itself as "Horrible, horrible hack". #Wesnoth1 day ago
  • That's all there's to say on the matter.2 days ago
  • Shadowmaster’s Blog: After the Storm 0.8.0 http://t.co/Txzwse3y #Wesnoth2 days ago
  • I just updated the #Wesnoth forums' Posting Guidelines with a new item on attachments: http://t.co/hZeCFXqF4 days ago
  • Can anyone tell me how an account name of 'buynowwebsites' could exist for anything other than spamming? http://t.co/93ZTLOlM1 week ago
Categories
  • XML Frogatto
  • XML Hardware
  • XML IRC
  • XML freenode
  • XML Miscellaneous
  • XML Personal
  • XML Projects
  • XML Rei 2 IRC Bot
  • XML Wesnoth-TC
  • XML Site updates
  • XML Software
  • XML Web browsers
  • XML Web design
  • XML phpBB
  • XML Wesnoth
  • XML Wesnoth Evolution
  • XML Wesnoth-UMC-Dev
Projects
  • Wesnoth Add-ons
  • Wesnoth-TC/RCX
  • Frogatto levels
  • Rei 2 IRC Bot
  • Wesnoth-UMC-Dev Registry
  • Shikadibot 0314
  • phpBB 3.0 Mods/Hacks
Articles
  • Wesnoth Evolution
Links
  • Battle for Wesnoth
  • Wesnoth-UMC-Dev
  • Frogatto & Friends
Contact • Site Information & Disclaimer

Copyright © 2006-2012 by Ignacio R. Morelle. All rights reserved.
Powered by Poison Ivy/Dorset6 D9 and Serendipity.
Hosting provided by rewound.net and NearlyFreeSpeech.NET.

Serendipity PHP Weblog Valid XHTML 1.0 Transitional