<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Another Gentoo Dev</title>
	<atom:link href="https://qiaomuf.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://qiaomuf.wordpress.com</link>
	<description>My opensource life</description>
	<lastBuildDate>Sat, 07 Jan 2012 17:59:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='qiaomuf.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>https://s-ssl.wordpress.com/i/buttonw-com.png</url>
		<title>Another Gentoo Dev</title>
		<link>https://qiaomuf.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="https://qiaomuf.wordpress.com/osd.xml" title="Another Gentoo Dev" />
	<atom:link rel='hub' href='https://qiaomuf.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Ifnet updates for NetworkManager 0.9</title>
		<link>https://qiaomuf.wordpress.com/2012/01/05/ifnet-updates-for-networkmanager-0-9/</link>
		<comments>https://qiaomuf.wordpress.com/2012/01/05/ifnet-updates-for-networkmanager-0-9/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 02:43:52 +0000</pubDate>
		<dc:creator>qiaomuf</dc:creator>
				<category><![CDATA[gentoo]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ifnet]]></category>
		<category><![CDATA[networkmanager]]></category>

		<guid isPermaLink="false">http://qiaomuf.wordpress.com/?p=376</guid>
		<description><![CDATA[NetworkManager 0.9 has changed a lot of stuff. Before NM 0.9, there are user connections and system connections. Ifnet plug-in is made to only take charge of system connections. But after NM 0.9, all connections become system connections and ifnet tries to manage all of them. Then some bad things might happen. The problem is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=376&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>NetworkManager 0.9 has changed a lot of stuff. Before NM 0.9, there are user connections and system connections. Ifnet plug-in is made to only take charge of system connections. But after NM 0.9, all connections become system connections and ifnet tries to manage all of them. Then some bad things might happen. The problem is reported by David Narvaez and he helped a lot on it. <a href="https://bugs.gentoo.org/show_bug.cgi?id=392409"><strong>Bug #392409</strong></a> is also caused by the problem. This is fixed in networkmanager-0.9.2.0-r2: if a user <strong>does not check</strong> &#8220;available to all users&#8221;, ifnet will not handle the connection any more and the default plug-in &#8220;keyfile&#8221; will do the job.</p>
<p>Another important change is that ifnet now supports openrc style. As bash arrays are not allowed by openrc, ifnet caused <a href="https://bugs.gentoo.org/show_bug.cgi?id=369711"><strong>Bug #369711</strong></a>. After networkmanager-0.9.2.0-r2, ifnet can read both the old baselayout style (with bash arrays) and openrc style (without bash arrays), but it only writes to /etc/conf.d/net with openrc style.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qiaomuf.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qiaomuf.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qiaomuf.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qiaomuf.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qiaomuf.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qiaomuf.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qiaomuf.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qiaomuf.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qiaomuf.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qiaomuf.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qiaomuf.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qiaomuf.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qiaomuf.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qiaomuf.wordpress.com/376/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=376&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://qiaomuf.wordpress.com/2012/01/05/ifnet-updates-for-networkmanager-0-9/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/b12b15b58561a9c6c4d3921b60f62226?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">qiaomuf</media:title>
		</media:content>
	</item>
		<item>
		<title>A brilliant way to parallize your commands</title>
		<link>https://qiaomuf.wordpress.com/2011/09/04/a-brilliant-way-to-parallize-your-commands/</link>
		<comments>https://qiaomuf.wordpress.com/2011/09/04/a-brilliant-way-to-parallize-your-commands/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 15:13:55 +0000</pubDate>
		<dc:creator>qiaomuf</dc:creator>
				<category><![CDATA[autotools]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://qiaomuf.wordpress.com/?p=341</guid>
		<description><![CDATA[The solution I&#8217;m taking about here comes from stackoverflow.com. The original question is : I have a list/queue of 200 commands that I need to run in a shell on a Linux server. I only want to have a maximum of 10 processes running (from the queue) at once. Some processes will take a few [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=341&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The solution I&#8217;m taking about here comes from stackoverflow.com. The <a href="http://stackoverflow.com/questions/463963/parallel-processing-from-a-command-queue-on-linux-bash-python-ruby-whatever">original question</a> is :</p>
<blockquote><p>I have a list/queue of 200 commands that I need to run in a shell on a Linux server. I only want to have a maximum of 10 processes running (from the queue) at once. Some processes will take a few seconds to complete, other processes will take much longer. When a process finishes I want the next command to be &#8220;popped&#8221; from the queue and executed.</p></blockquote>
<p><strong>Solution: write a makefile with the following content</strong>:</p>
<p style="padding-left:30px;"><code>all: usera userb userc....<br />
usera:<br />
imapsync usera<br />
userb:<br />
imapsync userb<br />
....</code></p>
<p>Then just run</p>
<p><pre class="brush: bash;">make -j 10 -f makefile</pre></p>
<p>I think the answer is really brilliant as it not only makes use of available tools that are quite mature, but also solves the problem fast with little effort. If the situation is getting more complicated, the solution can still be easily adjusted. <em>xargs</em> is also a good solution btw.<code></code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qiaomuf.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qiaomuf.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qiaomuf.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qiaomuf.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qiaomuf.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qiaomuf.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qiaomuf.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qiaomuf.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qiaomuf.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qiaomuf.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qiaomuf.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qiaomuf.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qiaomuf.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qiaomuf.wordpress.com/341/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=341&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://qiaomuf.wordpress.com/2011/09/04/a-brilliant-way-to-parallize-your-commands/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/b12b15b58561a9c6c4d3921b60f62226?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">qiaomuf</media:title>
		</media:content>
	</item>
		<item>
		<title>libbash final report</title>
		<link>https://qiaomuf.wordpress.com/2011/08/06/libbash-final-report/</link>
		<comments>https://qiaomuf.wordpress.com/2011/08/06/libbash-final-report/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 13:47:21 +0000</pubDate>
		<dc:creator>qiaomuf</dc:creator>
				<category><![CDATA[c/c++]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[libbash]]></category>

		<guid isPermaLink="false">http://qiaomuf.wordpress.com/?p=329</guid>
		<description><![CDATA[My GSoC project will end in this weekend so this is the final report. This week, I spent most of my time making sure the project is in a good state for future developers. So far, libbash can generate correct ebuild metadata for 8414 out of 27586 ebuilds. What is blocking us from moving on? [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=329&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My GSoC project will end in this weekend so this is the final report. This week, I spent most of my time making sure the project is in a good state for future developers.</p>
<p>So far, libbash can generate correct ebuild metadata for 8414 out of 27586 ebuilds. What is blocking us from moving on? We need to be able to parse all the eclasses. But there are still a few problems in the parser grammar. On the other hand, our runtime is not complete. In one word, more time is required. This is the <a href="https://www.ohloh.net/p/gentoo_libbash">ohloh page for libbash</a> where you can learn some statistics of the code.</p>
<p>I wrote an ebuild for libbash and put it in my overlay. Now you can play with it by</p>
<p><pre class="brush: bash;">
layman -a qiaomuf
emerge libbash
</pre></p>
<p>Although libbash is not powerful enough to generate all ebuild metadata, it can do something useful now. As I said before, you can always check what libbash can support from <a href="http://git.overlays.gentoo.org/gitweb/?p=proj/libbash.git;a=tree;f=scripts;hb=HEAD">these test scripts</a>. One thing you should notice is that we do not support running external command.</p>
<p>The library is quite easy to use. To give you a taste, here is a code snippet showing how to use it:</p>
<p><pre class="brush: cpp; highlight: [14];">
#include &lt;algorithm&gt;
#include &lt;iostream&gt;
#include &lt;iterator&gt;

#include &lt;libbash/libbash.h&gt;

int main(int argc, char** argv)
{
  // store variable values and function names
  std::unordered_map&lt;std::string, std::vector&lt;std::string&gt;&gt; variables;
  std::vector&lt;std::string&gt; functions;

  // interpret the script specified by argv[1]
  libbash::interpret(argv[1], variables, functions);

  // do what ever you want with variables and functions
  std::copy(functions.begin(),
            functions.end(),
            std::ostream_iterator&lt;std::string&gt;(std::cout, &quot; &quot;));
  std::cout &lt;&lt; std::endl;
}
</pre></p>
<p>To get it compiled, run</p>
<p><pre class="brush: bash;">
g++ -std=c++0x $(pkg-config --cflags --libs libbash) test.cpp
</pre></p>
<p>The program will interpret the script like bash and store the result in the variable map and function name list. All the variables are treated as arrays. For more information, you can check the API documentation.<br />
(P.S.: The library is not stable so please don&#8217;t use it in any serious place)</p>
<p>So what&#8217;s next? I think it would be improving the parser grammar, figuring out problems from the output of instruo and implement more runtime. People are welcome to make contributions. I&#8217;ll continue making contributions after GSoC.</p>
<p>Last but not least, I&#8217;d like to thank Google and Gentoo community for giving me such great experience. Thank Petteri for mentoring me. I enjoyed a wonderful summer with you and learned a lot including C++0x, boost libraries, ANTLR, autotools, Scrum and so on. Thank Donnie, Robin and other people who helped me.</p>
<p>OK, I&#8217;m going to get myself prepared and seek a job <img src='https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qiaomuf.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qiaomuf.wordpress.com/329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qiaomuf.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qiaomuf.wordpress.com/329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qiaomuf.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qiaomuf.wordpress.com/329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qiaomuf.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qiaomuf.wordpress.com/329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qiaomuf.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qiaomuf.wordpress.com/329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qiaomuf.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qiaomuf.wordpress.com/329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qiaomuf.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qiaomuf.wordpress.com/329/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=329&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://qiaomuf.wordpress.com/2011/08/06/libbash-final-report/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/b12b15b58561a9c6c4d3921b60f62226?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">qiaomuf</media:title>
		</media:content>
	</item>
		<item>
		<title>libbash weekly report #11</title>
		<link>https://qiaomuf.wordpress.com/2011/08/03/libbash-weekly-report-11/</link>
		<comments>https://qiaomuf.wordpress.com/2011/08/03/libbash-weekly-report-11/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 08:58:24 +0000</pubDate>
		<dc:creator>qiaomuf</dc:creator>
				<category><![CDATA[gentoo]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[libbash]]></category>

		<guid isPermaLink="false">http://qiaomuf.wordpress.com/?p=325</guid>
		<description><![CDATA[Sorry for the delay this time because I was in Beijing in the last weekend. Finally I can get down to write the report. Now 8414 ebuilds can be handled. The number is increasing again and it&#8217;s not that hard to make progress this time because we have fixed the big issues in the parser [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=325&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Sorry for the delay this time because I was in Beijing in the last weekend. Finally I can get down to write the report.</p>
<p>Now 8414 ebuilds can be handled. The number is increasing again and it&#8217;s not that hard to make progress this time because we have fixed the big issues in the parser grammar. However, running instruo is not that fast any more. It is because we can parse more eclasses so there are more things to handle.</p>
<p>I did more than expected in the last week. Here is the list of what I have done in the last week:</p>
<ul>
<li>Fix code so that our instruo won&#8217;t crash anymore(turns out to be a problem related to thread-safety)</li>
<li>Get libtool.eclass fully parsed</li>
<li>Get perl-module.eclass fully parsed</li>
<li>Get distutils.eclass fully parsed</li>
<li>Get java-utils-2.eclass fully parsed</li>
<li>Get kde4-base.eclass fully parsed</li>
<li>Get python.eclass parsed with one exception: double quoted arithmetic expansion</li>
</ul>
<p>The above eclasses included all the tasks for grammar improvements that I mentioned in the <a href="http://qiaomuf.wordpress.com/2011/07/26/libbash-weekly-report-10/">last weekly report</a>.</p>
<p>This week I will:</p>
<ul>
<li>Improve our build system to install something useful</li>
<li>Improve our ebuild so that the library can be installed and used properly</li>
<li>Review all the documentation</li>
<li>Review all the code</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qiaomuf.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qiaomuf.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qiaomuf.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qiaomuf.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qiaomuf.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qiaomuf.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qiaomuf.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qiaomuf.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qiaomuf.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qiaomuf.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qiaomuf.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qiaomuf.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qiaomuf.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qiaomuf.wordpress.com/325/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=325&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://qiaomuf.wordpress.com/2011/08/03/libbash-weekly-report-11/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/b12b15b58561a9c6c4d3921b60f62226?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">qiaomuf</media:title>
		</media:content>
	</item>
		<item>
		<title>libbash weekly report #10</title>
		<link>https://qiaomuf.wordpress.com/2011/07/26/libbash-weekly-report-10/</link>
		<comments>https://qiaomuf.wordpress.com/2011/07/26/libbash-weekly-report-10/#comments</comments>
		<pubDate>Tue, 26 Jul 2011 09:29:59 +0000</pubDate>
		<dc:creator>qiaomuf</dc:creator>
				<category><![CDATA[gentoo]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[libbash]]></category>

		<guid isPermaLink="false">http://qiaomuf.wordpress.com/?p=320</guid>
		<description><![CDATA[Finally I have done with the backtracking removal. Now doing semantic predicate is much easier. With this change, I successfully supported here document, which was the biggest blocker before I started this work. In addition, the performance is better. I used valgrind to get performance comparison. Here is the output of ms_print (post-processing tool for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=320&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Finally I have done with the backtracking removal. Now doing semantic predicate is much easier. With this change, I successfully supported here document, which was the biggest blocker before I started this work. In addition, the performance is better. I used valgrind to get performance comparison. Here is the output of ms_print (post-processing tool for Massif) before and after backtracking removal: <a href="http://dev.gentoo.org/~qiaomuf/massif.before">before</a>, <a href="http://dev.gentoo.org/~qiaomuf/massif.after">after</a>. I reduced about 38% memory usage and got the library run 20% faster.</p>
<p>What I have done in the past week:</p>
<ul>
<li>Completed the work on the new parser and incorporated it to our project</li>
<li>Improved parameter expansion parsing and its runtime</li>
<li>Improved built-in and keyword test</li>
<li>Improved the runtime for case statement</li>
<li>Improved arithmetic expansion</li>
<li>Improved the local built-in</li>
<li>Fixed some minor problems in compound statement and parameter expansion</li>
<li>Reimplemented the export built-in</li>
<li>Removed several tokens to avoid conflicts</li>
<li>Improved here document and here string</li>
<li>Fixed single quoted string in command substitution</li>
</ul>
<p>In the following week, I will:</p>
<ul>
<li>Get backtracking removal pushed</li>
<li>Fix our instruo implementation (now it crashes with the new grammar)</li>
<li>Improve process substitution</li>
<li>Support redirection without any command</li>
<li>Reimplement the local built-in</li>
<li>Fix some minor problems in variable expansion and bash test</li>
<li>Remove some composite tokens</li>
</ul>
<p>I started working on this project early and I will start seeking a job soon (I&#8217;ll soon graduate from my university). So Petteri and I agreed to end the GSoC on 08.06. As a result, this is the last iteration of this year&#8217;s GSoC. I&#8217;ll write one more regular report and a final report before the end. I&#8217;ll continue my work on this project as soon as I get a job <img src='https://s-ssl.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qiaomuf.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qiaomuf.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qiaomuf.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qiaomuf.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qiaomuf.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qiaomuf.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qiaomuf.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qiaomuf.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qiaomuf.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qiaomuf.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qiaomuf.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qiaomuf.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qiaomuf.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qiaomuf.wordpress.com/320/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=320&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://qiaomuf.wordpress.com/2011/07/26/libbash-weekly-report-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/b12b15b58561a9c6c4d3921b60f62226?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">qiaomuf</media:title>
		</media:content>
	</item>
		<item>
		<title>libbash weekly report #9 (mid-term summary)</title>
		<link>https://qiaomuf.wordpress.com/2011/07/18/libbash-weekly-report-9-mid-term-summary/</link>
		<comments>https://qiaomuf.wordpress.com/2011/07/18/libbash-weekly-report-9-mid-term-summary/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 11:40:14 +0000</pubDate>
		<dc:creator>qiaomuf</dc:creator>
				<category><![CDATA[gentoo]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[libbash]]></category>

		<guid isPermaLink="false">http://qiaomuf.wordpress.com/?p=313</guid>
		<description><![CDATA[It&#8217;s been four months since I started working on this project. I just passed the mid-term evaluation so I&#8217;d like to talk about the current status of libbash. My plan for the mid-term evaluation is to be able to parse the ebuilds that don&#8217;t inherit any eclass. With a few exceptions, I achieved that more [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=313&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been four months since I started working on this project. I just passed the mid-term evaluation so I&#8217;d like to talk about the current status of libbash.</p>
<p>My plan for the mid-term evaluation is to be able to parse the ebuilds that don&#8217;t inherit any eclass. With a few exceptions, I achieved that more than a month ago. If you read my weekly reports, you might have noticed that we could parse about 7000+ ebuilds at some point. That&#8217;s when I achieved the goal.</p>
<p>If you want to see what libbash can handle so far, there are <a title="test scripts" href="http://git.overlays.gentoo.org/gitweb/?p=proj/libbash.git;a=tree;f=scripts;h=5aac894cce36dca87cd3dfb924b91712e560f7fc;hb=HEAD" target="_blank">several test scripts</a> where you can find the answer.</p>
<p>But why are there some exceptions? The answer is due to the limitation of parser grammar. The parser grammar was supposed to be working at the end of GSoC 2010. However we found there were still many issues in the grammar while implementing the runtime of libbash. The parser grammar is quite important and I can&#8217;t work on the runtime if the parser grammar does not work properly.</p>
<p>Then what are you doing these days? I spent most of the time fixing the problems in the parser grammar. In my GSoC application, I said if I had enough time, I would try to disable global backtracking for the parser grammar. But now this seems to be required. I started working on it from last week and it goes pretty well so far.</p>
<p>Some people doubt if I could completely disable backtracking. I&#8217;m not a compiler expert and I don&#8217;t have the confidence to say if bash is LL(k). As far as I see, I can handle most of the syntax with LL(k) parser. But what I am really trying to do is to remove the global backtracking option of ANTLR grammar. With that option, ANTLR will automatically backtrack so there might be many places where you could have avoided backtracking. It also makes the problems in the parser grammar even more complicated. It&#8217;s highly recommended not to use that option in production code. As a result, I&#8217;m trying to use left factoring, syntactic predicate and local backtracking option instead of the global one. So far the parser grammar is faster and it&#8217;s much easier to fix the problems in it. I&#8217;ll give the performance comparison in the next weekly report.</p>
<p>What I have done in the last week:</p>
<ul>
<li>worked on a new parser grammar without the global backtracking option</li>
</ul>
<p>Plan for this week:</p>
<ul>
<li>finish the work with the new parser grammar and improve unit tests</li>
<li>incorporate the new parser grammar</li>
<li>fully support here document</li>
<li>improve the rules for parameter expansion</li>
<li>improve the rules for built-in and keyword test</li>
<li>fix the problem with \newline</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qiaomuf.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qiaomuf.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qiaomuf.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qiaomuf.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qiaomuf.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qiaomuf.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qiaomuf.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qiaomuf.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qiaomuf.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qiaomuf.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qiaomuf.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qiaomuf.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qiaomuf.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qiaomuf.wordpress.com/313/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=313&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://qiaomuf.wordpress.com/2011/07/18/libbash-weekly-report-9-mid-term-summary/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/b12b15b58561a9c6c4d3921b60f62226?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">qiaomuf</media:title>
		</media:content>
	</item>
		<item>
		<title>libbash weekly report #8</title>
		<link>https://qiaomuf.wordpress.com/2011/07/11/libbash-weekly-report-8/</link>
		<comments>https://qiaomuf.wordpress.com/2011/07/11/libbash-weekly-report-8/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 11:00:18 +0000</pubDate>
		<dc:creator>qiaomuf</dc:creator>
				<category><![CDATA[gentoo]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[libbash]]></category>

		<guid isPermaLink="false">http://qiaomuf.wordpress.com/?p=308</guid>
		<description><![CDATA[This week I focused on improving the parser grammar . Petteri and I finally decide to remove the global backtracking. We didn&#8217;t plan to do it at first because it would cost a lot of time. We thought that was not something required for metadata generation. However, many stories are blocked due to the limitation [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=308&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This week I focused on improving the parser grammar . Petteri and I finally decide to remove the global backtracking. We didn&#8217;t plan to do it at first because it would cost a lot of time. We thought that was not something required for metadata generation. However, many stories are blocked due to the limitation of parser grammar. We have to remove backtracking so that semantic predicate can work for the grammar. Although doing it is quite difficult and will cost a lot of time, we will get a cleaner and much faster grammar when it&#8217;s done. It is the thing that we should do sooner or later anyway.</p>
<p>These are what I have done in the past week:</p>
<ul>
<li>Used bash to verify unit tests</li>
<li>Supported thread safety</li>
<li>Turned off backtracking for the command rules</li>
<li>Left factored the rules for pipeline and function definition</li>
<li>Improved double quoted string handling</li>
<li>Worked on upgrading to ANTLR 3.4</li>
<li>Started working on removing global backtracking</li>
</ul>
<p>Note that we support thread safety now and our version of instruo can finish its work in less than 1 minute. We still haven&#8217;t upgraded to ANTLR 3.4 because of some upstream bugs. The process might take longer.</p>
<p>In the next few weeks, I will mainly focus on one story: removing global backtracking. I hope it can be done in two weeks.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qiaomuf.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qiaomuf.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qiaomuf.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qiaomuf.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qiaomuf.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qiaomuf.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qiaomuf.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qiaomuf.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qiaomuf.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qiaomuf.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qiaomuf.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qiaomuf.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qiaomuf.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qiaomuf.wordpress.com/308/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=308&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://qiaomuf.wordpress.com/2011/07/11/libbash-weekly-report-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/b12b15b58561a9c6c4d3921b60f62226?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">qiaomuf</media:title>
		</media:content>
	</item>
		<item>
		<title>libbash weekly report #7</title>
		<link>https://qiaomuf.wordpress.com/2011/07/04/libbash-weekly-report-7/</link>
		<comments>https://qiaomuf.wordpress.com/2011/07/04/libbash-weekly-report-7/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 11:17:26 +0000</pubDate>
		<dc:creator>qiaomuf</dc:creator>
				<category><![CDATA[gentoo]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[libbash]]></category>

		<guid isPermaLink="false">http://qiaomuf.wordpress.com/?p=302</guid>
		<description><![CDATA[This week we finally have our CI server working. Many thinks to robbat2 and other people who helped. If your GSoC projects might benefit from it(buildbot), please go ahead to ask for it. The number of ebuilds that we can handle doesn&#8217;t change as we still have the problem in our parser grammar. Here&#8217;s what [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=302&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This week we finally have our CI server working. Many thinks to robbat2 and other people who helped. If your GSoC projects might benefit from it(buildbot), please go ahead to ask for it. The number of ebuilds that we can handle doesn&#8217;t change as we still have the problem in our parser grammar. Here&#8217;s what I have done in the last week:</p>
<ul>
<li>Finished setting up the CI server</li>
<li>Broke down the walker grammar to reduce compile time</li>
<li>Unified header protection coding style</li>
<li>Cleaned up doxygen warnings</li>
</ul>
<p>two stories are blocked:</p>
<ul>
<li>Upgrade to ANTLR 3.4</li>
</ul>
<p style="padding-left:30px;">I fixed some problems in the libraries and reported some bugs upstream. Now I&#8217;m still blocked by some upstream bugs. This story is quite important because many stories need semantic predicate. We hope ANTLR 3.4 could support it when backtracking is turned on.</p>
<ul>
<li>Make the library thread safe</li>
</ul>
<p style="padding-left:30px;">There are still some problems with the thread safe code, I will continue working on it in this week.</p>
<p>So this week I will continue working on the blocked stories. We will decide what to do next after upgrading to ANTLR 3.4.</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qiaomuf.wordpress.com/302/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qiaomuf.wordpress.com/302/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qiaomuf.wordpress.com/302/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qiaomuf.wordpress.com/302/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qiaomuf.wordpress.com/302/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qiaomuf.wordpress.com/302/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qiaomuf.wordpress.com/302/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qiaomuf.wordpress.com/302/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qiaomuf.wordpress.com/302/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qiaomuf.wordpress.com/302/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qiaomuf.wordpress.com/302/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qiaomuf.wordpress.com/302/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qiaomuf.wordpress.com/302/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qiaomuf.wordpress.com/302/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=302&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://qiaomuf.wordpress.com/2011/07/04/libbash-weekly-report-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/b12b15b58561a9c6c4d3921b60f62226?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">qiaomuf</media:title>
		</media:content>
	</item>
		<item>
		<title>libbash weekly report #6</title>
		<link>https://qiaomuf.wordpress.com/2011/06/27/libbash-weekly-report-6/</link>
		<comments>https://qiaomuf.wordpress.com/2011/06/27/libbash-weekly-report-6/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 11:16:54 +0000</pubDate>
		<dc:creator>qiaomuf</dc:creator>
				<category><![CDATA[gentoo]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[libbash]]></category>

		<guid isPermaLink="false">http://qiaomuf.wordpress.com/?p=300</guid>
		<description><![CDATA[Last week I tried to do semantic predicate in our parser grammar. We hoped that it could solve most of the problems we were facing. Unfortunately, it didn&#8217;t end up well as we cannot make semantic predicate working with backtracking. This week I will migrate to ANTLR 3.4. and see if it helps solve the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=300&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Last week I tried to do semantic predicate in our parser grammar. We hoped that it could solve most of the problems we were facing. Unfortunately, it didn&#8217;t end up well as we cannot make semantic predicate working with backtracking. This week I will migrate to ANTLR 3.4. and see if it helps solve the problem. Here are what I have done in the last week:</p>
<ul>
<li>Supported braces in command arguments</li>
<li>Improved comment handling</li>
<li>Supported ANSI C Quoting</li>
<li>Supported shortcut capability for &amp;&amp; and || in arithmetic expansion</li>
<li>Supported arithmetic expression</li>
<li>Supported break built-in</li>
<li>Improved our build system to reduce dependencies</li>
<li>Made arithmetic expansion follow POSIX</li>
<li>Improved exception hierarchy</li>
<li>Implemented shift built-in</li>
<li>Improved the ast_printer utility</li>
</ul>
<p>A few stories are blocked due to the backtracking problem.</p>
<p>This week I will:</p>
<ul>
<li>Upgrade to ANTLR 3.4 and see if it helps solve the backtracking problem</li>
<li>Fix errors in the CI Server</li>
<li>Break down walker grammar to reduce compile time</li>
<li>Use bash to verify test scripts</li>
<li>Support alias</li>
<li>Handle options to the local built-in</li>
<li>Upgrade to Paludis 0.64.1</li>
<li>Support thread-safety</li>
<li>Clean up warnings from doxygen</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qiaomuf.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qiaomuf.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qiaomuf.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qiaomuf.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qiaomuf.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qiaomuf.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qiaomuf.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qiaomuf.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qiaomuf.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qiaomuf.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qiaomuf.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qiaomuf.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qiaomuf.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qiaomuf.wordpress.com/300/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=300&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://qiaomuf.wordpress.com/2011/06/27/libbash-weekly-report-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/b12b15b58561a9c6c4d3921b60f62226?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">qiaomuf</media:title>
		</media:content>
	</item>
		<item>
		<title>libbash weekly report #5</title>
		<link>https://qiaomuf.wordpress.com/2011/06/20/libbash-weekly-report-5/</link>
		<comments>https://qiaomuf.wordpress.com/2011/06/20/libbash-weekly-report-5/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 12:04:26 +0000</pubDate>
		<dc:creator>qiaomuf</dc:creator>
				<category><![CDATA[gentoo]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[libbash]]></category>

		<guid isPermaLink="false">http://qiaomuf.wordpress.com/?p=294</guid>
		<description><![CDATA[In the last week, I focused on parser grammar improvement. So far we can generate correct metadata for 8028 ebuilds. As we have made error handling POSIX compliant, any parsing failure will cause an exception. So making the parser working properly is the first thing that should be done. To be honest, fixing bugs in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=294&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the last week, I focused on parser grammar improvement. So far we can generate correct metadata for 8028 ebuilds. As we have made error handling POSIX compliant, any parsing failure will cause an exception. So making the parser working properly is the first thing that should be done. To be honest, fixing bugs in the parser is not easy. The logic there is already quite complicated and backtracking make it worse. But I need to get through it. Here are what I have done in the last week:</p>
<ul>
<li>Supported bash redirection for all kinds of commands</li>
<li>Supported the special parameter $-</li>
<li>Supported parsing -o and -a operators for built-in test</li>
<li>Supported brace expansion</li>
<li>Implemented eclass parse failure cache</li>
<li>Supported backslash escapes inside double quotes</li>
<li>Fixed variable indirection in arithmetic expressions</li>
<li>Supported regex match operator for keyword test</li>
<li>Tried to parse here document and improve variable expansion</li>
<li>Improved CI server configuration</li>
</ul>
<p>This week I will:</p>
<ul>
<li>Support braces in command arguments</li>
<li>Improve comment handling</li>
<li>Handle single quoted string in variable reference like $&#8217;string&#8217;</li>
<li>Support shortcut capability for &amp;&amp; and || in arithmetic expression</li>
<li>Support arithmetic expression</li>
<li>Support break built-in</li>
<li>Support read-only built-in</li>
<li>Improve our build system to reduce dependencies</li>
<li>Make arithmetic expansion follow POSIX</li>
<li>Improve exception hierarchy</li>
<li>Implement shift built-in</li>
<li>Try boost::spirit::qi to implement a simple lexer for ANTLR</li>
</ul>
<p>At the end of this weekly report, I&#8217;d like to mention a small tip for bash arithmetic. As you probably have known, you can&#8217;t write $(( expression )) as a bash command. But sometimes you just need to evaluate the expression and nothing else. You can certainly call the let built-in but that requires you quote your expression to avoid word splitting. Then some people invent this:</p>
<pre>: $(( <var>expression</var> ))</pre>
<p>&#8216;:&#8217; is a bash built-in that does nothing. So the argument gets evaluated first and then &#8216;:&#8217; gets called. I really feel it unnecessary as you can always use bash arithmetic expression:</p>
<pre>(( <var>expression</var> ))</pre>
<p>This is exactly equivalent to</p>
<pre>let "<var>expression</var>"</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/qiaomuf.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/qiaomuf.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/qiaomuf.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/qiaomuf.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/qiaomuf.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/qiaomuf.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/qiaomuf.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/qiaomuf.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/qiaomuf.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/qiaomuf.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/qiaomuf.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/qiaomuf.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/qiaomuf.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/qiaomuf.wordpress.com/294/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=qiaomuf.wordpress.com&amp;blog=13754809&amp;post=294&amp;subd=qiaomuf&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://qiaomuf.wordpress.com/2011/06/20/libbash-weekly-report-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/b12b15b58561a9c6c4d3921b60f62226?s=96&#38;d=&#38;r=G" medium="image">
			<media:title type="html">qiaomuf</media:title>
		</media:content>
	</item>
	</channel>
</rss>
