Sunday, February 13, 2011

Aww... how he was loved

I am guilty of orphaning the mighty Beagle. With so many bugs calling for attention, I reverted to debugging towards the end of the last decade; I had no option other than turning a blind eye to one of my favourite projects. There were technical reasons which acted as good secondary excuses - Evolution devised a new API for search engines which basically made beagle incompatible with that email client, the File system indexer (one of the many data gatherers supported by it) was full of corner-case hacks demanding cleanup and rewrite, and lastly, increasing attention to tracker, whose one of the taglines (possibly made up by fan-boys) was "C".

I havn't been catching up with beagle-tracker-mono world since then. To be honest, I have long stopped following /. and Linux news altogether. I couldn't get myself to unsubscribe from beagle mailing-list though, even though I was convinced within a year no one in the world would be using beagle any more and there will never be any email in that list. It was just matter of time.

Therefore, imagine my surprise to see the following recent thread in the mailing list. It was too nice and warming to read the posts once-twice-thrice. The stability and versatility that we aimed and delivered, is surprisingly, still relevant. Maybe I should title this post as "How he is still loved"
Thu, 10 Feb 2011 13:53:42 +0100

Dear beagle hackers,
since the mailing list is inactive I fear that beagle is now ultimately abandoned. Is this the case? If so, this really makes me sad. I have been using beagle daily for a number of years and I still find that there is no better desktop search available on Linux. Tracker is a disappointment. It supports very few data sources, is a cpu and memory hog, it is buggy, and its search results are very poor in quality, and I don't really see it making progress either. I got so used to beagle for quickly finding e-mail and files that I was saddened to see that Debian completely removed it from the archives, because development has stopped. Isn't there anyone anywhere willing to take over? There has been so much effort invested into beagle. In the end it was really stable, reliable and usable, that just letting it rot is such a wasteful thing to do... 
Thu, 10 Feb 2011 11:46:20 -0600

I don't think anybody is actively working on beagle, but I wouldn't
call it dead.  It's still used by many people, and we're at least
keeping it runnable -- eg we had an update to adapt to new Mono.Sqlite
APIs upstream.  Feel free to work on it!
Fri, 11 Feb 2011 10:06:13 +0100


I would love to, but unfortunately I am in no way qualified to do so. It is good to hear that people are still using it, However, at least for Debian users this has become very difficult since it was removed from the repositories. Has it been updated to work with recent version of Evolution?
Fri, 11 Feb 2011 13:28:41 -0500

On Thu, 2011-02-10 at 13:53 +0100, Johannes Rohr wrote: 
> Dear beagle hackers,
> since the mailing list is inactive I fear that beagle is now ultimately 
> abandoned. Is this the case? If so, this really makes me sad.
> I have been using beagle daily for a number of years and I still find 
> that there is no better desktop search available on Linux.
> Tracker is a disappointment. It supports very few data sources, is a cpu 
> and memory hog, it is buggy, and its search results are very poor in 
> quality, and I don't really see it making progress either.

I feel the same way;  I'd hoped Tracker could serve as a replacement for
Beagle but to call it a disappointment is an understatement.  

Score a big one for the anti-Mono-FUD-monster  [funny they used to go
on-an-on that Beagle was slow because it used Mono... then Beagle got
fast and Tracker still devours gobs of CPU to produce essentially no
result].

But in Tracker's defense Evolution has been changing significantly in
the past few revisions so Beagle doesn't work with it anymore either.
In time hopefully Evolution will settle down again and the Tracker
integration will improve.  Some really nice improvements are being made
to Evolution.

> I got so used to beagle for quickly finding e-mail and files that I was 
> saddened to see that Debian completely removed it from the archives, 
> because development has stopped. Isn't there anyone anywhere willing to 
> take over? There has been so much effort invested into beagle. In the 
> end it was really stable, reliable and usable, that just letting it rot 
> is such a wasteful thing to do...

If there are no developers that is what happens.  Pointing out that
there "should be" developers doesn't make them magically appear.
Fri, 11 Feb 2011 13:47:15 -0500

>
> I feel the same way; I'd hoped Tracker could serve as a replacement for
> Beagle but to call it a disappointment is an understatement.

Ditto. I have continued to be disappointed by Tracker. I've completely
removed it from my systems as it was actively blocking other
applications. More trouble that it was worth.

Beagle was always very un-intrusive and always gave me great search
results.

Sad that it's moribund. :-(
Then there were posts about an alternate desktop search yada yada yada which I am skipping. Though, one thing should be kept in mind - one shouldn't apples and oranges. Beagle is not a file-system indexer. There are plenty of other tools to do that, and the simplest file system indexer can be written in less than 100 lines (of any modern programming language).

There is of course a file system indexer built on beagle that can be used to compare against existing file system indexers - it is called blocate and I believe, is shipped alongside beagle (in distros still packaging beagle). Let us bow once again to the stability and versatility - blocate is merely a wrapper shell script calling the regular beagle commands.

Friday, January 28, 2011

Superfish menu + Drupal Fusion + How the devil do I

Superfish is a pretty cool menu based on JQuery and CSS. If you are suspicious, view the wonder for yourself at http://users.tpg.com.au/j_birch/plugins/superfish/ with the nav-bar example.

Fusion based Drupal themes are currently hot on market, e.g., Acquia Prosper. You can check them out for your own at http://fusiondrupalthemes.com/browse.

You are yet to hear the awesomest - jQuery hoverintent plugin. Very helpful for navigating complex menus, where often, one slip of the mouse implies restarting the navigation.

Fusion themes already use Superfish for their main menu system. Of course, I madly fell in love the moment I saw the navbar. However, the sophisticated CSS and JS of Superfish nav-bar goes kaput when used in Fusion. Quoting jeremy (a TopNotchThemer at http://fusiondrupalthemes.com forum)
Superfish is a bit difficult to work with when you need to get the active menu sub-menu to be visible when you are on that section. I've tried a LOT of different scripts and changes to the theme but never found a solution that worked for Superfish and it was very unstabble when I got close to what I wanted.
I actually went with disabling the primary menu and Superfish all together and going with a block instead for my menu. This is basically starting all over and doesn't work with Superfish at all so you have full control over the placement and styling but will have to write it yourself.
So for this specific case I recommend going with a block instead of the default primary menu with Superfish. Best of luck!

So, I started keeping notes when I saw some early signs of success. Here is the recipe to get it (close to) perfect.

Fix Superfish nav-bar menu in Fusion-based Drupal themes

1. Enable navbar for superfish
From http://fusiondrupalthemes.com/story/100525/customizing-superfish-menus-your-fusion-theme

function iiitd_preprocess_page(&$vars) {
  // Add Superfish navbar class if dropdown enabled
  if ($vars['primary_links'] && theme_get_setting('primary_menu_dropdown') == 1) {
      $vars['primary_links_tree'] = preg_replace('/^<ul class="menu sf-menu/i', '<ul class="menu sf-menu sf-navbar', $vars['primary_links_tree'], 1);
  }
} 
 
2. Ask navbar to keep showing second level
http://fusiondrupalthemes.com/forum/using-fusion/adjusting-superfish-behaviour

--- mysubtheme.js
Drupal.behaviors.mysubthemeSuperfish = function (context) {

$("#primary-menu ul.sf-navbar").superfish({
    hoverClass:  'sfHover',
    pathLevels:  2,
    pathClass:   'active-trail',
    delay:       800,
    animation:   {opacity:'show'}, // opacity: fade-in, height: slide-in
    speed:       'normal',
    autoArrows:  true,
    dropShadows: false,
    disableHI:   false
  }).supposition();
};

3. Modify fusion-core/superfish.js DIRECTLY! Superfish removed the active-trail class which fusion didn't like at all!
return this.each(function() {
   var s = this.serial = sf.o.length;
   var o = $.extend({},sf.defaults,op);
   o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
+    $(this).addClass([o.hoverClass,c.bcClass].join(' '));
+     //.filter('li:has(ul)').removeClass(o.pathClass);
-    $(this).addClass([o.hoverClass,c.bcClass].join(' '))
-     .filter('li:has(ul)').removeClass(o.pathClass);
   });
   sf.o[s] = sf.op = o;

4. (As good as modifying superfish.js) Set the default value for Superfish directly - by the time drupal does it, the page is already rendered in an incorrect way.

--- mysubtheme.js
// Change defaults too - otherwise, second level does not show the active-trail
$.fn.superfish.defaults.pathClass = 'active-trail';
$.fn.superfish.defaults.pathLevels = 2;

5. Add space for the second level to show in the right place.
div#primary-menu ul.sf-navbar {
    height: 2.5em;
    padding-bottom: 2.5em !important;
    padding-left: 0 !important;
    position: relative;
    width: 100%;
    z-index: 97;
    line-height: 100%;
}

div#primary-menu ul.sf-navbar li {
  position: static;
}

div#primary-menu ul.sf-navbar li.sfHover ul {
  margin-top: 0;
  top: 2.5em;   /* match top ul list item height */
  left: 0;
}

6. Even though the theme comes with hoverintent plugin files, HI (as hoverintent is often called) doesn't actually work. Even after disableHI is set to false. The reason and the fix is ...
// Destroy default fusionSuperfish initialization.
/* Explanation: default fusionSuperfish disables HI during its initialization -
 * which, attaches a jquery hover() handler. The jquery hover handler attaches
 * mouseenter and mouseleave events to the element. The mouseenter handler first
 * actually changes the eventype to 'mouseenter' and then calls the handler.
 *
 * Now, HI requires handlers for mouseover and mouseout. However, upon firing
 * those events, first the hover handler is called. So, by the time the HI
 * handler is called, the event type has already been changed to mouseenter/mouseleave!
 * And that is how the cookie crumbled everytime.
 */
Drupal.behaviors.fusionSuperfish = function (context) { };
Drupal.behaviors.fusionSuperfishBlocks = function (context) { };


This post carries a timestamp of 1:30am at night. Don't even ask for warranty.

Wednesday, December 01, 2010

Internet to TV

This is the age of parallel processing.

Multiple firefox profile running simultaneously (--no-remote / MOZ_NO_REMOTE=1).
Multiple tabs opened in yakuake.
Multiple CPUs (one for dealing with flash/firefox, other for life).
Now added, multiple sound outputs from computer.

I have one pair of speakers which I use in the dining area. Helps me get past barely edibles.

My work area has now moved close to the TV. This TV has HDMI (and is DLNA-compatible), so it made perfect sense to me when the geeky fairy whispered something about using the TV speakers for listening to Magic 106.7FM, Jango and Youtubish songs off of my not-so-great-sounding laptop. minidlna doesn't quite stream non-file contents, so I was left with pleading ALSA to let specially chosen audio to be routed for TV@dBera via HDMI.

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 3: INTEL HDMI [INTEL HDMI]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
$ cat > ~/.asoundrc.tv
pcm.!default {
    type plug
    slave {
        pcm {
            type hw
            card 0
            device 3
        }
    }
}
$ ALSA_CONFIG_PATH=~/.asoundrc.tv firefox -P music -no-remote

Hitting the right button on the TV remote sets its Energy Saving to Picture Off. Voila! I just got myself an awesome pair of speakers.

Edit: If you get no sound, make sure the IEC958 interface is unmuted (you can check/set/unset using alsamixer). IEC958 is the interface for digital output for a lot of soundcards.

Friday, September 03, 2010

forever very-vapor

WHAT ! Duke Nukem Forever is not a vapour ware ? But I thought that is part of the definition of vap...

I am feeling weak at my knees, being compelled to write about a hearsay read on blogs and twitter feeds. It's just that hard to keep cool.

Let's Nuke'em Duke!

Sunday, June 07, 2009

this is his 4th computer

A thin man with a pointed beard loved honeysuckle. He had some honeysuckle trees in an orchard across a huge river. He built a boat and used it to cross the river. The fruits were good. He ate some and sold the rest.
...
10 years later, the boat showed signs of age. He built a new boat. Life was good again.

1 millennium, 6 century and 5 decades later, a very smart man told us how to create a very smart machine. One machine which can do everything. Of course, the machine needed sophisticated instructions but there were a lot of people who can figure out the right instructions for any operation.

6 decades later. A company that sells computers made a wonderful laptop. A fat man who earns a lot of money bought one. The laptop performed top-notch, looked solid and meant business. He was happy.
...
2 years later, the computer slowed down. He bought a new one. The one felt as fast as the old one when he had bought it. He considered the purchase a terribly insightful investment.

200 years later. A group of bespectacled visionaries will figure out every detail of how our body works. A lot of companies will appear who will promise a live-long and live-happy life. "Don't like your middle ear? Here, we will replace it with a machine. 1-day money back guarantee". You can hear a lot in 1 day, so everyone will be satisfied. A young rich business couple will modify themselves to become what they want. They will get married. They will make it to the news as the first perfect couple.
...
7 days later, the man will get bored of his wife. He will find her pose unexciting and her actions banal. He will find a new woman for a huge sum of money.
...
After uranium, monitors and PCBs, the world will face the challenge of a new type of landfill: people.

Wednesday, February 04, 2009

Better than my best

Wow! "Toshiba handheld hits 1GHz"
http://news.cnet.com/8301-13924_3-10155730-64.html

The news isn't that tomorrow's phones will beat my current best computer. Technology, like leaking water, always finds a way to go down ... err... advance. I like it or not.

What surprises me is the abusive intent of folks behind the technology. Like it or not, designing is more art than science. The kind of rationality and precision that goes into using the technology to create something more than a crapware is nothing short of the artistic choices a painter makes when rendering the perfect sunset over an island where he never went.

The minds that control the coding hands do not seem to realise this ... no matter what better hardware I come across, I also come across a newer version of the same software which makes it crawl. Even the upcoming dual-core 1.5GHz is not going to impress me much, not any more. Perfection is the key.

Wednesday, July 23, 2008

< Insert Your Favourite > Desktop Search Hackfest

Good news - a (read: the first ever) Desktop Search Hackfest is being
planned after the Maemo Summit, in Berlin.
http://wiki.maemo.org/Desktop_Search_Hackfest

Not so good news - I will not be able to attend. It's not easy to
sneak out as a grad student from an US university (bonus if you are an
_alien_). Joe is not going either. Our in-house Xesam guru is about a
join a real job, the money-paying kind. It might be hard for him to
attend either. I dearly wish Beagle could somehow benefit from this
meeting. Good luck to the other projects. Get some work done and make
the users happy. It is nice to see that Strigi/Nepomuk devs are
attending. And thanks to Nokia for making this happen.

On a side note, look at the number of participants from the Tracker
project ! Wow, they're booming. Double kudos to them.