<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>web(cslai)</title>
	
	<link>http://cslai.coolsilon.com</link>
	<description>Findings and Notes in Web Development</description>
	<lastBuildDate>Fri, 18 May 2012 09:50:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/cslai" /><feedburner:info uri="cslai" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license><image><link>http://creativecommons.org/licenses/by-nc-sa/3.0/</link><url>http://creativecommons.org/images/public/somerights20.gif</url><title>Some Rights Reserved</title></image><item>
		<title>Yet another Instant Messaging service</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/2GvGNI_z9ug/</link>
		<comments>http://cslai.coolsilon.com/2012/05/18/yet-another-instant-messaging-service/#comments</comments>
		<pubDate>Fri, 18 May 2012 09:50:48 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[Mobile Development]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=300</guid>
		<description><![CDATA[I have recently made my Adium useless by moving all my IM accounts to my beloved Nokia N9. While moving my buddy lists of all major instant messaging services, I did a quick check on each of the contact to see past interaction. It is sort of surprising to see I don&#8217;t actually chat with [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/AY7IW6ZzKq6RbOTVcS2WzmAcYsE/0/da"><img src="http://feedads.g.doubleclick.net/~a/AY7IW6ZzKq6RbOTVcS2WzmAcYsE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/AY7IW6ZzKq6RbOTVcS2WzmAcYsE/1/da"><img src="http://feedads.g.doubleclick.net/~a/AY7IW6ZzKq6RbOTVcS2WzmAcYsE/1/di" border="0" ismap="true"></img></a></p><p>I have recently made my Adium useless by moving all my IM accounts to my beloved Nokia N9. While moving my buddy lists of all major instant messaging services, I did a quick check on each of the contact to see past interaction. It is sort of surprising to see I don&#8217;t actually chat with them as frequent as I thought, so why do I &#8220;need&#8221; my Adium opened all the time?</p>
<p><span id="more-300"></span></p>
<p>There&#8217;s a new app (in beta) released for Nokia N9 called wazapp, which is an unofficial port of WhatsApp for MeeGo Harmattan/Maemo (a port for Fremantle, which runs on N900 is coming). The main reason I installed this is because I got tired of friends asking me whether I have one.</p>
<p>The funny thing about instant messaging services is that we don&#8217;t appear to have enough of them. There was once ICQ was the only choice until the UIN gets ridiculously long. Then people switch to MSN/WLM or whatever crap Microsoft decide to call it now. Then it comes Skype, Google Talk and Facebook Chat, chances are, anyone who is relying Internet for communication purpose, would have more than one instant messaging service account, regardless whether they are being actively used.</p>
<p>Then comes the era of smartphone applications, which spurs the development of more applications which is supposed to make us more &#8220;sociable&#8221; and &#8220;approachable&#8221;. Aren&#8217;t we approachable enough already? What is wrong with just phone calls and text messages? Am I feeling insecure that people may forget about me so I keep on registering myself to new services?</p>
<p>It&#8217;s really tiring having to maintain so many instant messaging accounts and I doubt if I would jump into another one any time soon. In fact, I am in the process of pruning my contact list to contain just real close friends to ironically, and reduce my reliance to the phone.</p>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=2GvGNI_z9ug:xUublmcTHuw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=2GvGNI_z9ug:xUublmcTHuw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=2GvGNI_z9ug:xUublmcTHuw:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=2GvGNI_z9ug:xUublmcTHuw:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=2GvGNI_z9ug:xUublmcTHuw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=2GvGNI_z9ug:xUublmcTHuw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=2GvGNI_z9ug:xUublmcTHuw:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=2GvGNI_z9ug:xUublmcTHuw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/2GvGNI_z9ug" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2012/05/18/yet-another-instant-messaging-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2012/05/18/yet-another-instant-messaging-service/</feedburner:origLink></item>
		<item>
		<title>Cold-start and Ramp-Up problems</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/DqzYD4wA4ks/</link>
		<comments>http://cslai.coolsilon.com/2012/05/15/cold-start-and-ramp-up-problems/#comments</comments>
		<pubDate>Mon, 14 May 2012 17:35:50 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[Recommender System]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=294</guid>
		<description><![CDATA[Everyone knows folksonomy is (or was) cool and useful, however, when it is applied in real life, then problem arises. The idea of blogging this came while I am struggling to get my literature review report done (been doing it for months, I am being so ridiculous, I know). As a matter of fact, as [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/Oocyk6BXPfOPepXZ1EmSQCklTFU/0/da"><img src="http://feedads.g.doubleclick.net/~a/Oocyk6BXPfOPepXZ1EmSQCklTFU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Oocyk6BXPfOPepXZ1EmSQCklTFU/1/da"><img src="http://feedads.g.doubleclick.net/~a/Oocyk6BXPfOPepXZ1EmSQCklTFU/1/di" border="0" ismap="true"></img></a></p><p>Everyone knows folksonomy is (or was) cool and useful, however, when it is applied in real life, then problem arises. The idea of blogging this came while I am struggling to get my literature review report done (been doing it for months, I am being so ridiculous, I know). As a matter of fact, as I am dying to get it done, there are a couple of things that I found to be blog-worthy. So, I will be publishing a couple of brief overview to some of the topics involved in the coming days in a really casual (read: lazy, and full of personal speculations) way to this very humble little blog of mine.</p>
<p><span id="more-294"></span></p>
<p>Let&#8217;s start with a brief overview of <a href="http://cslai.coolsilon.com/2011/02/17/collaborative-tagging-folksonomy/">folksonomy</a>, which is typically a system (usually web 2.0 applications like flickr, youtube and del.icio.us) that allow users to annotate published content with keywords, also known as tags. The tagging may be done by all users or just the publisher of the particular content depending on the policy applied by the system. The usage of these tags is mainly for organization, but it may also help in discovering some unseen content. Well, I can really write a whole article just about folksonomy, but let&#8217;s just move on to the topic of the day.</p>
<p>Firstly, one may ask, WTF is a ramp-up problem? Imagine when a system grows as large as youtube for instance, where hours of video clips get uploaded in a minute (or even seconds, I don&#8217;t quite remember, but <a href="http://www.ted.com/talks/kevin_allocca_why_videos_go_viral.html">first heard here</a>), expecting the publisher to individually tag their videos with relevant keywords is not really practical, considering there are already a number of them don&#8217;t even bother to provide description. No big deal then, one may just say. However, this pose a problem to<br />
users like us, if there&#8217;s is no enough information provided, how are we supposed to find out what the video is about without having to waste our time watching it that has a chance of becoming yet another yet-another-friggin-cat-video-that-waste-n-minutes-of-my-life when I am really looking for something else?</p>
<p>If we can&#8217;t, how can youtube decide whether to put that video to a search result? Of course, it may be possible for a site like youtube to actually generate a transcript using their voice recognition technology. However, if the web application is developed by just a small startup, how are they going to find out the content of a multimedia content like video clips for instance?</p>
<p>What about cold-start problems then? A cold-start problem happens when a new user registers himself (or herself) to a system and the system doesn&#8217;t know anything about him due to the lack of information. It is a problem because the system wouldn&#8217;t be able to recommend him to other content published by other users that is relevant to him unless he start publishing and annotate his content or rather start &#8216;liking&#8217; (rating) content published by others.</p>
<p>Wait a minute, didn&#8217;t I just read cold-start problem also applies to the scenario described in ramp-up problem mentioned above, you may ask. It&#8217;s true that there are people who generalize these two as cold-start problem, but I prefer to have them separated. Although it is true that they are both really similar in nature, but they are still two different cases, it makes explanation easier without the risk of confusing the audience.</p>
<p>So how does people respond to these problems? Some system would try to work out some implicit annotations from what they have in hand, however the result wouldn&#8217;t be just as accurate but still better than nothing most of the time. One of the real solutions to the problem is by encouraging users to tag by setting some challenging goals, aka. making it fun. In order to make the process fun, some uses the badge (or achievement) system like Stackoverflow, and some make tagging as a game. The other solution would be the implementation of auto-tagging feature, but that often involves a lot of computing magic and may not be really feasible.</p>
<p>On the other hand, for cold-start problem, a questionnaire can sometimes help in building a profile for the user to kick start his participation. However, the questionnaire can be left unanswered for uninterested user, or answered randomly. Another way of building a useful profile would be require a new user to rate or annotate a set of content until enough information is captured. Unless the process involved is fun, otherwise I don&#8217;t really see it as something that is doable. Demographic information would be used as a workaround to this problem by using it to complement the user&#8217;s profile. So, a new user would be assumed to share the same taste as the whole population in the beginning until they develop their own taste from the system&#8217;s POV.</p>
<p>I guess that&#8217;s it for this very brief note on cold-start and ramp-up problems. I would try to publish more in these couple of days while I am wrapping up my literature review report. My supervisor is gonna get so pissed off with me.</p>
<p>Some references (in no particular order):</p>
<ul>
<li>Chumki Basu, Haym Hirsh, and William Cohen. Recommendation as clas- sification: Using social and content-based information in recommendation.<br />
13<br />
In Proceedings Of The National Conference On Artificial Intelligence, vol- ume pp, pages 714–720. JOHN WILEY &#038; SONS LTD, JOHN WILEY \&#038; SONS LTD, 1998. ISBN 0262510987. URL http://scholar.google.com/ scholar?hl=en&#038;btnG=Search&#038;q=intitle:Recommendation+as+Classification: +Using+Social+and+Content-Based+Information+in+Recommendation#0.</li>
<li>R Farzan and P Brusilovsky. Social navigation support in a course recommendation system. In V Wade, H Ashman, and B Smyth, editors, Adaptive Hypermedia and Adaptive WebBased Systems 4th International Conference AH 2006, volume 4018 of Lecture Notes in Computer Science, pages 91–100. Springer Berlin Heidelberg, 2006. ISBN 9783540346968. doi: 10.1007/11768012. URL http://www.springerlink. com/content/v4221425gm747700/.</li>
<li>Rong Hu and Pearl Pu. Using Personality Information in Collaborative Filtering for New Users. Proceedings of the 2nd ACM RecSys10 Workshop on Recommender Sys- tems and the Social Web, 2010. URL http://www.dcs.warwick.ac.uk/~ssanand/ RSWeb_files/Proceedings_RSWEB-10.pdf#page=23.</li>
<li>Stefan Siersdorfer and Sergej Sizov. Social recommender systems for web 2.0 folk- sonomies. ACM Press, New York, New York, USA, 2009. ISBN 9781605584867.<br />
17<br />
doi: 10.1145/1557914.1557959. URL http://portal.acm.org/citation.cfm? doid=1557914.1557959.</li>
<li>Martin Szomszor, Ciro Cattuto, Harith Alani, Kieron OHara, Andrea Baldassarri, Vittorio Loreto, and Vito D P Servedio. Folksonomies, the Semantic Web, and Movie Recommendation. eprintsecssotonacuk, pages 71–84, 2007. URL http://eprints. ecs.soton.ac.uk/14007/.</li>
<li>Andrew I Schein, Alexandrin Popescul, Lyle H Ungar, and David M Pennock. Methods and metrics for cold-start recommendations. Proceedings of the 25th an- nual international ACM SIGIR conference on Research and development in infor- mation retrieval SIGIR 02, (Sigir):253, 2002. doi: 10.1145/564376.564421. URL http://portal.acm.org/citation.cfm?doid=564376.564421.</li>
<li>Douglas Eck, Paul Lamere, Thierry Bertin-Mahieux, and Stephen Green. Auto- matic Generation of Social Tags for Music Recommendation. Learning, 20:1–8, 2007. URL http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.67. 7891&amp;rep=rep1&amp;type=pdf.</li>
<li>H Berger, M Denk, M Dittenbach, A Pesenhofer, and D Merkl. Photo-Based User Profiling for Tourism Recommender Systems. In Giuseppe Psaila, editor, ECommerce and Web Technologies, volume 4655/2007, pages 46–55. Springer, 2007. doi: 10.1007/978-3-540-74563-1\ 5. URL http://www.springerlink.com/index/ jv44060013345257.pdf.</li>
<li>Hao Ma, Haixuan Yang, Michael R Lyu, and Irwin King. Sorec: social recom- mendation using probabilistic matrix factorization. In Proceeding of the 17th ACM conference on Information and knowledge management, pages 931–940. ACM, 2008. ISBN 9781595939913. doi: 10.1145/1458082.1458205. URL http://portal.acm. org/citation.cfm?id=1458205.</li>
<li>Upendra Shardanand and Pattie Maes. Social information filtering: algorithms for automating word of mouth. In I R Katz, R Mack, L Marks, M B Rosson, and J Nielsen, editors, Proceedings of the ACM Conference on Human Fac- tors in Computing Systems, volume 1 of Proceedings of ACM CHI’95 Conference on Human Factors in Computing Systems, pages 210–217. ACM Press/Addison- Wesley Publishing Co., 1995. ISBN 0201847051. doi: 10.1145/223904.223931. URL http://portal.acm.org/citation.cfm?id=223931&amp;coll=portal&amp; d&#8230;N=53154003&amp;ret=1.</li>
</ul>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=DqzYD4wA4ks:fHE4CzG9x5Y:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=DqzYD4wA4ks:fHE4CzG9x5Y:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=DqzYD4wA4ks:fHE4CzG9x5Y:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=DqzYD4wA4ks:fHE4CzG9x5Y:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=DqzYD4wA4ks:fHE4CzG9x5Y:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=DqzYD4wA4ks:fHE4CzG9x5Y:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=DqzYD4wA4ks:fHE4CzG9x5Y:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=DqzYD4wA4ks:fHE4CzG9x5Y:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/DqzYD4wA4ks" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2012/05/15/cold-start-and-ramp-up-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2012/05/15/cold-start-and-ramp-up-problems/</feedburner:origLink></item>
		<item>
		<title>Re-organizing my MacVim configuration</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/xgtVXx7mloI/</link>
		<comments>http://cslai.coolsilon.com/2012/05/05/re-organizing-my-macvim-configuration/#comments</comments>
		<pubDate>Sat, 05 May 2012 04:05:58 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=291</guid>
		<description><![CDATA[It is very difficult to like the way vim handle plugins by default, so I was really thrilled to find out about pathogen when a geek I followed tweeted about it. It took me some time to actually re-organize my current configuration to this new format. Then I thought why not reorganize my .vimrc as [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/1aymdj8jPU7Tn9e09x0_1OPnNWg/0/da"><img src="http://feedads.g.doubleclick.net/~a/1aymdj8jPU7Tn9e09x0_1OPnNWg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/1aymdj8jPU7Tn9e09x0_1OPnNWg/1/da"><img src="http://feedads.g.doubleclick.net/~a/1aymdj8jPU7Tn9e09x0_1OPnNWg/1/di" border="0" ismap="true"></img></a></p><p>It is very difficult to like the way vim handle plugins by default, so I was really thrilled to find out about <a href="https://github.com/tpope/vim-pathogen">pathogen</a> when a geek I followed <a href="https://twitter.com/#!/lowks/status/145022399987982336">tweeted about it</a>. It took me some time to actually re-organize my current configuration to this new format. Then I thought why not reorganize my .vimrc as well, as my current version looks a bit cryptic after a while.</p>
<p><span id="more-291"></span></p>
<p>So I have updated my .vimrc to something like <a href="https://bitbucket.org/jeffrey04/personal-config/diff/.vimrc?diff2=806f21d55b2a&#038;diff1=1e199a6d8ef9">this</a> (link shows the diff). It is now a lot more elaborative, so whenever I need to change the settings I know what I am doing without having to refer to the documentation.</p>
<p><a href="http://hg-git.github.com/">Hg-git</a> is a great tool to enable Mercurial to work with git repositories. I know I should be picking up git but I still find myself liking Mercurial for now. So with pathogen around, I decided to install plugins in the right way by setting up proper <a href="http://mercurial.selenic.com/wiki/Subrepository">sub-repositories</a>. However, the <a href="http://stackoverflow.com/questions/4057888/adding-a-git-subrepository-to-mercurial">problem</a> comes when I was trying to push my changes. Apparently Mercurial will attempt to check with all repositories to decide whether to push changes. However, this is a problem when I do not have changes in the sub-repositories, and I do not have access to those repositories. So, according to one of the proposed solution to this problem posted at stackoverflow, I needed to fall back using an older version of Mercurial where there was no sub-repository support, and I ended up pushing my changes using version 1.2.1.</p>
<p>Another discovery while updating my configuration is that apparently there&#8217;s a transparency option for MacVim. So if one is using MacVim, to achieve the gorgeous transparency effect, just put this in .vimrc</p>
<pre><code>
" Set transparency for MacVim
if has("gui_macvim")
    set transparency=15
endif
</code></pre>
<p>I sort of like the current state of my MacVim right now. Will see how it works when I get this set of settings on a linux machine.</p>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=xgtVXx7mloI:HFVUFNdD8ic:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=xgtVXx7mloI:HFVUFNdD8ic:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=xgtVXx7mloI:HFVUFNdD8ic:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=xgtVXx7mloI:HFVUFNdD8ic:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=xgtVXx7mloI:HFVUFNdD8ic:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=xgtVXx7mloI:HFVUFNdD8ic:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=xgtVXx7mloI:HFVUFNdD8ic:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=xgtVXx7mloI:HFVUFNdD8ic:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/xgtVXx7mloI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2012/05/05/re-organizing-my-macvim-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2012/05/05/re-organizing-my-macvim-configuration/</feedburner:origLink></item>
		<item>
		<title>Release of my app on bitbucket</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/u58Z1FCKkuI/</link>
		<comments>http://cslai.coolsilon.com/2012/05/05/release-of-my-app-on-bitbucket/#comments</comments>
		<pubDate>Sat, 05 May 2012 02:39:30 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[Mobile Development]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=289</guid>
		<description><![CDATA[Should have done this earlier, I was just being lazy to go through all the steps to publish it properly. So here it is, the full source is published to bitbucket. Feel free to fork the project if you are interested. I have not attach a licence to it but it will most probably be [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/PRX4C9A1RF3spzzoRfLMQTCI1ac/0/da"><img src="http://feedads.g.doubleclick.net/~a/PRX4C9A1RF3spzzoRfLMQTCI1ac/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/PRX4C9A1RF3spzzoRfLMQTCI1ac/1/da"><img src="http://feedads.g.doubleclick.net/~a/PRX4C9A1RF3spzzoRfLMQTCI1ac/1/di" border="0" ismap="true"></img></a></p><p>Should have done this earlier, I was just being lazy to go through all the steps to publish it properly. So here it is, the full source is published to <a href="https://bitbucket.org/jeffrey04/restricted-mode-toggler/overview">bitbucket</a>. Feel free to fork the project if you are interested. I have not attach a licence to it but it will most probably be BSD licence. I have also uploaded the latest <a href="http://cslai.coolsilon.com/2012/02/09/packaging-a-daemon-script-for-meego-1-2-harmattan/">0.0.2 release</a> to bitbucket and would update the download link posted previously soon.</p>
<p><span id="more-289"></span></p>
<p>Besides attaching a licence, there are a couple of things that needs to be done. For example, I would need to cough out a README.md to actually describes what the app does properly. I am still thinking whether I would want to provide proper support by enabling the issue tracker provided by bitbucket. For now, the app needs PySide to be installed and that would involve some manual work, at least a terminal app is needed to add new repositories.</p>
<p>I am also sort of interested in participating in this <a href="http://talk.maemo.org/showthread.php?t=83761">competition</a>. There&#8217;s another application that I would want to develop but don&#8217;t think I would be able to make it in time as I plan to learn QML properly while doing it. Would have to see how everything goes.</p>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=u58Z1FCKkuI:RljvNwG_jEE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=u58Z1FCKkuI:RljvNwG_jEE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=u58Z1FCKkuI:RljvNwG_jEE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=u58Z1FCKkuI:RljvNwG_jEE:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=u58Z1FCKkuI:RljvNwG_jEE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=u58Z1FCKkuI:RljvNwG_jEE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=u58Z1FCKkuI:RljvNwG_jEE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=u58Z1FCKkuI:RljvNwG_jEE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/u58Z1FCKkuI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2012/05/05/release-of-my-app-on-bitbucket/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2012/05/05/release-of-my-app-on-bitbucket/</feedburner:origLink></item>
		<item>
		<title>Adding a new settings applet for my daemon</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/JfXVXtP2YbU/</link>
		<comments>http://cslai.coolsilon.com/2012/04/30/adding-a-new-settings-applet-for-my-daemon/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 08:59:08 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[Mobile Development]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=286</guid>
		<description><![CDATA[This is basically a small incremental update to my script published here. For some reason, the previous version of the script didn&#8217;t really work, so this release should fix the problem. Besides fixing the problem where the daemon did not actually launched at start up, I have added a settings applet for this script as [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/PKAzFZrw0lZUsi9MTG8_nnbq0So/0/da"><img src="http://feedads.g.doubleclick.net/~a/PKAzFZrw0lZUsi9MTG8_nnbq0So/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/PKAzFZrw0lZUsi9MTG8_nnbq0So/1/da"><img src="http://feedads.g.doubleclick.net/~a/PKAzFZrw0lZUsi9MTG8_nnbq0So/1/di" border="0" ismap="true"></img></a></p><p>This is basically a small incremental update to my script published <a href="http://cslai.coolsilon.com/2012/02/09/packaging-a-daemon-script-for-meego-1-2-harmattan/">here</a>. For some reason, the previous version of the script didn&#8217;t really work, so this release should fix the problem. Besides fixing the problem where the daemon did not actually launched at start up, I have added a settings applet for this script as well.</p>
<p><span id="more-286"></span></p>
<p>Don&#8217;t feel like going the more complicated route, so I decided to just create a very simple applet using xml declaration. So I started with this <a href="http://harmattan-dev.nokia.com/docs/library/html/guide/html/Developer_Library_Best_practices_for_application_development_Storing_and_managing_application_settings.html">documentation</a>, and then followed the example given <a href="http://harmattan-dev.nokia.com/docs/library/html/guide/html/Developer_Library_Best_practices_for_application_development_Storing_and_managing_application_settings_Example_of_managing_settings_with_Control_Panel_Applets.html">here</a>.</p>
<p>The settings applet for the script looks like this</p>
<p><a href="http://www.flickr.com/photos/jeffrey04/7127656427/" title="Restricted mode toggler by Jeffrey04, on Flickr"><img src="http://farm9.staticflickr.com/8003/7127656427_939a7a7f4d.jpg" width="281" height="500" alt="Restricted mode toggler"></a></p>
<p>Switching the toggle on will stop the daemon from changing the &#8216;Allow background connections&#8217; switch as I would sometimes need the data network to stay on for whatever reason. So I suppose this is a useful feature to have. Don&#8217;t ask me why the settings start in the middle of the screen, I have no idea, and I don&#8217;t care as long as it is working.</p>
<p>Again, the final product can be downloaded <a href="http://coolsilon.com/deb/restricted-mode-toggler_0.0.2_armel.deb">here</a>, and there will be no support or whatsoever if you decided to install this. So install at your own risk, but you can still leave me comments here if you found problems. I have tested this on PR1.2, not sure if this would work for PR1.1 though.</p>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=JfXVXtP2YbU:SJFgamWt_RQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=JfXVXtP2YbU:SJFgamWt_RQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=JfXVXtP2YbU:SJFgamWt_RQ:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=JfXVXtP2YbU:SJFgamWt_RQ:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=JfXVXtP2YbU:SJFgamWt_RQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=JfXVXtP2YbU:SJFgamWt_RQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=JfXVXtP2YbU:SJFgamWt_RQ:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=JfXVXtP2YbU:SJFgamWt_RQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/JfXVXtP2YbU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2012/04/30/adding-a-new-settings-applet-for-my-daemon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2012/04/30/adding-a-new-settings-applet-for-my-daemon/</feedburner:origLink></item>
		<item>
		<title>Packaging a Daemon Script for Meego 1.2 Harmattan</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/Z0HWCn4MdlU/</link>
		<comments>http://cslai.coolsilon.com/2012/02/09/packaging-a-daemon-script-for-meego-1-2-harmattan/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 17:53:27 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[Mobile Development]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=280</guid>
		<description><![CDATA[Another half a day spent on figuring out how to package my daemon properly, fortunately with help from friends over at #harmattan IRC channel as well as cckwes, I finally get the deb package generated properly. So just a quick reminder on what my daemon does, it is just a quick hack that toggles the [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/cDizQfs3nuDC_WSfZE3TcgFlTCQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/cDizQfs3nuDC_WSfZE3TcgFlTCQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/cDizQfs3nuDC_WSfZE3TcgFlTCQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/cDizQfs3nuDC_WSfZE3TcgFlTCQ/1/di" border="0" ismap="true"></img></a></p><p>Another half a day spent on figuring out how to package <a href="http://cslai.coolsilon.com/2012/02/08/creating-a-new-daemon-script-for-meego-1-2-harmattan/">my daemon</a> properly, fortunately with help from friends over at #harmattan IRC channel as well as <a href="http://blog.linux4us.org/">cckwes</a>, I finally get the deb package generated properly. So just a quick reminder on what my daemon does, it is just a quick hack that toggles the &#8216;allow background connections&#8217; on and off depending which kind of data network a user is connected to. Apparently I am not the only one who are looking for this, as <a href="http://harmattan-bugs.nokia.com/show_bug.cgi?id=55">a feature request</a> was filed long long time ago.</p>
<p><span id="more-280"></span></p>
<h2>Preparing an Upstart Configuration File</h2>
<p>After spending much time reading through the <a href="http://upstart.ubuntu.com/cookbook/">Upstart Cookbook</a> and a brief explanation on how to <a href="http://harmattan-dev.nokia.com/docs/library/html/guide/html/Developer_Library_Developing_for_Harmattan_Creating_daemons.html">develop a daemon</a> for harmattan, all I could vomit was (reads: still need time to actually understand the whole document):</p>
<p><code><br />
author "Choon-Siang Lai <mycyberpet@yahoo.com>"<br />
description "My workaround for enhancement <http://harmattan-bugs.nokia.com/show_bug.cgi?id=55>"<br />
&nbsp;<br />
expect daemon<br />
&nbsp;<br />
exec /usr/bin/aegis-exec -s -u user /opt/restricted-mode-toggler/bin/control.py start<br />
</code></p>
<p>Just a quick note on the execution at startup, it would typically take minutes before the daemon is executed after the GUI is started. Not sure why this is, but don&#8217;t worry if the daemon is not executed right after startup, it takes time. <img src='http://cslai.coolsilon.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Packaging using Qt Creator under OS X</h2>
<p>The reason why OS X is mentioned is because apparently the package building process <a href="https://bugreports.qt-project.org/browse/QTBUG-21908">is bugged</a>. To fix the problem, edit dh_installdeb located at $QtSdkRoot/Madde/madbin according to the comments to the above mentioned bug report.</p>
<p>To make sure Qt Creator is building the package properly, I was told to add a line at the top of the .pro file as I am building a package that consists only python scripts.</p>
<p><code>TEMPLATE = lib</code></p>
<h2>TL;DR The Final Product</h2>
<p>The final product of my daemon can be downloaded <a href="http://coolsilon.com/deb/restricted-mode-toggler_0.0.1_armel.deb">here</a>. Currently it is set to update the setting every 60-65 seconds. A GUI may probably be done if I feel like doing it. <img src='http://cslai.coolsilon.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Please note that I provide no support or whatsoever to the script and hold no responsibility if it kills your phone. I didn&#8217;t have time to add in dependency check in it, in order to run this properly, you need python-gconf, python-pyside and python-qtmobility installed. For instructions on how to enable the developer repository, read this <a href="http://wiki.meego.com/N950_landing_page#Developing">wiki</a> for more information.</p>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=Z0HWCn4MdlU:pK_MUFlbhg4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=Z0HWCn4MdlU:pK_MUFlbhg4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=Z0HWCn4MdlU:pK_MUFlbhg4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=Z0HWCn4MdlU:pK_MUFlbhg4:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=Z0HWCn4MdlU:pK_MUFlbhg4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=Z0HWCn4MdlU:pK_MUFlbhg4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=Z0HWCn4MdlU:pK_MUFlbhg4:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=Z0HWCn4MdlU:pK_MUFlbhg4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/Z0HWCn4MdlU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2012/02/09/packaging-a-daemon-script-for-meego-1-2-harmattan/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2012/02/09/packaging-a-daemon-script-for-meego-1-2-harmattan/</feedburner:origLink></item>
		<item>
		<title>Creating a new daemon script for Meego 1.2 Harmattan</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/xoKreScl3To/</link>
		<comments>http://cslai.coolsilon.com/2012/02/08/creating-a-new-daemon-script-for-meego-1-2-harmattan/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 09:24:13 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[Mobile Development]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=271</guid>
		<description><![CDATA[Call me a cheapskate, as I still have not subscribe to a mobile data plan after purchasing my second smartphone, namely Nokia N9. There&#8217;s this &#8216;allow background connections&#8217; option but it doesn&#8217;t care whether the connected network is a WLAN network or mobile data network. After finding out that Nokia has no interest in creating [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/yf_-nHZ7ALLQBNpAx1jB7PmJ01k/0/da"><img src="http://feedads.g.doubleclick.net/~a/yf_-nHZ7ALLQBNpAx1jB7PmJ01k/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/yf_-nHZ7ALLQBNpAx1jB7PmJ01k/1/da"><img src="http://feedads.g.doubleclick.net/~a/yf_-nHZ7ALLQBNpAx1jB7PmJ01k/1/di" border="0" ismap="true"></img></a></p><p>Call me a cheapskate, as I still have not subscribe to a mobile data plan after purchasing my second smartphone, namely <a href="http://swipe.nokia.com.my/">Nokia N9</a>. There&#8217;s this &#8216;allow background connections&#8217; option but it doesn&#8217;t care whether the connected network is a WLAN network or mobile data network. After finding out that Nokia has no interest in creating another separate option so that each type of network has their respective &#8216;allow background connections&#8217; switch, I decided to make one for my own.</p>
<p><span id="more-271"></span></p>
<p>Turns out it is not too difficult to implement it via Python and PySide, thanks to djszapi, frals, itsabigtruck for their guidance over #harmattan IRC channel <img src='http://cslai.coolsilon.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . Writing the daemon part is easy (but still took me half a day to get it work properly), however I have not figure out how to put everything together in Qt Creator. As I have not done any daemon in the past (I am a web developer, remember?), and Python not being my favorite language, it did took me quite a while to get the daemon part done. I <a href="http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/">followed the example</a> published by <a href="http://www.jejik.com/authors/sander_marechal/">Sander Marechal</a> and have my simple daemon done.</p>
<p>Then I proceeded with the actual script, apparently toggling on and off the settings is not as complicated as it seems. Using python-gconf, the actual code to <a href="http://therning.org/magnus/archives/57">do the work</a> is just:</p>
<p><code class="python"><br />
gconf.client_get_default().set_bool('/system/osso/connectivity/network_type/restricted_mode', True);<br />
</code></p>
<p>So I proceeded with the actual <a href="http://www.pyside.org/docs/pyside-mobility/QtMobility/SystemInfo/QSystemAlignedTimer.html">QSystemAlignedTimer</a> code (I used <a href="http://www.pyside.org/docs/pyside/PySide/QtCore/QTimer.html">QTimer</a> initially to get the idea) as this is the recommended way of creating a daemon <a href="http://harmattan-dev.nokia.com/docs/library/html/guide/html/Developer_Library_Developing_for_Harmattan_Creating_daemons.html">as stated here</a>. It took me quite some time to get everything working, and to my surprise it involves using of <a href="http://jingfenghanmax.blogspot.com/2009/11/thread-in-qt.html">threads</a>. If this is not confusing enough, apparently there&#8217;s a <a href="http://labs.qt.nokia.com/2010/06/17/youre-doing-it-wrong/">right way of working with threads</a>.</p>
<p>However, after pulling a considerable amount of hair, and some help from <a href="http://stackoverflow.com/questions/9183606/pyside-qtimer-needs-qapplication-to-work">Stackoverflow</a>, I managed to vomit out something that works, as follows</p>
<p><code><br />
class Updater(QObject):<br />
    def update_mode(self):<br />
        gconf.client_get_default().set_bool('/system/osso/connectivity/network_type/restricted_mode', self.is_wlan() == False);<br />
&nbsp;<br />
    def is_wlan(self):<br />
        return QSystemNetworkInfo().networkStatus(QSystemNetworkInfo.WlanMode) == QSystemNetworkInfo.Connected;<br />
&nbsp;<br />
    def run(self):<br />
	timer = QSystemAlignedTimer(self);<br />
	timer.timeout.connect(self.update_mode);<br />
	timer.start(300, 330);<br />
&nbsp;<br />
class MyDaemon(Daemon):<br />
    def run(self):<br />
        app = QApplication(sys.argv);<br />
&nbsp;<br />
        thread = QThread();<br />
        thread.start();<br />
&nbsp;<br />
        update = Updater();<br />
        update.moveToThread(thread);<br />
        update.run();<br />
&nbsp;<br />
        app.exec_();<br />
</code></p>
<p>Now, the only question left is, how do I <a href="http://talk.maemo.org/showthread.php?p=1162014">put everything together</a> as a Qt project in Qt Creator so I can deploy this on my N9 properly. I am currently reading <a href="http://upstart.ubuntu.com/cookbook/">this</a> so that I can make my daemon to run at startup.</p>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=xoKreScl3To:h0n0gwIYut8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=xoKreScl3To:h0n0gwIYut8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=xoKreScl3To:h0n0gwIYut8:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=xoKreScl3To:h0n0gwIYut8:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=xoKreScl3To:h0n0gwIYut8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=xoKreScl3To:h0n0gwIYut8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=xoKreScl3To:h0n0gwIYut8:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=xoKreScl3To:h0n0gwIYut8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/xoKreScl3To" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2012/02/08/creating-a-new-daemon-script-for-meego-1-2-harmattan/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2012/02/08/creating-a-new-daemon-script-for-meego-1-2-harmattan/</feedburner:origLink></item>
		<item>
		<title>Sorting Multilingual Data</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/HJ0l-Oyp4Rg/</link>
		<comments>http://cslai.coolsilon.com/2011/09/06/sorting-multilingual-data/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 08:14:37 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=266</guid>
		<description><![CDATA[Been trying my best to stick to the well-known UNIX Philosophy &#8211; &#8220;Do one thing and do it well&#8221;, so I have been breaking down my projects into numerous pieces of small tasks and rely on existing tools whenever possible. One of the existing tool that I use a lot is the GNU sort tool. [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/uFYdTAO1GrjcUAfzgX7nsOwq9Qg/0/da"><img src="http://feedads.g.doubleclick.net/~a/uFYdTAO1GrjcUAfzgX7nsOwq9Qg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/uFYdTAO1GrjcUAfzgX7nsOwq9Qg/1/da"><img src="http://feedads.g.doubleclick.net/~a/uFYdTAO1GrjcUAfzgX7nsOwq9Qg/1/di" border="0" ismap="true"></img></a></p><p>Been trying my best to stick to the well-known <a href="http://en.wikipedia.org/wiki/Unix_philosophy">UNIX Philosophy</a> &#8211; &#8220;Do one thing and do it well&#8221;, so I have been breaking down my projects into numerous pieces of small tasks and rely on existing tools whenever possible. One of the existing tool that I use a lot is the GNU sort tool. Generally sort utility is really doing fine and dandy without having to configure anything, at least not until I realize the problem that leads to this post.</p>
<p><span id="more-266"></span></p>
<p>Considering I am having input in this form</p>
<pre><code>
http://flickr.com/photos/tags/スラム http://flickr.com/photos/13980928@N03/6001200971 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/13980928@N03/6001200971 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/13980928@N03/6001200971 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/21207178@N07/5441742937 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/21207178@N07/5441742937 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/21207178@N07/5441742937 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/25845846@N06/3033371575 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/25845846@N06/3033371575 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/25845846@N06/3033371575 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/30366924@N08/5772100510 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/30366924@N08/5772100510 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/30366924@N08/5772100510 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/31343451@N00/5957189406 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/31343451@N00/5957189406 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/36662563@N00/4815218552 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/36662563@N00/4815218552 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/36662563@N00/4815218552 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/38583880@N00/5686968462 1
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/38583880@N00/5686968462 1
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/46857830@N03/5651576112 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/99996011@N00/5396566822 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/99996011@N00/5396566822 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/99996011@N00/5396566822 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/38583880@N00/5686968462 1
http://flickr.com/photos/tags/スラム http://flickr.com/photos/43335486@N00/5794673203 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/43335486@N00/5794673203 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/43335486@N00/5794673203 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/46857830@N03/5651576112 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/31343451@N00/5957189406 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/46857830@N03/5651576112 0
</code></pre>
<p>I am expecting result in this order</p>
<pre><code>
http://flickr.com/photos/tags/スラム http://flickr.com/photos/13980928@N03/6001200971 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/21207178@N07/5441742937 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/25845846@N06/3033371575 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/30366924@N08/5772100510 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/31343451@N00/5957189406 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/36662563@N00/4815218552 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/38583880@N00/5686968462 1
http://flickr.com/photos/tags/スラム http://flickr.com/photos/43335486@N00/5794673203 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/46857830@N03/5651576112 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/99996011@N00/5396566822 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/13980928@N03/6001200971 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/21207178@N07/5441742937 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/25845846@N06/3033371575 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/30366924@N08/5772100510 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/31343451@N00/5957189406 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/36662563@N00/4815218552 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/38583880@N00/5686968462 1
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/43335486@N00/5794673203 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/46857830@N03/5651576112 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/99996011@N00/5396566822 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/13980928@N03/6001200971 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/21207178@N07/5441742937 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/25845846@N06/3033371575 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/30366924@N08/5772100510 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/31343451@N00/5957189406 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/36662563@N00/4815218552 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/38583880@N00/5686968462 1
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/43335486@N00/5794673203 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/46857830@N03/5651576112 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/99996011@N00/5396566822 0
</code></pre>
<p>but I am getting this instead</p>
<pre><code>
http://flickr.com/photos/tags/スラム http://flickr.com/photos/13980928@N03/6001200971 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/13980928@N03/6001200971 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/13980928@N03/6001200971 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/21207178@N07/5441742937 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/21207178@N07/5441742937 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/21207178@N07/5441742937 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/25845846@N06/3033371575 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/25845846@N06/3033371575 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/25845846@N06/3033371575 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/30366924@N08/5772100510 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/30366924@N08/5772100510 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/30366924@N08/5772100510 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/31343451@N00/5957189406 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/31343451@N00/5957189406 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/31343451@N00/5957189406 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/36662563@N00/4815218552 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/36662563@N00/4815218552 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/36662563@N00/4815218552 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/38583880@N00/5686968462 1
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/38583880@N00/5686968462 1
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/38583880@N00/5686968462 1
http://flickr.com/photos/tags/スラム http://flickr.com/photos/43335486@N00/5794673203 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/43335486@N00/5794673203 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/43335486@N00/5794673203 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/46857830@N03/5651576112 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/46857830@N03/5651576112 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/46857830@N03/5651576112 0
http://flickr.com/photos/tags/スラム http://flickr.com/photos/99996011@N00/5396566822 0
http://flickr.com/photos/tags/ホーム http://flickr.com/photos/99996011@N00/5396566822 0
http://flickr.com/photos/tags/ブラジル http://flickr.com/photos/99996011@N00/5396566822 0
</code></pre>
<p>After a quick search, it turns out that GNU sort actually <a href="http://stackoverflow.com/questions/4389520/unix-command-line-sort-utility-with-unicode-support">rely on LC_COLLATE</a> to do the sorting. I don&#8217;t really care about the character sequence order as long as I get consistent output, therefore the easiest way to fix this problem is obviously changing either LC_COLLATE, LC_ALL or LANG environment variable to &#8220;C&#8221;. However, to ensure the utility works the same elsewhere without interfering other scripts/programs relying on those environment variables, it would be easier to do <a href="http://www.madboa.com/geek/utf8/">this</a> instead</p>
<pre><code>
$ &lt;whatever command that produce output to stdOut&gt; | LC_COLLATE="C" sort
</code></pre>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=HJ0l-Oyp4Rg:3EDbxszcLfc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=HJ0l-Oyp4Rg:3EDbxszcLfc:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=HJ0l-Oyp4Rg:3EDbxszcLfc:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=HJ0l-Oyp4Rg:3EDbxszcLfc:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=HJ0l-Oyp4Rg:3EDbxszcLfc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=HJ0l-Oyp4Rg:3EDbxszcLfc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=HJ0l-Oyp4Rg:3EDbxszcLfc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=HJ0l-Oyp4Rg:3EDbxszcLfc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/HJ0l-Oyp4Rg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2011/09/06/sorting-multilingual-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2011/09/06/sorting-multilingual-data/</feedburner:origLink></item>
		<item>
		<title>Setting Up Virtuoso for Redland Under Ubuntu</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/YZYZYquQqRo/</link>
		<comments>http://cslai.coolsilon.com/2011/08/02/setting-up-virtuoso-for-redland-under-ubuntu/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 07:54:26 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=261</guid>
		<description><![CDATA[Just a quick update to the previous post, the virtuoso storage engine works with redland provided the required packages are properly installed (yes, yes, yes, I know I haven&#8217;t release my PHP OO wrapper for Redland). Now that the package is installed, we need to do some configuration so that Redland can use it. Installing [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/tPRXV1jhwQ79mkjyNR4kAjjZXhA/0/da"><img src="http://feedads.g.doubleclick.net/~a/tPRXV1jhwQ79mkjyNR4kAjjZXhA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/tPRXV1jhwQ79mkjyNR4kAjjZXhA/1/da"><img src="http://feedads.g.doubleclick.net/~a/tPRXV1jhwQ79mkjyNR4kAjjZXhA/1/di" border="0" ismap="true"></img></a></p><p>Just a quick update to the <a href="http://cslai.coolsilon.com/2011/07/27/building-librdf-storage-virtuoso-package/">previous post</a>, the virtuoso storage engine works with <a href="http://librdf.org">redland</a> provided the required packages are properly installed (yes, yes, yes, I know I haven&#8217;t release my PHP OO wrapper for Redland). Now that the package is installed, we need to do some configuration so that Redland can use it.</p>
<p><span id="more-261"></span></p>
<h2>Installing Virtuoso</h2>
<p>Just a quick update to the <a href="http://cslai.coolsilon.com/2011/07/27/building-librdf-storage-virtuoso-package/">previous post</a>, the virtuoso storage engine works with <a href="http://librdf.org">redland</a> provided the required packages are properly installed (yes, yes, yes, I know I haven&#8217;t release my PHP OO wrapper for Redland). Now that the package is installed, we need to do some configuration so that Redland can use it.</p>
<p><!--more--></p>
<h2>Running Virtuoso</h2>
<p>virtuoso-opensource and unixodbc-dev would have to be installed before virtuoso database can be started. After installing the required packages, make a copy of virtuoso.ini from /etc/virtuoso-opensource-6.1/virtuoso.ini to the directory where you want virtuoso to store the database.</p>
<pre><code>
$ mkdir foo
$ cp /etc/virtuoso-opensource-6.1/virtuoso.ini foo
</code></pre>
<p>Edit the ini file as desired, just make sure the configured ports aren&#8217;t being used by other processes (by default, virtuoso runs at port 1111 with web interface at port 8890, so if you are running another instance of it, change the port settings). If you are not interested in running another instance of virtuoso database, you can actually skip this part.</p>
<p>After everything is configured, just run this command at the directory.</p>
<pre><code>
$ cd foo
$ virtuoso-t -fd
</code></pre>
<p>For more information, please refer to this <a href="http://ods.openlinksw.com/wiki/main/Main/VOSUbuntuNotes">quick start guide</a>.</p>
<h2>Setting Up ODBC</h2>
<p>By referring to <a href="https://help.ubuntu.com/community/ODBC">this tutorial</a>, add these lines to /etc/odbc.ini (assuming the database name is SENSEIDB)</p>
<pre><code>
[SENSEIDB]
Driver = /usr/lib/odbc/virtodbc.so
Description = Sensei DB
Address = localhost:11111
</code></pre>
<h2>Making Redland to Work With Virtuoso</h2>
<p>Just make sure the ODBC configuration is done correctly, then follow the <a href="http://librdf.org/docs/api/redland-storage-module-virtuoso.html">guide</a> for <a href="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtRDFDriverRedland">further instructions</a>.</p>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=YZYZYquQqRo:vReToWsgjws:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=YZYZYquQqRo:vReToWsgjws:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=YZYZYquQqRo:vReToWsgjws:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=YZYZYquQqRo:vReToWsgjws:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=YZYZYquQqRo:vReToWsgjws:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=YZYZYquQqRo:vReToWsgjws:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=YZYZYquQqRo:vReToWsgjws:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=YZYZYquQqRo:vReToWsgjws:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/YZYZYquQqRo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2011/08/02/setting-up-virtuoso-for-redland-under-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2011/08/02/setting-up-virtuoso-for-redland-under-ubuntu/</feedburner:origLink></item>
		<item>
		<title>Building librdf-storage-virtuoso Package</title>
		<link>http://feedproxy.google.com/~r/cslai/~3/upwFHyD5PyU/</link>
		<comments>http://cslai.coolsilon.com/2011/07/27/building-librdf-storage-virtuoso-package/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 05:07:19 +0000</pubDate>
		<dc:creator>Jeffrey04</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://cslai.coolsilon.com/?p=253</guid>
		<description><![CDATA[I wanted to try using virtuoso as the storage engine for Redland but unfortunately there is no librdf-storage-virtuoso package for Ubuntu. After getting some help from @dajobe, I attempted to build the packages myself. Although it takes quite some time to build packages, but not too difficult it seems. The version of Redland that I [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/0hXfUANgx6O3UtTd1jAv64ZNuGk/0/da"><img src="http://feedads.g.doubleclick.net/~a/0hXfUANgx6O3UtTd1jAv64ZNuGk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/0hXfUANgx6O3UtTd1jAv64ZNuGk/1/da"><img src="http://feedads.g.doubleclick.net/~a/0hXfUANgx6O3UtTd1jAv64ZNuGk/1/di" border="0" ismap="true"></img></a></p><p>I wanted to try using virtuoso as the storage engine for Redland but unfortunately  there is no librdf-storage-virtuoso package for Ubuntu. After getting some help from <a href="https://twitter.com/#!/dajobe">@dajobe</a>, I attempted to build the packages myself. Although it takes quite some time to build packages, but not too difficult it seems.</p>
<p><span id="more-253"></span></p>
<p>The version of Redland that I am attempting to build is 1.0.13, and unfortunately this means I would have to build librasqal3 too as the version provided by Ubuntu Natty is not up to date. Installing the packages may cause some breakage, so&#8230; YMMV.</p>
<h2>Pre-requisites</h2>
<p>By following the instructions <a href="http://download.librdf.org/">here</a>, add this source repository to /etc/apt/sources.list</p>
<pre><code>
deb-src http://download.librdf.org/binaries/debian/unstable ./
</code></pre>
<p>And then run an apt-get update</p>
<pre><code>$ sudo apt-get update</code></pre>
<h2>Building Rasqal</h2>
<p>To build Rasqal, first grab the source package</p>
<pre><code>$ sudo apt-get source librasqal</code></pre>
<p>Grab the source packages</p>
<pre><code>
$ sudo apt-get source librasqal3
</code></pre>
<p>.. install the dependencies</p>
<pre><code>$ sudo apt-get build-dep librasqal3 librasqal3-dev</code></pre>
<p>Then build them</p>
<pre><code>$ sudo apt-get -b source librasqal3</code></pre>
<p>Then install librasqal3, librasqal3-dev, rasqal-utils</p>
<h2>Build Redland</h2>
<p>First we will need to grab the packages</p>
<pre><code>$ sudo apt-get -b source librdf0</code></pre>
<p>You may get an error saying some packages can&#8217;t be downloaded, in particular the source package. Just download <a href="http://download.librdf.org/source/redland-1.0.13.tar.gz">this</a> into the same directory as the other downloaded tarballs and rename it as redland_1.0.13.orig.tar.gz (Note: as of writing, source packages for 1.0.14 is not out yet, you may want to adjust when package for 1.0.14 is out).</p>
<p>There are some other dependencies besides the listed ones that needs to be installed, to install all of them, issue these commands</p>
<pre><code>
$ sudo apt-get install virtuoso-opensource unixodbc-dev
$ sudo apt-get build-dep librdf0
</code></pre>
<p>Now we can proceed to build Redland</p>
<pre><code>$ sudo apt-get -b source librdf0</code></pre>
<p>To build librdf-storage-virtuoso, Navigate to $REDLAND_SRC/redland-1.0.13/debian and edit a file named &#8216;control&#8217; (without the quotes). Append this to the end of the file.</p>
<pre><code>
Package: librdf-storage-virtuoso
Section: libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Replaces: librdf0 (<< 1.0.9-3)
Description: RDF library, Virtuoso backend
 Redland is a library that provides a high-level interface for RDF
 (Resource Description Framework) implemented in an object-based API.
 It is modular and supports different RDF/XML parsers, storage
 mechanisms and other elements. Redland is designed for applications
 developers to provide RDF support in their applications as well as
 for RDF developers to experiment with the technology.
 .
 This package contains the Virtuoso storage backend.
</code></pre>
<p>Edit a file named 'files' (without the quotes) and append this line</p>
<pre><code>
librdf-storage-virtuoso_1.0.13-2_i386.deb libs optional
</code></pre>
<p>Add a new file named librdf-storage-virtuoso.install with the following content</p>
<pre><code>
debian/tmp/usr/lib/redland/librdf_storage_virtuoso.so
</code></pre>
<p>Add another file named librdf-storage-virtuoso.substvars</p>
<pre><code>
shlibs:Depends=libc6 (>= 2.3.6-6~), libc6 (>= 2.4), libdb4.8, librdf0 (>= 1.0.13), unixodbc (>= 2.2.11)
misc:Depends=
</code></pre>
<p>Not sure what happens, but that was the edited version after building the packages, my original version is shown below (will update once I find out why)</p>
<pre><code>
shlibs:Depends=libc6 (>= 2.3.6-6~), libc6 (>= 2.4), libdb4.8, librdf0 (>= 1.0.13), unixodbc-dev (>= 2.2.14p2-2ubuntu1), virtuoso-opensource (>= 6.1.2+dfsg1-1ubuntu4)
misc:Depends=
</code></pre>
<p><del datetime="2011-07-27T06:21:44+00:00">Lastly, create a new file named librdf-storage-virtuoso.debhelper.log from librdf-storage-mysql.debhelper.log</del> Apparently this file is generated automatically, thanks @dajobe for the <a href="https://twitter.com/#!/dajobe/status/96086263605624833">tip</a> again.</p>
<p>Lastly, navigate back to $REDLAND_SRC and build the packages again</p>
<pre><code>
# apt-get -b source librdf0
</code></pre>
<h2>Building Redland-bindings</h2>
<p>Same thing again, first grab the source packages</p>
<pre><code>
$ sudo apt-get source redland-bindings
</code></pre>
<p>Since I am just interested in the php5-librdf package, I issue this to fetch the dependencies</p>
<pre><code>
$ sudo apt-get build-dep php5-librdf
</code></pre>
<p>Proceed with building</p>
<pre><code>$ sudo apt-get -b source php5-librdf</code></pre>
<p>Everything looks fine as of now, but I am seeing some random conflicts. Will try to work with the virtuoso storage engine and post a follow up later today.</p>
<div style='clear:both'></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/cslai?a=upwFHyD5PyU:JNLfU8HWXuM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/cslai?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=upwFHyD5PyU:JNLfU8HWXuM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/cslai?i=upwFHyD5PyU:JNLfU8HWXuM:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=upwFHyD5PyU:JNLfU8HWXuM:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/cslai?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=upwFHyD5PyU:JNLfU8HWXuM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/cslai?i=upwFHyD5PyU:JNLfU8HWXuM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=upwFHyD5PyU:JNLfU8HWXuM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/cslai?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/cslai?a=upwFHyD5PyU:JNLfU8HWXuM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/cslai?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/cslai/~4/upwFHyD5PyU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://cslai.coolsilon.com/2011/07/27/building-librdf-storage-virtuoso-package/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://cslai.coolsilon.com/2011/07/27/building-librdf-storage-virtuoso-package/</feedburner:origLink></item>
	</channel>
</rss>

