<?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>Alter Ego! &#187; Computer Science</title>
	<atom:link href="http://blog.josemanimala.eu.org/posts/category/computer-science/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.josemanimala.eu.org</link>
	<description>Light in Dark Times</description>
	<lastBuildDate>Mon, 14 May 2012 07:31:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Multi pull</title>
		<link>http://blog.josemanimala.eu.org/posts/950</link>
		<comments>http://blog.josemanimala.eu.org/posts/950#comments</comments>
		<pubDate>Mon, 16 Apr 2012 13:50:42 +0000</pubDate>
		<dc:creator>josemanimala</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Journal]]></category>
		<category><![CDATA[Meaningless Stuff!!]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://blog.josemanimala.eu.org/?p=950</guid>
		<description><![CDATA[Suppose I am building a software using ten different libraries which are frequently updated, a nice to have would be git pull all which would download all linked libraries from their origin hosted locations.]]></description>
			<content:encoded><![CDATA[<p>Suppose I am building a software using ten different libraries which are frequently updated, a nice to have would be git pull all which would download all linked libraries from their origin hosted locations.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josemanimala.eu.org/posts/950/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Julia CGI Get request example</title>
		<link>http://blog.josemanimala.eu.org/posts/943</link>
		<comments>http://blog.josemanimala.eu.org/posts/943#comments</comments>
		<pubDate>Mon, 02 Apr 2012 11:23:37 +0000</pubDate>
		<dc:creator>josemanimala</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://blog.josemanimala.eu.org/?p=943</guid>
		<description><![CDATA[Adding to the apache cgi example for julia. Here is a small script to handle get requests using the QUERY_STRING environment variable. This example heavily utilizes code examples on CGI using C. #!/home/jose/JMM/Code/julia/julia libc = dlopen("libc.so.6") paramsList = ccall(dlsym(libc, :getenv), Ptr{Uint8}, (Ptr{Uint8},), "QUERY_STRING") matcher = match(r"(.*)=(.*)",cstring(paramsList)) param = matcher.captures if param[1] == "Name" println("Content-type: text/html\n\n") [...]]]></description>
			<content:encoded><![CDATA[<p>Adding to the apache cgi example for julia. Here is a small script to handle get requests using the QUERY_STRING environment variable. This example heavily utilizes code examples on CGI using C.<br />
<code><br />
#!/home/jose/JMM/Code/julia/julia</p>
<p>libc = dlopen("libc.so.6")</p>
<p>paramsList = ccall(dlsym(libc, :getenv), Ptr{Uint8}, (Ptr{Uint8},), "QUERY_STRING")<br />
matcher = match(r"(.*)=(.*)",cstring(paramsList))<br />
param = matcher.captures<br />
if param[1] == "Name"<br />
println("Content-type: text/html\n\n")<br />
println(strcat("Hello ",param[2]))<br />
end</code></p>
<p>Call the file as shown below.</p>
<p>http://localhost/julia-web/helloworld.jl?Name=Jose</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josemanimala.eu.org/posts/943/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Julia and mysql</title>
		<link>http://blog.josemanimala.eu.org/posts/939</link>
		<comments>http://blog.josemanimala.eu.org/posts/939#comments</comments>
		<pubDate>Mon, 02 Apr 2012 10:37:29 +0000</pubDate>
		<dc:creator>josemanimala</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Journal]]></category>
		<category><![CDATA[Meaningless Stuff!!]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://blog.josemanimala.eu.org/?p=939</guid>
		<description><![CDATA[Simple mysql client version number example for julia using the ccall library loading interface. prerequisites. sudo apt-get install libmysqlclient16-dev copy the code into a file called dbversion.jl. Please remove the C style comments in the code as they WILL NOT work in julia. #!/home/jose/JMM/Code/julia/julia //print the content type header println("Content-type: text/html\n\n"); //Load the mysql libraries [...]]]></description>
			<content:encoded><![CDATA[<p>Simple mysql client version number example for julia using the ccall library loading interface.</p>
<p>prerequisites.</p>
<p>sudo apt-get install libmysqlclient16-dev</p>
<p>copy the code into a file called dbversion.jl. Please remove the C style comments in the code as they <strong>WILL NOT</strong> work in julia.</p>
<p><code>#!/home/jose/JMM/Code/julia/julia</p>
<p>//print the content type header</p>
<p>println("Content-type: text/html\n\n");</p>
<p>//Load the mysql libraries</p>
<p>mysql = dlopen("libmysqlclient")</p>
<p>//call the C library with a pointer return type</p>
<p>mysqlexec = ccall(dlsym(mysql, :mysql_get_client_info), Ptr{Uint8}, ())</p>
<p>//convert the returned pointer to a string.</p>
<p>println(cstring(mysqlexec))</code></p>
<p>Should successfully print the mysql version number. I am still working on the various aspects of this. Also the above code was for use with apache.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josemanimala.eu.org/posts/939/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple hello world in julia</title>
		<link>http://blog.josemanimala.eu.org/posts/925</link>
		<comments>http://blog.josemanimala.eu.org/posts/925#comments</comments>
		<pubDate>Mon, 02 Apr 2012 10:09:41 +0000</pubDate>
		<dc:creator>josemanimala</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Journal]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://blog.josemanimala.eu.org/?p=925</guid>
		<description><![CDATA[First off configure apache to handle the .jl file extension and enable exec permissions on the folder open up the default file under /etc/apache2/sites-available. directory "/var/www/julia-web/" AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all directory AddHandler cgi-script .cgi .jl Restart apache sudo service apache2 restart create a simple file under the path [...]]]></description>
			<content:encoded><![CDATA[<p>First off configure apache to handle the .jl file extension and enable exec permissions on the folder</p>
<p>open up the default file under /etc/apache2/sites-available.</p>
<p><code></p>
<p>directory "/var/www/julia-web/"<br />
                AllowOverride None<br />
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch<br />
                Order allow,deny<br />
                Allow from all<br />
directory</p>
<p>AddHandler cgi-script .cgi .jl</p>
<p></code></p>
<p>Restart apache</p>
<p><code><br />
sudo service apache2 restart<br />
</code></p>
<p>create a simple file under the path /var/www/julia-web.</p>
<p><code>jose@meanmachine-jr:/var/www/julia-web$ cat > helloworld.jl<br />
<strong>#!/home/jose/JMM/Code/julia/julia<br />
</strong><br />
println("Content-type: text/html\n\n");<br />
println("Hello world");<br />
</code></p>
<p>Change the line in bold to the path to your compiled julia interpreter.</p>
<p>as with any cgi file make sure to give execute permissions to the file.</p>
<p><code>chmod -R 777 helloworld.jl</code></p>
<p>That should be it.<br />
<div id="attachment_929" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.josemanimala.eu.org/posts/925/shot-2" rel="attachment wp-att-929"><img src="http://blog.josemanimala.eu.org/wp-content/uploads/2012/04/shot1-300x168.jpg" alt="helloworld.jl" title="Simple hello world in julia." width="300" height="168" class="size-medium wp-image-929" /></a><p class="wp-caption-text">Hello world in julia</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josemanimala.eu.org/posts/925/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Julia Lang on Bodhi Linux :)</title>
		<link>http://blog.josemanimala.eu.org/posts/921</link>
		<comments>http://blog.josemanimala.eu.org/posts/921#comments</comments>
		<pubDate>Mon, 02 Apr 2012 09:36:48 +0000</pubDate>
		<dc:creator>josemanimala</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Journal]]></category>
		<category><![CDATA[Meaningless Stuff!!]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://blog.josemanimala.eu.org/?p=921</guid>
		<description><![CDATA[This is more of an informational log on compiling julia on Bodhi linux 1.3. The first thing about any linux builds is to make sure you have the linux kernel headers installed for your linux kernel version. I am assuming you already have and hence proceeding to the important part. Clone the repository. git clone [...]]]></description>
			<content:encoded><![CDATA[<p>This is more of an informational log on compiling julia on Bodhi linux 1.3.</p>
<p>The first thing about any linux builds is to make sure you have the linux kernel headers installed for your linux kernel version. I am assuming you already have and hence proceeding to the important part.</p>
<p>Clone the repository.</p>
<p>git clone git@github.com:josemanimala/julia.git</p>
<p>Install the prerequisites.</p>
<p>sudo apt-get install libncurses5-dev gcc-multilib gfortran</p>
<p>I was getting there architecture errors, for which the julia lang website suggests passing the architecture value in the commandline or setting it in Make.inc that comes with the julia archive.</p>
<p>make TARGET=NEHALEM</p>
<p>This should start building julia.</p>
<p>Issues, I was getting build issues with the file ~/julia/external/llvm-3.0/lib/Target/X86/Release/ folder missing some files. To get rid of this, I went into the llvm directory and manually ran make. Once that was completed moved to the julia folder and executed make again. This time it ran to completion without any problems.</p>
<p>Finally.</p>
<p>jose@meanmachine-jr:~/JMM/Code/julia$ ./julia<br />
               _<br />
   _       _ _(_)_     |<br />
  (_)     | (_) (_)    |<br />
   _ _   _| |_  __ _   |  A fresh approach to technical computing<br />
  | | | | | | |/ _` |  |<br />
  | | |_| | | | (_| |  |  Version 0.0.0+1333339897.re491<br />
 _/ |\__&#8217;_|_|_|\__&#8217;_|  |  Commit e491e6cf9c (2012-04-02 09:41:37)<br />
|__/                   |</p>
<p>julia></p>
<p>Going to look at building web apps in julia next. DB support?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josemanimala.eu.org/posts/921/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dead beef: shuffle annoyance!</title>
		<link>http://blog.josemanimala.eu.org/posts/914</link>
		<comments>http://blog.josemanimala.eu.org/posts/914#comments</comments>
		<pubDate>Mon, 26 Mar 2012 07:42:12 +0000</pubDate>
		<dc:creator>josemanimala</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Journal]]></category>
		<category><![CDATA[Meaningless Stuff!!]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://blog.josemanimala.eu.org/?p=914</guid>
		<description><![CDATA[I love dead beef and its my favorite music player when I am coding. But one thing that annoys me is that dead beef with shuffle on picks a random song when I press previous rather than going to the previous song. Also, I can pause and play with the pause button seems like the [...]]]></description>
			<content:encoded><![CDATA[<p>I love dead beef and its my favorite music player when I am coding. But one thing that annoys me is that dead beef with shuffle on picks a random song when I press previous rather than going to the previous song. Also, I can pause and play with the pause button <img src='http://blog.josemanimala.eu.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  seems like the underlying api shares function calls.</p>
<p>Dead beef creator thank you so much for this music player.</p>
<p>Cheers,<br />
Jose</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josemanimala.eu.org/posts/914/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android &#8211; Free apps, battery usage, needs a study?</title>
		<link>http://blog.josemanimala.eu.org/posts/904</link>
		<comments>http://blog.josemanimala.eu.org/posts/904#comments</comments>
		<pubDate>Tue, 20 Mar 2012 08:10:13 +0000</pubDate>
		<dc:creator>josemanimala</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Meaningless Stuff!!]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://blog.josemanimala.eu.org/?p=904</guid>
		<description><![CDATA[/rant This is really absurd, they actually needed a study to show that Free ads in android apps would sap the battery? source: http://www.phonearena.com/news/Study-says-free-Android-apps-can-zap-your-battery-life_id28228 Personal opinion: I would say this was obvious as the ads do use up more battery charge than the applications use, because they are pulling the ads off the internet using [...]]]></description>
			<content:encoded><![CDATA[<p>/rant</p>
<p>This is really absurd, they actually needed a study to show that Free ads in android apps would sap the battery?</p>
<p>source: http://www.phonearena.com/news/Study-says-free-Android-apps-can-zap-your-battery-life_id28228</p>
<p>Personal opinion: I would say this was obvious as the ads do use up more battery charge than the applications use, because they are pulling the ads off the internet using http requests which do put unnecessary toll on the battery, which is already using up enough charge to run the  app in the first place. But to go on a scientific study and funding for that to me seems a little redundant. To a computer engineer, this fact about battery usage is very obvious.</p>
<p>Sigh! Well, there has to be a way to fund and support Masters projects, but this one is the lamest one I have heard so far.</p>
<p>/rant over</p>
<p>The study could be looking at other complex phenomenon which are using up a lot of battery charge, but highlighting this one fact could seriously be taken in another sense.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josemanimala.eu.org/posts/904/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cars with light sensors like phones</title>
		<link>http://blog.josemanimala.eu.org/posts/900</link>
		<comments>http://blog.josemanimala.eu.org/posts/900#comments</comments>
		<pubDate>Sat, 17 Mar 2012 11:34:52 +0000</pubDate>
		<dc:creator>josemanimala</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Journal]]></category>
		<category><![CDATA[Meaningless Stuff!!]]></category>

		<guid isPermaLink="false">http://blog.josemanimala.eu.org/?p=900</guid>
		<description><![CDATA[Are there any cars out there that have light sensors on them. It would be a great idea for mass market cars. I almost always forget to turn off my cars head lamps.]]></description>
			<content:encoded><![CDATA[<p>Are there any cars out there that have light sensors on them. It would be a great idea for mass market cars. I almost always forget to turn off my cars head lamps.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josemanimala.eu.org/posts/900/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Google, why?</title>
		<link>http://blog.josemanimala.eu.org/posts/889</link>
		<comments>http://blog.josemanimala.eu.org/posts/889#comments</comments>
		<pubDate>Wed, 29 Feb 2012 17:22:33 +0000</pubDate>
		<dc:creator>josemanimala</dc:creator>
				<category><![CDATA[Computer Science]]></category>

		<guid isPermaLink="false">http://blog.josemanimala.eu.org/?p=889</guid>
		<description><![CDATA[Google had this nifty feature where, you search for something on the main page (google.com) and then click on one of the tabs for its other services, it would load up the results for the thing you searched for previously on the web. Now after the web ui updates this is gone! This was a [...]]]></description>
			<content:encoded><![CDATA[<p>Google had this nifty feature where, you search for something on the main page (google.com) and then click on one of the tabs for its other services, it would load up the results for the thing you searched for previously on the web.</p>
<p>Now after the web ui updates this is gone! This was a nice to have!<br />
Why google? Why?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josemanimala.eu.org/posts/889/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian Squeeze Dom0 and DomU</title>
		<link>http://blog.josemanimala.eu.org/posts/886</link>
		<comments>http://blog.josemanimala.eu.org/posts/886#comments</comments>
		<pubDate>Thu, 23 Feb 2012 07:11:19 +0000</pubDate>
		<dc:creator>josemanimala</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://blog.josemanimala.eu.org/?p=886</guid>
		<description><![CDATA[This is a quick guide and note myself to create a simple xen vm (domU) on Debian Squeeze. I am assuming that you have a host running debian squeeze with the base system installed on it. I am using the default ext3 filesystem and not using lvm. Install the required xen kernel. This is a [...]]]></description>
			<content:encoded><![CDATA[<p>This is a quick guide and note myself to create a simple xen vm (domU) on Debian Squeeze.</p>
<p>I am assuming that you have a host running debian squeeze with the base system installed on it. I am using the default ext3 filesystem and not using lvm.</p>
<p>Install the required xen kernel. This is a paravirtualization setup and my processor doesn&#8217;t support full virtualization (HVM).</p>
<p>Executing all commands logged in as root. If not please append the sudo command after installing it using sudo apt-get install sudo and then add your user to the /etc/sudoers file using visudo command.</p>
<p>After that proceed to install the xen base system and xen tools. we will use the xen-linux-system meta package to automatically do the basic install. </p>
<p><code><br />
# apt-get update<br />
# aptitude -P install xen-linux-system<br />
# apt-get install xen-tools<br />
</code></p>
<p>Update grub to defaultly boot the xen kernel</p>
<p><code><br />
# mv -i /etc/grub.d/10_linux /etc/grub.d/21_linux<br />
# update-grub<br />
</code></p>
<p>Edit the xen domains file as shown below. This is because Xen will save and restore a VM rather than do a clean shutdown, too much HDD resource usage.</p>
<p><code><br />
vi /etc/default/xendomains</p>
<p>#XENDOMAINS_SAVE=/var/lib/xen/save<br />
XENDOMAINS_SAVE=""</p>
<p>#XENDOMAINS_RESTORE=true<br />
XENDOMAINS_RESTORE=false<br />
</code></p>
<p>reboot the machine now to boot into the new kernel.</p>
<p><code><br />
# reboot<br />
</code></p>
<p>edit /etc/xen-tools/xen-tools.conf to have the below configuration settings at a minimum.</p>
<p><code><br />
dir = /home/xen<br />
install-method = debootstrap<br />
size   = 4Gb      # Disk image size.<br />
memory = 128Mb    # Memory size<br />
swap   = 256Mb    # Swap size<br />
fs     = ext3     # use the EXT3 filesystem for the disk image.<br />
#dist   = `stable` # Default distribution to install.<br />
image  = sparse   # Specify sparse vs. full disk images.<br />
dhcp = 1<br />
passwd = 1<br />
kernel = /boot/vmlinuz-`uname -r`<br />
initrd = /boot/initrd.img-`uname -r`<br />
mirror = `xt-guess-suite-and-mirror --mirror`<br />
mirror_squeeze = http://cdn.debian.net/debian<br />
ext3_options     = noatime,nodiratime,errors=remount-ro<br />
ext2_options     = noatime,nodiratime,errors=remount-ro<br />
xfs_options      = defaults<br />
reiserfs_options = defaults<br />
btrfs_options    = defaults<br />
</code></p>
<p>Create the squeeze vm using the xen-create-image command below. I am creating it to use our default dhcp server to get an ip.</p>
<p><code><br />
# xen-create-image --hostname xen1.local.com --vcpus 1 --pygrub --dist squeeze --dhcp<br />
General Information<br />
--------------------<br />
Hostname       :  xen1.local.com<br />
Distribution   :  squeeze<br />
Mirror         :  http://ftp.de.debian.org/debian/<br />
Partitions     :  swap            256Mb (swap)<br />
                  /               4Gb   (ext3)<br />
Image type     :  sparse<br />
Memory size    :  128Mb<br />
Kernel path    :  /boot/vmlinuz-2.6.32-5-xen-amd64<br />
Initrd path    :  /boot/initrd.img-2.6.32-5-xen-amd64</p>
<p>Networking Information<br />
----------------------<br />
IP Address     : DHCP [MAC: xx:xx:xx:xx:xx]</p>
<p>Creating partition image: /home/xen/domains/xen1.local.com/swap.img<br />
Done</p>
<p>Creating swap on /home/xen/domains/xen1.local.com/swap.img<br />
Done</p>
<p>Creating partition image: /home/xen/domains/xen1.local.com/disk.img<br />
Done</p>
<p>Creating ext3 filesystem on /home/xen/domains/xen1.local.com/disk.img<br />
Done<br />
Installation method: debootstrap<br />
</code></p>
<p>After sometime of processing the command will exit as successful.</p>
<p>On my machine I had to comment out the line in the /etc/xen/xend-config.sxp file before I could boot the domain.</p>
<p><code><br />
vi /etc/xen/xend-config.sxp<br />
#(vif-script vif-bridge)<br />
(network-script network-bridge)<br />
</code></p>
<p>restart xend </p>
<p><code>sudo /init.d/xend restart</code></p>
<p>I started up the domain with the command</p>
<p><code><br />
# xm create /etc/xen/xen1.local.com.cfg -c<br />
</code></p>
<p>To exit the console once you are done use ^] (ctrl + ]).</p>
<p>Thanks,<br />
Jose</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josemanimala.eu.org/posts/886/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

