<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Coding and Stuff</title>
    <link>https://chris.iluo.net/blog/</link>
    <description>Recent content on Coding and Stuff</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright ©, Chris Pilkington; all rights reserved.</copyright>
    <lastBuildDate>Sat, 28 Oct 2023 10:26:27 +0000</lastBuildDate>
    <atom:link href="/rss.xml" rel="self" type="application/rss+xml"/>
    <item>
      <title>openglmm_shaders Verlet Integration</title>
      <link>https://chris.iluo.net/blog/2023/10/28/openglmm_shaders-verlet-integration/</link>
      <pubDate>Sat, 28 Oct 2023 10:26:27 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2023/10/28/openglmm_shaders-verlet-integration/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been working on verlet integration lately in my OpenGL 3.3 library and libopenglmm_shaders test.&lt;br&gt;
&lt;a href="https://codeberg.org/pilkch/tests/"&gt;Source&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Verlet Integration is a way of simulating some physical interactions. This is not a serious physics engine like ODE/Bullet/Box2D/etc. I&amp;rsquo;m sure verlet integration can be used for serious stuff, I&amp;rsquo;ve just used it as a way to get a basic fun physics simulation, focusing on speed and simple coding. There is a &lt;a href="https://www.cs.cmu.edu/afs/cs/academic/class/15462-s13/www/lec_slides/Jakobsen.pdf"&gt;famous paper on verlet integration&lt;/a&gt; and many discussions about it online. The typical way that verlet physics is simulated in games is with particles which provide the basic shape of objects, and springs joining the particles together. The springs have a length that they try to maintain, and a stiffness. They can iteratively keep the particles a certain distance from each other. A rope segment is basically a spring with a maximum length, but no minimum length. A pin is a constraint on a particle to hold it in position. These primitives can then be used to simulate semi-rigid bodies and complex objects. Ragdolls, cloth, grass, tires, rope, hair, bridges, and even destruction can be simulated.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Migrating from WordPress to Hugo</title>
      <link>https://chris.iluo.net/blog/2023/10/03/migrating-from-wordpress-to-hugo/</link>
      <pubDate>Tue, 03 Oct 2023 20:26:27 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2023/10/03/migrating-from-wordpress-to-hugo/</guid>
      <description>&lt;p&gt;For the last few years I&amp;rsquo;ve been intrigued by the idea of switching from WordPress to a statically generated blog such as Hugo mainly to reduce the attack surface of my web server (I&amp;rsquo;ve always been a bit paranoid of WordPress).&lt;/p&gt;
&lt;p&gt;There are a number of benefits:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;No PHP or javascript&lt;/li&gt;
&lt;li&gt;No WordPress and associated vulnerabilities&lt;/li&gt;
&lt;li&gt;Reduced attack surface&lt;/li&gt;
&lt;li&gt;Quicker page requests (Not really an issue for my hobbyist blog)&lt;/li&gt;
&lt;li&gt;Potentially slightly more resilient to high traffic from slashdot/reddit or a DDOS attack (Again not really an issue for this blog)&lt;/li&gt;
&lt;li&gt;Version controlled in git&lt;/li&gt;
&lt;li&gt;Could be built and deployed with &lt;a href="https://en.wikipedia.org/wiki/Continuous_integration"&gt;Continous Integration&lt;/a&gt; (I&amp;rsquo;m not doing this yet)&lt;/li&gt;
&lt;li&gt;Reproducable, if the server is lost or I move hosts I should be able to get up and running again in an hour&lt;/li&gt;
&lt;li&gt;Themes (Not as many themese, and not as easy to switch themes as WordPress, but not bad)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The main downsides are:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Replacing VSCode and VSCode Remote with VSCodium and Open Remote SSH</title>
      <link>https://chris.iluo.net/blog/2022/11/21/replacing-vscode-and-vscode-remote-with-vscodium-and-open-remote-ssh/</link>
      <pubDate>Mon, 21 Nov 2022 23:40:56 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2022/11/21/replacing-vscode-and-vscode-remote-with-vscodium-and-open-remote-ssh/</guid>
      <description>&lt;p&gt;VSCode with the VSCode Remote plugin make for an awesome Windows client for connecting to a remote Linux machine to do the real development. It’s seamless, once connected to the remote it feels like you are just working on a Linux machine. In the background it connects via SSH to a Linux host, installs a server daemon, and from then on commands are handled by the VS Code Server plugin, from the client you can open files, edit them, create new terminals, navigate, install packages, build, all as if you are directly working on the remote. It’s like a hybrid of SSH and RDP.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Logging Structured Data From an Application</title>
      <link>https://chris.iluo.net/blog/2022/07/08/logging-structured-data-from-an-application/</link>
      <pubDate>Fri, 08 Jul 2022 23:52:11 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2022/07/08/logging-structured-data-from-an-application/</guid>
      <description>&lt;h3 id="what-is-structured-data"&gt;What is structured data?&lt;/h3&gt;
&lt;p&gt;Structured data is data formatted in a structured manner so that the sender can clearly communicate to the receiver each field/property/part of each message without confusion or ambiguity about where the message starts/stops, and what each field represents and it’s value.&lt;/p&gt;
&lt;p&gt;We usually represent structured data with fields or key value pairs. The data can even be represented in a tree such as in JSON or XML.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Creating a Linux Container in C++</title>
      <link>https://chris.iluo.net/blog/2021/01/13/creating-a-linux-container-in-c-/</link>
      <pubDate>Wed, 13 Jan 2021 00:34:47 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2021/01/13/creating-a-linux-container-in-c-/</guid>
      <description>&lt;p&gt;I love Linux containers. You get &lt;em&gt;a&lt;/em&gt; degree of separation from the host and other machines without hosting a full VM and without requiring a whole second OS.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What are containers?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A process or group of processes that are running on the same kernel as the host but in isolation via &lt;a href="https://en.wikipedia.org/wiki/Linux_namespaces"&gt;namespaces&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Cgroups"&gt;cgroups&lt;/a&gt; and &lt;a href="https://images.linuxcontainers.org"&gt;images&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why would you do this?&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Share resources (3 web servers in containers on one physical server for example)&lt;/li&gt;
&lt;li&gt;Less overhead and quicker to spin up than a VM&lt;/li&gt;
&lt;li&gt;To experiment in Linux without modifying the host OS settings or filesystem&lt;/li&gt;
&lt;li&gt;To run software or use libraries that cannot or shouldn’t be run on the host (Mismatched versions, tries to read data from your home folder, tries to mess around with other processes, spams syslog, tries to phone home or query the network, or talk to Linux kernel modules)&lt;/li&gt;
&lt;li&gt;Consistent behaviour (Developers can run wildly different machines but develop within identical containers, consistent continuous integration, simulate end users’ machines for debugging)&lt;/li&gt;
&lt;li&gt;Run a collection of containers that can talk to each other but can’t talk to the rest of the network (Local testing, integration testing, load testing, mess around with network configurations and firewall rules without endangering the host)&lt;/li&gt;
&lt;li&gt;Run a collection of containers that can talk to each other but only one or two of them are public facing (LAMP stack, ELK stack, a cluster, etc.)&lt;/li&gt;
&lt;li&gt;Set limits on memory usage and disk usage (Restrict resource heavy applications or test out of memory situations without killing the host)&lt;/li&gt;
&lt;li&gt;Share folders and even whole Linux kernel modules from the host into the container.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Why wouldn’t you do this?&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Minecraft Server Cross Platform Compatibility</title>
      <link>https://chris.iluo.net/blog/2021/01/11/minecraft-server-cross-platform-compatibility/</link>
      <pubDate>Mon, 11 Jan 2021 22:06:07 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2021/01/11/minecraft-server-cross-platform-compatibility/</guid>
      <description>&lt;p&gt;&lt;img src="./blog/wp-content/uploads/2021/01/minecraft-server-compatibility.svg" alt="Minecraft cross platform compatibility chart"&gt;&lt;br&gt;
Note: The legacy consoles essentially cannot connect outside their own platform&lt;/p&gt;
&lt;h3 id="references"&gt;References&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/r/Minecraft/comments/crlnzp/what_versions_of_minecraft_are_crosscompatible/"&gt;https://www.reddit.com/r/Minecraft/comments/crlnzp/what_versions_of_minecraft_are_crosscompatible/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.minecraft.net/en-us/store/minecraft-xbox-360"&gt;https://www.minecraft.net/en-us/store/minecraft-xbox-360&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://minecraft.gamepedia.com/Xbox_360_Edition"&gt;https://minecraft.gamepedia.com/Xbox_360_Edition&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/GeyserMC/Geyser"&gt;https://github.com/GeyserMC/Geyser&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With GeyserMC and the Java and Bedrock editions there seems to be quite good cross platform compatibility, but alas, I was hoping to connect Xbox 360 to a Java or Bedrock server which I do not think is possible.&lt;/p&gt;
&lt;h4 id="protocol"&gt;Protocol&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;The programming language and game engine have little to do with incompatibilities; rather, it is because of differences in various data formats like IDs; for example, in the PC edition each type of wooden fence uses its own block ID*, while in PE they use data values so only one ID is used (the same as oak fences in PC). More significant differences may lie in things like mob AI and mechanics like combat and items that are missing (e.g. PE does not have shields and swords presumably still block).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Basic HTML5 Soundboard</title>
      <link>https://chris.iluo.net/blog/2017/10/05/basic-html5-soundboard/</link>
      <pubDate>Thu, 05 Oct 2017 22:56:43 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2017/10/05/basic-html5-soundboard/</guid>
      <description>&lt;p&gt;&lt;img src="https://codeberg.org/pilkch/soundboard/blob/master/readme-image.png?raw=true" alt="readme-image.png"&gt;&lt;/p&gt;
&lt;p&gt;I made a &lt;a href="./projects/soundboard/"&gt;thing&lt;/a&gt;. It has other people’s giant images and audio that I haven’t bothered resizing or compressing so it can take maybe 20 seconds to load as you click through the sounds. I made it as something my kids can play with on a tablet and because I’ve always thought it would be a great use for the new audio APIs in HTML5. The source code is &lt;a href="https://codeberg.org/pilkch/soundboard"&gt;here&lt;/a&gt;. Enjoy.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Stop Watch and Time Out Classes</title>
      <link>https://chris.iluo.net/blog/2017/02/26/stop-watch-and-time-out-classes/</link>
      <pubDate>Sun, 26 Feb 2017 23:16:08 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2017/02/26/stop-watch-and-time-out-classes/</guid>
      <description>&lt;p&gt;I have a passing interest in stop watch and time out type classes. Keeping track of elapsed time, remaining time. They are very basic classes, but I find them interesting.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://codeberg.org/pilkch/tests/blob/master/stopwatch/main.cpp#L15"&gt;GetTimeMS function&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The stop watch and timer classes use this function to get the system time, we actually return the system time minus the application start time to get a time relative to the application start time, starting at 0. This is not necessary, return the system time is fine, returning the time the application is running is usually just easier to think about than the time since 1970, which is kind of arbitrary.&lt;br&gt;
This function uses milliseconds, if this is not enough, we can easily switch to nanoseconds.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Colour Picker Added Hex and Float Conversions</title>
      <link>https://chris.iluo.net/blog/2016/09/13/colour-picker-added-hex-and-float-conversions/</link>
      <pubDate>Tue, 13 Sep 2016 00:22:08 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2016/09/13/colour-picker-added-hex-and-float-conversions/</guid>
      <description>&lt;p&gt;&lt;img src="./blog/wp-content/uploads/2016/09/colour-picker-hex-float.png" alt="Colour picker hex and float entry."&gt;&lt;br&gt;
Colour picker hex and float entry.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The colour pickers I see never have conversions from RGB uint8_t (255, 255, 255) to RGB float (1.0f, 1.0f, 1.0f), so I added it to mine.&lt;/li&gt;
&lt;li&gt;HSL, HSV and YUV are also shown.&lt;/li&gt;
&lt;li&gt;There is one &lt;a href="https://codeberg.org/pilkch/colourpicker/issues/2"&gt;bug&lt;/a&gt; when typing in a text colour if no single RGB component dominates then the colour palette look up fails, picking full white.&lt;/li&gt;
&lt;li&gt;It’s in JavaScript, so as usual I am surprised by how quickly and relatively easy this was to implement. The biggest issues I had were not knowing how JavaScript converts strings to and from numbers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="./projects/colourpicker/"&gt;Try It&lt;/a&gt;&lt;br&gt;
&lt;a href="https://codeberg.org/pilkch/colourpicker"&gt;Source&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Some Simple Regexes for Finding If Statements</title>
      <link>https://chris.iluo.net/blog/2016/04/19/some-simple-regexes-for-finding-if-statements/</link>
      <pubDate>Tue, 19 Apr 2016 22:37:31 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2016/04/19/some-simple-regexes-for-finding-if-statements/</guid>
      <description>&lt;p&gt;I know almost nothing about regexes, these are just some useful ones I created for checking code style, if statements specifically.&lt;/p&gt;
&lt;p&gt;Find single line if statements (Useful when your coding style requires adding curly braces to everything):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;/^ *if &lt;span style="color:#ae81ff"&gt;\(&lt;/span&gt;.+&lt;span style="color:#ae81ff"&gt;\)&lt;/span&gt;.*&lt;span style="color:#f92672"&gt;(&lt;/span&gt;;&lt;span style="color:#f92672"&gt;)&lt;/span&gt;/igm
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="https://regex101.com/r/yC1cR5/3"&gt;regex101&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Find multiple line if statements (Useful when your coding style favours less lines):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;/^ *if &lt;span style="color:#ae81ff"&gt;\(&lt;/span&gt;.+&lt;span style="color:#ae81ff"&gt;\)&lt;/span&gt;.*&lt;span style="color:#f92672"&gt;({)&lt;/span&gt;/igm
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="https://regex101.com/r/lH3tM3/1"&gt;regex101&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regex101 is really impressive. You can paste a regex and check it against some test inputs. The best part is the description of what each symbol in your regex does and even what some of the combined parts do, such as various brackets around groups of expressions.&lt;/p&gt;</description>
    </item>
    <item>
      <title>openglmm_shaders Test 20150817</title>
      <link>https://chris.iluo.net/blog/2015/08/18/openglmm_shaders-test-20150817/</link>
      <pubDate>Tue, 18 Aug 2015 00:54:48 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2015/08/18/openglmm_shaders-test-20150817/</guid>
      <description>&lt;p&gt;Here is a video demo of my OpenGL 3.3 library libopenglmm.&lt;br&gt;
&lt;a href="https://codeberg.org/pilkch/tests/"&gt;Source&lt;/a&gt;&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
      &lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/zrItSzA40WE?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
    &lt;/div&gt;

&lt;p&gt;Materials:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Lambert shading (Mirror’s Edge style)&lt;/li&gt;
&lt;li&gt;Fog&lt;/li&gt;
&lt;li&gt;Cube mapping&lt;/li&gt;
&lt;li&gt;Multitexturing&lt;/li&gt;
&lt;li&gt;Normal mapping&lt;/li&gt;
&lt;li&gt;Car paint (Slighty broken, I think a texture look up is incorrect)&lt;/li&gt;
&lt;li&gt;Glass mixed with dirty metal texture (Similar to an old rusty/broken mirror)&lt;/li&gt;
&lt;li&gt;Cel shading&lt;/li&gt;
&lt;li&gt;Smoke particle system with lambert lighting with 4 normals that very roughly approximate a sphere (I think something is wrong with the depth texture look up)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Post render effects:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Colour Picker Released</title>
      <link>https://chris.iluo.net/blog/2015/05/30/colour-picker-released/</link>
      <pubDate>Sat, 30 May 2015 00:50:45 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2015/05/30/colour-picker-released/</guid>
      <description>&lt;p&gt;&lt;a href="./blog/wp-content/uploads/2015/05/colourpicker.png"&gt;&lt;img src="./blog/wp-content/uploads/2015/05/colourpicker.png" alt="Colour Picker in action"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I created a colour picker in JavaScript, then I created 3 variations that simulate the &lt;a href="http://en.wikipedia.org/wiki/Color_blindness"&gt;common colour blindnesses&lt;/a&gt;. They are all linked so that when you select a colour in one it picks the &amp;ldquo;same&amp;rdquo; colour in the others. I mainly just created it out of interest. I realise there are similar colour blind simulator tools, but I hadn&amp;rsquo;t seen any that used linked colour pickers like this.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Diesel Photo Manager 0.1 Released</title>
      <link>https://chris.iluo.net/blog/2013/09/21/diesel-photo-manager-0.1-released/</link>
      <pubDate>Sat, 21 Sep 2013 15:09:45 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2013/09/21/diesel-photo-manager-0.1-released/</guid>
      <description>&lt;p&gt;I couldn&amp;rsquo;t find a photo browser for Linux that also imported my photos in the folder format I wanted so I created my own.&lt;/p&gt;
&lt;p&gt;This is the first release and it has these features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Simple interface&lt;/li&gt;
&lt;li&gt;Thumbnail grid mode&lt;/li&gt;
&lt;li&gt;Single photo mode&lt;/li&gt;
&lt;li&gt;Import and sort photos into folders based on the date&lt;/li&gt;
&lt;li&gt;Convert files to dng&lt;/li&gt;
&lt;li&gt;Show the background thread progress on the statusbar&lt;/li&gt;
&lt;li&gt;Check for updates via version.xml&lt;/li&gt;
&lt;li&gt;Default to dark theme (Can be overridden with the –light command line parameter)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Still to come:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Medusa Music Player 0.9 Released</title>
      <link>https://chris.iluo.net/blog/2013/09/21/medusa-music-player-0.9-released/</link>
      <pubDate>Sat, 21 Sep 2013 12:12:14 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2013/09/21/medusa-music-player-0.9-released/</guid>
      <description>&lt;p&gt;I’ve release a new version of Medusa music player with these features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Simple interface&lt;/li&gt;
&lt;li&gt;Last.fm support&lt;/li&gt;
&lt;li&gt;Date added and a full file path column&lt;/li&gt;
&lt;li&gt;Drag and drop from the file manager&lt;/li&gt;
&lt;li&gt;Moving files to the trash folder&lt;/li&gt;
&lt;li&gt;Move files to a particular folder and remember the last 5 folders&lt;/li&gt;
&lt;li&gt;Extra columns&lt;/li&gt;
&lt;li&gt;Show the background thread progress on the statusbar&lt;/li&gt;
&lt;li&gt;Import playlist from Rhythmbox and Banshee&lt;/li&gt;
&lt;li&gt;Autoplay at last track at startup&lt;/li&gt;
&lt;li&gt;Web server for controlling playback, volume and deleting tracks remotely&lt;/li&gt;
&lt;li&gt;Check for updates via version.xml&lt;/li&gt;
&lt;li&gt;Popup notifications when a new track is played&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;New:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Medusa Music Player 0.8 Released</title>
      <link>https://chris.iluo.net/blog/2013/06/13/medusa-music-player-0.8-released/</link>
      <pubDate>Thu, 13 Jun 2013 00:58:27 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2013/06/13/medusa-music-player-0.8-released/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve release a new version of Medusa music player with these features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Simple interface&lt;/li&gt;
&lt;li&gt;Last.fm support&lt;/li&gt;
&lt;li&gt;Date added and a full file path column&lt;/li&gt;
&lt;li&gt;Drag and drop from the file manager&lt;/li&gt;
&lt;li&gt;Moving files to the trash folder&lt;/li&gt;
&lt;li&gt;Move files to a particular folder and remember the last 5 folders&lt;/li&gt;
&lt;li&gt;Extra columns&lt;/li&gt;
&lt;li&gt;Show the background thread progress on the statusbar&lt;/li&gt;
&lt;li&gt;Import playlist from Rhythmbox and Banshee&lt;/li&gt;
&lt;li&gt;Autoplay at last track at startup&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;New:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Medusa Music Player 0.7 Released</title>
      <link>https://chris.iluo.net/blog/2012/08/12/medusa-music-player-0.7-released/</link>
      <pubDate>Sun, 12 Aug 2012 01:44:58 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2012/08/12/medusa-music-player-0.7-released/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve release a new version of Medusa music player with these features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Simple interface&lt;/li&gt;
&lt;li&gt;Last.fm support&lt;/li&gt;
&lt;li&gt;Date added and a full file path column&lt;/li&gt;
&lt;li&gt;Drag and drop from the file manager&lt;/li&gt;
&lt;li&gt;Auto play last track at startup&lt;/li&gt;
&lt;li&gt;Moving files to the trash folder&lt;/li&gt;
&lt;li&gt;Move files to a particular folder and remember the last 5 folders&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;New:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Extra columns&lt;/li&gt;
&lt;li&gt;Show the background thread progress on the statusbar&lt;/li&gt;
&lt;li&gt;Import playlist from Rhythmbox and Banshee&lt;/li&gt;
&lt;li&gt;Add autoplay at last track at startup&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Still to come:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Medusa Music Player 0.6 Released</title>
      <link>https://chris.iluo.net/blog/2012/06/05/medusa-music-player-0.6-released/</link>
      <pubDate>Tue, 05 Jun 2012 00:36:01 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2012/06/05/medusa-music-player-0.6-released/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve release a new version of Medusa music player with these features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Simple interface&lt;/li&gt;
&lt;li&gt;Last.fm support&lt;/li&gt;
&lt;li&gt;Date added and a full file path column&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;New:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Drag and drop from the file manager&lt;/li&gt;
&lt;li&gt;Auto play last track at startup&lt;/li&gt;
&lt;li&gt;Moving files to the trash folder&lt;/li&gt;
&lt;li&gt;Move files to a particular folder and remember the last 5 folders&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Still to come:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Easy tag editing for multiple files at once&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src="./blog/wp-content/uploads/2012/06/Screenshot-from-2012-06-04-233308.png" alt="Medusa Main Window" title="Medusa Main Window"&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Java Gotchas</title>
      <link>https://chris.iluo.net/blog/2012/05/18/java-gotchas/</link>
      <pubDate>Fri, 18 May 2012 23:38:03 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2012/05/18/java-gotchas/</guid>
      <description>&lt;p&gt;&lt;img src="./blog/wp-content/uploads/2012/05/java.png" alt="Java" title="Java"&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Everything is a pointer that initially points to null. Every non-POD type must be newed (I forget this one a lot)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The POD types (int, float, enum, etc.) behave just like their C++ counter parts.&lt;br&gt;
The boxed versions (Integer, Float) and String in Java are more like a pointer to the POD value.&lt;br&gt;
For example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-java" data-lang="java"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;String a &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;chris&amp;#34;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;String b &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;chris&amp;#34;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; (a &lt;span style="color:#f92672"&gt;==&lt;/span&gt; b) System.&lt;span style="color:#a6e22e"&gt;out&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;println&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#34;The strings are the same&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This test will always fail because operator== for pointers (Instances of anything derived from java.lang.Object) will test if the pointers point to the same memory.&lt;br&gt;
To compare boxed types:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Medusa Music Player 0.5 Released</title>
      <link>https://chris.iluo.net/blog/2012/03/24/medusa-music-player-0.5-released/</link>
      <pubDate>Sat, 24 Mar 2012 16:54:03 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2012/03/24/medusa-music-player-0.5-released/</guid>
      <description>&lt;p&gt;I’ve been working on a music player for Linux. What I really wanted was &lt;a href="http://www.foobar2000.org/"&gt;foobar2000&lt;/a&gt; for Linux but nothing on Linux is quite like it. There are lot of iTunes clones (Amarok, Banshee, Songbird, Rhythmbox, etc) but they are all too complicated or make copies of your music or show you lyrics and Wikipedia articles and include a web browser. I just want a simple music player. I can list the features I want one hand (I’ve only implemented the struck through items so far):&lt;/p&gt;</description>
    </item>
    <item>
      <title>Debugging 101</title>
      <link>https://chris.iluo.net/blog/2012/03/23/debugging-101/</link>
      <pubDate>Fri, 23 Mar 2012 20:34:08 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2012/03/23/debugging-101/</guid>
      <description>&lt;p&gt;Tips to help you find bugs.&lt;/p&gt;
&lt;h2 id="turn-the-warning-level-up-and-turn-on-warnings-as-errors"&gt;Turn the warning level up and turn on warnings as errors&lt;/h2&gt;
&lt;p&gt;I know, it can be a pain, but it works. It helps you produce more rhobust, forward compatible, portable code that is syntactically correct on more compilers.&lt;/p&gt;
&lt;h2 id="use-assert"&gt;Use assert&amp;hellip;&lt;/h2&gt;
&lt;p&gt;Assert will help you find errors before you even knew there was a problem. It is 100x better if your application tells you exactly where problems are and breaks into the debugger than for your application to crash for the customer. It goes hand in hand with compile time type safety, compiler warnings and static_assert.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pimp My Code Part 2</title>
      <link>https://chris.iluo.net/blog/2012/03/17/pimp-my-code-part-2/</link>
      <pubDate>Sat, 17 Mar 2012 17:59:12 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2012/03/17/pimp-my-code-part-2/</guid>
      <description>&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Pimp_My_Ride"&gt;&lt;img src="./blog/wp-content/uploads/2012/03/20498288.jpg" alt="Xhibit" title="Xhibit"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;char&lt;/span&gt; szPassword[&lt;span style="color:#ae81ff"&gt;255&lt;/span&gt;];
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GenerateRandomPassword(szPassword, &lt;span style="color:#ae81ff"&gt;16&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;char&lt;/span&gt; szText[&lt;span style="color:#ae81ff"&gt;255&lt;/span&gt;];
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sprintf(szText, &lt;span style="color:#e6db74"&gt;&amp;#34;User: %s, ID: %d, Password: %s&amp;#34;&lt;/span&gt;, szUser, &lt;span style="color:#66d9ef"&gt;int&lt;/span&gt;(userid&lt;span style="color:#f92672"&gt;++&lt;/span&gt;), szPassword);
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Don&amp;rsquo;t increment and use a variable on the same line. We know, you’re very tricky, you saved a line. You also made sure that beginners to C++ don’t know what the result will be. &lt;a href="https://en.wikipedia.org/wiki/KISS_principle"&gt;Keep it simple stupid&lt;/a&gt;. Create the simplest most readable code possible, it makes skimming over code and debugging code much easier. Fixed length arrays are very prone to buffer overruns, in this example szPassword is probably only 8 characters long after calling GenerateRandomPassword, but szUser could be any length and could definitely overrun 255 characters. The best way to mitigate this problem is to use a real string class such as &lt;code&gt;std::string&lt;/code&gt;. We can also avoid using &lt;code&gt;sprintf&lt;/code&gt; by using a type safe string writing class, &lt;code&gt;std::ostringstream&lt;/code&gt;. Code using &lt;code&gt;std::ostringstream&lt;/code&gt; is also slightly more human readable.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pimp My Code Part 1 Redux</title>
      <link>https://chris.iluo.net/blog/2011/12/22/pimp-my-code-part-1-redux/</link>
      <pubDate>Thu, 22 Dec 2011 22:06:07 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2011/12/22/pimp-my-code-part-1-redux/</guid>
      <description>&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Pimp_My_Ride"&gt;&lt;img src="./blog/wp-content/uploads/2011/12/20498215.jpg" alt="Xhibit" title="Xhibit"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Not exactly a redux, but very similar to &lt;a href="./blog/2011/12/17/pimp-my-code-part-1/" title="Pimp My Code Part 1"&gt;last time&lt;/a&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;bIsNotEmpty &lt;span style="color:#f92672"&gt;=&lt;/span&gt; false;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; (vNests.GetSize() &lt;span style="color:#f92672"&gt;!=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;) {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;  &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; (vNests[&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;]&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt;vEggs.GetSize() &lt;span style="color:#f92672"&gt;!=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;) bIsNotEmpty &lt;span style="color:#f92672"&gt;=&lt;/span&gt; true;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;First of all we don’t actually care about the size, we just care that we have (Or don’t have) a nest with eggs in it. Depending on the container GetSize may or may not be a variable look up. IsEmpty is always a variable lookup:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;bIsNotEmpty &lt;span style="color:#f92672"&gt;=&lt;/span&gt; false;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; (&lt;span style="color:#f92672"&gt;!&lt;/span&gt;vNests.IsEmpty()) {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;  &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; (&lt;span style="color:#f92672"&gt;!&lt;/span&gt;vNests[&lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;]&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt;vEggs.IsEmpty()) bIsNotEmpty &lt;span style="color:#f92672"&gt;=&lt;/span&gt; true;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We can combine this into a single line:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pimp My Code Part 1</title>
      <link>https://chris.iluo.net/blog/2011/12/17/pimp-my-code-part-1/</link>
      <pubDate>Sat, 17 Dec 2011 09:41:26 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2011/12/17/pimp-my-code-part-1/</guid>
      <description>&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Pimp_My_Ride"&gt;&lt;img src="./blog/wp-content/uploads/2011/12/20590346.jpg" alt="Xhibit" title="Xhibit"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;inline&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;bool&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;IsSpecial&lt;/span&gt;(&lt;span style="color:#66d9ef"&gt;const&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;char&lt;/span&gt;&lt;span style="color:#f92672"&gt;*&lt;/span&gt; szValue)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// Returns true if this is a special value
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; (stricmp(szValue, &lt;span style="color:#e6db74"&gt;&amp;#34;MySpecialValue&amp;#34;&lt;/span&gt;) &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;) {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;   &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; true;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; false;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I see this sort of thing all the time. For boolean functions that call boolean functions the if and return statements are usually superflous, we can use the return value of &lt;code&gt;(stricmp(szValue, “MySpecialValue”) == 0)&lt;/code&gt; itself:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;// Returns true if this is a special value
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;inline&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;bool&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;IsSpecial&lt;/span&gt;(&lt;span style="color:#66d9ef"&gt;const&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;char&lt;/span&gt;&lt;span style="color:#f92672"&gt;*&lt;/span&gt; szValue)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; (stricmp(szValue, &lt;span style="color:#e6db74"&gt;&amp;#34;MySpecialValue&amp;#34;&lt;/span&gt;) &lt;span style="color:#f92672"&gt;==&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If it were up to me I would also use a string class and keep as much of the code as possible in the string “realm” (This makes the code a lot simpler and easier to read):&lt;/p&gt;</description>
    </item>
    <item>
      <title>Converting Pentax PEF Files to PNG</title>
      <link>https://chris.iluo.net/blog/2011/12/15/converting-pentax-pef-files-to-png/</link>
      <pubDate>Thu, 15 Dec 2011 07:46:15 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2011/12/15/converting-pentax-pef-files-to-png/</guid>
      <description>&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Ufraw"&gt;Ufraw&lt;/a&gt; is a fantastic utility to convert raw camera formats. You can install it via (And you may as well get the plugin for &lt;a href="http://en.wikipedia.org/wiki/GIMP"&gt;gimp&lt;/a&gt; while you are at it):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo yum install ufraw ufraw-gimp
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;OR
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apt-get install ufraw gimp-ufraw
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;There is a great tutorial on using ufraw from a bash script &lt;a href="http://jcornuz.wordpress.com/2007/10/10/workflow-3-quick-raw-converting-batch/"&gt;here&lt;/a&gt;, my only recommendation is converting to &lt;a href="http://en.wikipedia.org/wiki/Portable_Network_Graphics"&gt;PNG&lt;/a&gt; but it is entirely up to personal preference.&lt;/p&gt;
&lt;p&gt;PNG version:&lt;br&gt;
pef2png.sh&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt; ! -d ./processed_images &lt;span style="color:#f92672"&gt;]&lt;/span&gt;; &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt; mkdir ./processed_images; &lt;span style="color:#66d9ef"&gt;fi&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# processes raw files&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; f in *.pef;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;  echo &lt;span style="color:#e6db74"&gt;&amp;#34;Processing &lt;/span&gt;$f&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;  ufraw-batch &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ae81ff"&gt;&lt;/span&gt;    --wb&lt;span style="color:#f92672"&gt;=&lt;/span&gt;camera &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ae81ff"&gt;&lt;/span&gt;    --exposure&lt;span style="color:#f92672"&gt;=&lt;/span&gt;auto &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ae81ff"&gt;&lt;/span&gt;    --out-type&lt;span style="color:#f92672"&gt;=&lt;/span&gt;png &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ae81ff"&gt;&lt;/span&gt;    --compression&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;96&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ae81ff"&gt;&lt;/span&gt;    --out-path&lt;span style="color:#f92672"&gt;=&lt;/span&gt;./processed_images &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ae81ff"&gt;&lt;/span&gt;    $f
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cd ./processed_images
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# change the image names&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; i in *.png;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;  mv &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$i&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;i/.png&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;_r.png;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; i in *.png;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;  mv &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$i&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;i/imgp/_igp&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Usage:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Eclipse</title>
      <link>https://chris.iluo.net/blog/2011/07/02/eclipse/</link>
      <pubDate>Sat, 02 Jul 2011 00:49:23 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2011/07/02/eclipse/</guid>
      <description>&lt;p&gt;Last time I tried &lt;a href="http://www.eclipse.org/"&gt;Eclipse&lt;/a&gt; (10 years ago?!?) it was incredibly slow. JVMs and Eclipse have both improved remarkably in that time, and Eclipse is now just as fast as KDevelop. There are many nice features that I haven’t seen in other IDEs yet such as a warnings and errors panel that compiles your project in the background. The special feature here is that for every warning and error, Eclipse will offer a few possible solutions to solve it, for example “import java.util.io.File is never used” will offer a few solutions, “Remove unused import”, “Organise imports” and “Add @SuppressWarnings ‘unused&amp;rsquo;”.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Java</title>
      <link>https://chris.iluo.net/blog/2011/06/22/java/</link>
      <pubDate>Wed, 22 Jun 2011 09:41:24 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2011/06/22/java/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been &lt;a href="https://codeberg.org/pilkch/postcodes"&gt;getting back into Java&lt;/a&gt; in my spare time recently, as I think about possibly making a few Android games. These are some notes about the differences between Java and C++.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In Java (almost) everything is an object. Strings, Floats and Ints are first class types.&lt;/li&gt;
&lt;li&gt;In C++ we usually don’t have to stress too much about performance. We can usually afford to do extra processing, create and pass around as many temporaries as we like, use extra ram and hold onto large amounts of ram. Java dies if you use too many temporaries. Performance in Java is highly reliant on the algorithms used.&lt;/li&gt;
&lt;li&gt;Java benefits from lazy initialisation, not doing anything you don’t need to until you need to.&lt;/li&gt;
&lt;li&gt;Caching previous results (But not holding onto excessive amounts of ram).&lt;/li&gt;
&lt;li&gt;Reducing number of temporaries by using classes such as StringBuilder.&lt;/li&gt;
&lt;li&gt;Java is fun to use. Like a strict C++. Strict in a good way. It is how C++ should have been created. Unfortunately the C++ standards committee decided that backwards compatability was a higher priority than creating awesomeness.&lt;/li&gt;
&lt;li&gt;The built in libraries are pretty good. I can still write algorithms quicker in C++ but there is a lot more extra functionality in the standard Java libraries such as regular expressions, file system, networking, threads, gui and sql. This is changing slightly with C++0x, but it still lacks basic things such as XML parsing, sql and anything related to gui.&lt;/li&gt;
&lt;li&gt;Each file can only contain 1 public class. This enforces good structure on your API, &amp;ldquo;what is the public interface going to be?&amp;rdquo;, where in C++ a lot of APIs just throw all classes in the header and allow the user to do whatever they want.&lt;/li&gt;
&lt;li&gt;Using classes from other files is less broken. The lack of including is a good thing although packages and import are basically the same as namespaces and include/using.&lt;/li&gt;
&lt;li&gt;Being forced to catch exceptions is great, the compiler makes sure that you are doing something with the exceptions later. If you throw or rethrow an exception you then have to mark your function as &lt;code&gt;throws&lt;/code&gt; so that the exception and catching the exception propogates up the call stack. The best part about this is that the compiler then knows exactly where an exception should be handled and produces an error if you haven’t handled it or rethrown it.&lt;/li&gt;
&lt;li&gt;I miss const. There is final but it isn’t quite the same.&lt;/li&gt;
&lt;li&gt;I miss for example operator overriding. Some built in classes such as String, Array, Vector, etc. could definitely benefit from it. buffer[0] is easier for me to write and understand at first glance than buffer.get(0). Geometric vector and matrix classes could definitely benefit from operator overloading too for example &lt;code&gt;a = b + c&lt;/code&gt; can be understood instantly, &lt;code&gt;a.Add(b, c)&lt;/code&gt; is a bit awkward and I have to think about it, &amp;ldquo;a is being modified, right, b and c are left unmodified, right?&amp;rdquo;.&lt;/li&gt;
&lt;li&gt;I miss complex macros and ifdef/ifndef. These can be very helpful, for example using one class on one platform and another class on the other or sharing all the code in a class except for a few lines that are different. Apparently the JVM should be good enough that you can branch on the platform and use oop to change functionality and not lose too much performance. I’m not sure what the replacement is though for a part of your application that just doesn’t compile on other platforms because it uses a platform specific API.&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>No root file system is defined</title>
      <link>https://chris.iluo.net/blog/2010/11/29/no-root-file-system-is-defined/</link>
      <pubDate>Mon, 29 Nov 2010 09:55:36 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2010/11/29/no-root-file-system-is-defined/</guid>
      <description>&lt;p&gt;On the weekend I was installing the new version of &lt;a href="http://www.mythbuntu.org"&gt;Mythbuntu&lt;/a&gt; (More interesting screenshots &lt;a href="http://www.mythtv.org/wiki/Screenshots"&gt;here&lt;/a&gt;) and I had a weird error, “No root file system is defined”. At first I thought it must have been something to do with failing to recognise the existing partitions or possibly they were corrupt. “fdisk -l” worked, returning sda, sda1-sda4, which was correct however “mount” would always fail. It turned out that it was just our old friend &lt;a href="./blog/2009/11/16/cannot-open-devsda1-device-or-resource-busy/"&gt;dmraid&lt;/a&gt; was breaking in new and unexpected ways.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How To Automatically Download All of Your YouTube Favourites</title>
      <link>https://chris.iluo.net/blog/2010/11/27/how-to-automatically-download-all-of-your-youtube-favourites/</link>
      <pubDate>Sat, 27 Nov 2010 18:04:17 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2010/11/27/how-to-automatically-download-all-of-your-youtube-favourites/</guid>
      <description>&lt;p&gt;FireFox add-ons such as &lt;a href="http://www.clickyoutubedownload.com/"&gt;1-Click YouTube Video Download&lt;/a&gt; are good but one must visit every video and manually save it. I have a lot of favourites and I wanted to back them up with as little effort as possible. Here is how.&lt;/p&gt;
&lt;p&gt;You will need &lt;a href="http://rg3.github.com/youtube-dl/download.html"&gt;youtube-dl&lt;/a&gt;. It is available via yum/apt-get however the version provided may be quite old (In Fedora 14 it did not support -playlist-start and -playlist-end).&lt;/p&gt;
&lt;p&gt;Create a new playlist and add all the videos from your favourites (Note: A playlist can only contain 200 videos if you have more than than this you will have to make multiple playlists and repeat this process for each one).&lt;/p&gt;</description>
    </item>
    <item>
      <title>malloc double free/non- aligned pointer being freed set a breakpoint in malloc_error_break to debug</title>
      <link>https://chris.iluo.net/blog/2010/01/10/malloc-double-free/non-aligned-pointer-being-freed-set-a-breakpoint-in-malloc_error_break-to-debug/</link>
      <pubDate>Sun, 10 Jan 2010 10:00:22 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2010/01/10/malloc-double-free/non-aligned-pointer-being-freed-set-a-breakpoint-in-malloc_error_break-to-debug/</guid>
      <description>&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;malloc: *** error &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; object 0x3874a0: double free
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;***set a breakpoint in malloc_error_break to debug
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;malloc: *** error &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; object 0x18a138: Non- aligned pointer being freed
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;*** set a breakpoint in malloc_error_break to debug
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So basically something in your code is screwing around with memory.&lt;/p&gt;
&lt;p&gt;Either releasing something that has already been released:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;int&lt;/span&gt;&lt;span style="color:#f92672"&gt;*&lt;/span&gt; x &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;new&lt;/span&gt; x[&lt;span style="color:#ae81ff"&gt;10&lt;/span&gt;];
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;delete&lt;/span&gt; [] x;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;delete&lt;/span&gt; [] x;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Or releasing something that is not pointing to the start of an allocated block of memory:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cannot open /dev/sda1: Device or resource busy</title>
      <link>https://chris.iluo.net/blog/2009/11/16/cannot-open-/dev/sda1-device-or-resource-busy/</link>
      <pubDate>Mon, 16 Nov 2009 22:23:19 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2009/11/16/cannot-open-/dev/sda1-device-or-resource-busy/</guid>
      <description>&lt;p&gt;After an update (Upgrade?) a while ago I couldn’t boot into Fedora, it had the text mode bar graph and after getting to 100% it failed with this error message:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Cannot open /dev/sda1: Device or resource busy
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It turned out that this was a dmraid problem. It would appear that something changed when updating and added or enabled dmraid. So I had to find a way to remove or disable it, the simplest solution I found that worked was disabling it via the arguments to the kernel in GRUB.&lt;/p&gt;</description>
    </item>
    <item>
      <title>When Good Customers Go Bad</title>
      <link>https://chris.iluo.net/blog/2009/09/26/when-good-customers-go-bad/</link>
      <pubDate>Sat, 26 Sep 2009 09:36:47 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2009/09/26/when-good-customers-go-bad/</guid>
      <description>&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;class&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;Customer&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;class&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;CustomerEx&lt;/span&gt;; &lt;span style="color:#75715e"&gt;// Added 20.03.2006
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;class&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;CustomerEx2&lt;/span&gt;; &lt;span style="color:#75715e"&gt;// Added 05.10.2006
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;class&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;CustomerEx2B&lt;/span&gt;; &lt;span style="color:#75715e"&gt;// Added 13.07.2008
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to Find and Remove Folders Recursively in Linux/Unix Because I Always Forget This</title>
      <link>https://chris.iluo.net/blog/2009/09/26/how-to-find-and-remove-folders-recursively-in-linux/unix-because-i-always-forget-this/</link>
      <pubDate>Sat, 26 Sep 2009 09:33:04 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2009/09/26/how-to-find-and-remove-folders-recursively-in-linux/unix-because-i-always-forget-this/</guid>
      <description>&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Recursively search for folders called .svn and delete them (Even if not empty)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;find . -name .svn -type d -print | xargs rm -rf
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Recursively search for files called *~ (gedit creates these for temporarily saving to) and delete them&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;find . -name &lt;span style="color:#ae81ff"&gt;\*&lt;/span&gt;~ -print | xargs rm -rf
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Recursively search for files called *.h or *.cpp and print them&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;find -name &lt;span style="color:#e6db74"&gt;&amp;#39;*.h&amp;#39;&lt;/span&gt; -o -name &lt;span style="color:#e6db74"&gt;&amp;#39;*.cpp&amp;#39;&lt;/span&gt; -print
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Blender Export OBJ Python Script</title>
      <link>https://chris.iluo.net/blog/2009/09/12/blender-export-obj-python-script/</link>
      <pubDate>Sat, 12 Sep 2009 15:50:42 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2009/09/12/blender-export-obj-python-script/</guid>
      <description>&lt;p&gt;First of all I’d like to state that I’m definitely a &lt;a href="http://www.blender.org/"&gt;Blender&lt;/a&gt; n00b and I have never touched &lt;a href="http://en.wikipedia.org/wiki/Python_%28programming_language%29"&gt;Python&lt;/a&gt; in my life.&lt;/p&gt;
&lt;p&gt;&lt;img src="./blog/wp-content/uploads/2009/09/sphere.png" alt="Baby steps, textured sphere loaded from an obj file" title="Sphere"&gt;
Baby steps, textured sphere loaded from an obj file&lt;/p&gt;
&lt;p&gt;In my game engine I basically have this sort of layout:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sphere/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sphere.obj
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sphere.mat
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sphere.png
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The .obj points to the .mat file which points to the .png file. So in Blender I would set the material name to “sphere” and ideally in the .obj file it would have a line like this, “usemtl sphere”, I would then get the sphere part and append “.mat” and load the material. I’m not sure if this is standard practice for Blender export scripts, but when exporting to the &lt;a href="http://en.wikipedia.org/wiki/Obj"&gt;obj&lt;/a&gt; file &lt;a href="http://www.royriggs.com/obj.html"&gt;format&lt;/a&gt;, Blender adds the texture name to the material like so, “usemtl sphere_sphere.png”, not cool. Anyway I thought, hey, the export script is written in Python, I wonder if I can fix this?&lt;/p&gt;</description>
    </item>
    <item>
      <title>I Love the Idea of a New Smart Phone</title>
      <link>https://chris.iluo.net/blog/2009/08/30/i-love-the-idea-of-a-new-smart-phone/</link>
      <pubDate>Sun, 30 Aug 2009 21:04:31 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2009/08/30/i-love-the-idea-of-a-new-smart-phone/</guid>
      <description>&lt;p&gt;The list of awesome phones:&lt;br&gt;
&lt;a href="http://www.htc.com/"&gt;HTC Phones&lt;/a&gt;&lt;br&gt;
&lt;a href="http://www.openmoko.com/"&gt;OpenMoko&lt;/a&gt;&lt;br&gt;
&lt;a href="http://www.palm.com/us/products/phones/pre/"&gt;Palm Pre&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;However, a new hotness has just been born.&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://maemo.nokia.com/n900/"&gt;Nokia n900&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;32 GB internal storage&lt;/li&gt;
&lt;li&gt;Expandable to up to 48 GB with external microSD card&lt;/li&gt;
&lt;li&gt;3.5G mobile network&lt;/li&gt;
&lt;li&gt;Quadband GSM with GPRS and EDGE&lt;/li&gt;
&lt;li&gt;Data transfers over a cellular network 10/2Mbps&lt;/li&gt;
&lt;li&gt;Data transfers over Wi-Fi 54Mbps&lt;/li&gt;
&lt;li&gt;Flash 9.4 support (In your face iPhone users, Nokia loves me)&lt;/li&gt;
&lt;li&gt;5-megapixel (2584 × 1938 resolution) digital camera (&lt;a href="http://en.wikipedia.org/wiki/IPhone#Camera_and_photos"&gt;iPhone is up to 3.2-megapixel&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;800 × 480 resolution video recording&lt;/li&gt;
&lt;li&gt;Dual LED flash&lt;/li&gt;
&lt;li&gt;800 × 480 resolution screen&lt;/li&gt;
&lt;li&gt;Tactile and onscreen QWERTY keyboards (Yes, none of this onscreen keyboard rubbish)&lt;/li&gt;
&lt;li&gt;Removable battery (That probably won&amp;rsquo;t &lt;a href="http://www.crunchgear.com/2009/08/12/yet-another-exploding-iphone/"&gt;explode&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Assisted-GPS receiver&lt;/li&gt;
&lt;li&gt;Ovi Maps pre-installed&lt;/li&gt;
&lt;li&gt;TV out (PAL/NTSC) with Nokia Video Connectivity Cable (CA-75U, included in box) or WLAN/UPnP&lt;/li&gt;
&lt;li&gt;Wide aspect ratio 16:9 (WVGA)&lt;/li&gt;
&lt;li&gt;Video recording file format: .mp4; codec: MPEG-4&lt;/li&gt;
&lt;li&gt;Video recording at up to 848 × 480 pixels (WVGA) and up to 25fps&lt;/li&gt;
&lt;li&gt;Video playback file formats: .mp4, .avi, .wmv, .3gp; codecs: H.264, MPEG-4, Xvid, WMV, H.263&lt;/li&gt;
&lt;li&gt;Music playback file formats: .wav, .mp3, .AAC, .eAAC, .wma, .m4a&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The important part:&lt;br&gt;
Development in &lt;a href="http://en.wikipedia.org/wiki/C_%28programming_language%29"&gt;C&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Python_%28programming_language%29"&gt;Python&lt;/a&gt; are supported, using &lt;a href="http://www.gtk.org/"&gt;GTK&lt;/a&gt;.&lt;br&gt;
Unfortunately it looks like &lt;a href="http://en.wikipedia.org/wiki/C%2B%2B"&gt;C++&lt;/a&gt; is not supported so anyone wanting to do any &lt;a href="http://en.wikipedia.org/wiki/Object-oriented_programming"&gt;OOP&lt;/a&gt; will have to do it in Python.&lt;br&gt;
That is great that Nokia are supporting open standards, releasing a mobile phone running &lt;a href="http://en.wikipedia.org/wiki/Linux"&gt;Linux&lt;/a&gt;. It would be nice if they supported C++ too, but that is just my personal preference, and it may come in the future, I know all the C++ jazz is quite complex and definitely non-trivial.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Symbols/Characters Returned by ls -l</title>
      <link>https://chris.iluo.net/blog/2009/08/27/symbols/characters-returned-by-ls-l/</link>
      <pubDate>Thu, 27 Aug 2009 10:45:12 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2009/08/27/symbols/characters-returned-by-ls-l/</guid>
      <description>&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$ ls -l
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;total &lt;span style="color:#ae81ff"&gt;24&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;drwxrwxr-x   ...   thisisadirectory
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;-rw-rw-r--   ...   thisisafile
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;lrwxrwxrwx.  ...   thisisalink -&amp;gt; /media/data
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We &lt;a href="http://www.freeos.com/articles/3127/"&gt;know what the rwx fields are&lt;/a&gt; but what about d, - and l? Ok, those are pretty obvious too, &lt;a href="http://www.comptechdoc.org/os/linux/usersguide/linux_ugfilesp.html"&gt;here&lt;/a&gt; is a list of the more obscure ones because I always forget.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;d&lt;/strong&gt; Directory.&lt;br&gt;
&lt;strong&gt;l&lt;/strong&gt; Symbolic link.&lt;br&gt;
&lt;strong&gt;-&lt;/strong&gt; Regular file.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;b&lt;/strong&gt; Block buffered device special file.&lt;br&gt;
&lt;strong&gt;c&lt;/strong&gt; Character unbuffered device special file.&lt;br&gt;
&lt;strong&gt;s&lt;/strong&gt; Socket link.&lt;br&gt;
&lt;strong&gt;p&lt;/strong&gt; FIFO pipe.&lt;br&gt;
&lt;strong&gt;.&lt;/strong&gt; indicates a file with an SELinux security context, but no other alternate access method.&lt;/p&gt;</description>
    </item>
    <item>
      <title>libxdgmm</title>
      <link>https://chris.iluo.net/blog/2009/07/22/libxdgmm/</link>
      <pubDate>Wed, 22 Jul 2009 09:46:05 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2009/07/22/libxdgmm/</guid>
      <description>&lt;p&gt;I think the &lt;a href="http://en.wikipedia.org/wiki/Portland_Project"&gt;Portland Project&lt;/a&gt; from &lt;a href="http://www.freedesktop.org/"&gt;freedesktop.org&lt;/a&gt;, is a great idea and&lt;br&gt;
everyone should be &lt;a href="http://ploum.frimouvy.org/?207-modify-your-application-to-use-xdg-folders"&gt;supporting it in their applications&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I’ve just created a very small C++ wrapper (libxdgmm) for accessing &lt;a href="http://portland.freedesktop.org/wiki/"&gt;XDG&lt;/a&gt; more easily. To use it, you need &lt;a href="http://breathe.git.sourceforge.net/git/gitweb.cgi?p=breathe/breathe;a=blob;f=include/libxdgmm/libxdgmm.h;hb=HEAD"&gt;libxdgmm.h&lt;/a&gt; and &lt;a href="http://breathe.git.sourceforge.net/git/gitweb.cgi?p=breathe/breathe;a=blob;f=src/libxdgmm/libxdgmm.cpp;hb=HEAD"&gt;libxdgmm.cpp&lt;/a&gt;. Just add these to your project and then use them like so:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#include&lt;/span&gt; &lt;span style="color:#75715e"&gt;&amp;lt;libxdgmm/libxdg.h&amp;gt;&lt;/span&gt;&lt;span style="color:#75715e"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;int&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;main&lt;/span&gt;(&lt;span style="color:#66d9ef"&gt;int&lt;/span&gt; argc, &lt;span style="color:#66d9ef"&gt;char&lt;/span&gt;&lt;span style="color:#f92672"&gt;**&lt;/span&gt; argv)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;  &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; (&lt;span style="color:#f92672"&gt;!&lt;/span&gt;xdg&lt;span style="color:#f92672"&gt;::&lt;/span&gt;IsInstalled()) std&lt;span style="color:#f92672"&gt;::&lt;/span&gt;cout&lt;span style="color:#f92672"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;XDG is not installed&amp;#34;&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;&amp;lt;&lt;/span&gt;std&lt;span style="color:#f92672"&gt;::&lt;/span&gt;endl;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;  &lt;span style="color:#66d9ef"&gt;else&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;    std&lt;span style="color:#f92672"&gt;::&lt;/span&gt;string data;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;    xdg&lt;span style="color:#f92672"&gt;::&lt;/span&gt;GetDataHome(data);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;    std&lt;span style="color:#f92672"&gt;::&lt;/span&gt;cout&lt;span style="color:#f92672"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;data=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;\&amp;#34;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;&amp;lt;&lt;/span&gt;data&lt;span style="color:#f92672"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;\&amp;#34;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;&amp;lt;&lt;/span&gt;std&lt;span style="color:#f92672"&gt;::&lt;/span&gt;endl;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;    std&lt;span style="color:#f92672"&gt;::&lt;/span&gt;string config;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;    xdg&lt;span style="color:#f92672"&gt;::&lt;/span&gt;GetConfigHome(config);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;    std&lt;span style="color:#f92672"&gt;::&lt;/span&gt;cout&lt;span style="color:#f92672"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;config=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;\&amp;#34;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;&amp;lt;&lt;/span&gt;config&lt;span style="color:#f92672"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;\&amp;#34;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;&amp;lt;&lt;/span&gt;std&lt;span style="color:#f92672"&gt;::&lt;/span&gt;endl;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;    &lt;span style="color:#75715e"&gt;// Obviously these have to exist to work.  You can translate the error code returned by calling xdg::GetOpenErrorString(int result);
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;&lt;/span&gt;    xdg&lt;span style="color:#f92672"&gt;::&lt;/span&gt;OpenFile(&lt;span style="color:#e6db74"&gt;&amp;#34;/home/chris/dev/cMd3Loader.cpp&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;    xdg&lt;span style="color:#f92672"&gt;::&lt;/span&gt;OpenFolder(&lt;span style="color:#e6db74"&gt;&amp;#34;/home/chris/&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;    xdg&lt;span style="color:#f92672"&gt;::&lt;/span&gt;OpenURL(&lt;span style="color:#e6db74"&gt;&amp;#34;http://chris.iluo.net&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;  &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; EXIT_SUCCESS;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I still have to wrap some of the other functionality, such as &lt;code&gt;XDG_DESKTOP_DIR&lt;/code&gt;, &lt;code&gt;XDG_DOCUMENTS_DIR&lt;/code&gt;, &lt;code&gt;XDG_MUSIC_DIR&lt;/code&gt;, desktop-file-utils, xdg-desktop-menu and xdg-desktop-icon etc.  I will wrap these as I need them (Or at special request).  I don&amp;rsquo;t think I will be supporting xdg-screensaver or xdg-mime as I don&amp;rsquo;t have a use for them right now.&lt;/p&gt;</description>
    </item>
    <item>
      <title>AHGotoPage Doesn't Work Argh!</title>
      <link>https://chris.iluo.net/blog/2009/06/04/ahgotopage-doesnt-work-argh/</link>
      <pubDate>Thu, 04 Jun 2009 00:14:28 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2009/06/04/ahgotopage-doesnt-work-argh/</guid>
      <description>&lt;p&gt;It looks like &lt;a href="http://developer.apple.com/documentation/Carbon/Reference/Apple_Help/Reference/reference.html#//apple_ref/doc/uid/TP30000169-CH1g-F16335"&gt;AHGotoPage&lt;/a&gt; is broken with Mac OS X 10.5.7 and later (It was also broken on 10.3.9 and earlier). Probably the easiest way around this for the moment is to open your help documentation in a web browser using &lt;a href="http://developer.apple.com/documentation/Carbon/Reference/LaunchServicesReference/Reference/reference.html#//apple_ref/c/func/LSOpenCFURLRef"&gt;LSOpenCFURLRef&lt;/a&gt; instead. Hope this helps someone.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Upgraded Linux Kernel not recognising ext3 partitions and the solution</title>
      <link>https://chris.iluo.net/blog/2009/06/03/upgraded-linux-kernel-not-recognising-ext3-partitions-and-the-solution/</link>
      <pubDate>Wed, 03 Jun 2009 00:31:14 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2009/06/03/upgraded-linux-kernel-not-recognising-ext3-partitions-and-the-solution/</guid>
      <description>&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Unable to access resume device &lt;span style="color:#f92672"&gt;(&lt;/span&gt;/dev/dm-1&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mount: error mounting /dev/root on /sysroot as ext3: No such file or directory
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Being a Linux noob, I found &lt;a href="http://forums.fedoraforum.org/showthread.php?t=216396"&gt;this solution&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Create &lt;a href="https://bugzilla.redhat.com/attachment.cgi?id=330620"&gt;mkinitrd.new&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;chmod +x mkinitrd.new
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;su
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cd /boot
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo ./mkinitrd.new -f initrd-2.6.27.24-170.2.68.fc10.x86_64.img 2.6.27.24-170.2.68.fc10.x86_64
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>"Error: glXCreateContext failed" After Updating Video Drivers</title>
      <link>https://chris.iluo.net/blog/2009/04/09/error-glxcreatecontext-failed-after-updating-video-drivers/</link>
      <pubDate>Thu, 09 Apr 2009 21:18:51 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2009/04/09/error-glxcreatecontext-failed-after-updating-video-drivers/</guid>
      <description>&lt;p&gt;After updating video drivers I couldn’t run 3d applications, for example glxinfo:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Error: glXCreateContext failed
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The following needs to be present in the xorg.conf file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Section &lt;span style="color:#e6db74"&gt;&amp;#34;Files&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ModulePath &lt;span style="color:#e6db74"&gt;&amp;#34;/usr/lib64/xorg/modules/extensions/nvidia&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ModulePath &lt;span style="color:#e6db74"&gt;&amp;#34;/usr/lib64/xorg/modules&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;EndSection
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Yearly Update :)</title>
      <link>https://chris.iluo.net/blog/2009/02/25/yearly-update/</link>
      <pubDate>Wed, 25 Feb 2009 09:17:01 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2009/02/25/yearly-update/</guid>
      <description>&lt;p&gt;[&lt;img src="./blog/wp-content/uploads/2009/02/sudoku090225.png" alt="Sudoku Work in Progress"&gt;
Skysytem background, testing wireframe grid, TombRaider MD3 model, testing material boxes, particle systems, frames per second messages, pegs, shocks, all the necessary elements of a Sudoku game.&lt;/p&gt;
&lt;p&gt;It’s been a while, I have like 20 draft entries in &lt;a href="http://www.wordpress.org/"&gt;WordPress&lt;/a&gt; ranging from 1 paragraph comments up to 10 paragraph full on entries that still need that final once over and edit before going live. Actually it might be cool if there was (There probably is) a plugin so that people could optionally go to a page on my blog where they can see everything that hasn’t been published yet, like tagged with “draft” or something and comment on which ones I should flesh out and which ones I should ditch before they are even finished.&lt;/p&gt;</description>
    </item>
    <item>
      <title>x86_64 Linux C/C++ Test</title>
      <link>https://chris.iluo.net/blog/2008/12/15/x86_64-linux-c/c-test/</link>
      <pubDate>Mon, 15 Dec 2008 16:10:02 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2008/12/15/x86_64-linux-c/c-test/</guid>
      <description>&lt;p&gt;I use:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://gcc.gnu.org/"&gt;gcc&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.cmake.org/"&gt;cmake&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.kdevelop.org/"&gt;KDevelop&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://rapidsvn.tigris.org/"&gt;RapidSVN&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://meld.sourceforge.net/"&gt;Meld&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;However, don’t go the websites, all of these are available in the (Default?) repositories, so you can either install them via &lt;a href="http://en.wikipedia.org/wiki/Yellow_dog_Updater,_Modified"&gt;yum&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/PackageKit"&gt;PackageKit&lt;/a&gt; or apt-get. Also note: RapidSVN and Meld are only needed if you want to use SVN. Even KDevelop is not required if you have another text editor that you prefer such as gedit/vi/emacs. If you want to create your provide your own make file then you don’t need cmake either.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Linux x86_64</title>
      <link>https://chris.iluo.net/blog/2008/12/13/linux-x86_64/</link>
      <pubDate>Sat, 13 Dec 2008 15:23:12 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2008/12/13/linux-x86_64/</guid>
      <description>&lt;p&gt;I have been dipping my toe into x86_64 waters sporadically over the last couple of years. On each of the previous occasions it always seemed too immature, packages were way to hard to come by (I prefer precompiled binaries), half my hardware didn’t work, strange crashes etc. Seeing as this episode has been 100% successful, I thought this time I would document it.&lt;/p&gt;
&lt;p&gt;&lt;img src="./blog/wp-content/uploads/2008/12/screen_prompt_320x240_color_test.png" alt="/blog/wp-content/uploads/2008/12/screen_prompt_320x240_color_test-300x225.png"&gt;&lt;br&gt;
Fedora&lt;/p&gt;
&lt;p&gt;My favourite distribution is &lt;a href="http://fedoraproject.org"&gt;Fedora&lt;/a&gt; due to it’s rapid development and ease of use. I &lt;a href="http://fedoraproject.org/en/get-fedora"&gt;downloaded&lt;/a&gt; via &lt;a href="http://en.wikipedia.org/wiki/BitTorrent"&gt;BitTorrent&lt;/a&gt;. (Obviously) make sure you get the x86_64 version. I always like to run the sha checksum to rule out that as the problem if something does arise later. I also make sure that my DVD verifies in my burning program after it has been burnt.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Covers!</title>
      <link>https://chris.iluo.net/blog/2008/11/23/covers/</link>
      <pubDate>Sun, 23 Nov 2008 14:09:15 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2008/11/23/covers/</guid>
      <description>&lt;p&gt;Last night we went to &lt;a href="http://the-riotact.com/?p=9752"&gt;The Pheonix&lt;/a&gt; (Where I met Christina almost 3 years ago!) and they had &lt;a href="http://www.theelliscollective.com/"&gt;The Ellis Collective&lt;/a&gt; playing with two other bands. The girl on the violin was the highlight, reminding &lt;a href="http://www.rephrase.net/"&gt;Sam&lt;/a&gt; and I of &lt;a href="http://www.fourplayjazz.com/"&gt;Fourplay&lt;/a&gt;. It would have been good if there were more violin solos, also the songs on their site just don’t do the violin justice.&lt;br&gt;
I heart &lt;a href="http://en.wikipedia.org/wiki/Cover_version"&gt;covers&lt;/a&gt;. No wait, I heart covers more than everyone in the world put together. YouTube is awesome for finding covers, it can be quite patchy, but basically everyone votes down the worst ones so you only view the gold.&lt;/p&gt;</description>
    </item>
    <item>
      <title>const int vs. enum vs. define</title>
      <link>https://chris.iluo.net/blog/2008/11/01/const-int-vs.-enum-vs.-define/</link>
      <pubDate>Sat, 01 Nov 2008 14:02:56 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2008/11/01/const-int-vs.-enum-vs.-define/</guid>
      <description>&lt;p&gt;Example A:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;int&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;GetValue0&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;  &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;10&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;int&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;GetValue1&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;  &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;10&lt;/span&gt; &lt;span style="color:#f92672"&gt;+&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;10&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;int&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;GetValue2&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;  &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;10&lt;/span&gt; &lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;10&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So if all of the values 10 represent a common &lt;a href="http://en.wikipedia.org/wiki/Magic_number_(programming)"&gt;magic number&lt;/a&gt; then you are going to want to extract that value to one location instead of the 5 that it is in at the moment. How do we do this?&lt;/p&gt;
&lt;p&gt;Say we call the value &lt;code&gt;MAGIC_NUMBER&lt;/code&gt; (Of course, in a real life situation you would use a better name than this, wouldn’t you? Something like &lt;code&gt;PI&lt;/code&gt;, &lt;code&gt;GST_PERCENTAGE&lt;/code&gt;, &lt;code&gt;NUMBER_OF_CLIENTS&lt;/code&gt;, etc.) we would then have this code.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Crank very early testing of heightmap and basic physics</title>
      <link>https://chris.iluo.net/blog/2008/02/02/crank-very-early-testing-of-heightmap-and-basic-physics/</link>
      <pubDate>Sat, 02 Feb 2008 08:16:02 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2008/02/02/crank-very-early-testing-of-heightmap-and-basic-physics/</guid>
      <description>&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
      &lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/aHPVFrJhbWc?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
    &lt;/div&gt;

&lt;p&gt;This is what I have been working on in my spare time. I think it is going alright. I still have to do:&lt;br&gt;
The brakes can’t be locked up at the moment, they always give a little so you can’t for example lean on the front wheel and hold the brakes and expect to stay in the same place.&lt;br&gt;
Create the level editor, at the moment the level is just a bunch of sin waves added together.&lt;br&gt;
Add a little bit of &lt;a href="http://en.wikipedia.org/wiki/Parallax_scrolling"&gt;parallax scrolling&lt;/a&gt; to add a bit of interest and depth.&lt;br&gt;
Create better artwork for example shocks and rider.&lt;br&gt;
Add dynamic bike bits such as suspension that compresses and a rider that leans forwards and backwards and has a weight (At the moment I fake weight transfer by just rotating the bike).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Call of Duty 4 AI and difficulty levels</title>
      <link>https://chris.iluo.net/blog/2007/12/17/call-of-duty-4-ai-and-difficulty-levels/</link>
      <pubDate>Mon, 17 Dec 2007 08:00:53 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2007/12/17/call-of-duty-4-ai-and-difficulty-levels/</guid>
      <description>&lt;p&gt;I started and finished &lt;a href="http://en.wikipedia.org/wiki/Call_of_Duty_4:_Modern_Warfare"&gt;Call of Duty 4&lt;/a&gt; yesterday. Basically it is war themed &lt;a href="http://en.wikipedia.org/wiki/First-person_shooter"&gt;FPS&lt;/a&gt; that tries to capture the feeling of helplessness of being in a war. The standard method for creating each level in a game like this (&lt;a href="http://en.wikipedia.org/wiki/Quake_1"&gt;Quake 1&lt;/a&gt;) is to create the “map” that the player will run around in and then manually add a series of points (Spawn points) in the map that represent each bad guy. So if you add 20 points, you will have 20 bad guys. Another method is to specify 100 spawn points and then spawn 20 bad guys at 20 of those points, which mixes it up a little bit so that the game is less predictable. In earlier games like Quake 1 and Wolfenstein, these bad guys have a problem where they just sit on their starting position until they saw the player, at which point they would basically run straight at the player shooting, pretty simple stuff.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Welcome</title>
      <link>https://chris.iluo.net/blog/2007/11/23/welcome/</link>
      <pubDate>Fri, 23 Nov 2007 18:38:45 +0000</pubDate>
      <guid>https://chris.iluo.net/blog/2007/11/23/welcome/</guid>
      <description>&lt;p&gt;Hullo! If you are reading this I have now moved from LiveJournal to my self hosted WordPress blog. I am aiming to post at least one article per month, hardly a challenge, but hopefully I can sustain at least this poor effort.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
