<?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>James Wynn &#187; programming</title>
	<atom:link href="http://jameswynn.com/tag/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://jameswynn.com</link>
	<description>Technology, Programming, Games, Religion, Rants</description>
	<lastBuildDate>Wed, 02 Jun 2010 21:06:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Three Big Lies about Programming</title>
		<link>http://jameswynn.com/2010/06/three-big-lies-about-programming/</link>
		<comments>http://jameswynn.com/2010/06/three-big-lies-about-programming/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 19:54:26 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://jameswynn.com/?p=218</guid>
		<description><![CDATA[I recently found two fantastic presentations the guys from Insomniac put together about misguided/inefficient approaches to programming and the steps they take to compensate.
The first, titled "Three Big Lies: Typical Design Failures in Game Programming," puts forth that many of the biggest issues we face as programmers is of our own design. Essentially, we are [...]]]></description>
			<content:encoded><![CDATA[<p>I recently found two fantastic presentations the guys from <a title="Insomniac Games" href="http://www.insomniacgames.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.insomniacgames.com');">Insomniac </a>put together about misguided/inefficient approaches to programming and the steps they take to compensate.</p>
<p>The first, titled <a title="Three Big Lies..." href="http://www.insomniacgames.com/assets/filesthreebiglies2010.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.insomniacgames.com');">"Three Big Lies: Typical Design Failures in Game Programming,"</a> puts forth that many of the biggest issues we face as programmers is of our own design. Essentially, we are guilty of over abstracting and over modeling.  They argue that since all programming boils down to data transformations, we should just focus on the data.  "World Modeling" may be a nice way to ease new programmers into the field, but it is not necessarily the most efficient approach.</p>
<p>The second presentation focused on a design paradigm that I have worked very hard to create for many of my own projects.  <a title="A Dynamic Component Architecture..." href="http://www.insomniacgames.com/assets/filesadynamiccomponentarchitectureforhighperformancegameplay.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.insomniacgames.com');">"A Dynamic Component Architecture for High Performance Gameplay,"</a> essentially lays out a system for modeling game objects through composition of relatively flat hierarchies of components.  Where more traditional approaches create individual objects with complex inheritance systems.  The author not only explains the benefits of the system, but also a sample of his API and many examples of how it helps improve their system.</p>
<p>If these articles don't challenge the way you program, then either you are a genius and have already made these revelations, or you're an idiot.  Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://jameswynn.com/2010/06/three-big-lies-about-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GNU Patch in Windows 7 or Vista</title>
		<link>http://jameswynn.com/2010/03/gnu-patch-in-windows-7-or-vista/</link>
		<comments>http://jameswynn.com/2010/03/gnu-patch-in-windows-7-or-vista/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 15:09:26 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://jameswynn.com/?p=186</guid>
		<description><![CDATA[I just had a little fight with Windows 7 about permissions. It seems that it demands that any executable with the word "patch" in the name must be run with administrative privileges. After fighting with it for a few minutes about the absurdity of the problem, I resorted to a simple hack.

Rename patch.exe to patsh.exe.
Then [...]]]></description>
			<content:encoded><![CDATA[<p>I just had a little fight with Windows 7 about permissions. It seems that it demands that any executable with the word "<em>patch</em>" in the name must be run with administrative privileges. After fighting with it for a few minutes about the absurdity of the problem, I resorted to a simple hack.</p>
<ol>
<li>Rename <em>patch.exe</em> to <em>pat<strong>s</strong>h.exe</em>.</li>
<li>Then create patch.bat in the same directory containing the following command:<br />
<span style="font-family: monospace;">@patsh.exe %*</span></li>
</ol>
<p>You will never notice a difference, and Windows 7 can go politely F*** itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://jameswynn.com/2010/03/gnu-patch-in-windows-7-or-vista/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accessing SQLite databases in C++ using SOCI</title>
		<link>http://jameswynn.com/2009/10/accessing-sqlite-databases-in-c-using-soci/</link>
		<comments>http://jameswynn.com/2009/10/accessing-sqlite-databases-in-c-using-soci/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 19:31:59 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://jameswynn.com/?p=163</guid>
		<description><![CDATA[I recently decided to use SOCI and SQLite at work and found that neither there is not a super straight forward path for setting this up. As of SOCI version 3.0.0 there is no support for Visual Studio 2008, so I had to convert and fix a few bugs resulting from that. There were some [...]]]></description>
			<content:encoded><![CDATA[<p>I recently decided to use <a href="http://soci.sourceforge.net" onclick="javascript:pageTracker._trackPageview('/outbound/article/soci.sourceforge.net');">SOCI</a> and <a href="http://www.sqlite.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.sqlite.org');">SQLite</a> at work and found that neither there is not a super straight forward path for setting this up. As of SOCI version 3.0.0 there is no support for <strong>Visual Studio 2008</strong>, so I had to convert and fix a few bugs resulting from that. There were some path issues as well. Also they don't package the SQLite interface with SOCI so you have to checkout the repo to get access to it. After getting that there are still a few snags, not to mention actually setting up SQLite as a library.</p>
<p>[Updated: 10/13/2009]<br />
After writing this article the SOCI team has resolved some of these issues, so some of these steps are no longer necessary.</p>
<h2><span id="more-163"></span></h2>
<h2>Step 1: Setup SQLite</h2>
<h3>Step 1.1</h3>
<p>Download the SQLite 3.6.18 source and library files.</p>
<ul>
<li><a href="http://www.sqlite.org/sqlite-amalgamation-3_6_18.zip" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.sqlite.org');">Source</a></li>
<li><a href="http://www.sqlite.org/sqlitedll-3_6_18.zip" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.sqlite.org');">Libraries</a></li>
</ul>
<h3>Step 1.2:</h3>
<p>Unarchive the SQLite archives into a directory, mine will be <em>c:\usr\sqlite3</em></p>
<h3>Step 1.3:</h3>
<p>Create the sqlite3.lib file by using Visual Studio's lib command:</p>

<div class="wp_syntax"><div class="code"><pre class="batch" style="font-family:monospace;">LIB /DEF:sqlite3.def</pre></div></div>

<h2><strong>Step 2: Setup SOCI</strong></h2>
<h3>Step 2.1:</h3>
<p>Download the <a href="http://soci.git.sourceforge.net/git/gitweb.cgi?p=soci/soci;a=snapshot;h=ed12736cf7418abcef7a5b2230c745adaa9aaaa3;sf=tgz" onclick="javascript:pageTracker._trackPageview('/outbound/article/soci.git.sourceforge.net');">head of SOCI's git repository</a></p>
<h3>Step 2.2:</h3>
<p>Decompress the file into another directory, mine will be <em>c:\usr\soci</em></p>
<h3>Step 2.3:</h3>
<p>Soci requires <em>stdint.h</em> but Visual Studio 2008 does not provide it, so simply download <a href="http://www.azillionmonkeys.com/qed/pstdint.h" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.azillionmonkeys.com');">pstdint.h</a> and rename it to <em>stdint.h</em> in the <em>soci\src\core</em> directory.</p>
<h3>Step 2.4:</h3>
<p>Open the directory<em> soci\build</em> and copy <em>msvc80</em> to <em>msvc90</em>.</p>
<p>Now open the msvc90\dll directory.</p>
<p>Through Visual Studio 2008, open the <em>soci_dll.sln</em> file and allow it to convert it with the default parameters.</p>
<h3>Step 2.5: Build SOCI's Core and SQLite3</h3>
<p>SOCI's core project should build without errors, but the sqlite project will have several.</p>
<h3>Step 2.6: Fixing Build Errors</h3>
<p>Now SOCI's core project should build without errors, but the sqlite3 project will definitely fail. It will give two specific errors:</p>
<blockquote>
<pre>fatal error C1083: Cannot open include file: 'sqlite3.h': No such file or directory</pre>
</blockquote>
<p>and</p>
<blockquote>
<pre>error C3163: '_vsnprintf': attributes inconsistent with previous declaration</pre>
</blockquote>
<p>Both are relatively easy to fix.</p>
<h4>Step 2.6.1: Fixing SQLite3 include paths</h4>
<p>In Visual Studio, navigate to View-&gt;Property Manager, then in the pane that shows up, expand the sqlite3 project, then expand "Debug | Win32" then "soci_dll" then double-click on the "soci" object. Select "User Macros" on the sheet you find there.</p>
<p>Find SQLITE3_INCLUDE_DIR and SQLITE_LIB_DIR and change them to the directory created earlier, "c:\usr\sqlite3"</p>
<h4>Step 2.6.2: Fixing _vsnprintf</h4>
<p>[Update 10/13/2009]<br />
This step is no longer needed.</p>
<p>Expand the <strong>core</strong> project and look for soci-platform.h and find a line that says "HAVE_VSNPRINTF"</p>
<p>This is redefining something that VS2008 provides already and confuses the hell out of the compiler. Just comment it out, or change it to look like:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp cpp" style="font-family:monospace;"><span style="color: #666666;">// Define if you have the vsnprintf variants.</span>
<span style="color: #339900;">#if _MSC_VER &amp;lt; 1500</span>
<span style="color: #339900;">#	define HAVE_VSNPRINTF 1</span>
<span style="color: #339900;">#	define vsnprintf _vsnprintf</span>
<span style="color: #339900;">#endif</span></pre></div></div>

<h3>Step 2.7 Building SOCI's sqlite3_test project</h3>
<p>This project will be riddled with errors unless you have boost installed. I personally don't use it, so had to comment out large chunks of <em>common-tests.h</em>.  Specifically, comment out the area at the top where it includes the boost headers. Also comment out the contents of test26, test28 and test30.</p>
<p>Also add this line at the bottom of <em>soci-platform.h:</em></p>

<div class="wp_syntax"><div class="code"><pre class="cpp cpp" style="font-family:monospace;"><span style="color: #339900;">#undef SOCI_USE_BOOST</span></pre></div></div>

<h2>Finished</h2>
<p>Now you should have a working copy of SOCI 3.0.0 with SQLite3 support in Visual Studio 2008. Congratulations!</p>
]]></content:encoded>
			<wfw:commentRss>http://jameswynn.com/2009/10/accessing-sqlite-databases-in-c-using-soci/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SimpleFileWatcher: New version</title>
		<link>http://jameswynn.com/2009/09/simplefilewatcher-new-version/</link>
		<comments>http://jameswynn.com/2009/09/simplefilewatcher-new-version/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 03:46:23 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[SimpleFileWatcher]]></category>

		<guid isPermaLink="false">http://jameswynn.com/?p=161</guid>
		<description><![CDATA[Just released a new version of SimpleFileWatcher. Not a lot of new content, but a pretty serious bug was fixed for Win32 and some better error handling. I create some more maintainable build scripts using premake. Also, I moved the OgreDemo off to its own directory to help contain all the files.
Download: SimpleFileWatcher 2009.09.14
]]></description>
			<content:encoded><![CDATA[<p>Just released a new version of SimpleFileWatcher. Not a lot of new content, but a pretty serious bug was fixed for Win32 and some better error handling. I create some more maintainable build scripts using <a href="http://industriousone.com/premake" onclick="javascript:pageTracker._trackPageview('/outbound/article/industriousone.com');">premake</a>. Also, I moved the OgreDemo off to its own directory to help contain all the files.</p>
<p>Download: <a href="http://simplefilewatcher.googlecode.com/files/SimpleFileWatcher-2009-09-14.zip" onclick="javascript:pageTracker._trackPageview('/outbound/article/simplefilewatcher.googlecode.com');">SimpleFileWatcher 2009.09.14</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jameswynn.com/2009/09/simplefilewatcher-new-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up a Symbol Server for Visual Studio 2008</title>
		<link>http://jameswynn.com/2009/08/setting-up-a-symbol-server-for-visual-studio-2008/</link>
		<comments>http://jameswynn.com/2009/08/setting-up-a-symbol-server-for-visual-studio-2008/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 17:34:03 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://jameswynn.com/?p=157</guid>
		<description><![CDATA[Debugging an application after its been released can be a total pain.  So, over time I've collected some software and techniques for making it a bit easier on myself and my team.  We ship our product with a modified version of  Hans Dietrich's XCrashReport to provide logs, system information, and minidumps when our application inevitably crashes. [...]]]></description>
			<content:encoded><![CDATA[<p>Debugging an application after its been released can be a total pain.  So, over time I've collected some software and techniques for making it a bit easier on myself and my team.  We ship our product with a modified version of  <a title="XCrashReport" href="http://www.codeproject.com/KB/debug/XCrashReportPt4.aspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.codeproject.com');">Hans Dietrich's XCrashReport</a> to provide logs, system information, and minidumps when our application inevitably crashes. If you're not already using something similar I would highly recommend checking it out.</p>
<p>This utility sends us lots of crash dump files and until now we've always had to dig back through our archives to find the corresponding symbols and source code. But today I decided to rid us of the headache and set up a <a href="http://support.microsoft.com/kb/319037" onclick="javascript:pageTracker._trackPageview('/outbound/article/support.microsoft.com');">Symbol Server</a> that could automatically determine our version and load it into Visual Studio 2008. The documentation can be a bit lacking at times, so I will try to illuminate the path that I took.</p>
<p><strong>Step 1:</strong><br />
Download <a href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.microsoft.com');">Debugging Tools for Windows</a>. This provides you with symstore.exe which will be important for creating the symbol store.</p>
<p><strong>Step 1.5:</strong><br />
Add the Debugging Tools directory to your path, so we have access to symstore.exe.</p>
<p><strong>Step 2:</strong><br />
Create a folder on your build server and share it such that you have something like \\BuildServer\Symbols available to your workstation.</p>
<p><strong>Step 3:</strong><br />
For each build, execute a command like</p>
<blockquote><p>symstore.exe add /r /p /f U:\Project\Bin\*.* /s \\BuildServer\Symbols /t "My Project" /v "Build 42"</p></blockquote>
<p>Where <em>U:\Project\Bi</em>n is the directory with your .pdb files, <em>\\BuildServer\Symbols</em> is obviously the symbols directory, <em>"My Project"</em> is the name of the project, and <em>"Build 42"</em> is the description of the version.</p>
<p><strong>Step 4:</strong><br />
Open Visual Studio 2008,  go to Tools-&gt;Options-&gt;Debugging-&gt;Symbols. Set your cache directory to something like <em>C:\SymbolCache</em>, then add the location of the new symbol store: <em>\\BuildServer\Symbols</em>.</p>
<p><strong>Step 4.5:</strong><br />
At this point, it would be advisable to add the Microsoft Symbol Store to the locations list too: <em>http://msdl.microsoft.com/download/symbols</em>.</p>
<p>This should facilitate debugging crash dumps without tracking down the symbols. Also, check out the <a href="http://msdn.microsoft.com/en-us/library/ms680641(VS.85).aspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/msdn.microsoft.com');">Source Server</a> which will access your VCS system to pull out the correct source code files for you automatically too.</p>
]]></content:encoded>
			<wfw:commentRss>http://jameswynn.com/2009/08/setting-up-a-symbol-server-for-visual-studio-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FileWatcher becomes SimpleFileWatcher</title>
		<link>http://jameswynn.com/2009/05/filewatcher-becomes-simplefilewatcher/</link>
		<comments>http://jameswynn.com/2009/05/filewatcher-becomes-simplefilewatcher/#comments</comments>
		<pubDate>Fri, 15 May 2009 04:30:54 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[FileWatcher]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[SimpleFileWatcher]]></category>

		<guid isPermaLink="false">http://jameswynn.com/?p=148</guid>
		<description><![CDATA[I finally got around to doing a little more work on FileWatcher and decided it needed an official home.  Then comes the compoundingly obvious problem of giving a product such a generic title.  Sure FileWatcher fits the purpose, but there are about 1.5 billion other projects/products with the same title.  So the new title is [...]]]></description>
			<content:encoded><![CDATA[<p>I finally got around to doing a little more work on FileWatcher and decided it needed an official home.  Then comes the compoundingly obvious problem of giving a product such a generic title.  Sure FileWatcher fits the purpose, but there are about 1.5 billion other projects/products with the same title.  So the new title is SimpleFileWatcher, and with that comes two new features for users of SimpleFileWatcher.  SFW is now under the <a href="http://www.opensource.org/licenses/mit-license.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.opensource.org');">MIT License</a>, so no worries about using the code in commercial products.  And secondly, it is hosted on <a href="http://code.google.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/code.google.com');">Google Code</a>.</p>
<p><a title="SimpleFileWatcher @ Google Code" href="http://simplefilewatcher.googlecode.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/simplefilewatcher.googlecode.com');">SimpleFileWatcher</a></p>
<p>And the new release:</p>
<p><a href="http://simplefilewatcher.googlecode.com/files/SimpleFileWatcher-2009-05-14.zip" onclick="javascript:pageTracker._trackPageview('/outbound/article/simplefilewatcher.googlecode.com');">SimpleFileWatcher v.2009.05.14</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jameswynn.com/2009/05/filewatcher-becomes-simplefilewatcher/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Libraries Binding Lua to C++</title>
		<link>http://jameswynn.com/2009/05/libraries-binding-lua-to-c/</link>
		<comments>http://jameswynn.com/2009/05/libraries-binding-lua-to-c/#comments</comments>
		<pubDate>Tue, 05 May 2009 22:31:28 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://jameswynn.com/?p=142</guid>
		<description><![CDATA[Lua is a fantastically lightweight and super fast scripting language that is the current defacto standard in-game language. Use in many many games, including the infamous World of Warcraft. We used it in my last project with great success as well, but we were never quite satisfied with the level of integration.  And this really [...]]]></description>
			<content:encoded><![CDATA[<p>Lua is a fantastically lightweight and super fast scripting language that is the current defacto standard in-game language. Use in many many games, including the infamous World of Warcraft. We used it in my last project with great success as well, but we were never quite satisfied with the level of integration.  And this really stems from the main detractor of Lua. There is no fantastic binding system for gluing it to C++. There are <a href="http://lua-users.org/wiki/BindingCodeToLua" onclick="javascript:pageTracker._trackPageview('/outbound/article/lua-users.org');">many out there</a> to be sure, but most fall short.  The most popular seem to be <a href="http://www.codenix.com/~tolua/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.codenix.com');">toLua++</a> and <a href="http://luabind.sf.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/luabind.sf.net');">LuaBind</a>.</p>
<p>toLua++ was the route we decided to go with our last system, but this had caveats.  The system required us to maintain extra "doctored" copies of our headers that could be used for generating the binding code.  This duplicated data caused headaches more than once.  That aside, there were problems with memory bloat, and memory leaks. From what I understand, these issues are known and have yet to be delt with.</p>
<p>LuaBind is probably the most used (rivaled only by toLua++) binding system right now.  It has a few glaring issues of its own though.  Most notably is its heavy use of the <a href="http://www.boost.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.boost.org');">boost</a> library.  Boost is a fantastic set of facilities, but it is just too bloated for a project not already reliant on it. This requirement caused builds to take significantly longer due to its heavy use of meta-template programming (something boost users are apparently comfortable with.)  LuaBind also makes my Lua IDE, <a href="http://www.unknownworlds.com/decoda" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.unknownworlds.com');">Decoda,</a> practically unusably sluggish. I'm not sure what is affecting it, but I assume it has something to do with the inflated symbol files it has to parse.</p>
<p>A few runners up that I'm currently considering now are <a href="http://luabridge.sourceforge.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/luabridge.sourceforge.net');">LuaBridge</a> and <a href="http://www.pplux.com/slb/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.pplux.com');">SLB</a> (Simple Lua Binder). Both of these libraries are essentially building a LuaBind clone without the boost dependency. LuaBridge hasn't been updated in over 18 months, and is as well as dead, so the plan of action would be to pick up where the original author left off.  While the author of SLB hasn't posted any updates in months, he has been committing code regularly to the googlecode repository.  Right now I'm hoping SLB pans out, but we will see.</p>
<p>Anyone else have a good recommendation?</p>
]]></content:encoded>
			<wfw:commentRss>http://jameswynn.com/2009/05/libraries-binding-lua-to-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FileWatcher now supports OSX/BSD via kqueue</title>
		<link>http://jameswynn.com/2009/03/filewatcher-now-supports-osxbsd-via-kqueue/</link>
		<comments>http://jameswynn.com/2009/03/filewatcher-now-supports-osxbsd-via-kqueue/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 23:46:10 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[FileWatcher]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[SimpleFileWatcher]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://jameswynn.com/?p=139</guid>
		<description><![CDATA[Now not only does FileWatcher support Win32 and Linux, but it supports OSX/BSD/anything else using kqueue.  This should cover 90% of the cases where this functionality is needed and I'm planning on a fallback mode that will just use directory scans and file timestamps to determine changes.
Get the new version here:
FileWatcher 2009.03.04
]]></description>
			<content:encoded><![CDATA[<p>Now not only does FileWatcher support Win32 and Linux, but it supports OSX/BSD/anything else using kqueue.  This should cover 90% of the cases where this functionality is needed and I'm planning on a fallback mode that will just use directory scans and file timestamps to determine changes.</p>
<p>Get the new version here:<br />
<a href="http://jameswynn.com/files/FileWatcher-2009.03.04.zip" onclick="javascript:pageTracker._trackPageview('/downloads/files/FileWatcher-2009.03.04.zip');">FileWatcher 2009.03.04</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jameswynn.com/2009/03/filewatcher-now-supports-osxbsd-via-kqueue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FileWatcher library watches files while you play</title>
		<link>http://jameswynn.com/2009/02/filewatcher-library-watches-files-while-you-play/</link>
		<comments>http://jameswynn.com/2009/02/filewatcher-library-watches-files-while-you-play/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 13:14:31 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[FileWatcher]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[SimpleFileWatcher]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://jameswynn.com/?p=118</guid>
		<description><![CDATA[Spurred by an article a while back in Game Developer Magazine, I decided to write a little cross platform library for detecting changes in files.  The library works in both Windows and Linux (tested in ubuntu 8.10, but should work in anything with inotify) with support soon coming to OSX.  The library is [...]]]></description>
			<content:encoded><![CDATA[<p>Spurred by an article a while back in Game Developer Magazine, I decided to write a little cross platform library for detecting changes in files.  The library works in both Windows and Linux (tested in ubuntu 8.10, but should work in anything with inotify) with support soon coming to OSX.  The library is great for automatically updating game resources during development.  Most real game engines have this these days, and now everyone else can too!</p>
<p>The library comes with two samples.  OgreDemo.cpp shows a simple example of reloading textures on the fly using the <a href="http://www.ogre3d.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.ogre3d.org');">Ogre3D</a> engine.  SimpleDemo.cpp just watches a directory and outputs the file names when a file changes.</p>
<p>Some example code:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp cpp" style="font-family:monospace;"><span style="color: #666666;">// Create the object</span>
FW<span style="color: #008080;">::</span><span style="color: #007788;">FileWatcher</span><span style="color: #000040;">*</span> fileWatcher <span style="color: #000080;">=</span> <span style="color: #0000dd;">new</span> FW<span style="color: #008080;">::</span><span style="color: #007788;">FileWatcher</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>;
&nbsp;
<span style="color: #666666;">// add a directory watch</span>
FW<span style="color: #008080;">::</span><span style="color: #007788;">WatchID</span> watchid <span style="color: #000080;">=</span> fileWatcher<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>addWatch<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;..<span style="color: #666666; font-weight: bold;">\\</span>media&quot;</span>, <span style="color: #0000dd;">new</span> UpdateListener<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>;
&nbsp;
...
&nbsp;
<span style="color: #666666;">// somewhere in your update loop call update</span>
fileWatcher<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>update<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>;
&nbsp;
<span style="color: #666666;">// where UpdateListener is defined as such</span>
<span style="color: #0000ff;">class</span> UpdateListener <span style="color: #008080;">:</span> <span style="color: #0000ff;">public</span> FW<span style="color: #008080;">::</span><span style="color: #007788;">FileWatchListener</span>
<span style="color: #008000;">&#123;</span>
<span style="color: #0000ff;">public</span><span style="color: #008080;">:</span>
    UpdateListener<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><span style="color: #008000;">&#125;</span>
    <span style="color: #0000ff;">void</span> handleFileAction<span style="color: #008000;">&#40;</span>FW<span style="color: #008080;">::</span><span style="color: #007788;">WatchID</span> watchid, <span style="color: #0000ff;">const</span> String<span style="color: #000040;">&amp;</span> dir,
                                    <span style="color: #0000ff;">const</span> String<span style="color: #000040;">&amp;</span> filename,
                                    FW<span style="color: #008080;">::</span><span style="color: #007788;">FileWatcher</span><span style="color: #008080;">::</span><span style="color: #007788;">Action</span> action<span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        std<span style="color: #008080;">::</span><span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;File (&quot;</span> <span style="color: #000080;">&lt;&lt;</span> dir <span style="color: #000040;">+</span> \\ <span style="color: #000040;">+</span> filename <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;) has event &quot;</span>
                        <span style="color: #000080;">&lt;&lt;</span> action <span style="color: #000080;">&lt;&lt;</span> std<span style="color: #008080;">::</span><span style="color: #007788;">endl</span>;
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span>;</pre></div></div>

<p><a href="http://jameswynn.com/files/FileWatcher-2009.02.17.zip" onclick="javascript:pageTracker._trackPageview('/downloads/files/FileWatcher-2009.02.17.zip');">Download version 2009.02.17</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jameswynn.com/2009/02/filewatcher-library-watches-files-while-you-play/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hikari &#8211; Flash for Ogre3D</title>
		<link>http://jameswynn.com/2009/01/hikari-flash-for-ogre3d/</link>
		<comments>http://jameswynn.com/2009/01/hikari-flash-for-ogre3d/#comments</comments>
		<pubDate>Sun, 11 Jan 2009 16:11:07 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Spark Engine]]></category>

		<guid isPermaLink="false">http://jameswynn.com/?p=100</guid>
		<description><![CDATA[Hikari is a library for embedding Flash widgets into an Ogre screen overlay using the Internet Explorer Flash browser plugin.  When I had first heard of this library I, like many others, had been using the somewhat antiquated CEGUI and were growing more frustrated by the day.  At the time CEGUI had lost its main [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Hikari Library" href="http://code.google.com/p/hikari-library/wiki/Introduction" onclick="javascript:pageTracker._trackPageview('/outbound/article/code.google.com');">Hikari</a> is a library for embedding <a title="Flash (like you didnt know)" href="http://www.adobe.com/products/flash/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.adobe.com');">Flash</a> widgets into an <a title="Ogre Rendering Library" href="http://www.ogre3d.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.ogre3d.org');">Ogre</a> screen overlay using the Internet Explorer Flash browser plugin.  When I had first heard of this library I, like many others, had been using the somewhat antiquated <a title="Crazy Eddie's GUI Library" href="http://www.cegui.org.uk/wiki/index.php/Main_Page" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.cegui.org.uk');">CEGUI</a> and were growing more frustrated by the day.  At the time CEGUI had lost its main developer and the view among the Ogre community was that the project was dying and in need of replacement.  Hikari is not the only, or even the first, to try to fill the void left by the then dying (but now reestablished) default GUI library package, but it is the only choice providing industry supported tools.</p>
<p>That said, I have had some sizeable stumbling blocks with Hikari.  Many of these problems are merely results of fundamental incompatibilities with the <a title="Spark Engine" href="http://jameswynn.com/tag/spark-engine/" >Spark Engine</a>.  Hikari's implementation creates an Ogre material and performs buffer blits between the Flash COM buffer and the Ogre material.  This is all well and good, if it is done syncronously with Spark's render thread, which it is not.  So it seems Hikari will have to be altered to work within Spark's rendering paradigm.</p>
<p>Overall I would give Hikari a 3.5/5 with a much higher possibility.  One of its major caveats is that it uses the Internet Explorer browser plugin interface as opposed to something more portable like the <a title="NPAPI (Firefox, Safari, Chrome, etc)" href="http://en.wikipedia.org/wiki/NPAPI" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">NPAPI</a> which would allow it to be cross-platform, though I hear this is something the developer is working on.</p>
]]></content:encoded>
			<wfw:commentRss>http://jameswynn.com/2009/01/hikari-flash-for-ogre3d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
