<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blog of Tim Janik &#187; Tools</title>
	<atom:link href="http://blogs.gnome.org/timj/category/tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.gnome.org/timj</link>
	<description>Technical ramblings by Tim Janik</description>
	<lastBuildDate>Tue, 15 Sep 2009 07:59:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>20.10.2008 Bugzilla Utility buglist.py</title>
		<link>http://blogs.gnome.org/timj/2008/10/20/20102008-bugzilla-utility-buglistpy/</link>
		<comments>http://blogs.gnome.org/timj/2008/10/20/20102008-bugzilla-utility-buglistpy/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 12:10:48 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2008/10/20/20102008-bugzilla-utility-buglistpy/</guid>
		<description><![CDATA[
Managing bug lists has become an ubiquitous task when dealing with the GNOME or Nokia bugzillas. At some point I became fed up with the involved cut and pasting, searching and sorting, so I cooked up a small command line utility to construct bug list URLs and format bug list summaries in text form. Here&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><!--- paragraph break --></p>
<p align="left">Managing bug lists has become an ubiquitous task when dealing with the GNOME or Nokia bugzillas. At some point I became fed up with the involved cut and pasting, searching and sorting, so I cooked up a small command line utility to construct bug list URLs and format bug list summaries in text form. Here&#8217;s it in action:</p>
<p><!--- paragraph break --></p>
<pre>    echo "junktext 556578 moretext 516885 " | buglist.py gnome
    <a href="http://bugzilla.gnome.org/buglist.cgi?bug_id=516885,556578">http://bugzilla.gnome.org/buglist.cgi?bug_id=516885,556578</a>
     516885 - Add RGBA support
     556578 - GIMP windows stay on top of other windows</pre>
<p><!--- paragraph break --></p>
<p align="left">It knows a good number of bugzillas, such as the ones from Gnome, FreeDesktop, Maemo, Nokia, OpenedHand, GCC, LibC and Mozilla. More bugzilla URLs can easily be added, and it handles HTTPS authentication that some of the corporate bugzilla installations require.</p>
<p><!--- paragraph break --></p>
<p align="left">The script is available here: <a href="http://testbit.eu/~timj/tools/buglist.py"> buglist.py</a> (v0.4)</p>
<p><!--- paragraph break --></p>
<p align="left">Have fun and send in patches. ;)</p>
<p><!--- paragraph break --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2008/10/20/20102008-bugzilla-utility-buglistpy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>30.10.2007 YummyYummySourceControl Version 0.9</title>
		<link>http://blogs.gnome.org/timj/2007/10/30/30102007-yummyyummysourcecontrol-version-09/</link>
		<comments>http://blogs.gnome.org/timj/2007/10/30/30102007-yummyyummysourcecontrol-version-09/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 09:54:04 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2007/10/30/30102007-yummyyummysourcecontrol-version-09/</guid>
		<description><![CDATA[ A couple people have reported minor and major bugs in the last yyhelp version, particularly after yycommit got reimplemented to operate on top of git-commit(1) instead of cg-commit(1). Besides some others, this new release fixes all known yycommit issues and also (re-)introduces some new features: yyhelp (v0.9)
 
	Overview of Changes in YummyYummySourceControl-0.9:

	* use plain [...]]]></description>
			<content:encoded><![CDATA[<p> A couple people have reported minor and major bugs in the last yyhelp version, particularly after yycommit got reimplemented to operate on top of <a href="http://www.kernel.org/pub/software/scm/git/docs/git-commit.html">git-commit(1)</a> instead of <a href="http://www.kernel.org/pub/software/scm/cogito/docs/cg-commit.1.html">cg-commit(1)</a>. Besides some others, this new release fixes all known yycommit issues and also (re-)introduces some new features: <a href="http://testbit.eu/~timj/tools/yyhelp">yyhelp</a> (v0.9)<br />
<code> </code></p>
<pre>	Overview of Changes in YummyYummySourceControl-0.9:

	* use plain "git-commit" with temporary index file to stage
	  commit files, this works around git-commit-1.5.2.5 not
          handling deleted files as command line args correctly.
	* also list remote branches for yylsbranches.
	* fix leading dot getting stripped from modified files if $gitprefix=.
	* require and use gawk for time formatting, which mawk doesn't support.
	* properly honor the [FILES...] arguments to yycommit.
	* terminate sed command blocks with semicolon (needed on BSD).
	* resurrected yyhelp.auto-push-commits functionality of yycommit.</pre>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2007/10/30/30102007-yummyyummysourcecontrol-version-09/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>13.10.2007 Yummy-Yummy Porcelain Version 0.8</title>
		<link>http://blogs.gnome.org/timj/2007/10/13/13102007-yummy-yummy-porcelain-version-08/</link>
		<comments>http://blogs.gnome.org/timj/2007/10/13/13102007-yummy-yummy-porcelain-version-08/#comments</comments>
		<pubDate>Sat, 13 Oct 2007 22:02:55 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2007/10/13/13102007-yummy-yummy-porcelain-version-08/</guid>
		<description><![CDATA[ Here is a new release of YummyYummySourceControl, a shallow porcelain script around common git(7) command variants: yyhelp (v0.8)
This version supports a new command to grep and match an extended regular expression on the full project history by invoking git-grep(1) on all existing commits, displaying matches by commit hash and file name. Also, a CVS/SVN/Cogito [...]]]></description>
			<content:encoded><![CDATA[<p> Here is a new release of YummyYummySourceControl, a shallow porcelain script around common <a href="http://www.kernel.org/pub/software/scm/git/docs/">git(7)</a> command variants: <a href="http://testbit.eu/~timj/tools/yyhelp">yyhelp</a> (v0.8)</p>
<p>This version supports a new command to grep and match an extended regular expression on the full project history by invoking <a href="http://www.kernel.org/pub/software/scm/git/docs/git-grep.html">git-grep(1)</a> on all existing commits, displaying matches by commit hash and file name. Also, a CVS/SVN/Cogito style version of yycommit has now been implemented on top of <a href="http://www.kernel.org/pub/software/scm/git/docs/git-commit.html">git-commit(1)</a>. So YummyYummySourceControl-0.8 finally gets rid of the last remaining <a href="http://www.kernel.org/pub/software/scm/cogito/docs/cg-commit.1.html">cogito dependency</a>, making it a free standing <em>Git Porcelain Suite</em>. ;-)<br />
Of course there have also been some other miscellaneous changes and docu updates. <code> </code></p>
<pre>	Overview of Changes in YummyYummySourceControl-0.8:

	* removed cogito(7) dependency.
	* made yyview start gitk in the background.
	* suppress yydiff outputs of non-checked-out files (ignored by yycommit).
	* implemented yycommit SVN/CVS/CG-alike on top of git-commit.
	* added '-s' option to yyChangeLog to skip SVN revisions.
	* implemented yyHistoryGrep.</pre>
<p>I have been asked some of the purpose of YummyYummySourceControl, so i will extend a bit on that here:</p>
<p>- On <a href="http://mail.gnome.org/archives/beast/2007-January/msg00001.html">some occasions</a> i had to dig quite deeply into the nitty-gritty details of git (and cogito). However i can simply not be bothered to deal with the complexity of its command set for everyday use. I need my source control interface to be <strong>really simple</strong> when i concentrate on the various projects i&#8217;m involved in.</p>
<p>- I refuse to bother with the state (or existence) of git&#8217;s index file for anything but the correct implementation of yyhelp. SVN and CVS don&#8217;t force me to deal with an intermediate cache state between repository and working tree, YummyYummySourceControl keeps me from seeing it in git.</p>
<p>- I might be using yydiff and yyview up to a dozen or so times per hour while working. Passing options along here or piping the output to a pager or starting stuff in the background really becomes unaffordable at that rate. These commands do all the necessary stuff out of the box, all i have to type is &#8220;yyd&#8221;+Tab+Return and &#8220;yyv&#8221;+Tab+Return for each of them now.</p>
<p>- I&#8217;m too old and stupid to remember to pull after i&#8217;ve pushed and what the <a href="http://www.kernel.org/pub/software/scm/git/docs/git-svn.html">git-svn(1)</a> command variants look like. yypull and yypushpull handle that for me.</p>
<p>- Personally, i find ChangeLog style logs much more parsable than <a href="http://www.kernel.org/pub/software/scm/git/docs/git-log.html">git-log(1)</a> output. yyChangeLog gives me that for the git commit history.</p>
<p>- To allow proper git merging, cherry picking, rebasing, etc, i&#8217;ve switched to commit my ChangeLog entries as commit message only (with introductionary one-liner instead of the date + email header) and for <a href="http://rapicorn.org">Rapicorn</a> auto-generate the project ChangeLog for tarballs. Even if the ChangeLog is not auto generated as with <a href="http://beast.gtk.rg">Beast</a> or <a href="http://gtk.rg">Gtk+</a>, i can still use this commit message scheme for git-svn checkouts, as long as i update the project&#8217;s SVN ChangeLog before yypushpull-ing the changes from my local tree to SVN. yyChangeLog -s will generate the remaining ChangeLog portion missing from SVN.</p>
<p>- To help my utter laziness, yystatus -c can preformat file name change lists for my ChangeLog-style commit messages, i&#8217;ve always missed that with CVS and SVN.</p>
<p>- To help against sudden confusion and lengthy URL searches, yyinfo tells me all i want to know about a repository (git URL + revision, SVN URL + revision, etc).</p>
<p>And i love to have grep-able access to all the data involved in my day to day activities, yyHistoryGrep now gives me that for my project histories.</p>
<p>Given git&#8217;s speed, the possibility for light-weight local repositories, and using yyhelp&#8217;s ease, revision control has become so available for me, that i could very comfortably apply it to portions of my home directory and /etc/ on a remote server (e.g. i&#8217;ve created a ~/.git/ a couple months ago where i checked in a handful selected files like TODO, my blog diary, .emacs and a few other frequently changing TODO-style files and i&#8217;m happily committing to it multiple times a day).</p>
<p>I&#8217;m not claiming that yyhelp solves anyone else&#8217;s problems, but it certainly has helped my SCM usage a great deal, and for me serves as a key to make a frequently used subset of the git machinery accessible at very few finger tips.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2007/10/13/13102007-yummy-yummy-porcelain-version-08/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>19.09.2007 Yummy-Yummy git-svn</title>
		<link>http://blogs.gnome.org/timj/2007/09/19/19092007-yummy-yummy-git-svn/</link>
		<comments>http://blogs.gnome.org/timj/2007/09/19/19092007-yummy-yummy-git-svn/#comments</comments>
		<pubDate>Wed, 19 Sep 2007 13:30:44 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2007/09/19/19092007-yummy-yummy-git-svn/</guid>
		<description><![CDATA[ I&#8217;ve had to add another bit to yyhelp to make my everyday coding more convenient, so it got support for git-svn(1). The yypull and yypushpull commands will now detect a git(7) repository set up with git-svn, and unless the repository also has a regular git upstream, pulling and pushing will be carried out via [...]]]></description>
			<content:encoded><![CDATA[<p> I&#8217;ve had to add another bit to yyhelp to make my everyday coding more convenient, so it got support for <a href="http://www.kernel.org/pub/software/scm/git/docs/git-svn.html">git-svn(1)</a>. The <code>yypull</code> and <code>yypushpull</code> commands will now detect a <a href="http://www.kernel.org/pub/software/scm/git/docs/">git(7)</a> repository set up with git-svn, and unless the repository also has a regular git upstream, pulling and pushing will be carried out via <code>git-svn rebase</code> and <code>git-svn dcommit</code>. <code>yyinfo</code> shows the update method being used for a repository and also displays the SVN HEAD revision now if any. That, plus miscellaneous changes make version 0.6 of <a href="http://testbit.eu/~timj/tools/yyhelp">yyhelp</a>:<br />
<code> </code></p>
<pre>	Overview of Changes in YummyYummySourceControl-0.6:

	* for git-svn repositories, use rebase and dcommit to pull and push
	* fixed argument parsing for yybranch and yybranchdel
	* support revision argument for yydiff
	* check revision argument to yywarp</pre>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2007/09/19/19092007-yummy-yummy-git-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>08.09.2007 Yummy-Yummy Buglets</title>
		<link>http://blogs.gnome.org/timj/2007/09/08/08092007-yummy-yummy-buglets/</link>
		<comments>http://blogs.gnome.org/timj/2007/09/08/08092007-yummy-yummy-buglets/#comments</comments>
		<pubDate>Sat, 08 Sep 2007 16:41:31 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2007/09/08/08092007-yummy-yummy-buglets/</guid>
		<description><![CDATA[ The YummyYummySourceControl script got a few buglet fixups during the last days, so I&#8217;ve put up version 0.5b: yyhelp.
Here&#8217;s the obligatory list of changes since the last version:
 
	Overview of Changes in YummyYummySourceControl-0.5b:

	* update stat info for yycommit to ignore touched but unmodified files
	* use full paths for yyrestore to fix spurious file resurrections [...]]]></description>
			<content:encoded><![CDATA[<p> The YummyYummySourceControl script got a few buglet fixups during the last days, so I&#8217;ve put up version 0.5b: <a href="http://testbit.eu/~timj/tools/yyhelp">yyhelp</a>.<br />
Here&#8217;s the obligatory list of changes since the <a href="http://blogs.gnome.org/timj/2007/06/30/29062007-yummiyummigit/trackback/">last version</a>:<br />
<code> </code></p>
<pre>	Overview of Changes in YummyYummySourceControl-0.5b:

	* update stat info for yycommit to ignore touched but unmodified files
	* use full paths for yyrestore to fix spurious file resurrections in parent dirs
	* fixed bogus error messages on yycommit</pre>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2007/09/08/08092007-yummy-yummy-buglets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>29.08.2007 Yummy-Yummy Again</title>
		<link>http://blogs.gnome.org/timj/2007/08/29/29082007-yummy-yummy-again/</link>
		<comments>http://blogs.gnome.org/timj/2007/08/29/29082007-yummy-yummy-again/#comments</comments>
		<pubDate>Wed, 29 Aug 2007 14:58:23 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2007/08/29/29082007-yummy-yummy-again/</guid>
		<description><![CDATA[ I&#8217;ve put up a new release of the slightly renamed YummyYummySourceControl script here: yyhelp (0.5).  The script still depends on cogito(7) for the implementation of yycommit, but other such dependencies have been removed at this point so it&#8217;ll eventually depend on Git(7) only. Following is a sum up of the changes between the [...]]]></description>
			<content:encoded><![CDATA[<p> I&#8217;ve put up a new release of the slightly renamed YummyYummySourceControl script here: <a href="http://testbit.eu/~timj/tools/yyhelp">yyhelp (0.5)</a>. <br /> The script still depends on <a href="http://en.wikipedia.org/wiki/Cogito_(software)">cogito(7)</a> for the implementation of yycommit, but other such dependencies have been removed at this point so it&#8217;ll eventually depend on <a href="http://www.kernel.org/pub/software/scm/git/docs/">Git(7)</a> only. Following is a sum up of the changes between the <a href="http://blogs.gnome.org/timj/2007/06/30/29062007-yummiyummigit/trackback/">last version</a> and v0.5: <br /> <code>
<pre>	Overview of Changes in YummyYummySourceControl-0.5:

	* Help improvements.
	* Support auto-push after commits.
	* Improved installation support: --install-aliases &amp; --uninstall-aliases.
	* Automagically support less as pager.
	* Buglet fixes in yydiff.
	* Provided native implementation of yystatus with extra options.
	* New command yyinfo to list repository information.
	* New command yyblame with colorization support.
	* Allow tagging of specific revisions.</pre>
<p></code> Here&#8217;s the synopsis of the new command set: <br /> <code>
<pre>	<strong>SYNOPSIS</strong>
	    yyadd          [FILES...] - add files to git repository
	    yyblame        [FILES...] - annotate file source code
	    yybranch    [-f] &lt;branch&gt; - add branch (forcable)
	    yybranchdel [-f] &lt;branch&gt; - delete branch (forcable)
	    yyChangeLog               - show git log in ChangeLog style
	    yycommit       [FILES...] - commit current working tree
	    yydiff         [FILES...] - show committable differences in
	                                working tree
	    yygc                      - repack and prune repository
	    yyhelp                    - display yy* help information
	    yyinfo                    - display repository information
	    yylsbranches              - list branches
	    yylstags                  - list tags
	    yypull                    - pull upstream sources
	    yypushpull                - push &amp; pull upstream sources
	    yyremove       [FILES...] - remove files from git repository
	    yyreset                   - reset (revert to HEAD) all files in the tree
	    yyrestore      [FILES...] - forcefully re-checkout specific files
	    yystatus       [-t|-u|-c] - display working tree status
	                                -t: trim unknown; -u: show unknown;
	                                -c: trim and use commit message style
	    yytag    &lt;tag&gt; [revision] - add tag
	    yytagdel &lt;tag&gt;            - delete tag
	    yyuncommit                - undo the last commit (must be unpushed)
	    yyview                    - browse &amp; navigate the history
	    yywarp           &lt;branch&gt; - checkout new branch</pre>
<p></code> </p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2007/08/29/29082007-yummy-yummy-again/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>13.07.2007 Switch On Strings In C And C++</title>
		<link>http://blogs.gnome.org/timj/2007/07/14/13072007-switch-on-strings-in-c-and-c/</link>
		<comments>http://blogs.gnome.org/timj/2007/07/14/13072007-switch-on-strings-in-c-and-c/#comments</comments>
		<pubDate>Sat, 14 Jul 2007 10:46:38 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2007/07/14/13072007-switch-on-strings-in-c-and-c/</guid>
		<description><![CDATA[ For Rapicorn i need a simple and nicely readable way to special case code on various strings, which isn&#8217;t a problem in most scripting languages but is not provided by C/C++. Switching on strings turns out to be a widely investigated topic: SOS (agay), TheScript, JavaBug (CNFW), CodeGuru, CLC-FAQ and google has lots more. [...]]]></description>
			<content:encoded><![CDATA[<p> For <a href="http://rapicorn.org">Rapicorn</a> i need a simple and nicely readable way to special case code on various strings, which isn&#8217;t a problem in most scripting languages but is not provided by C/C++. Switching on strings turns out to be a widely investigated topic: <a href="http://shum.huji.ac.il/~agay/sos/theory.html">SOS</a> (<a href="http://www.thescripts.com/forum/thread222212.html">agay</a>), <a href="http://www.thescripts.com/forum/thread60556.html">TheScript</a>, <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5012262">JavaBug</a> (<a href="http://sixlegs.com/blog/java/cglib-stringswitch-hash.html">CNFW</a>), <a href="http://www.codeguru.com/Cpp/Cpp/cpp_mfc/article.php/c4067#more">CodeGuru</a>, <a href="http://c-faq.com/misc/strswitch.html">CLC-FAQ</a> and google has lots more. </p>
<p> Now here goes my approach to switching on strings for C/C++, caveats upfront: <br /> &#8211; The strings may only consist of identifier chars: <code>[A-Za-z_0-9]</code>; <br /> &#8211; Convenient application is based on a GNU Preprocessor feature: <a href="http://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html">-imacros</a>; <br /> &#8211; Macro implementations use a GCC-ism: <a href="http://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html">Statement Expressions</a>; <br /> &#8211; The convenient command line variant uses a bash-ism: <a href="http://tldp.org/LDP/abs/html/process-sub.html">Process Substitution</a>; <br /> &#8211; One compile-time script is needed, currently implemented in python (though it could be written in any language). </p>
<p> With this out of the way, let&#8217;s dive into the code. This is the syntax: <code>
<pre>	switch (SOSID_LOOKUP (sample_string))
          {
          case SOSID (hello): printf ("Hello ");   break;
          case SOSID (world): printf ("World! ");  break;
          case 0: default:    printf ("unknown "); break;
          }</pre>
<p></code> This is how the code needs to be compiled: <code>gcc -Wall -O2 -imacros &lt;(sosid.py &lt;input.c) input.c</code> </p>
<p> The actual implementation is fairly simple, <a href="http://testbit.eu/~timj/tools/sosid.py">sosid.py</a> extracts all identifiers from SOSID() statements and generates a handful of macro definitions: <code>SOSID(), SOSID_LOOKUP(), SOSID_LOOKUP_ICASE(), ...</code> Plus input specific macros: <code>SOSID__hello, SOSID__world, ...</code> GCC will pick up those definitions via the -imacros option. That is enough to implement SOSID_LOOKUP() so that it can yield the integer IDs that the SOSID(*)/SOSID__* statements expand to for any string that corresponds to one of the <code>SOSID(</code>identifiers<code>)</code> occurring in the source file. </p>
<p> Example: <br /> <code>call_switch ("hello"); call_switch ("foo0815"); call_switch ("world");</code> <br /> Yields: <br /> <code>Hello unkown World!</code> </p>
<p> The lookups are implemented via a <a href="http://en.wikipedia.org/wiki/Binary_search">binary search</a> and the strings are sorted in a way so that binary searches for case sensitive and case insensitive lookups are both possible. That means for large string lists, the lookups which are of complexity <a href="http://en.wikipedia.org/wiki/Binary_logarithm">O(ld N)</a> actually have a performance advantage over lengthy <code>if..else if..else</code> constructs with O(N) complexity. <br /> The code is available as a single script at the moment: <a href="http://testbit.eu/~timj/tools/sosid.py">sosid.py</a>. </p>
<p> Note that the bash-ism, imacros-use and GCC-isms are not mandatory, ordinary temporary files can be generated by the script and be included instead and it could be adapted to generate portable inline functions. The identifier-chars restriction is a hard one though. It comes from the fact that <code>SOSID(ident)</code> must yield valid C/C++ integers, and that can only be accomplished by <a href="http://en.wikipedia.org/wiki/C_preprocessor#Token_Concatenation">token pasting</a>. Depending on GCC is good enough for Rapicorn, so people will have to express active interest in this, in order for me to make the script more portable. </p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2007/07/14/13072007-switch-on-strings-in-c-and-c/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>29.06.2007 YummiYummiGit</title>
		<link>http://blogs.gnome.org/timj/2007/06/30/29062007-yummiyummigit/</link>
		<comments>http://blogs.gnome.org/timj/2007/06/30/29062007-yummiyummigit/#comments</comments>
		<pubDate>Sat, 30 Jun 2007 02:51:22 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2007/06/30/29062007-yummiyummigit/</guid>
		<description><![CDATA[ Starting with the discontinuation of cogito, i began to wonder about my future git usage patterns. On the one hand, i have become quite used to the convenience of some of the cogito commands, on the other hand i found myself using or looking up git commands every other day. Since the discontinuation, cogito [...]]]></description>
			<content:encoded><![CDATA[<p> Starting with the discontinuation of <a href="http://en.wikipedia.org/wiki/Cogito_(software)">cogito</a>, i began to wonder about my future <a href="http://git.kernel.org/?p=git/git.git">git</a> usage patterns. On the one hand, i have become quite used to the convenience of some of the cogito commands, on the other hand i found myself using or looking up git commands every other day. Since the discontinuation, cogito cannot be expected to remedy those work-flow interruptions any time soon, so i actually started to cook up my own small set of convenience wrappers. I&#8217;m adding those on demand whenever i need a new source repository command, and i try hard to keep it simple, avoid giving the wrappers any options and keep an eye on them being very shell-completion friendly. </p>
<p> The <a href="http://www.gnu.org/licenses/gpl.html">GPLv3 licensed</a> result is a single shell script plus a handful links for invocation: <a href="http://testbit.eu/~timj/tools/yyhelp">yyhelp</a>. </p>
<p> For the curious, the prefix &#8216;yy&#8217; was chosen to allow conflict free shell completion. I&#8217;ll quote the yyhelp information here, so people can decide if it&#8217;s interesting for them and also get to see the installation instructions. I&#8217;m not entirely sure where to take this shallow wrapper in the future, however keeping it simple is really the main incentive behind it. Any deeper logic required should rather be filed as git-core requests. If you want to talk to me about YummiYummiGit, drop me a line <a href="http://www.gtk.org/~timj">via email</a>, or try <a href="irc://irc.freenode.org/#git">#git</a> on <a href="http://freenode.net/">irc.freenode.net:6667</a>. <br /> <code>
<pre>	YummiYummiGit                                                     YummiYummiGit

	<strong>NAME</strong>
		YummiYummiGit - The simplest git wrapper ever, yet convenient

	<strong>SYNOPSIS</strong>
		yyadd          [FILES...] - add files to git repository
		yybranch    [-f] &lt;branch&gt; - add branch (forcable)
		yybranchdel [-f] &lt;branch&gt; - delete branch (forcable)
		yyChangeLog               - show git log in ChangeLog style
		yycommit       [FILES...] - commit current working tree
		yydiff         [FILES...] - show committable differences in working tree
		yygc                      - repack and prune repository
		yyhelp                    - display yy* help information
		yylsbranches              - list branches
		yylstags                  - list tags
		yypull                    - pull upstream sources
		yypushpull                - push &amp; pull upstream sources
		yyremove       [FILES...] - remove files from git repository
		yyreset                   - reset (revert to HEAD) all files in the tree
		yyrestore      [FILES...] - forcefully recheckout specific files
		yystatus                  - display working tree status
		yytag               &lt;tag&gt; - add tag
		yytagdel            &lt;tag&gt; - delete tag
		yyuncommit                - undo the last commit (must be unpushed)
		yyview                    - browse &amp; navigate the history
		yywarp           &lt;branch&gt; - checkout new branch

	<strong>HISTORY</strong>
		YummiYummiGit was created as a very shallow wrapper around git-* tool
		option variants, to simplify common cases.
		Depending on programming habits, YummiYummiGit may or may not suit your
		daily needs. It is in any case not meant as a full replacement for the
		git interface (there is e.g. no yyclone) and subject to change.

	<strong>INSTALLATION</strong>
		To install YummiYummiGit, copy yyhelp into a bin/ directory from $PATH
		and invoke: ./yyhelp --create-aliases

	YummiYummiGit-0.4                                                 YummiYummiGit</pre>
<p></code> </p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2007/06/30/29062007-yummiyummigit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>30.06.2005</title>
		<link>http://blogs.gnome.org/timj/2005/06/30/30062005/</link>
		<comments>http://blogs.gnome.org/timj/2005/06/30/30062005/#comments</comments>
		<pubDate>Thu, 30 Jun 2005 17:42:17 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2005/06/30/30062005/</guid>
		<description><![CDATA[ More hacking on diary-publish.py, the command line web blogger script. Since http://blogs.gnome.org/timj is currently down due to the gnome server move, i added a simple html writer to it that allowes previewing of the marked up diary with an html browser before posting them.
]]></description>
			<content:encoded><![CDATA[<p> More hacking on diary-publish.py, the command line web blogger script. Since http://blogs.gnome.org/timj is currently down due to the gnome server move, i added a simple html writer to it that allowes previewing of the marked up diary with an html browser before posting them.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2005/06/30/30062005/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>20.06.2005</title>
		<link>http://blogs.gnome.org/timj/2005/06/20/20062005/</link>
		<comments>http://blogs.gnome.org/timj/2005/06/20/20062005/#comments</comments>
		<pubDate>Mon, 20 Jun 2005 21:32:58 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2005/06/20/20062005/</guid>
		<description><![CDATA[ Have been hacking on the command line web blogger today and learned python on the way, so can you read this? Posting works already, q.e.d. However, NewsBruiser is giving me a hard time with not accepting editPost() requests. So in effect, i&#8217;ll not be able to update this entry later on which sucks.
]]></description>
			<content:encoded><![CDATA[<p> Have been hacking on the command line web blogger today and learned <a href="http://docs.python.org/">python</a> on the way, so can you read this? Posting works already, q.e.d. However, <a href="http://newsbruiser.tigris.org/">NewsBruiser</a> is giving me a hard time with not accepting <a href="http://www.xmlrpc.com/metaWeblogApi">editPost()</a> requests. So in effect, i&#8217;ll not be able to update this entry later on which sucks.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2005/06/20/20062005/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
