<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>Advogato blog for harinath</title>
    <link>http://www.advogato.org/person/harinath/</link>
    <description>Advogato blog for harinath</description>
    <language>en-us</language>
    <generator>mod_virgule</generator>
    <pubDate>Thu, 23 May 2013 13:15:34 GMT</pubDate>
    <item>
      <pubDate>Thu, 23 Oct 2008 06:14:35 GMT</pubDate>
      <title>My Novell Hack Week project: Implement support for Mono in Automake</title>
      <link>http://www.advogato.org/person/harinath/diary.html?start=6</link>
      <guid>my_novell_hack_week_project__implement_support_for_mono_in_automake.html</guid>
      <description>&lt;p&gt;This week was &lt;a href="http://idea.opensuse.org" &gt;hack week&lt;/a&gt; for all the
Open Source hackers at Novell, where we got to work on ideas and
projects that we were personally interested in. I decided to work
on something that I've been planning for a long time, ever since I
joined the Mono project, in fact:
&lt;a href="http://idea.opensuse.org/content/ideas/better-automake-support-for-mono" &gt;add support for Mono in Automake&lt;/a&gt;. &lt;br /&gt;
It has been a while since I hacked on the automake source tree, but
I didn't have too much trouble getting started. In the end, I got
most of the features I intended for it:
support for building Mono exes and dlls
support for installing them in the GAC
support out-of-tree builds
dependency tracking on sources
support for specifying resources, and tracking dependencies on them
support for specifying references, and tracking dependencies on
them
support for multiple languages, include C#, VB.NET, Nemerle, Boo
easy extensibility of the support to other languages --
essentially, just need to add the filename extension of the
language to SUFFIXES
bundled autoconf macro to detect installed compilers and other
tools
... and some examples, test cases, and documentation to explain how
to use all of it&lt;/p&gt;

&lt;p&gt;Stuff missing include
autoconf macros to detect if libraries are installed or not
support for Microsoft's compilers -- basically a question of
replacing '/' with '\' in filenames, where appropriate
support for response files -- mainly wrt distributing sources
mentioned in them
real life experience with actual projects using all the above
features&lt;/p&gt;

&lt;p&gt;The whole effort took up most of the five days. I spent much of
Monday checking out the code from CVS into &lt;a href="http://git.or.cz" &gt;git&lt;/a&gt;
and looking at how support for C and other languages was
implemented. I had most of the basic support done by Tuesday, got
all dependency tracking working by Wednesday, and added
documentation, autoconf support, and GAC-installation support by
Friday afternoon. I'm very happy that I spent the time upfront to
import the project into git, since it saved me from spending a lot
of timeslices tracking my changes. &lt;br /&gt;
The code is available as a series of
&lt;a href="http://blog.hurrynot.org/mono-in-automake/patches" title="http://blog.hurrynot.org/mono-in-automake/patches" &gt;patches&lt;/a&gt;
to Automake (packed conveniently in a
&lt;a href="http://blog.hurrynot.org/mono-in-automake/patches.tar.gz" title="http://blog.hurrynot.org/mono-in-automake/patches.tar.gz" &gt;tarball&lt;/a&gt;),
and there's also an
&lt;a href="http://blog.hurrynot.org/mono-in-automake/test-1.0.tar.gz" title="http://blog.hurrynot.org/mono-in-automake/test-1.0.tar.gz" &gt;example project&lt;/a&gt;
that shows how to use it. I also have a
&lt;a href="http://video.google.com/videoplay?docid=7525466052747539502" &gt;"lightning talk" short video&lt;/a&gt;
about the project.&lt;/p&gt;

&lt;p&gt;&lt;embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=7525466052747539502&amp;amp;hl=en" flashvars=""&gt; &lt;/embed&gt;&lt;/p&gt;

&lt;p&gt;As much as I enjoyed the coding, I also thoroughly enjoyed working
with the whole Bangalore open source team, all in the same
conference room for five days, with everyone having a good time,
and good food.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/hurrynot/~4/418538612" height="1" width="1"/&gt;</description>
    </item>
    <item>
      <pubDate>Sun, 1 Jul 2007 18:06:17 GMT</pubDate>
      <title>My Novell Hack Week project: Implement support for Mono in Automake</title>
      <link>http://www.advogato.org/person/harinath/diary.html?start=5</link>
      <guid>http://blog.hurrynot.org/2007/07/01/my-novell-hack-week-project-implement-support-for-mono-in-automake/</guid>
      <description>&lt;p&gt;This week was &lt;a href="http://idea.opensuse.org" &gt;hack week&lt;/a&gt; for all the Open Source hackers at Novell, where we got to work on ideas and projects that we were personally interested in.  I decided to work on something that I&amp;#8217;ve been planning for a long time, ever since I joined the Mono project, in fact: &lt;a href="http://idea.opensuse.org/content/ideas/better-automake-support-for-mono" &gt;add support for Mono in Automake&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It has been a while since I hacked on the automake source tree, but I didn&amp;#8217;t have too much trouble getting started.  In the end, I got most of the features I intended for it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;support for building Mono exes and dlls&lt;/li&gt;
&lt;li&gt;support for installing them in the GAC&lt;/li&gt;
&lt;li&gt;support out-of-tree builds&lt;/li&gt;
&lt;li&gt;dependency tracking on sources&lt;/li&gt;
&lt;li&gt;support for specifying resources, and tracking dependencies on them&lt;/li&gt;
&lt;li&gt;support for specifying references, and tracking dependencies on them&lt;/li&gt;
&lt;li&gt;support for multiple languages, include C#, VB.NET, Nemerle, Boo&lt;/li&gt;
&lt;li&gt;easy extensibility of the support to other languages &amp;#8212; essentially, just need to add the filename extension of the language to SUFFIXES&lt;/li&gt;
&lt;li&gt;bundled autoconf macro to detect installed compilers and other tools&lt;/li&gt;
&lt;li&gt;&amp;#8230; and some examples, test cases, and documentation to explain how to use all of it&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Stuff missing include&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;autoconf macros to detect if libraries are installed or not&lt;/li&gt;
&lt;li&gt;support for Microsoft&amp;#8217;s compilers &amp;#8212; basically a question of replacing &amp;#8216;/&amp;#8217; with &amp;#8216;\&amp;#8217; in filenames, where appropriate&lt;/li&gt;
&lt;li&gt;support for response files &amp;#8212; mainly wrt distributing sources mentioned in them&lt;/li&gt;
&lt;li&gt;real life experience with actual projects using all the above features&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The whole effort took up most of the five days.  I spent much of Monday checking out the code from CVS into &lt;a href="http://git.or.cz" &gt;git&lt;/a&gt; and looking at how support for C and other languages was implemented.  I had most of the basic support done by Tuesday, got all dependency tracking working by Wednesday, and added documentation, autoconf support, and GAC-installation support by Friday afternoon.   I&amp;#8217;m very happy that I spent the time upfront to import the project into git, since it saved me from spending a lot of timeslices tracking my changes.&lt;/p&gt;
&lt;p&gt;The code is available as a series of &lt;a href="http://blog.hurrynot.org/mono-in-automake/patches" class="urlextern" title="http://blog.hurrynot.org/mono-in-automake/patches" rel="nofollow" &gt;patches&lt;/a&gt; to Automake  (packed conveniently in a &lt;a href="http://blog.hurrynot.org/mono-in-automake/patches.tar.gz" class="urlextern" title="http://blog.hurrynot.org/mono-in-automake/patches.tar.gz" rel="nofollow" &gt;tarball&lt;/a&gt;), and there&amp;#8217;s also an &lt;a href="http://blog.hurrynot.org/mono-in-automake/test-1.0.tar.gz" class="urlextern" title="http://blog.hurrynot.org/mono-in-automake/test-1.0.tar.gz" rel="nofollow" &gt;example project&lt;/a&gt; that shows how to use it.  I also have a &lt;a href="http://video.google.com/videoplay?docid=7525466052747539502" &gt;&amp;#8220;lightning talk&amp;#8221; short video&lt;/a&gt; about the project.&lt;/p&gt;
&lt;p&gt;As much as I enjoyed the coding, I also thoroughly enjoyed working with the whole Bangalore open source team, all in the same conference room for five days, with everyone having a good time, and good food.&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Wed, 27 Jun 2007 04:06:44 GMT</pubDate>
      <title>It&#x2019;s a girl !!!</title>
      <link>http://www.advogato.org/person/harinath/diary.html?start=4</link>
      <guid>http://blog.hurrynot.org/2006/12/07/its-a-girl/</guid>
      <description>&lt;div style="float: right; margin-left: 10px; margin-bottom: 10px"&gt;&lt;a title="photo sharing" href="http://www.flickr.com/photos/harinath/316298014/" &gt;&lt;img align="top" style="border: 2px solid #000000" src="http://static.flickr.com/99/316298014_5f26ee2d49_m.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;I became a dad this morning (6:25am).&lt;br /&gt;
&lt;br clear="all" /&gt;&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Wed, 27 Jun 2007 04:06:44 GMT</pubDate>
      <title>More thoughts about MCS and GMCS</title>
      <link>http://www.advogato.org/person/harinath/diary.html?start=3</link>
      <guid>http://blog.hurrynot.org/2006/02/16/more-thoughts-about-mcs-and-gmcs/</guid>
      <description>&lt;p&gt;Martin got GMCS to &lt;a href="http://primates.ximian.com/%7Emartin/blog/entry_155.html" &gt;work on Windows&lt;/a&gt;, with a small caveat &amp;#8212; there&amp;#8217;s no API to change the &lt;em&gt;MethodAttributes&lt;/em&gt; of a &lt;em&gt;MethodBuilder&lt;/em&gt;.  I have a couple of observations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the caveat isn&amp;#8217;t really a big deal.  You only need to set &lt;em&gt;NewSlot&lt;/em&gt; when there is a &lt;tt&gt;new&lt;/tt&gt; keyword used in the declaration.  Otherwise, it&amp;#8217;s useful but not necessary (See &lt;a href="http://bugzilla.ximian.com/show_bug.cgi?id=74852" &gt;bug 74852&lt;/a&gt; for the gory details)&lt;/li&gt;
&lt;li&gt;these changes, coupled with my older changes should allow us to have more code similarity between MCS and GMCS.  Specifically, I think we can put in a couple of stubs: &lt;em&gt;DropGenericTypeArguments&lt;/em&gt; and &lt;em&gt;DropGenericMethodArguments&lt;/em&gt; into MCS and eliminate a big part of the textual differences between MCS and GMCS in non-generics related code.  We already started on this in &lt;em&gt;doc.cs&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <pubDate>Wed, 27 Jun 2007 04:06:44 GMT</pubDate>
      <title>automake, make dist and long filenames</title>
      <link>http://www.advogato.org/person/harinath/diary.html?start=2</link>
      <guid>http://blog.hurrynot.org/2006/01/18/automake-make-dist-and-long-filenames/</guid>
      <description>&lt;p&gt;Harish noticed some &lt;a href="http://blogs.gnome.org/view/kharish/2006/01/18/0" &gt;strange behaviour&lt;/a&gt; with &amp;#8216;make dist&amp;#8217;. He later found out that it had to do with a file with an overly long pathname. Automake 1.9 by default forces &amp;#8216;tar&amp;#8217; to work in the &amp;#8220;most compatible&amp;#8221; mode, and that mode supports pathnames only upto 99 characters long.&lt;/p&gt;
&lt;p&gt;The solution is to ask automake to request tar to use the POSIX standard &amp;#8216;pax&amp;#8217; format. Add a line like the following in the top-level Makefile.am.&lt;/p&gt;
&lt;pre&gt;AUTOMAKE_OPTIONS = tar-pax&lt;/pre&gt;
&lt;p&gt;However, life wouldn&amp;#8217;t be interesting if it was so simple.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This option is not backwards compatible: older versions of automake don&amp;#8217;t know about it, and they barf on unknown options&lt;/li&gt;
&lt;li&gt;The tar that comes with SuSE 9.2 (IIRC) doesn&amp;#8217;t support &amp;#8216;pax&amp;#8217;, but does support the &amp;#8216;ustar&amp;#8217; format, an older POSIX standard. Luckily automake has an option to request &amp;#8216;ustar&amp;#8217; format: &lt;tt&gt;tar-ustar&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That gets us to mono&amp;#8217;s solution.  Here&amp;#8217;s the configure.in tidbit that does the trick:&lt;/p&gt;
&lt;pre&gt;# Gross hack to enable 'make dist' on automake 1.9+tar 1.14.
# The extra brackets are to foil regex-based scans.
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])&lt;/pre&gt;
&lt;p&gt;Now, please forget this trick, it&amp;#8217;s gross.  Just use automake 1.9.&lt;/p&gt;
&lt;p&gt;PS: There&amp;#8217;s an even simpler trick: start distributing ZIP files (&lt;tt&gt;make dist-zip&lt;/tt&gt;) instead &lt;img src='http://blog.hurrynot.org/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /&gt;&lt;/p&gt;
</description>
    </item>
    <item>
      <pubDate>Wed, 27 Jun 2007 04:06:44 GMT</pubDate>
      <title>MCS: Implemented ::-lookup (qualified alias member) feature</title>
      <link>http://www.advogato.org/person/harinath/diary.html?start=1</link>
      <guid>http://blog.hurrynot.org/2005/08/03/mcs-implemented-lookup-qualified-alias-member-feature/</guid>
      <description>&lt;div&gt;Today, I added my first &amp;#8220;tick-mark&amp;#8221; feature to Mono&amp;#8217;s C# compiler: qualified-alias-member or &amp;#8216;::&amp;#8217; lookup. It&amp;#8217;s a relatively small feature, and doesn&amp;#8217;t impact much, code-wise.&lt;/p&gt;
&lt;p&gt;In all, it took about a day&amp;#8217;s worth of effort from start to check-in. But, that one-day effort needed quite some preparatory work. I&amp;#8217;d pretty much decided on the approach a couple of months ago, and had a reasonable plan-of-attack, and was looking for an opportune time to work on it. More importantly, the past few months I spent incessantly refactoring the name- and type-lookup facilities in the compiler has paid off, making the task of implementing &amp;#8216;::&amp;#8217; trivial.&lt;/p&gt;&lt;/div&gt;
</description>
    </item>
    <item>
      <pubDate>Wed, 27 Jun 2007 04:06:44 GMT</pubDate>
      <title>Thread-safety and me</title>
      <link>http://www.advogato.org/person/harinath/diary.html?start=0</link>
      <guid>http://blog.hurrynot.org/2005/06/24/thread-safety-and-me/</guid>
      <description>&lt;p&gt;I&amp;#8217;m thinking of working on fixing Mono&amp;#8217;s &lt;a href="http://svn.myrealbox.com/source/trunk/mcs/class/corlib/System.Collections.Generic/Dictionary.cs" &gt;Dictionary&lt;/a&gt; to be &lt;a href="http://en.wikipedia.org/wiki/Thread-safe" &gt;thread-safe&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It seems ironic: I wrote a large part of that Wiki page, and I&amp;#8217;m in large part responsible for the dictionary code not being thread-safe. &amp;#8220;Blame&amp;#8221; me for the use of the &lt;a href="http://en.wikipedia.org/wiki/Competitive_analysis" &gt;move-to-front&lt;/a&gt; heurstic in the dictionary code, and I must say, it was a &lt;a href="http://svn.myrealbox.com/viewcvs/trunk/mcs/class/corlib/System.Collections.Generic/Dictionary.cs?rev=46350&amp;#038;view=markup" &gt;beautiful piece of code&lt;/a&gt;: see how simple it made the &amp;#8216;Remove()&amp;#8217; code.&lt;/p&gt;
&lt;p&gt;Of course I&amp;#8217;ve disliked threads all along, and this gives me more reasons to blame threads for the ugliness they bring into the world.&lt;/p&gt;
</description>
    </item>
  </channel>
</rss>
