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

<channel>
	<title>Kamibu &#187; Uncategorized</title>
	<atom:link href="http://blog.kamibu.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.kamibu.com</link>
	<description></description>
	<lastBuildDate>Sat, 14 Nov 2009 10:51:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Gentoo Portage: libxcb and broken libraries</title>
		<link>http://blog.kamibu.com/2009/11/14/gentoo-portage-libxcb-and-broken-libraries/</link>
		<comments>http://blog.kamibu.com/2009/11/14/gentoo-portage-libxcb-and-broken-libraries/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 10:46:01 +0000</pubDate>
		<dc:creator>abresas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.kamibu.com/?p=103</guid>
		<description><![CDATA[When using the Gentoο distribution, updating all your installed packages should be as easy as: # emerge -avDuN world But, when I tried it yesterday, It wouldn&#8217;t work: It could not emerge media-libs/xine-lib. I tried running revdep-rebuild to find any broken libraries and it found a lot of them, all missing files from libxcb. I [...]]]></description>
			<content:encoded><![CDATA[<p>When using the Gentoο distribution, updating all your installed packages should be as easy as:<br />
# emerge -avDuN world</p>
<p>But, when I tried it yesterday, It wouldn&#8217;t work: It could not emerge media-libs/xine-lib.</p>
<p>I tried running revdep-rebuild to find any broken libraries and it found a lot of them, all missing files from libxcb. I tried to emerge it, but I realized it was part of the packages &#8220;emerge world&#8221; had already emerged.</p>
<p>After doing some googling, I found <a href="http://www.gentoo.org/proj/en/desktop/x/x11/libxcb-1.4-upgrade-guide.xml">Gentoo libxcb 1.4 Upgrade Guide</a>. It says you have to manually run a bash script, then revdep-rebuild and finally remove an outdated shared library file.</p>
<p>So, be careful when you upgrade libxcb, world or any package that depends on libxcb (I think the new Xorg >= 1.6 is one of them).</p>
<p>However, when things like this happen, I always wonder: Why do I have to read upgrade guides and run things manually? Isn&#8217;t emerge supposed to do this for me? I&#8217;m sure there is some kind of explanation, but isn&#8217;t there some way to get around this? Maybe an option on emerge?</p>
<p>Even the annoying &#8220;eselect news&#8221; doesn&#8217;t inform you about this important guide. Instead, it keeps popping up every time it finds an article that you will surely not be interested to read (an exception was the new article about KDE 3.5 and the sunset overlay).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kamibu.com/2009/11/14/gentoo-portage-libxcb-and-broken-libraries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bring functional programming to IEEExtreme!</title>
		<link>http://blog.kamibu.com/2009/09/01/bring-functional-programming-to-ieeextreme/</link>
		<comments>http://blog.kamibu.com/2009/09/01/bring-functional-programming-to-ieeextreme/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 10:29:08 +0000</pubDate>
		<dc:creator>abresas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.kamibu.com/?p=84</guid>
		<description><![CDATA[IEEExtreme 2009 competition registration opens today, 1st of September. This competition seems very interesting, and some kamibu members are thinking about participating! Languages supported are: Microsoft Visual C++/C#, C/C++, C# and some &#8220;surprises&#8221;. I would really like to see some functional programming language getting on to that list, like Common Lisp, Haskell or my favourite: [...]]]></description>
			<content:encoded><![CDATA[<p>IEEExtreme 2009 competition registration <a href="http://www.ieee.org/web/membership/students/xtreme/logistics.html">opens today</a>, 1st of September.</p>
<p>This competition seems very interesting, and some kamibu members are thinking about participating!</p>
<blockquote><p>Languages supported are: Microsoft Visual C++/C#, C/C++, C# and some &#8220;surprises&#8221;.</p></blockquote>
<p>I would really like to see some functional programming language getting on to that list, like Common Lisp, Haskell or my favourite: Scheme!</p>
<p>Functional programming may be very handy some times, and a lot of fun!</p>
<p>For example, I tried solving last year&#8217;s &#8220;Merging IP&#8217;s&#8221; problem (see <a href="http://www.ieee.org/portal/cms_docs_iportals/iportals/membership/students/scholarshipsawardscontests/IEEEXtreme2008_Competition_Booklet.pdf">IEEEXtreme 2008 Competition booklet</a>, pdf) using Scheme.</p>
<p>The goal is to merge a list of IP intervals (e.g. 192.168.1.1 &#8211; 192.168.1.60), so that you only keep a list of the minimum required intervals.</p>
<p>Example Input:<br />
3.0.0.0 &#8211; 3.100.0.0<br />
3.99.0.0 &#8211; 3.255.0.0<br />
10.1.0.0 &#8211; 10.200.0.0<br />
10.2.0.1 &#8211; 10.5.99.99<br />
10.200.0.1 &#8211; 10.225.225.0</p>
<p>Example Output:<br />
3.0.0.0 &#8211; 3.255.0.0<br />
10.1.0.0 &#8211; 10.225.225.0</p>
<p>Let&#8217;s build the main loop for the program (without input and output functions).</p>
<p>Suppose we have 2 functions ready: (should-merge int1  int2) that is true only if intervals int1 and int2 should be merged (one of them starts in the middle of the other and ends after it), and (precedes int1 int2) only if both addresses of interval1 &#8220;precede&#8221; interval2 (e.g. 5.0.0.0 &#8211; 6.0.0.0 precedes 6.0.0.5-7.0.0.0).</p>
<p>Now, we can write a function (merge-intervals intervals merged) that will recursively merge all intervals. Intervals parameter should be a list of intervals that have to be merged, sorted by their first address.<br />
Merged should be a list of intervals that are always totally merged. In the beginning it should be an empty list, and in the end the solution of the problem.</p>
<p><pre class="php"><span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/define"><span style="color: #000066;">define</span></a> <span style="color: #66cc66;">&#40;</span>merge-intervals intervals merged<span style="color: #66cc66;">&#41;</span>
  ; important! intervals must be sorted
  <span style="color: #66cc66;">&#40;</span>cond <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">null</span>? intervals<span style="color: #66cc66;">&#41;</span> merged<span style="color: #66cc66;">&#41;</span> ; all intervals are merged. <span style="color: #b1b100;">return</span> merged <a href="http://www.php.net/list"><span style="color: #000066;">list</span></a>
          <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">null</span>? merged<span style="color: #66cc66;">&#41;</span>
            ; just started, merged is <a href="http://www.php.net/empty"><span style="color: #000066;">empty</span></a>
            ; remove first of intervals and add it to the merged <a href="http://www.php.net/list"><span style="color: #000066;">list</span></a>
            merge-intervals <span style="color: #66cc66;">&#40;</span>cdr intervals<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/list"><span style="color: #000066;">list</span></a> <span style="color: #66cc66;">&#40;</span>car intervals<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
          <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>should-merge <span style="color: #66cc66;">&#40;</span>car intervals<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>car merged<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> 
            ; the two intervals should be merged
            <span style="color: #66cc66;">&#40;</span>merge-intervals <span style="color: #66cc66;">&#40;</span>cdr intervals<span style="color: #66cc66;">&#41;</span> 
              <span style="color: #66cc66;">&#40;</span>cons 
                <span style="color: #66cc66;">&#40;</span>merge <span style="color: #66cc66;">&#40;</span>car intervals<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>car merged<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> 
                <span style="color: #66cc66;">&#40;</span>cdr merged<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
          <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>precedes <span style="color: #66cc66;">&#40;</span>car merged<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>car intervals<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
            ; add the first of intervals to the top of merged
            <span style="color: #66cc66;">&#40;</span>merge-intervals <span style="color: #66cc66;">&#40;</span>cdr intervals<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>cons <span style="color: #66cc66;">&#40;</span>car intervals<span style="color: #66cc66;">&#41;</span> merged<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
          <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">else</span>
            ; the first of intervals starts after the last merged
            ; and ends before the last merged ends
            ; ignore it
            <span style="color: #66cc66;">&#40;</span>merge-intervals <span style="color: #66cc66;">&#40;</span>cdr intervals<span style="color: #66cc66;">&#41;</span> merged<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
; We also used the merge <span style="color: #000000; font-weight: bold;">function</span>, that has a pretty straightforward definition
; returns an interval that starts at the start of int1 and ends at the <a href="http://www.php.net/end"><span style="color: #000066;">end</span></a> of int2
<span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/define"><span style="color: #000066;">define</span></a> <span style="color: #66cc66;">&#40;</span>merge int1 int2<span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#40;</span>interval-create
    <span style="color: #66cc66;">&#40;</span>interval-start int1<span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#40;</span>interval-<a href="http://www.php.net/end"><span style="color: #000066;">end</span></a> int2<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></pre></p>
<p>Of course, there are no built-in functions to handle intervals in Scheme, you have to write them (interval-create etc) on your own.  A pair is perfect for representing an interval.</p>
<p>Notice that an iterative implementation would not (or at least it shouldn&#8217;t) be faster than the recursive impementation used here, as Scheme implements <a href="http://en.wikipedia.org/wiki/Tail_recursion">tail-recursion</a>.</p>
<p>For those not familiar with Scheme or Lisp,<br />
(car l) can be interpreted as returning the first item of list l<br />
(cdr l) as returning all the items but the first of list l, and<br />
(cons item l) as pushing item to the beginning of the list l,<br />
although that&#8217;s not exactly what they do.</p>
<p>Implementing should-merge and precedes function is a piece of cake if you represent the IP addresses as an integer (like ip2long of <a href="http://php.net/ip2long">PHP</a> or <a href="http://code.google.com/p/python-iptools/">python iptools</a>).</p>
<p>Bring Scheme to IEEExtreme 2009!<br />
Bring functional programming to IEEExtreme 2009!</p>
<p>P.S.: Thanks to <a href="http://ted.zino.gr">Ted</a> for pointing out IEEExtreme to the team <img src='http://blog.kamibu.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kamibu.com/2009/09/01/bring-functional-programming-to-ieeextreme/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Frontend optimizations</title>
		<link>http://blog.kamibu.com/2008/06/15/frontend-optimizations/</link>
		<comments>http://blog.kamibu.com/2008/06/15/frontend-optimizations/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 20:35:22 +0000</pubDate>
		<dc:creator>Izual</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Excalibur]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.kamibu.com/?p=39</guid>
		<description><![CDATA[In Excalibur Phoenix one aspect we are giving major attention to is frontend. In contrast to Excalibur Reloaded (the previous version) we try not only to provide a user-friendly interface but we also want it to be as fast as possible for the client. The latter is mostly a need that came up as more [...]]]></description>
			<content:encoded><![CDATA[<p>In Excalibur Phoenix one aspect we are giving major attention to is frontend.</p>
<p>In contrast to Excalibur Reloaded (the previous version) we try not only to provide a user-friendly interface but we also want it to be as fast as possible for the client. The latter is mostly a need that came up as more and more users started using Zino. Furthermore,  through the process of optimization we learn new techniques we weren&#8217;t keen with, that extend by far our knowledge especially on the way the browsers render a page and the lower level mechanisms that play a major part when there is a greater need for speed (the term is stolen from Google Blog <img src='http://blog.kamibu.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  ). So I want to write a few lines for some optimizations we started implementing in the new version.</p>
<p>1) Lessen HTTP requests</p>
<p>One of the most important aspects is to lessen the HTTP requests that are needed for a page to show properly. Till now, our pages had icons, images, many stylesheets and scripts. Each of those needed a separate HTTP request in order to download since all these files were separated. For example, we used to have the stylesheet for the user profile on a different file from the one for the frontpage.  What we do now, is combine all the scripts in one file, all the stylsheets in another and so we use just two separate files for all our styling and javascript. Another thing we did is known with the term &#8220;spriting&#8221;. We combined all of our background images into one bigger image file. Everytime we need to show an icon, we use this image we created as a source and through the background-position we specify exactly which icon we want to be visible. Those are the most common and effective ways we are currently using in Phoenix</p>
<p>2) Cache content</p>
<p>Another way of reducing HTTP requests and the weight of downloading for the client is to use caching. More specifically caching with far-future headers set. To make things a bit clearer if the browser has cached some of the needed components he has to check whether those are valid according to the Last-Modified header in the response. If the component hasn&#8217;t been modified there is no need to download it, so the size of the download decreases.  Though a request has been made, that could have been avoided if we used an Expires header. When we set an expires header, we are actually telling the browser to use the components in its cache till a specified date.  Until this expiry date the browser uses its cached content without the need to ask for modification of the content. This is more useful with static data such as javascript, stylesheets and icons.</p>
<p>3) Minification</p>
<p>In projects where great amount of javascript is in use, minifying the code makes a lot sense. With the term minification we mean the elimination of spaces, line breaks and comments from the original code. In other words all unnecessary stuff is removed in order to lessen the size of the data the client will download. This technique can also be used for stylesheets but is not so effective. Stylesheets optimization is a bit more complex, as you can get the most of it if you find duplicate rules for elements and remove them. Some developers go a step further with obfuscation but I believe it&#8217;s not worth. In obfuscation variable and function names are changed automatically to shorter ones, in order to reduce even more the size. Another reason for using obfuscation is to make the code unreadable to others. Implementing this technique is not as simple as minification and using it should be examined carefully as bugs are likely to appear because of core function name substitution.</p>
<p>4) Gzipping content</p>
<p>One last technique worth mentioning is to use gzip compression. The use of this technique is pretty obvious. Compression reduces download sizes leading to faster downstreaming times for the client. Gzipping is supported by almost all modern browsers so it doesn&#8217;t need further browser compatibility thoughts. This technique is more effective when combined with the others described. Minification combined with gzip compression decreases significantly the size of the content. To use it though the web server should be configured properly.</p>
<p>Last but not least few simple things to look after are: avoiding duplicate script inclusion, loading stylesheets at the beginning of the document, scripts at the bottom and sometimes clever content preloading that will be needed later on, while the user is interacting with other parts of the page.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kamibu.com/2008/06/15/frontend-optimizations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zino Phoenix mockups</title>
		<link>http://blog.kamibu.com/2008/04/10/zino-phoenix-mockups/</link>
		<comments>http://blog.kamibu.com/2008/04/10/zino-phoenix-mockups/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 15:45:27 +0000</pubDate>
		<dc:creator>Izual</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.kamibu.com/2008/04/10/zino-phoenix-mockups/</guid>
		<description><![CDATA[A sneak preview of the new Zino version!]]></description>
			<content:encoded><![CDATA[<p>A sneak preview of the new Zino version!</p>
<p><a href="http://blog.kamibu.com/wp-content/uploads/2008/04/profile.jpg" title="Userprofile"><img src="http://blog.kamibu.com/wp-content/uploads/2008/04/profile.thumbnail.jpg" alt="Userprofile" /></a></p>
<p><a href="http://blog.kamibu.com/wp-content/uploads/2008/04/frontpage.jpg" title="Frontpage"><img src="http://blog.kamibu.com/wp-content/uploads/2008/04/frontpage.thumbnail.jpg" alt="Frontpage" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kamibu.com/2008/04/10/zino-phoenix-mockups/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Kamiblog :-)</title>
		<link>http://blog.kamibu.com/2007/05/27/kamiblog/</link>
		<comments>http://blog.kamibu.com/2007/05/27/kamiblog/#comments</comments>
		<pubDate>Sun, 27 May 2007 16:01:15 +0000</pubDate>
		<dc:creator>abresas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.kamibu.com/?p=3</guid>
		<description><![CDATA[Hey welcome to kamibu blog! My name is Aleksis or &#8220;abresas&#8221;, and I&#8217;m honored to write the first post. Other members of the team: Dionyziz &#8211; The big boss, Izual &#8211; &#8220;Internet Explorer, I&#8217;m watching you&#8221;, Kostis90gr &#8211; &#8220;I will goto..&#8221; and Dimitris &#8211; aka Gatoni. I am pretty excited about kamibu, and the things [...]]]></description>
			<content:encoded><![CDATA[<p>Hey welcome to kamibu blog! <img src='http://blog.kamibu.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>My name is Aleksis or &#8220;abresas&#8221;, and I&#8217;m honored to write the first post.  Other members of the team:</p>
<p><strong>Dionyziz</strong> &#8211; The big boss,</p>
<p><strong>Izual</strong> &#8211; &#8220;Internet Explorer, I&#8217;m watching you&#8221;,</p>
<p><strong>Kostis90gr</strong> &#8211; &#8220;I will goto..&#8221; and</p>
<p><strong>Dimitris</strong> &#8211; aka Gatoni.</p>
<p>I am pretty excited about kamibu, and the things we are doing, but most of all excited about being member of such a team.</p>
<p>I&#8217;m sure everyone else is excited too!</p>
<p>Edit: Now we have 2 new members:</p>
<p><strong>Makis</strong> &#8211; Doctor M.<br />
and<br />
<strong>Rhapsody</strong> &#8211; (bow), chinese not japanease </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kamibu.com/2007/05/27/kamiblog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
