<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>A Random String of Bits &#187; programming</title>
	<atom:link href="http://stringofbits.net/tag/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://stringofbits.net</link>
	<description>Sequences of bytes about Technology, Programming, Gaming, Doctor Who, and more</description>
	<lastBuildDate>Thu, 26 Apr 2012 19:58:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='stringofbits.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>A Random String of Bits &#187; programming</title>
		<link>http://stringofbits.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://stringofbits.net/osd.xml" title="A Random String of Bits" />
	<atom:link rel='hub' href='http://stringofbits.net/?pushpress=hub'/>
		<item>
		<title>Gaming in Linux &#8211; my adventures with wine</title>
		<link>http://stringofbits.net/2011/06/02/gaming-in-linux-my-adventures-with-wine/</link>
		<comments>http://stringofbits.net/2011/06/02/gaming-in-linux-my-adventures-with-wine/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 18:00:00 +0000</pubDate>
		<dc:creator>Anna Wiggins</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[video games]]></category>
		<category><![CDATA[wine]]></category>

		<guid isPermaLink="false">http://stringofbits.net/?p=335</guid>
		<description><![CDATA[I like playing games. My 1600-word review of Portal 2 should have been at least some indication of that. I enjoy console and PC video games, tabletop roleplaying games, and board games. But today, I&#8217;m talking about playing PC video games in Linux. wine is not an emulator Let&#8217;s start with the basics (then probably [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringofbits.net&#038;blog=23443234&#038;post=335&#038;subd=stringofbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I like playing games. My 1600-word review of Portal 2 should have been at least some indication of that. I enjoy console and PC video games, tabletop roleplaying games, and board games. But today, I&#8217;m talking about playing PC video games in Linux.</p>
<h3>wine is not an emulator</h3>
<p>Let&#8217;s start with the basics (then probably skip the middle ground and jump straight to the advanced stuff). Programs written for Windows or Mac OS can&#8217;t be run natively in Linux. By &#8216;natively&#8217;, I mean you can&#8217;t just click on a Windows application, or type its name on your terminal, and expect it to work. You&#8217;ll get an error like this:</p>
<pre>bash: ./windowsprogram.exe: cannot execute binary file</pre>
<p>There are a number of reasons this doesn&#8217;t work. The first and most fundamental is that Windows and Linux use different <em>binary file formats</em>; that is, the actual program code is structured in an entirely different way.</p>
<p>So why not just create a tool that can take one binary format and convert it to another? Well, to begin with, that would be pretty complicated, and probably fraught with problems; these binary formats are actually pretty complex, and include things like how to dynamically access libraries. Libraries are big chunks of code that are written separately from the program, then used by the program so that software developers don&#8217;t have to repeatedly write the same code to accomplish common tasks.</p>
<p>And that leads us to the real problem &#8211; Linux and Windows have fundamentally different sets of libraries available. Each OS has a large collection of system libraries that developers can use to interact with the Operating System in different ways. And there is very, very little overlap between these libraries. A prominent example of a library that exists only in Windows is Direct3D, which is used by a lot of game developers; it contains code that makes it easier to do a lot of complicated things with the graphics card, thus making it easier to make pretty, visually involved games.</p>
<p>So, if you want to run a Windows program in Linux, you would have to create a tool that could take a Windows program, make it &#8220;think&#8221; it is running in a Windows environment, and then take its library calls and somehow convert them into a set of library calls that Linux can understand. Direct3D calls, for instance, might be converted into equivalent OpenGL calls in Linux. This is exactly what the wine project does.</p>
<p>Wine has been around for a long time, and it has aged well (these are the jokes, folks). The latest wine codebase does a great job handling a ton of Windows applications, including a great many games. This article is an overview of my experience using wine to play games on Fedora.</p>
<h3>blizzards and steam valves</h3>
<p>My journey begins with wine-1.3.18, the version packaged with fedora 13. Wanting to play <a href="http://us.battle.net/sc2/en/">Starcraft 2</a>, I ran the installer, which executed without a problem. The game itself also ran great, without having to make any tweaks at all to wine&#8217;s configuration. So, Starcraft 2 was an easy win. Blizzard&#8217;s games, in general, work great under wine. I&#8217;m not sure if Blizzard just avoids strange API calls, or if wine has a lot of developers interested in making certain Blizzard&#8217;s games work. Either way, this one was phenomenally easy.</p>
<p>The next thing I tried was Valve&#8217;s <a href="http://store.steampowered.com/">Steam</a> client. If you&#8217;re somehow reading this from the past, or Steam no longer exists in the future (or you have recently emerged from a coma), Steam is a game distribution platform. You can buy electronic copies of games, install them in steam, and play them. Many games also support achievements and server-side syncing of your game data. This makes gaming on multiple computers really nice (as long as you&#8217;re the only one using Steam, that is). It also has community features; you can see what your friends are playing, join them in multiplayer games, etc.</p>
<p>So, I have quite a few games on Steam, and before I can try to run the <strong>games</strong> under wine, I have to get Steam to run. This was a little bit trickier than running Starcraft 2. First, the Steam installer is a .msi file, which requires the msiexec tool to run. Luckily, recent versions of wine come equipped with an open-source clone of the msiexec tool. So, all I had to do was:</p>
<pre>msiexec SteamInstall.msi</pre>
<p>Once this was done, Steam launched, but I ran into a new problem: every time I move my mouse over the Steam windows, they would flicker, making it hard to see what I was doing. This was solved by using winecfg to set the &#8216;Windows Version&#8217; to Windows 7. Problem solved.</p>
<p>The next problem I encountered with Steam was that, when I drag a Steam window, it continues to move around after I release the mouse button, as if I&#8217;m still holding it. I have to click on another Steam window to make it stop. This problem remains unsolved in the latest version of wine (1.3.21 as of this writing).</p>
<p>Having Steam running, though, I was able to try a few games. The first thing I discovered was that every game I tried had major problems until I unchecked &#8216;Enable Steam community in-game&#8217;. Once I had done this, <a href="http://store.steampowered.com/app/3590/">Plants vs Zombies</a> and <a href="http://store.steampowered.com/app/12330/">Darkstar One</a> both worked great &#8216;out of the box&#8217;, with no tweaking required.</p>
<p><a href="http://store.steampowered.com/app/400/">Portal</a>, on the other hand, was not as great. Every few seconds of game play (not exactly precise, and it happens more when portals are open) the game will stutter for a moment. I spent a lot of time tweaking wine to try to fix this, but the problem remains in the latest version of wine. In addition, in wine 1.3.20, an even worse problem appeared &#8211; instead of stuttering, the game would act as if the mouse had been moved a random distance in a random direction periodically.</p>
<p>The last game I tried out was <a href="http://store.steampowered.com/app/440/">Team Fortress 2</a>. It refused to start until I added an override for hl2.exe (in winecfg) disabling gameoverlayrenderer.dll and changing the Windows version to NT 4.0 (who knew Windows NT was a good gaming platform?). After this, the game worked with a stuttering problem similar to Portal&#8217;s, but more dependent on how much action was happening on screen. This was probably my most disappointing experience with wine, and 1 problematic game out of 5 isn&#8217;t bad.</p>
<p>So far, I have a (let&#8217;s say) 80% success rate with running Windows games under Linux using wine, with comparatively little effort required on my part. This is a fantastic result compared to even 2 years ago, and I look forward to watching the wine project enable ever more games under Linux.</p>
<h3>tips, tricks, caveats</h3>
<p>If you&#8217;re using Fedora, you may run into problems with pulseaudio. I recommend disabling it completely, via the following:</p>
<pre>yum remove alsa-plugins-pulseaudio
echo &gt; ~/.pulse/client.conf &lt;&lt; EOF
autospawn = no
daemon-binary = /bin/true
EOF</pre>
<p>Then, reboot your machine (or make sure you kill all running pulseaudio processes). Wine works a lot better this way. You&#8217;ll probably also want to run:</p>
<pre>setsebool wine_mmap_zero_ignore 1</pre>
<p>To make SELinux play well with games in wine.</p>
<p>Something I wanted to do but was unable to achieve was run native Linux games directly from Steam, and have Steam keep track of them. After asking on the wine-users mailing list, I learned that the way wine emulates Windows process handling makes this impossible. So, instead, I created <a href="https://github.com/annabunches/steamstub">steamstub</a>, a Windows program written specifically for Steam under wine. To use it, add it as a non-steam game to Steam, then edit the game&#8217;s properties and change the name to a native Linux game of your choice. Now, before you go play your Linux game, click &#8216;Play&#8217; on this game in Steam. Steamstub will deliver a small popup, and to your Steam friends, it will look like you are playing a non-steam game until you click &#8216;OK&#8217;. This lets you advertise what game you are playing, even when Steam can&#8217;t launch it.</p>
<p>One more thing you may find interesting is a tool I developed called <a href="https://github.com/annabunches/wino">wino</a>. It lets you keep track of multiple wine prefixes (virtual Windows environments), so you can keep your programs separated. This makes it easier to recover if something in your drive_c directory gets broken; you only have to worry about reinstalling at most one program. If you make heavy use of steam&#8217;s &#8216;non-Steam game&#8217; functionality, like I do, then this is not as useful for you. However, wino also does a lot of other useful things, like allow you to have a default command assigned to a wineprefix (so you could just run &#8216;wino steam&#8217; to launch Steam.exe). It can also run winecfg (and a lot of other tools) on a prefix via &#8216;wino prefixname &#8211;config&#8217;.</p>
<br />Filed under: <a href='http://stringofbits.net/category/technology/'>Technology</a> Tagged: <a href='http://stringofbits.net/tag/programming/'>programming</a>, <a href='http://stringofbits.net/tag/video-games/'>video games</a>, <a href='http://stringofbits.net/tag/wine/'>wine</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stringofbits.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stringofbits.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stringofbits.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stringofbits.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stringofbits.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stringofbits.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stringofbits.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stringofbits.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stringofbits.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stringofbits.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stringofbits.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stringofbits.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stringofbits.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stringofbits.wordpress.com/335/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringofbits.net&#038;blog=23443234&#038;post=335&#038;subd=stringofbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stringofbits.net/2011/06/02/gaming-in-linux-my-adventures-with-wine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a6c6c99ccd3e2bbaec318a52fb3d43c?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">annabunches</media:title>
		</media:content>
	</item>
		<item>
		<title>Bulding bridges in the metaverse</title>
		<link>http://stringofbits.net/2010/01/08/bulding-bridges-in-the-metaverse/</link>
		<comments>http://stringofbits.net/2010/01/08/bulding-bridges-in-the-metaverse/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 17:24:59 +0000</pubDate>
		<dc:creator>Anna Wiggins</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[metaverse]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[second life]]></category>

		<guid isPermaLink="false">http://stringofbits.net/?p=154</guid>
		<description><![CDATA[If/once you &#8220;get it&#8221;, Second Life is pretty cool. It can be a lot of different things, and its potential has barely even been scratched. Sure, the tools are cumbersome, but they are getting better. And some of Linden Lab&#8217;s policies suck, but that will just drive people to OSGrid, eventually. Anyway, there are people [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringofbits.net&#038;blog=23443234&#038;post=154&#038;subd=stringofbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If/once you &#8220;get it&#8221;, <a href="http://secondlife.com">Second Life</a> is pretty cool.  It can be a lot of different things, and its potential has barely even been scratched.  Sure, the tools are cumbersome, but they are getting better.  And some of Linden Lab&#8217;s policies suck, but that will just drive people to OSGrid, eventually.</p>
<p>Anyway, there are people in Second Life that I like being able to communicate with.  However, when I&#8217;m at work, it&#8217;s a lot of trouble to create an SSH tunnel home, then forward a text-only client like <a href="http://omvviewer-light.byteme.org.uk/">ommviewer-light</a> just so I can log in and see who is online.</p>
<p>So, as I always do, I went way overboard and created a system that can relay chat between an IRC channel (or channels) and any location (or locations) inside Second Life (or any other grid that supports LSL).  It can also check the online status of users and send them one-way IMs.  I call the entire system slrelay, and you can get it <a href="http://stringofbits.net/slrelay/">here</a>.</p>
<p>It requires a few things to work: a running webserver is absolutely necessary.  If you want the IRC features, then you also need an IRC network of your choice and a machine that can execute perl scripts.  I have my IRC bot connected to irc.slashnet.org.</p>
<p>slrelay has a number of possible uses.  You could use it to relay chat between key locations on a large landmass (say, an area that spans 3 or 4 sims).  It could relay chat between Second Life and another metaverse grid like OSGrid.  It can be used as a simple IRC tool to check who is online very quickly.  Or it can do all of these things at once.</p>
<br />Posted in Technology Tagged: metaverse, programming, second life <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stringofbits.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stringofbits.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stringofbits.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stringofbits.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stringofbits.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stringofbits.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stringofbits.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stringofbits.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stringofbits.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stringofbits.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stringofbits.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stringofbits.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stringofbits.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stringofbits.wordpress.com/154/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringofbits.net&#038;blog=23443234&#038;post=154&#038;subd=stringofbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stringofbits.net/2010/01/08/bulding-bridges-in-the-metaverse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a6c6c99ccd3e2bbaec318a52fb3d43c?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">annabunches</media:title>
		</media:content>
	</item>
		<item>
		<title>emacs 23, dbus, and libnotify</title>
		<link>http://stringofbits.net/2009/08/31/emacs-23-dbus-and-libnotify/</link>
		<comments>http://stringofbits.net/2009/08/31/emacs-23-dbus-and-libnotify/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 03:47:44 +0000</pubDate>
		<dc:creator>Anna Wiggins</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://stringofbits.net/?p=166</guid>
		<description><![CDATA[A new major version of emacs is out, and it includes dbus support. This is great, because it means we can do things like this: (require 'dbus) (defun send-desktop-notification (summary body timeout) "call notification-daemon method METHOD with ARGS over dbus" (dbus-call-method :session ; use the session (not system) bus "org.freedesktop.Notifications" ; service name "/org/freedesktop/Notifications" ; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringofbits.net&#038;blog=23443234&#038;post=166&#038;subd=stringofbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A new major version of <a href="http://www.gnu.org/software/emacs/">emacs</a> is out, and it includes dbus support.  This is great, because it means we can do things like this:</p>
<blockquote><pre>
(require 'dbus)
(defun send-desktop-notification (summary body timeout)
  "call notification-daemon method METHOD with ARGS over dbus"
  (dbus-call-method
    :session                        ; use the session (not system) bus
    "org.freedesktop.Notifications" ; service name
    "/org/freedesktop/Notifications"   ; path name
    "org.freedesktop.Notifications" "Notify" ; Method
    "emacs"
    0
    ""
    summary
    body
    '(:array)
    '(:array :signature "{sv}")
    ':int32 timeout))

(defun pw/compile-notify (buffer message)
  (send-desktop-notification "emacs compile" message 0))

(setq compilation-finish-function 'pw/compile-notify)
</pre>
</blockquote>
<p>Add this to your .emacs file and you will receive a libnotify popup when M-x compile completes.  It will even give you the exit message, so you know whether the compile was successful.</p>
<p>So now you can let that long compile run, and work on <a href="http://xkcd.com/303/">something else</a>.  emacs will let you know when the compile finishes.</p>
<p>As written above, the notifications will stay on your screen until you dismiss them (by clicking on them).  If you would like them to vanish after a preset time limit, change the 0 in the call to send-desktop-notification.  Set it to the number of milliseconds the popup should remain on the screen.</p>
<div id="attachment_173" class="wp-caption alignright" style="width: 310px"><a href="http://stringofbits.files.wordpress.com/2009/08/compile_bad1.png"><img src="http://stringofbits.files.wordpress.com/2009/08/compile_bad1.png?w=300&h=99" alt="Screenshot of libnotify popup showing a compiler error" title="compile_bad" width="300" height="99" class="size-medium wp-image-173" /></a><p class="wp-caption-text">Screenshot of libnotify popup showing a compiler error</p></div>
<p>This is just the tip of the iceberg, of course.  Any application that presents a dbus interface can be interacted with from emacs, which means that emacs can also integrate itself with the Linux desktop in <a href="http://emacs-fu.blogspot.com/2009/01/using-d-bus-example.html">other interesting ways</a>.</p>
<br />Posted in Technology Tagged: emacs, programming <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stringofbits.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stringofbits.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stringofbits.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stringofbits.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stringofbits.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stringofbits.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stringofbits.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stringofbits.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stringofbits.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stringofbits.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stringofbits.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stringofbits.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stringofbits.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stringofbits.wordpress.com/166/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringofbits.net&#038;blog=23443234&#038;post=166&#038;subd=stringofbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stringofbits.net/2009/08/31/emacs-23-dbus-and-libnotify/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a6c6c99ccd3e2bbaec318a52fb3d43c?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">annabunches</media:title>
		</media:content>

		<media:content url="http://stringofbits.files.wordpress.com/2009/08/compile_bad1.png?w=300" medium="image">
			<media:title type="html">compile_bad</media:title>
		</media:content>
	</item>
		<item>
		<title>d20tools 0.3 is here</title>
		<link>http://stringofbits.net/2009/08/22/d20tools-0-3-is-here/</link>
		<comments>http://stringofbits.net/2009/08/22/d20tools-0-3-is-here/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 02:27:22 +0000</pubDate>
		<dc:creator>Anna Wiggins</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[dungeons & dragons]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://stringofbits.net/?p=145</guid>
		<description><![CDATA[I&#8217;ve released a new version of d20tools. In addition to using a new, simpler file saving/loading scheme and better keyboard handling, the new feature is also a lot more stable. Other highlights include a more sensible entity/group management system, and the ability for any creature to be a henchman. Get it here. I&#8217;m lifting my [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringofbits.net&#038;blog=23443234&#038;post=145&#038;subd=stringofbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve released a new version of d20tools.  In addition to using a new, simpler file saving/loading scheme and better keyboard handling, the new feature is also a lot more stable.  Other highlights include a more sensible entity/group management system, and the ability for any creature to be a henchman.</p>
<p>Get it <a href="http://sourceforge.net/projects/d20tools">here</a>.</p>
<p>I&#8217;m lifting my moratorium on D&amp;D 4e, as well.  This means that d20tools will eventually support 4e creatures.  However, this is a huge undertaking, and I have to decide how best to handle it.  I&#8217;m leaning towards a system that will allow anyone to write system templates; then, any gaming system could be plugged in, theoretically.  In practice, this is a lot of work for a single developer, so I wouldn&#8217;t anticipate this happening any time soon.</p>
<br />Posted in Gaming Tagged: dungeons &amp; dragons, programming <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stringofbits.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stringofbits.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stringofbits.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stringofbits.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stringofbits.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stringofbits.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stringofbits.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stringofbits.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stringofbits.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stringofbits.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stringofbits.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stringofbits.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stringofbits.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stringofbits.wordpress.com/145/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringofbits.net&#038;blog=23443234&#038;post=145&#038;subd=stringofbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stringofbits.net/2009/08/22/d20tools-0-3-is-here/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a6c6c99ccd3e2bbaec318a52fb3d43c?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">annabunches</media:title>
		</media:content>
	</item>
		<item>
		<title>Twitter from the command line</title>
		<link>http://stringofbits.net/2009/07/02/twitter-from-the-command-line/</link>
		<comments>http://stringofbits.net/2009/07/02/twitter-from-the-command-line/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 20:38:30 +0000</pubDate>
		<dc:creator>Anna Wiggins</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://stringofbits.net/?p=129</guid>
		<description><![CDATA[I&#8217;ve recently started playing with twitter. A nice way to use it via the command-line (using curl) was suggested here. I have taken that and improved slightly on it. Here is the result: #!/bin/sh echo -n "twitter&#62; " read text while [ ${#text} -gt 140 ]; do echo echo "Message too long; used ${#text}/140 characters." [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringofbits.net&#038;blog=23443234&#038;post=129&#038;subd=stringofbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently started playing with twitter.  A nice way to use it via the command-line (using curl) was suggested <a href="http://binnyva.blogspot.com/2007/03/using-twitter-part-1-command-line.html">here</a>.  I have taken that and improved slightly on it.</p>
<p><span id="more-129"></span></p>
<p>Here is the result:</p>
<blockquote><p><code>#!/bin/sh<br />
echo -n "twitter&gt; "<br />
read text</p>
<p>while [ ${#text} -gt 140 ]; do</p>
<p>echo<br />
echo "Message too long; used ${#text}/140 characters."<br />
echo<br />
echo -n "twitter&gt; "<br />
read text</p>
<p>done</p>
<p>echo<br />
echo "Message is ${#text}/140 characters.  Press enter to post, or Ctrl+C to cancel."<br />
read</p>
<p>curl --basic --user "username:password" --data-ascii "status=`echo $text|tr ' ' '+'`" "http://twitter.com/statuses/update.json" &amp;&gt; /dev/null<br />
</code>
</p></blockquote>
<p>To use the script, copy all of that into a file somewhere in your path, then make the file executable (e.g., <code>chmod 755 /usr/local/bin/twitter</code>).  Now you can type &#8216;twitter&#8217;, type in your tweet, and you&#8217;re done!</p>
<p>I even set up fluxbox so that mod4+t launches a terminal with the script running.  To do that, I added this to ~/.fluxbox/keys:</p>
<blockquote><p>
<code><br />
Mod4 t :Exec xterm -e "twitter"<br />
</code>
</p></blockquote>
<p>If you&#8217;re not familiar with &#8216;mod4&#8242;, it is the Windows key on most PC keyboards.</p>
<p>I&#8217;ll eventually get around to writing a slightly more full-featured twitter updater in c or c++.  Until then, enjoy this script!</p>
<br />Posted in Technology Tagged: linux, programming, twitter <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stringofbits.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stringofbits.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stringofbits.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stringofbits.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stringofbits.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stringofbits.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stringofbits.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stringofbits.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stringofbits.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stringofbits.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stringofbits.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stringofbits.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stringofbits.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stringofbits.wordpress.com/129/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringofbits.net&#038;blog=23443234&#038;post=129&#038;subd=stringofbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stringofbits.net/2009/07/02/twitter-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a6c6c99ccd3e2bbaec318a52fb3d43c?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">annabunches</media:title>
		</media:content>
	</item>
		<item>
		<title>My new project &#8211; netjatafl</title>
		<link>http://stringofbits.net/2009/06/25/my-new-project-netjatafl/</link>
		<comments>http://stringofbits.net/2009/06/25/my-new-project-netjatafl/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 19:06:03 +0000</pubDate>
		<dc:creator>Anna Wiggins</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[chess]]></category>
		<category><![CDATA[go]]></category>
		<category><![CDATA[mancala]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tafl]]></category>

		<guid isPermaLink="false">http://stringofbits.net/?p=126</guid>
		<description><![CDATA[I&#8217;ve been pretty busy the last month working on netjatafl. Netjatafl will eventually be a networked client for playing various board and/or card games. It was originally created for hnefatafl and other tafl games. However, I have designed it to be extensible; I&#8217;m working on adding mancala games, and it looks like my design makes [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringofbits.net&#038;blog=23443234&#038;post=126&#038;subd=stringofbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been pretty busy the last month working on <a href="http://netjatafl.sourceforge.net">netjatafl</a>.  Netjatafl will eventually be a networked client for playing various board and/or card games.  It was originally created for hnefatafl and other tafl games.  However, I have designed it to be extensible; I&#8217;m working on adding mancala games, and it looks like my design makes it pretty easy to add a new game. (I&#8217;ve added most of the logic for mancala to the client and server in just a couple hours of work).  I intend to add shogi, xiangqi, chess, and possibly even go at some point in the future.</p>
<p>The netjatafl server (taflserv) operates on a simple, completely open protocol; it will eventually support authenticated logins and statistics tracking.  Anyone could write a netjatafl client for any platform, if they wished.  My clients will all be in C++, because this let&#8217;s me reuse the &#8216;libboardgame&#8217; library, which contains the game logic used by the server.  I will also build in a &#8220;capabilities&#8221; system at some point, so the client and server can both advertise which games they support.</p>
<p>The whole thing is theoretically usable in its current state; the client is an ncurses-based text UI that is pretty cumbersome, but can be used.  As far as I know, it only works in Linux.  Anyone who wants to cross-compile it for Windows and send me a patch with everything you had to add, feel free!  I will eventually add a proper GUI, probably gtk+-based.</p>
<p>Like the sound of this project?  Feel free to check out the code, compile it, and let me know what you think!</p>
<p>Etymology notes:  netjatafl is Old Norse for &#8220;net-table&#8221;; i.e. a networked table you can gather around to play games.  &#8216;taflbordh&#8217; is ON for &#8216;tafl board&#8217; (tafl can also refer to tafl games in general), which sounds a little redundant, but it made a nice name for a client.  And &#8216;taflserv&#8217; is just &#8216;tafl server&#8217;&#8230; &#8216;serv&#8217; was meant to be short for &#8216;server&#8217;, but I later noticed that it&#8217;s also a French word meaning &#8216;it serves&#8221;.  I find this somewhat appropriate.</p>
<br />Posted in Gaming, Programming Tagged: chess, go, mancala, programming, tafl <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stringofbits.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stringofbits.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stringofbits.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stringofbits.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stringofbits.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stringofbits.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stringofbits.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stringofbits.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stringofbits.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stringofbits.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stringofbits.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stringofbits.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stringofbits.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stringofbits.wordpress.com/126/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringofbits.net&#038;blog=23443234&#038;post=126&#038;subd=stringofbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stringofbits.net/2009/06/25/my-new-project-netjatafl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a6c6c99ccd3e2bbaec318a52fb3d43c?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">annabunches</media:title>
		</media:content>
	</item>
		<item>
		<title>Programming: The theory</title>
		<link>http://stringofbits.net/2006/08/22/programming-the-theory/</link>
		<comments>http://stringofbits.net/2006/08/22/programming-the-theory/#comments</comments>
		<pubDate>Tue, 22 Aug 2006 13:14:00 +0000</pubDate>
		<dc:creator>Anna Wiggins</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://stringofbits.net/?p=4</guid>
		<description><![CDATA[One of my biggest problems with the IT community, both in amateur programmers and prospective employers, is the following question: &#8220;So, what programming languages do you know?&#8221; This implies that learning a language is an extremely difficult task, and collecting languages like trophies is somehow a worthy pursuit. A programming language is a tool. A [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringofbits.net&#038;blog=23443234&#038;post=277&#038;subd=stringofbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One of my biggest problems with the IT community, both in amateur programmers and prospective employers, is the following question:  &#8220;So, what programming languages do you know?&#8221;  This implies that learning a language is an extremely difficult task, and collecting languages like trophies is somehow a worthy pursuit.</p>
<p>A programming language is a tool.  A skilled craftsman isn&#8217;t good at her trade because she knows how to use a given set of tools; anyone can learn that.  Rather, true skill comes from knowing how to *apply* the tools.  The fundamental concepts behind programming are the skills on which we should be focusing.</p>
<p>This applies to academia as well.  The language you use to teach students, especially the first language they encounter, *is* important.  I&#8217;m not about to advocate &#8220;teaching languages&#8221; like Pascal, though.  I think it&#8217;s important to choose a real-world language, with all the pitfalls and caveats of a real-world language, as a student&#8217;s first language.  At the same time, it should be a language with the features available to demonstrate all the fundamental concepts in programming.  A language that doesn&#8217;t support recursion would be a Bad Choice, for example.</p>
<p>So, when someone (a peer or a hopeful programmer-to-be) asks me &#8220;what languages do you know?&#8221;, I won&#8217;t respond &#8220;Well, I know C, C++, Java, perl, php, xhtml/xml/css (if you count those), lisp, prolog, LotusScript, Javascript, LSL&#8230;&#8221; etc.  Instead, I&#8217;ll say &#8220;I&#8217;ve used a number of languages, but the key thing is that I know how to learn any language.&#8221;  When an employer asks, I suppose I&#8217;ll have to say &#8220;Well, I know @languages&#8230;&#8221;.  Then, though, I might add &#8220;&#8230;but I consider the fundamental concepts behind programming languages to be more important, because mastering those means I can learn to get around in any language given a week or two of study.&#8221;</p>
<p>In summary:  Learning a programming language is trivial, once you know the fundamental concepts of programming.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/stringofbits.wordpress.com/277/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/stringofbits.wordpress.com/277/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stringofbits.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stringofbits.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stringofbits.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stringofbits.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/stringofbits.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/stringofbits.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/stringofbits.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/stringofbits.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stringofbits.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stringofbits.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stringofbits.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stringofbits.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stringofbits.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stringofbits.wordpress.com/277/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=stringofbits.net&#038;blog=23443234&#038;post=277&#038;subd=stringofbits&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://stringofbits.net/2006/08/22/programming-the-theory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7a6c6c99ccd3e2bbaec318a52fb3d43c?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">annabunches</media:title>
		</media:content>
	</item>
	</channel>
</rss>
