<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Edd Dumbill's Weblog: 'mono' articles</title>
  <link href="http://times.usefulinc.com/tagmonoatom" rel="self"/>
  <link href="http://times.usefulinc.com/tagmono" rel="alternate"/>
  <id>http://times.usefulinc.com/</id>
  <updated>2006-11-24T15:37:33Z</updated>
  <author>
    <name>Edd Dumbill</name>
    <email>edd-web@usefulinc.com</email>
  </author>
  <entry>
    <title>New release of  XmlIndexer search server</title>
    <link href="http://times.usefulinc.com/2006/11/24-searchxml" rel="alternate"/>
    <id>http://times.usefulinc.com/public/read/877</id>
    <updated>2006-11-24T15:37:33Z</updated>
    <published>2006-11-24T15:24:34Z</published>
    <summary>A bug-fixed version of my Mono-based XML search server.</summary>
    <category term="software"/>
    <category term="xml"/>
    <category term="mono"/>
    <content type="html">
&lt;p&gt;About 18 months or so ago I &lt;a href="http://times.usefulinc.com/2005/02/27-xmlindexer"&gt;released the first version&lt;/a&gt; of XmlIndexer, a general purpose XML indexing web service based on Mono and &lt;a href="http://incubator.apache.org/lucene.net/"&gt;Lucene.Net&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;I'm happy to announce now version 0.4 of this software which, thanks to improvements in Lucene.Net and &lt;a href="http://cvs.gnome.org/viewcvs/beagle/beagled/Lucene.Net/upstream-changes/"&gt;patches&lt;/a&gt; from the Beagle hackers, is a lot more stable. Previous versions had some nasty locking issues that could kill the server quite dead.&lt;/p&gt;&lt;p&gt;XmlIndexer is a simple indexer. Given a rulefile that maps XPaths to Lucene keys, it can be taught to index any XML file you should care to give it. I use it to provide search functionality to legacy applications, which then need only to expose their data as XML and call a few simple web services to perform a search.&lt;/p&gt;&lt;p&gt;Of related interest is the new Apache Incubator &lt;a href="http://incubator.apache.org/solr/features.html"&gt;Solr&lt;/a&gt; project, which provides a fancy search server based on Lucene, doing the same as my indexer, and much more.&lt;/p&gt;&lt;p&gt;XmlIndexer requires Lucene.Net version 1.9.1. For extra points, apply the locking &lt;a href="http://cvs.gnome.org/viewcvs/beagle/beagled/Lucene.Net/upstream-changes/"&gt;patches&lt;/a&gt; from Beagle to Lucene.Net before building. As a courtesy I include a Lucene.Net DLL I made this way in the download.&lt;/p&gt;&lt;p&gt;Download: &lt;a href="http://downloads.usefulinc.com/searchxml/searchxml-0.4.tar.gz"&gt;searchxml-0.4.tar.gz&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://times.usefulinc.com/2006/11/24-searchxml#disqus_thread"&gt;Join the conversation about this post&lt;/a&gt;&lt;/p&gt;    </content>
  </entry>
  <entry>
    <title>New home for Monopod</title>
    <link href="http://times.usefulinc.com/2006/09/06-monopod" rel="alternate"/>
    <id>http://times.usefulinc.com/public/read/860</id>
    <updated>2006-09-06T14:11:58Z</updated>
    <published>2006-09-06T14:07:53Z</published>
    <summary>Nickolay Shmyrev has taken over as the new maintainer of Monopod, my simple podcast client for the GNOME desktop.</summary>
    <category term="podcasts"/>
    <category term="mono"/>
    <content type="html">
&lt;p&gt;I'm pleased to report that Nickolay Shmyrev has taken over as the new maintainer of Monopod, my simple podcast client for the GNOME desktop.&lt;/p&gt;&lt;p&gt;Monopod now has a new &lt;a href="http://monopod.berlios.de/"&gt;home page&lt;/a&gt;, and a publicly available &lt;a href="http://developer.berlios.de/projects/monopod/"&gt;Subversion repository&lt;/a&gt;. My thanks to Nickolay for taking this on.&lt;/p&gt;&lt;p&gt;A &lt;a href="http://gnomefiles.org/app.php/Monopod"&gt;new release&lt;/a&gt; is now available, which makes Monopod build with the latest ipod-sharp code. If you're in the market for a drop-dead simple podcast client, Monopod's still a great choice.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a href="http://times.usefulinc.com/2006/09/06-monopod#disqus_thread"&gt;Join the conversation about this post&lt;/a&gt;&lt;/p&gt;    </content>
  </entry>
  <entry>
    <title>GObject subclassing in Ruby</title>
    <link href="http://times.usefulinc.com/2006/01/31-subclass" rel="alternate"/>
    <id>http://times.usefulinc.com/public/read/840</id>
    <updated>2006-01-31T20:23:24Z</updated>
    <published>2006-01-31T20:05:57Z</published>
    <summary>An update to yesterday's Ruby GNOME adventures.</summary>
    <category term="ruby"/>
    <category term="gnome"/>
    <category term="mono"/>
    <content type="html">
 &lt;p&gt;Thanks to everybody who wrote in with suggestions following on from my initial &lt;a href="http://times.usefulinc.com/2006/01/30-ruby-gnome"&gt;Ruby GNOME investigations&lt;/a&gt; yesterday.&lt;/p&gt; &lt;p&gt;After talking at cross purposes for some time in a bug report with a Ruby GNOME developer, I was pointed to a good example of how to do what I wanted: subclassing a GObject in Ruby.&lt;/p&gt; &lt;p&gt;This is something that the Mono Gtk# bindings do so well, I'd forgotten the required mechanics. Here's a simple subclass of button. I've highlighted the required magic in bold.&lt;br /&gt; &lt;/p&gt; &lt;pre&gt;class MyButton &amp;lt; Gtk::Button&lt;br /&gt;   attr_accessor :hitcount&lt;br /&gt; &lt;strong&gt;  # tell the GLib object system this is a new type&lt;br /&gt;   type_register&lt;br /&gt; &lt;/strong&gt;&lt;br /&gt;   def initialize(text)&lt;br /&gt;     super(&amp;quot;label&amp;quot; =&amp;gt; text)&lt;br /&gt;     self.hitcount = 0&lt;br /&gt;   end&lt;br /&gt; &lt;br /&gt; &lt;strong&gt;  # rather than overriding 'clicked', we must&lt;br /&gt;   # override the signal_do_clicked method&lt;br /&gt;   def signal_do_clicked(*args)&lt;br /&gt; &lt;/strong&gt;    self.hitcount+=1&lt;br /&gt;     super&lt;br /&gt;   end&lt;br /&gt; end&lt;/pre&gt; &lt;p&gt;The &lt;em&gt;type_register&lt;/em&gt; call registers the new class with the GLib type system (something the Mono bindings do for you automatically).&amp;nbsp; The second key was knowing the name of the default signal handler, which turns out to be of the form &lt;em&gt;signal_do_signalname&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;So, to follow up yesterday, I hadn't found a bug, merely a gap in the documentation. Thanks to  					Masao Mutoh for taking the time to answer my questions.&lt;/p&gt; &lt;p&gt;For comparison, here's the same implementation in Gtk#. There are pros and cons of both languages. Ruby's succinct &lt;em&gt;attr_accessor&lt;/em&gt; is balanced by the neat GObject-aware subclassing and the constructor inheritance of C#.&lt;br /&gt; &lt;/p&gt;  &lt;pre&gt;class MyButton : Button {&lt;br /&gt;        private int hitcount;&lt;br /&gt;&lt;br /&gt;        public MyButton (string text) : base (text)&lt;br /&gt;        {&lt;br /&gt;                hitcount = 0;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        protected override void OnClicked ()&lt;br /&gt;        {&lt;br /&gt;                hitcount++;&lt;br /&gt;                base.OnClicked ();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public int HitCount {&lt;br /&gt;                get&lt;br /&gt;                {&lt;br /&gt;                        return hitcount;&lt;br /&gt;                }&lt;br /&gt;                set&lt;br /&gt;                {&lt;br /&gt;                        hitcount = value;&lt;br /&gt;                }&lt;br /&gt;        }&lt;br /&gt;} &lt;/pre&gt; &lt;p&gt;&lt;a href="http://times.usefulinc.com/2006/01/31-subclass#disqus_thread"&gt;Join the conversation about this post&lt;/a&gt;&lt;/p&gt;    </content>
  </entry>
</feed>
