<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>CoderMan</title>
    <link rel="alternate" type="text/html" href="http://www.indicium.us/site_blog/" />
    <link rel="self" type="application/atom+xml" href="http://www.indicium.us/site_blog/atom.xml" />
    <id>tag:www.indicium.us,2008-11-22:/site_blog//1</id>
    <updated>2010-06-11T04:55:18Z</updated>
    <subtitle>Programming + Linux + Whatever</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.21-en</generator>

<entry>
    <title>Emacs: Inserting Ruby &quot;Code Blocks&quot;</title>
    <link rel="alternate" type="text/html" href="http://www.indicium.us/site_blog/2010/06/emacs-inserting-ruby-code-blocks.html" />
    <id>tag:www.indicium.us,2010:/site_blog//1.143</id>

    <published>2010-06-11T04:52:19Z</published>
    <updated>2010-06-11T04:55:18Z</updated>

    <summary>1. Highlight the material you wanted commented out.2. M-;Repeat above on the same code to uncomment it all....</summary>
    <author>
        <name>Christopher Howard</name>
        
    </author>
    
    <category term="emacs" label="Emacs" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ruby" label="Ruby" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.indicium.us/site_blog/">
        <![CDATA[1. Highlight the material you wanted commented out.<br />2. M-;<br /><br />Repeat above on the same code to uncomment it all.<br /> ]]>
        
    </content>
</entry>

<entry>
    <title>Quick Bandwidth Limiting in Linux with Trickle and Wget</title>
    <link rel="alternate" type="text/html" href="http://www.indicium.us/site_blog/2010/04/quick-bandwidth-limiting-in-linux-with-trickle-and-wget.html" />
    <id>tag:www.indicium.us,2010:/site_blog//1.142</id>

    <published>2010-04-20T19:43:30Z</published>
    <updated>2010-04-20T19:44:03Z</updated>

    <summary>http://indicium.us/cgi-bin/pages/get?view=trickle-wget-bandwidth-limiting...</summary>
    <author>
        <name>Christopher Howard</name>
        
    </author>
    
    
    <content type="html" xml:lang="en-US" xml:base="http://www.indicium.us/site_blog/">
        <![CDATA[<a href="http://indicium.us/cgi-bin/pages/get?view=trickle-wget-bandwidth-limiting">http://indicium.us/cgi-bin/pages/get?view=trickle-wget-bandwidth-limiting</a> ]]>
        
    </content>
</entry>

<entry>
    <title>What the Heck?</title>
    <link rel="alternate" type="text/html" href="http://www.indicium.us/site_blog/2010/04/what-the-heck.html" />
    <id>tag:www.indicium.us,2010:/site_blog//1.141</id>

    <published>2010-04-12T08:57:01Z</published>
    <updated>2010-04-12T09:04:08Z</updated>

    <summary></summary>
    <author>
        <name>Christopher Howard</name>
        
    </author>
    
    <category term="humor" label="humor" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.indicium.us/site_blog/">
        <![CDATA[<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/zCRUPWDIgYM&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/zCRUPWDIgYM&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>]]>
        
    </content>
</entry>

<entry>
    <title>gcc/g++: Mixed static and dynamic linking</title>
    <link rel="alternate" type="text/html" href="http://www.indicium.us/site_blog/2010/03/gccg-mixed-static-and-dynamic-linking.html" />
    <id>tag:www.indicium.us,2010:/site_blog//1.140</id>

    <published>2010-03-15T10:36:02Z</published>
    <updated>2010-03-15T18:34:25Z</updated>

    <summary> pre { color: green; } I couldn&apos;t find any good guide on how to do mixed static and dynamic linking with gcc or g++, so I just figured it out by trial and error. This is what I came...</summary>
    <author>
        <name>Christopher Howard</name>
        
    </author>
    
    <category term="c" label="C" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="c" label="C++" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="commandline" label="command-line" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="gcc" label="gcc" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.indicium.us/site_blog/">
        <![CDATA[<style>
pre {
color: green;
}
</style>
I couldn't find any good guide on how to do mixed static and dynamic linking with gcc or g++, so I just figured it out by trial and error. This is what I came up with. I hope it is technically accurate.<br /><br />First of all, you need to decide what libraries you want statically linked (leaving, of course, the rest to be dynamically linked). You have to decide on your own strategy, but generic libraries, like your game engine, or your regular expression handler, are likely candidates. But you'll probably want to use dynamic linking for <i>implementation specific</i> functionality. For example, you don't want to statically link opengl libraries, because there will be a different implementation of that interface on each computer depending on what graphics card drivers have been installed.<br /><br />Then, you will need to get the code archives for the libraries you want to statically link. These are *.a files, such as <i>libclanCore.a</i>. You get these when you compile the library from source, usually by specifying&nbsp; <i>--enable-static</i> on the <i>configure</i> command line. When compiling these libraries, you'll generally want to be using the most generic compiling options you ca (-O2 optimization is usually fine) since the code may be run on a very wide variety of processors. Copy the *.a files you need into your source code directory.<br /><br />Next, compile local source code files into object code. E.g.:<br /><br /><pre>$ g++ -O2 -c *.cpp</pre>Now, you need to do the linking. This part can be a bit tricky, and it will all be done in one command. For comparison, I'll first show you how I would normally link my code, using only dynamic linking:<br /><br /><pre>$ g++ -O2&nbsp;&nbsp; -o lusus_stack data.o lusus_stack.o     \<br />lusus_stack_funcs.o lusus_fallingleaf.o             \<br />lusus_explodinglogo.o lusus_stacktitle.o            \<br />lusus_wstackgraphic.o&nbsp; -lXxf86vm -lclanApp          \<br />-lclanCore -lclanDisplay -lclanSound -lclanVorbis   \<br />-lfontconfig -lfreetype -lclanGDI</pre><br />This produces an executable called lusus_stack. But I want to statically compile in all the clanlib game engine files. So I copy the libclan*.a files I needed into my source directory, and use this command:<br /><br /><pre>$ g++ data.o lusus_stack.o lusus_stack_funcs.o      \<br />lusus_fallingleaf.o lusus_explodinglogo.o           \<br />lusus_stacktitle.o lusus_wstackgraphic.o -o statapp \<br />libclanVorbis.a -lvorbis libclanSound.a -lasound    \<br />libclanGDI.a libclanDisplay.a -lpng12 -ljpeg        \<br />libclanApp.a libclanCore.a -lXxf86vm -lfontconfig   \<br />-lpthread</pre>You'll notice four elements here:<br /><ul><li>My local object code (*.o files)</li><li>Imported code archives (*.a files)</li><li>dynamically linked libraries (normal -l syntax)</li><li>the file name to be given to the executable (-o)<br /></li></ul>I did not use the -static option, because -static prevents any dynamic linking from being used.<br /><br />You will also see that I had to specify more libraries this time to be dynamically linked. These are the dependencies of the statically linked archives. You have to specify these manually now, because the system won't be able to dynamically figure them out later (from the shared object files).<br /><br />How do you figure out what the dependencies are? One way is to use the <i>ldd</i> tool on the <i>shared object</i> (.so) version of the library, like so: <br /><br /><pre>$ ldd /usr/local/lib/libclanDisplay.so <br />&nbsp;&nbsp;&nbsp; linux-vdso.so.1 =&gt;&nbsp; (0x00007fff7bbff000)<br />&nbsp;&nbsp;&nbsp; libpng12.so.0 =&gt; /usr/lib/libpng12.so.0 (0x00007fd1174b5000)<br />&nbsp;&nbsp;&nbsp; libjpeg.so.7 =&gt; /usr/lib/libjpeg.so.7 (0x00007fd117277000)<br />&nbsp;&nbsp;&nbsp; libz.so.1 =&gt; /lib/libz.so.1 (0x00007fd117061000)<br />&nbsp;&nbsp;&nbsp; libstdc++.so.6 =&gt; /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/libstdc++.so.6 (0x00007fd116d5e000)<br />&nbsp;&nbsp;&nbsp; libm.so.6 =&gt; /lib/libm.so.6 (0x00007fd116ada000)<br />&nbsp;&nbsp;&nbsp; libc.so.6 =&gt; /lib/libc.so.6 (0x00007fd116785000)<br />&nbsp;&nbsp;&nbsp; /lib64/ld-linux-x86-64.so.2 (0x00007fd117a5d000)<br />&nbsp;&nbsp;&nbsp; libgcc_s.so.1 =&gt; /lib/libgcc_s.so.1 (0x00007fd11656f000)</pre><br />Some of these libraries you won't need to specify, like libc, because they are automatically included by gcc/g++, or because they are dynamically loaded by some other library to which you are dynamically linking. But you can see here some obvious ones like libpng and libjpeg.<br /><br />Now, <b>important note</b>: It <i>does</i> matter in which order you place the files on the command-line when you go to do the linking! The reason for this: when gcc/g++ looks to resolve undefined references to functions, it will only resolve those references for files that have already been processed.<br /><br />What that means: if FILE A depends on functions from FILE B, put FILE A <i>before</i> FILE B on the command-line.<br /><br />How will you know if you failed to link in a library needed by one of your static libraries? Simple: gcc/g++ will spit out about 300 pages worth of complaints, looking something like this:<br /><br /><pre>libclanDisplay.a(jpeg_provider.o): In function `CL_JPEGProvider::save(CL_PixelBuffer, CL_StringContainer&lt;char, CL_StringReference&lt;char, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; const&amp;, CL_VirtualDirectory&amp;, int)':<br />/scratch/choward/ClanLib-2.0.4/Sources/Display/ImageProviders/jpeg_provider.cpp:114: undefined reference to `jpeg_std_error'<br />/scratch/choward/ClanLib-2.0.4/Sources/Display/ImageProviders/jpeg_provider.cpp:116: undefined reference to `jpeg_CreateCompress'<br />/scratch/choward/ClanLib-2.0.4/Sources/Display/ImageProviders/jpeg_provider.cpp:137: undefined reference to `jpeg_stdio_dest'<br />/scratch/choward/ClanLib-2.0.4/Sources/Display/ImageProviders/jpeg_provider.cpp:152: undefined reference to `jpeg_set_defaults'<br />/scratch/choward/ClanLib-2.0.4/Sources/Display/ImageProviders/jpeg_provider.cpp:156: undefined reference to `jpeg_set_quality'<br />...</pre><br />You can figure out what library is missing its dependencies from the first line here: libclanDisplay. And you have to guess which library you need from the complaints about what functions are missing. It's pretty obvious here that we need libjpeg.<br /><br />Anyway, that's all folks. If I have posted anything inaccurate or incomplete, let me know in the comments.<br /><br />[Shameless plug: Be sure to checkout out my programming web site at <a href="http://linuxprogrammingforums.com/" target="_blank">linuxprogrammingforums.com</a>!] <br /> ]]>
        
    </content>
</entry>

<entry>
    <title>New Website: Linux Programming Forums</title>
    <link rel="alternate" type="text/html" href="http://www.indicium.us/site_blog/2010/03/new-website-linux-programming-forums.html" />
    <id>tag:www.indicium.us,2010:/site_blog//1.139</id>

    <published>2010-03-10T08:00:24Z</published>
    <updated>2010-03-10T08:05:05Z</updated>

    <summary>I have started a new web site:linuxprogrammingforums.comThe web site provides online forum resource for a wide variety of languages and programming topics. The layout and organization of the forums is geared toward the needs and mindset of programmers with a...</summary>
    <author>
        <name>Christopher Howard</name>
        
    </author>
    
    <category term="c" label="C" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="c" label="C++" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="java" label="Java" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="linux" label="Linux" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="linuxprogrammingforums" label="linuxprogrammingforums" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="perl" label="Perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.indicium.us/site_blog/">
        <![CDATA[I have started a new web site:<br /><br /><a href="http://linuxprogrammingforums.com/">linuxprogrammingforums.com</a><br /><br />The web site provides online forum resource for a wide variety of languages and programming topics. The layout and organization of the forums is geared toward the needs and mindset of programmers with a Linux background.<br /><br />The board motto is<br /><br />"May the source be with you."<br />]]>
        
    </content>
</entry>

<entry>
    <title>Java BufferedImage: Beware of getSubimage!</title>
    <link rel="alternate" type="text/html" href="http://www.indicium.us/site_blog/2010/03/java-bufferedimage-beware-of-getsubimage.html" />
    <id>tag:www.indicium.us,2010:/site_blog//1.138</id>

    <published>2010-03-03T09:12:51Z</published>
    <updated>2010-03-03T09:26:31Z</updated>

    <summary> pre { color: green; } Wow, I just spent way too long trying to figure out a bug in some of my gaming code. Nothing made sense no matter how many times I looked at the problem and how...</summary>
    <author>
        <name>Christopher Howard</name>
        
    </author>
    
    <category term="java" label="Java" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.indicium.us/site_blog/">
        <![CDATA[<style>
pre { color: green; }
</style>
Wow, I just spent <i>way</i> too long trying to figure out a bug in some of my gaming code. Nothing made sense no matter how many times I looked at the problem and how many angles I considered. The weirdest things were happening in my graphical output, and I was getting very frustrated.<br /><br />I got desperate and decided to look over the APIs of all the graphical functions I was using. Then I looked at the BufferedImage.getSubimage function API and it was painfully obvious:<br /><br /><pre>getSubimage<br /><br />public BufferedImage getSubimage(int x,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int y,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int w,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int h)<br /><br />&nbsp;&nbsp;&nbsp; Returns a subimage defined by a specified rectangular region. The returned BufferedImage shares the same data array as the original image.<br /><br />&nbsp;&nbsp;&nbsp; Parameters:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; w - the width of the specified rectangular region<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; h - the height of the specified rectangular region <br />&nbsp;&nbsp;&nbsp; Returns:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a BufferedImage that is the subimage of this BufferedImage. <br />&nbsp;&nbsp;&nbsp; Throws:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RasterFormatException - if the specified area is not contained within this BufferedImage.</pre><br />I had assumed that getSubimage would return a <i>new</i> BufferImage array, but it actually is really just a map to part of the original BufferImage array. Consequently, whenever I was painting in the new BufferImage object, I was actually painting all over my original BufferImage!<br /><br />Well, that was a lesson learned the <i>really</i> hard way.<br />]]>
        
    </content>
</entry>

<entry>
    <title>Java: Making Ambiguous References Unambiguous</title>
    <link rel="alternate" type="text/html" href="http://www.indicium.us/site_blog/2010/02/java-making-ambiguous-references-unambiguous.html" />
    <id>tag:www.indicium.us,2010:/site_blog//1.137</id>

    <published>2010-02-12T05:44:52Z</published>
    <updated>2010-02-12T06:35:35Z</updated>

    <summary><![CDATA[ pre { color:green } // *** Key.java ***interface Key {}// *** Card.java ***interface Card {}// *** KeyCard.java ***public class KeyCard implements Key, Card {}// *** Door.java ***public class Door{&nbsp;&nbsp;&nbsp; public void openWith(Key key) { System.out.println("Opened door with key"); }&nbsp;&nbsp;&nbsp;...]]></summary>
    <author>
        <name>Christopher Howard</name>
        
    </author>
    
    <category term="java" label="Java" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.indicium.us/site_blog/">
        <![CDATA[<style>
pre { color:green }
</style>

<pre>// *** Key.java ***<br />interface Key {}<br /><br />// *** Card.java ***<br />interface Card {}<br /><br />// *** KeyCard.java ***<br />public class KeyCard implements Key, Card {}<br /><br />// *** Door.java ***<br />public class Door<br />{<br />&nbsp;&nbsp;&nbsp; public void openWith(Key key) { System.out.println("Opened door with key"); }<br />&nbsp;&nbsp;&nbsp; public void openWith(Card card) { System.out.println("Opened door with card"); }<br />}<br /><br />// *** Scenario.java ***<br />public class Scenario<br />{<br />&nbsp;&nbsp;&nbsp; public static void main(String[] args)<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; KeyCard keycard = new KeyCard();<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Door door = new Door();<br />       door.openWith(keycard);<br />&nbsp;&nbsp;&nbsp; }<br />}<br /> <br /></pre>What's wrong with this Java code? It won't compile:<br /><br /><pre>$ javac Scenario.java<br />Scenario.java:15: reference to openWith is ambiguous, both method openWith(Key) in Door and method openWith(Card) in Door match<br />	door.openWith(keycard);<br />	    ^<br />1 error</pre><br />There are two functions called openWith, which is fine, because Java supports overloaded functions. And we are passing an object to a function on the basis of which interface it implements, which is fine, because Java supports polymorphism. We have also implemented more than one interface in the <i>door</i> class, which <i>normally</i> is fine, because Java allows you to implement more than one interface per class, as a replacement for multiple inheritance.<br /><br />The problem, though, is that in this case we have an overloaded function, openWith, capable of taking an object that implements either the key interface or the card interface, but we passed it an object that implements both the key interface and the card interface, and the compiler does not know what you want it to be passed in as. So it is an ambiguous function call.<br /><br />I ran into this error in some code at work today. (Real code, not the silliness above.) I wasn't quite sure what to do. One option was to change the names of the functions in the <i>Door</i> class, to something like openWithKey(Key key) and openWithCard(Card card). But that would be effectively abandoning function overloading, which is a really convenient and tidy feature in any language.<br /><br />Another option would be change the <i>KeyCard</i> class to support only one interface or the other. But I want KeyCard to have more than one interface implemented... that is what makes it such a cool object.<br /><br />It took me a few minutes of staring at my screen to recognize the simplest, easiest, and most obvious choice. Every object variable in Java is really just a reference to the object right? So why don't we just add a few lines to the <i>Scenario</i> class, like so?:<br /><br /><pre>// *** Scenario.java ***<br />public class Scenario<br />{<br />&nbsp;&nbsp;&nbsp; public static void main(String[] args)<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; KeyCard keycard = new KeyCard();<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Door door = new Door();<br />       Key key = keycard;<br />       Card card = keycard;<br />       door.openWith(key);<br />       door.openWith(card);<br />&nbsp;&nbsp;&nbsp; }<br />}</pre>Now this compiles and runs:<br /><br /><pre>$ javac Scenario.java<br />$ java Scenario<br />Opened door with key<br />Opened door with card</pre><br />The variables<i> key, card, </i>and<i> keycard</i> all refer to the same object. That's fine with the compiler... it just needs to know which interface the object is supposed to look like when you pass it in.<br /><br />So, in summary, make an ambiguous function call unambiguous by aliasing it before-hand to be the specific kind of interface you need at that moment.<br />]]>
        
    </content>
</entry>

<entry>
    <title>First Gentoo Router</title>
    <link rel="alternate" type="text/html" href="http://www.indicium.us/site_blog/2010/02/first-gentoo-router.html" />
    <id>tag:www.indicium.us,2010:/site_blog//1.136</id>

    <published>2010-02-06T19:07:44Z</published>
    <updated>2010-02-06T19:29:05Z</updated>

    <summary>I stayed up late last night setting up my first Gentoo-based home router out of an old PC (500 Mhz Pentium III, 256 MB RAM). It has three interfaces (two LAN, one WAN), is fully optimized for the processor, and...</summary>
    <author>
        <name>Christopher Howard</name>
        
    </author>
    
    <category term="networking" label="networking" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.indicium.us/site_blog/">
        <![CDATA[I stayed up late last night setting up my first Gentoo-based home router out of an old PC (500 Mhz Pentium III, 256 MB RAM). It has three interfaces (two LAN, one WAN), is fully optimized for the processor, and provides DHCP, DNS, and NAT services.<br /><br />It was overall fairly easy following the online Gentoo documentation:<br /><br /><a href="http://www.gentoo.org/doc/en/home-router-howto.xml" target="_blank">http://www.gentoo.org/doc/en/home-router-howto.xml</a><br /><div><br />The longest part was all the time I spent trimming down the kernel (not strictly necessary but a lot of fun) and then it takes a long time for the kernel to build on a 500 Mhz box. It took probably 3-4 of my attention, including putting the PC together and testing the services, and about 7+ hours of computer time.<br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>Uh, no... Very Different.</title>
    <link rel="alternate" type="text/html" href="http://www.indicium.us/site_blog/2010/02/uh-no-very-different.html" />
    <id>tag:www.indicium.us,2010:/site_blog//1.135</id>

    <published>2010-02-05T03:54:00Z</published>
    <updated>2010-02-05T04:01:26Z</updated>

    <summary>So I&apos;m sitting on some stair steps at school, and I turn my laptop on, which is running Gentoo. The boot phase starts as usual, and the text scrolls by as the services start up.A large, young fellow walks by,...</summary>
    <author>
        <name>Christopher Howard</name>
        
    </author>
    
    <category term="humor" label="humor" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="linux" label="Linux" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.indicium.us/site_blog/">
        <![CDATA[So I'm sitting on some stair steps at school, and I turn my laptop on, which is running Gentoo. The boot phase starts as usual, and the text scrolls by as the services start up.<br /><br />A large, young fellow walks by, sees the screen, and says "Is that MS-DOS?"<br /><br />"No," I quickly reply, "It's Linux."<br /><br />"Oh. They're basically the same, aren't they?" he says.<br /><br />Ouch, that hurt.<br /> ]]>
        
    </content>
</entry>

<entry>
    <title>Nifty! Custom-Built Linux Computers</title>
    <link rel="alternate" type="text/html" href="http://www.indicium.us/site_blog/2010/02/nifty-custom-built-linux-computers.html" />
    <id>tag:www.indicium.us,2010:/site_blog//1.134</id>

    <published>2010-02-02T02:14:11Z</published>
    <updated>2010-02-02T02:26:43Z</updated>

    <summary>system76What attracted my attention was the server section, where you can by tower or rack mounted servers starting at around $700. Everything is Linux compatible, and they give you lots of options on the components.After playing around with the &quot;Eland...</summary>
    <author>
        <name>Christopher Howard</name>
        
    </author>
    
    <category term="hardware" label="hardware" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="linux" label="Linux" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.indicium.us/site_blog/">
        <![CDATA[<a href="http://system76.com/index.php" target="_blank">system76</a><br /><br />What attracted my attention was the server section, where you can by tower or rack mounted servers starting at around $700. Everything is Linux compatible, and they give you lots of options on the components.<br /><br />After playing around with the "Eland Pedestal" tower server, I found that for about $1,200 I could get something like this:<br /><br /><ul><li>Quad Core Intel Xeon X3230 2.66 GHz 1066 MHz FSB 8 MB L2 65nm</li><li>4 GB DDR2</li><li>3x 500 GB drives in a RAID 5 array</li></ul><br />Wouldn't mind having two or three of those babies for my cluster.<br /> ]]>
        
    </content>
</entry>

<entry>
    <title>Simple C++ Wrapper Around LibcURL</title>
    <link rel="alternate" type="text/html" href="http://www.indicium.us/site_blog/2010/01/simple-c-wrapper-around-libcurl.html" />
    <id>tag:www.indicium.us,2010:/site_blog//1.133</id>

    <published>2010-01-30T11:19:29Z</published>
    <updated>2010-01-30T11:24:10Z</updated>

    <summary>I wrote a very simple (one function) C++ wrapper class around libcurl, which one can use to download web page data into a C++ string. The class is called WebPageRetriever and is available here:http://indicium.us/cgi-bin/pages/get?view=scripts...</summary>
    <author>
        <name>Christopher Howard</name>
        
    </author>
    
    <category term="c" label="C++" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.indicium.us/site_blog/">
        <![CDATA[I wrote a very simple (one function) C++ wrapper class around libcurl, which one can use to download web page data into a C++ string. The class is called WebPageRetriever and is available here:<br /><br /><a href="http://indicium.us/cgi-bin/pages/get?view=scripts">http://indicium.us/cgi-bin/pages/get?view=scripts</a><br /> ]]>
        
    </content>
</entry>

<entry>
    <title>What Happens When Linux Runs out of Memory?</title>
    <link rel="alternate" type="text/html" href="http://www.indicium.us/site_blog/2010/01/what-happens-when-linux-runs-out-of-memory.html" />
    <id>tag:www.indicium.us,2010:/site_blog//1.132</id>

    <published>2010-01-29T09:11:05Z</published>
    <updated>2010-01-29T09:19:17Z</updated>

    <summary>What does your Linux system do when it completely runs out of memory? When even virtual memory is exausted?As a last resort, Linux turns your processes over to a dark angel known as the OOM Killer. The OOM Killer has...</summary>
    <author>
        <name>Christopher Howard</name>
        
    </author>
    
    <category term="linux" label="Linux" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.indicium.us/site_blog/">
        <![CDATA[What does your Linux system do when it completely runs out of memory? When even virtual memory is exausted?<br /><br />As a last resort, Linux turns your processes over to a dark angel known as the OOM Killer. The OOM Killer has the grisly job of picking which process needs to die in order to get your system back to a manageable state. It actually follows a rather precise formula, endeavoring to make a decision which will be most convenient to the user and fair to the running processes.<br /><br />The details are available here:<br /><br /><a href="http://linux-mm.org/OOM_Killer" target="_blank">http://linux-mm.org/OOM_Killer</a><br /> ]]>
        
    </content>
</entry>

<entry>
    <title>Gentoo Compiling Tip</title>
    <link rel="alternate" type="text/html" href="http://www.indicium.us/site_blog/2010/01/gentoo-compiling-tip.html" />
    <id>tag:www.indicium.us,2010:/site_blog//1.131</id>

    <published>2010-01-28T10:33:31Z</published>
    <updated>2010-01-28T10:42:31Z</updated>

    <summary>And now, a stunning compiling tip from Captain Obvious:If you are ever compiling the Linux kernel on any system with 500 Mhz of processing power or less, make sure to remove all the driver and filesystem options your don&apos;t need....</summary>
    <author>
        <name>Christopher Howard</name>
        
    </author>
    
    <category term="gentoo" label="Gentoo" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="hardware" label="hardware" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="linux" label="Linux" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.indicium.us/site_blog/">
        <![CDATA[And now, a stunning compiling tip from Captain Obvious:<br /><br />If you are ever compiling the Linux kernel on any system with 500 Mhz of processing power or less, make sure to remove all the driver and filesystem options your don't need. As I'm finding out the hard way, it takes around 5+ minutes to compile the modules for each file system on a computer this slow. I feel especially silly because I am only actually using one disk file system on the machine (xfs).<br /> ]]>
        
    </content>
</entry>

<entry>
    <title>Continous Monitoring of a Text File</title>
    <link rel="alternate" type="text/html" href="http://www.indicium.us/site_blog/2010/01/continous-monitoring-of-a-text-file.html" />
    <id>tag:www.indicium.us,2010:/site_blog//1.130</id>

    <published>2010-01-28T09:04:47Z</published>
    <updated>2010-01-28T09:10:47Z</updated>

    <summary><![CDATA[Probably should have known this before now, but in any case: I found out that you can continuously monitor the output of a file using the "tail" command. In other words, if you use the commandtail -f &lt;filename&gt;the program will...]]></summary>
    <author>
        <name>Christopher Howard</name>
        
    </author>
    
    <category term="linux" label="Linux" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="unix" label="Unix" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.indicium.us/site_blog/">
        <![CDATA[Probably should have known this before now, but in any case: I found out that you can continuously monitor the output of a file using the "tail" command. In other words, if you use the command<br /><br /><pre>tail -f &lt;filename&gt;</pre>the program will output the last 10 lines of the file, and then it will continue output additional data as the file grows.&nbsp; This is really handy, I found, when I needed to watch the output of genkernel.log while I was compiling my gentoo kernel.<br /> ]]>
        
    </content>
</entry>

<entry>
    <title>Gentoo Powered Electric Guitar</title>
    <link rel="alternate" type="text/html" href="http://www.indicium.us/site_blog/2010/01/gentoo-powered-electric-guitar.html" />
    <id>tag:www.indicium.us,2010:/site_blog//1.129</id>

    <published>2010-01-28T05:58:27Z</published>
    <updated>2010-01-28T06:08:20Z</updated>

    <summary>Saw this on gentoo.org today. Impressive. The inventor used Gentoo as the guitar&apos;s OS. http://www.misadigital.com/...</summary>
    <author>
        <name>Christopher Howard</name>
        
    </author>
    
    <category term="gentoo" label="Gentoo" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="music" label="music" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://www.indicium.us/site_blog/">
        <![CDATA[<p>Saw this on gentoo.org today. Impressive. The inventor used Gentoo as the guitar's OS.</p>

 <object height="340" width="560"><param name="movie" value="http://www.youtube.com/v/M2eiP12hQQY&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><embed src="http://www.youtube.com/v/M2eiP12hQQY&amp;hl=en_US&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="340" width="560"></object>

<p><br /></p><p><a href="http://www.misadigital.com/" target="_blank">http://www.misadigital.com/</a></p><p></p>]]>
        
    </content>
</entry>

</feed>
