<?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>SIGTTOU</title>
	<atom:link href="http://sigttou.com/feed" rel="self" type="application/rss+xml" />
	<link>http://sigttou.com</link>
	<description>Just another background process...</description>
	<lastBuildDate>Wed, 22 Dec 2010 00:12:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>On the fourth day of Christmas my true love gave to me&#8230; four CUDA tips&#8230;</title>
		<link>http://sigttou.com/four-cuda-tips</link>
		<comments>http://sigttou.com/four-cuda-tips#comments</comments>
		<pubDate>Wed, 22 Dec 2010 00:12:06 +0000</pubDate>
		<dc:creator>Bob Somers</dc:creator>
				<category><![CDATA[Adventures in GraphicsLand]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://sigttou.com/?p=282</guid>
		<description><![CDATA[This post is from a blog called Adventures in GraphicsLand that I&#8217;m writing with two fellow CS grad students, Chris Gibson and Ryan Schmitt. Articles about anything related to my graduate work in graphics or my thesis will be posted &#8230; <a href="http://sigttou.com/four-cuda-tips">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong><em>This post is from a blog called <a href="http://aigfx.com">Adventures in GraphicsLand</a> that I&#8217;m writing with two fellow CS grad students, Chris Gibson and Ryan Schmitt. Articles about anything related to my graduate work in graphics or my thesis will be posted there and then cross-posted here. Articles about handy tips (like fixing bugs with VirtualBox or software setup on Fedora) will remain here. This post that I wrote for AIGFX, originally appeared <a href="http://www.aigfx.com/2010/12/four-cuda-tips/">here</a>.</em></strong></p>
<p>Learning CUDA has definitely been an interesting experience. As much as they make it sound like it&#8217;s simple to get started (and for the most part, it is), there are lots of little traps that can keep you frustrated for hours&#8230; or days. Here are four tips that stumped me during initial development of Haste (which is <a title="Haste on GitHub" href="https://github.com/cphaste/haste" target="_blank">now on GitHub</a>!) that might be helpful to you.</p>
<h3>Long running kernels on a desktop workstation</h3>
<p>In Linux, X&#8217;s driver watchdog will kill a process that leaves a driver hanging for too long, so to prevent that from happening you can&#8217;t launch a GPU kernel unless it returns within a couple milliseconds. (This happens in Windows, too, but I&#8217;m working mainly in Linux at the moment.) However, you might want to test kernels on your workstation. The way around this is to switch to a text-only terminal before running your CUDA program. On most Linux distributions, you can swap between terminals using Ctrl-Alt-F2 through Ctrl-Alt-F6, where each is a different terminal. If you hit Ctrl-Alt-F1 in Fedora 14, it will take you back to your X session (you&#8217;re still logged in and everything).</p>
<p>So, all you need to do is write code in your graphical desktop, compile, hit Ctrl-Alt-F2 to switch to a text-only terminal, then run your program for testing. When you want to go back to graphical mode to fix bugs, just Ctrl-Alt-F1 back and off you go.</p>
<h3>Slow device info queries</h3>
<p>If you&#8217;re doing doing development on a headless compute box (like our Tesla machine at Cal Poly), you might have noticed that querying device information takes a long time. This is compounded if it&#8217;s a multi-device machine. Our box at Poly has four Tesla GPUs, and Haste startup was frustratingly slow. All we did is query the device list once, then query each device individually using <code>cudaGetDeviceProperties()</code>. It usually take on the order of 30 to 45 seconds at program startup to get all the device information and allocate memory before we were off to the races launching kernels.</p>
<p>The problem is that the NVIDIA drivers normally maintain a lot of state about the GPUs in memory. However, this state is only there if there&#8217;s some resident process keeping it there, like X. If X is not running (or not even installed, like on our headless compute box), that state will need to get reinitialized every time you make a call that requires it. This can be excruciatingly slow, especially on multi-device machines.</p>
<p>The solution? Well, the easiest one is to just install and leave X running, even on a headless machine. Just make sure it&#8217;s not driving a display, or better yet switch it over to a text-only terminal with Ctrl-Alt-F2 to keep X around but not have it interfere with your kernels.</p>
<h3>Printing debug info in device kernels</h3>
<p>I must admit, while debuggers are neat, I tend to like <code>printf()</code> debugging. It&#8217;s not that I don&#8217;t see the value of debuggers; for some problems they&#8217;re really the only way to solve things. Maybe it has something do with the fact that <a title="cuda-gdb goes kaboom" href="http://forums.nvidia.com/index.php?s=91b8cd119e65d54ab921f4415fc4fcfc&amp;showtopic=188223" target="_blank">cuda-gdb inexplicably crashes</a> on every machine and kernel I try to run it on.</p>
<p>With the Fermi architecture, available in cards of compute capability 2.0 and higher, you can actually do <code>printf()</code>&#8216;s directly from your device code now, without having to jump through any strange library hoops. Initially, however, I was never able to get it to work. I couldn&#8217;t find which CUDA header I needed to include to get things off the ground, and even when it seemed to compile it didn&#8217;t print anything.</p>
<p>Well, it sounds silly, but just <code>#include &lt;stdio.h&gt;</code> and away you go. I never tried this initially because I thought that didn&#8217;t make any sense. The C standard library doesn&#8217;t have CUDA device code! The best I can tell, <code>nvcc</code> is rewriting these standard calls from device code behind the scenes.</p>
<h3>The device info&#8217;s maximumThreadsPerBlock lies!</h3>
<p>This one really irks me. If you query a device&#8217;s properties, it reports the maximum number of threads per block in a <code>cudaDeviceProp</code> struct member called, shockingly, <code>maxThreadsPerBlock</code>. The problem is that this is not the actual number of threads you can launch. That depends entirely on your kernel&#8217;s occupancy, which you can figure out using the difficult-to-find <a href="http://developer.download.nvidia.com/compute/cuda/3_2_prod/sdk/docs/CUDA_Occupancy_Calculator.xls" target="_blank">occupancy calculator spreadsheet</a>. You&#8217;ll also want to compile your kernel with the <code>nvcc</code> option <code>--ptxas-options=-v</code> to see the shared memory and register usage for your kernel. You&#8217;ll need it in the spreadsheet.</p>
<p>The occupancy limit doesn&#8217;t bug me so much as the fact that this is not mentioned anywhere in the documentation where <code>maxThreadsPerBlock</code> is mentioned. Once would think that would be a great place to throw up a warning flag, letting developers know that that number is purely speculative, and that they need to do some real benchmarking of their kernel to find the best occupancy and thread launch combination. Essentially, the <code>maxThreadsPerBlock</code> element is entirely superfluous, since it&#8217;s only real use would be in scaling kernel launch sizes by number of device threads available. However, instead we should apparently embed the Excel worksheet in our program and have the device properties chug through the macros to provide any runtime adjustments based on the hardware we&#8217;re running on. (&lt;/sarcasm&gt;) Yeesh.</p>
<p>Hopefully these tips help you out. As I continue to bang my head against the wall and find new tidbits I&#8217;ll be keeping track of them on my <a title="GitHub wiki" href="https://github.com/bobsomers/haste/wiki/Cuda-notes" target="_blank">GitHub wiki page</a>. Happy holidays!</p>
]]></content:encoded>
			<wfw:commentRss>http://sigttou.com/four-cuda-tips/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CUDA Development Environment Setup Under Windows</title>
		<link>http://sigttou.com/cuda-dev-windows</link>
		<comments>http://sigttou.com/cuda-dev-windows#comments</comments>
		<pubDate>Sat, 13 Nov 2010 06:09:25 +0000</pubDate>
		<dc:creator>Bob Somers</dc:creator>
				<category><![CDATA[Adventures in GraphicsLand]]></category>

		<guid isPermaLink="false">http://sigttou.com/?p=257</guid>
		<description><![CDATA[This post is from a blog called Adventures in GraphicsLand that I&#8217;m writing with two fellow CS grad students, Chris Gibson and Ryan Schmitt. Articles about anything related to my graduate work in graphics or my thesis will be posted &#8230; <a href="http://sigttou.com/cuda-dev-windows">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong><em>This post is from a blog called <a href="http://aigfx.com">Adventures in GraphicsLand</a> that I&#8217;m writing with two fellow CS grad students, Chris Gibson and Ryan Schmitt. Articles about anything related to my graduate work in graphics or my thesis will be posted there and then cross-posted here. Articles about handy tips (like fixing bugs with VirtualBox or software setup on Fedora) will remain here. This post that I wrote for AIGFX, originally appeared <a href="http://www.aigfx.com/2010/11/cuda-dev-windows/">here</a>.</em></strong></p>
<p>Getting a complete CUDA development environment up and running under Windows can be a bit&#8230; daunting. Between all the dev drivers, SDKs, toolkits, and other trimmings it can take several hours to get your workstation up and running. However, the results are pretty nice.</p>
<p>This guide will give you the following setup:</p>
<ul>
<li>Visual Studio 2010 (C/C++ compiler and IDE)</li>
<li>CUDA Toolkit 3.2 (CUDA C compiler and runtime)</li>
<li>GPU Computing SDK 3.2 (sample code and utility libraries)</li>
<li>Parallel Nsight 1.5 (live debugging and performance analysis of CUDA code)</li>
<li>Visual Assist X 10.6 (syntax highlighting and completion goodies)</li>
</ul>
<p>There are, however, some drawbacks that you should be aware of:</p>
<ul>
<li>In addition to Visual Studio 2010, you need Visual Studio 2008. This is because the CUDA compiler (nvcc) only supports the VS 9.0 build tools at the moment. You can still develop in and compile from VS 2010 however.</li>
<li>You need two CUDA-capable GPUs in your machine to do CUDA debugging with Parallel Nsight.</li>
<li>Installation and setup will take the whole afternoon.</li>
</ul>
<p>For reference, my machine is running Windows 7 Professional x64. Your mileage may vary.</p>
<h3>Step 1: Get everything downloaded.</h3>
<p>Make sure you have downloaded installers or installation disks handy for all of the following:</p>
<ul>
<li>Microsoft Visual Studio 2008, and the <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E&amp;displaylang=en" target="_blank">SP1 update</a> (Express Edition won&#8217;t cut it)</li>
<li>Microsoft Visual Studio 2010 (Express Edition won&#8217;t cut it)</li>
<li><a href="http://www.wholetomato.com/downloads/default.asp" target="_blank">Visual Assist X 10.6.1833</a> or newer</li>
<li><a href="http://developer.nvidia.com/object/nsight-downloads.html" target="_blank">NVIDIA Developer Driver</a> (Note: Don&#8217;t use the one posted on the CUDA page, use the newer version posted on the Parallel Nsight page instead.)</li>
<li><a href="http://developer.nvidia.com/object/cuda_3_2_toolkit_rc.html#Windows XP, Windows Vista and Windows7" target="_blank">NVIDIA CUDA Toolkit</a> (CUDA C compiler and runtime)</li>
<li><a href="http://developer.nvidia.com/object/cuda_3_2_toolkit_rc.html#Windows XP, Windows Vista and Windows7" target="_blank">NVIDIA GPU Computing SDK</a> (Sample code and utility libraries)</li>
<li><a href="http://developer.nvidia.com/object/nsight-downloads.html" target="_blank">Parallel Nsight Host Installer</a> (The host is the machine running the development environment.)</li>
<li><a href="http://developer.nvidia.com/object/nsight-downloads.html" target="_blank">Parallel Nsight Monitor Installer</a> (The monitor is the target machine running the CUDA code.)</li>
</ul>
<h3>Step 2: Install Visual Studio(s).</h3>
<p>Both VS 2008 and 2010 can coexist side-by-side. Install VS 2008, then the SP1 update. Lastly install VS 2010. Be sure to launch Windows Update afterwords to pull down any patches to the dev tools.</p>
<h3>Step 3: Install Visual Assist X.</h3>
<p>If you haven&#8217;t used Visual Assist X before, you&#8217;ve been missing out. It has lots of refactoring and code exploration features, but its killer feature for me is how well it complements Visual Studio&#8217;s Intellisense. When you run the installer, you&#8217;ll be able to select if you want to install it for both versions of VS or just 2010. It&#8217;s up to you, but we only needed VS 2008 for the compiler so you can get away with just installing it for VS 2010.</p>
<h3>Step 4: Install the CUDA tools.</h3>
<p>First install the developer driver. Then the CUDA toolkit, and the GPU Computing SDK. The default installation paths are fine. Lastly, install the Parallel Nsight Host and Parallel Nsight Monitor.</p>
<h3>Step 5: Configure Visual Assist X to know about CUDA.</h3>
<p>To get full syntax highlighting and include support, we need to tell VAX about our CUDA libraries as well as the fact that it should treat CUDA files as C/C++ files.</p>
<p>Launch VS 2010 and open the Options screen (Tools &gt; Options). Under Projects and Solutions &gt; VC++ Project Settings add the following entries to the Extensions to Include item:</p>
<ul>
<li>.cu</li>
<li>.cu.h (or whatever you use for your CUDA headers)</li>
</ul>
<p>It should look something like this:</p>
<p><a href="http://sigttou.com/wp-content/uploads/extensions_to_include.png" target="_blank"><img class="alignnone size-medium wp-image-264" title="Extensions to Include" src="http://sigttou.com/wp-content/uploads/extensions_to_include-300x174.png" alt="Extensions to Include" width="300" height="174" /></a></p>
<p>Now close VS 2010 and open up the registry editor (Start &gt; regedit.exe). Browse to the following folder:</p>
<ul>
<li>HKEY_CURRENT_USER\Software\Whole Tomato\Visual Assist X\VANet10</li>
</ul>
<p>Now look for the ExtHeader key and add .cu.h to the list. Make sure the whole line ends with a semicolon. It should look something like this:</p>
<p><a href="http://sigttou.com/wp-content/uploads/regedit_header.png" target="_blank"><img class="alignnone size-medium wp-image-265" title="Regedit ExtHeader" src="http://sigttou.com/wp-content/uploads/regedit_header-300x227.png" alt="Regedit ExtHeader" width="300" height="227" /></a></p>
<p>Look a little further down and you should see the ExtSource key. Add .cu to the list in the same way. Again, make sure the line ends with a semicolon.</p>
<p><a href="http://sigttou.com/wp-content/uploads/regedit_source.png" target="_blank"><img class="alignnone size-medium wp-image-266" title="Regedit Source" src="http://sigttou.com/wp-content/uploads/regedit_source-300x227.png" alt="Regedit Source" width="300" height="227" /></a></p>
<p>Now relaunch VS 2010 and open the VAX options (VAssistX &gt; Visual Assist X Options). Open the Projects group on the left and select C/C++ Directories. Under Platform select Custom. Then, select Stable Include Files from the drop down on the right and add the paths to your CUDA toolkit includes and GPU Computing SDK includes. If you used the default installation directories, these are:</p>
<ul>
<li>C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v3.2\include</li>
<li>C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 3.2\C\common\inc</li>
</ul>
<p>In other words, your screen should look something like this:</p>
<p><a href="http://sigttou.com/wp-content/uploads/stable_includes_screenshot.png" target="_blank"><img class="alignnone size-medium wp-image-268" title="Stable Includes" src="http://sigttou.com/wp-content/uploads/stable_includes_screenshot-300x190.png" alt="Stable Includes" width="300" height="190" /></a></p>
<p>Now switch the drop down to Source files and add the following paths:</p>
<ul>
<li>C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v3.2\src</li>
<li>C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 3.2\C\common\src</li>
</ul>
<p><a href="http://sigttou.com/wp-content/uploads/source_files_screenshot.png" target="_blank"><img class="alignnone size-medium wp-image-269" title="Source Files" src="http://sigttou.com/wp-content/uploads/source_files_screenshot-300x190.png" alt="Source Files" width="300" height="190" /></a></p>
<p>Lastly, select the Performance item from the left and click the Rebuild Symbol Databases button.</p>
<p><a href="http://sigttou.com/wp-content/uploads/performance_rebuild.png" target="_blank"><img class="alignnone size-medium wp-image-270" title="Rebuild Symbol Databases" src="http://sigttou.com/wp-content/uploads/performance_rebuild-300x190.png" alt="Rebuild Symbol Databases" width="300" height="190" /></a></p>
<p>You should be good to go now with Visual Assist X and CUDA.</p>
<h3>Step 6: A bare bones CUDA project.</h3>
<p>To take you through the process of setting up a new CUDA project in VS 2010, here&#8217;s a simple bare bones console application that adds two numbers on the GPU.</p>
<p>First, go to File &gt; New &gt; Project. Select Win32 Console Application from the Visual C++ category. Enter a location and a name and click OK. In the wizard, uncheck Precompiled Headers and check Empty Project.</p>
<p>Now in the Solution Explorer, right click on the name of your project and select Build Customizations. In the box that pops up, select CUDA 3.2 and click OK.</p>
<p><a href="http://sigttou.com/wp-content/uploads/build_customizations.png" target="_blank"><img class="alignnone size-medium wp-image-271" title="Build Customizations" src="http://sigttou.com/wp-content/uploads/build_customizations-300x178.png" alt="Build Customizations" width="300" height="178" /></a></p>
<p>Now add a new source file to your project. Let&#8217;s call it hello.cu. Once it&#8217;s added, right click on it in the solution explorer and select Properties. Select the General item on the left and make sure the Item Type is set to CUDA C/C++.</p>
<p><a href="http://sigttou.com/wp-content/uploads/item_type.png" target="_blank"><img class="alignnone size-medium wp-image-272" title="CUDA Item Type" src="http://sigttou.com/wp-content/uploads/item_type-300x212.png" alt="CUDA Item Type" width="300" height="212" /></a></p>
<p>Lastly, we need to make sure we&#8217;re including the GPU Computing SDK headers and linking to the CUDA runtime library, as well as tell Visual Studio to use the 2008 (9.0) version of the compiler.</p>
<p>Right click on your project and select Properties. From the Configuration drop down, select All Configurations. Under Configuration Properties &gt; General, select v90 from the Platform Toolset item.</p>
<p><a href="http://sigttou.com/wp-content/uploads/platform_toolset.png" target="_blank"><img class="alignnone size-medium wp-image-273" title="Platform Toolset" src="http://sigttou.com/wp-content/uploads/platform_toolset-300x212.png" alt="Platform Toolset" width="300" height="212" /></a></p>
<p>Under Configuration Properties &gt; CUDA C/C++ &gt; Common, add the GPU Computing SDK include path to Additional Include Directories. If you chose the default installer path, it will be:</p>
<ul>
<li>C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 3.2\C\common\inc</li>
</ul>
<p><a href="http://sigttou.com/wp-content/uploads/cuda_include_dirs.png" target="_blank"><img class="alignnone size-medium wp-image-274" title="CUDA Additional Include Directories" src="http://sigttou.com/wp-content/uploads/cuda_include_dirs-300x212.png" alt="CUDA Additional Include Directories" width="300" height="212" /></a></p>
<p>Now under Configuration Properties &gt; Linker &gt; Input add cudart.lib to your Additional Dependencies.</p>
<p><a href="http://sigttou.com/wp-content/uploads/linker_cudart.png" target="_blank"><img class="alignnone size-medium wp-image-275" title="Linking CUDArt" src="http://sigttou.com/wp-content/uploads/linker_cudart-300x212.png" alt="Linking CUDArt" width="300" height="212" /></a></p>
<p>Apply the settings and click OK. All we need now is to flesh out our hello.cu file with a sample program and we&#8217;re good to go. Here&#8217;s a sample program that adds two integers on the GPU and prints the result. (Note that this is not the default VS 2010 or VAX syntax highlighting, I&#8217;ve done some heavy customization.)</p>
<p><a href="http://sigttou.com/wp-content/uploads/cuda_sample_program.png" target="_blank"><img class="alignnone size-medium wp-image-276" title="CUDA Example Program" src="http://sigttou.com/wp-content/uploads/cuda_sample_program-300x212.png" alt="CUDA Example Program" width="300" height="212" /></a></p>
<p>Hit the run button and away you go. For fun, (and to learn more about Parallel Nsight), try setting a breakpoint in your GPU code and debugging it. <img src='http://sigttou.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://sigttou.com/cuda-dev-windows/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Killing Trees with Maximum Efficiency</title>
		<link>http://sigttou.com/killing-trees</link>
		<comments>http://sigttou.com/killing-trees#comments</comments>
		<pubDate>Thu, 04 Nov 2010 09:26:36 +0000</pubDate>
		<dc:creator>Bob Somers</dc:creator>
				<category><![CDATA[Adventures in GraphicsLand]]></category>

		<guid isPermaLink="false">http://sigttou.com/?p=246</guid>
		<description><![CDATA[This post is from a blog called Adventures in GraphicsLand that I&#8217;m writing with two fellow CS grad students, Chris Gibson and Ryan Schmitt. Articles about anything related to my graduate work in graphics or my thesis will be posted &#8230; <a href="http://sigttou.com/killing-trees">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong><em>This post is from a blog called <a href="http://aigfx.com">Adventures in GraphicsLand</a> that I&#8217;m writing with two fellow CS grad students, Chris Gibson and Ryan Schmitt. Articles about anything related to my graduate work in graphics or my thesis will be posted there and then cross-posted here. Articles about handy tips (like fixing bugs with VirtualBox or software setup on Fedora) will remain here. This post that I wrote for AIGFX, originally appeared <a href="http://www.aigfx.com/2010/11/killing-trees-with-maximum-efficiency/">here</a>.</em></strong></p>
<p>So hopefully it doesn&#8217;t seem like we&#8217;ve <a href="http://www.youtube.com/watch?v=MpraJYnbVtE" target="_blank">jumped the shark</a> before things have even gotten rolling, but today I&#8217;m going write about&#8230; printers.</p>
<p>&#8220;But Bob,&#8221; you ask, &#8220;this is a blog about graphics. Why are you writing about printers?&#8221;</p>
<p>Well, first of all, because my trusty HP PSC 1315 All-in-One is wheezing its way out of existence at the moment. I&#8217;m shocked that a $50 printer/scanner lasted me over 5 years, but it&#8217;s held up quite well.</p>
<p><img class="alignnone size-medium wp-image-250" title="HP PSC 1315" src="http://sigttou.com/wp-content/uploads/hppsc1315-300x227.jpg" alt="HP PSC 1315" width="300" height="227" /></p>
<p>Secondly, because this blog is about our graphics <em>research</em> and research means one thing&#8230; printing out boatloads of other people&#8217;s research to read through. Sure everything&#8217;s a PDF these days so I could read it on the screen, but screens mean internet access and internet access means hours wasted on Reddit, Facebook, or Minecraft instead of reading. Eventually you realize that while you just spent hours building TNT-powered sheep cannons in a pixelated voxel world, your PDF, sadly, did not read itself. I know that I have a much higher chance of actually reading something if I can kick back on my couch or bed away from the those horrible backlit time sinks and read something on a good ole&#8217; stack of dead trees and ink.</p>
<p>Convinced yet? If not, then this post was written by Chris. If you are, check out the <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16828113545" target="_blank">sweet las﻿er printer</a> I just ordered from Newegg.</p>
<p><img class="alignnone size-full wp-image-251" title="Brother HL-2270DW" src="http://sigttou.com/wp-content/uploads/brotherhl2270dw.jpg" alt="Brother HL-2270DW" width="400" height="305" /></p>
<p>Looks pretty humble, but check out the specs:</p>
<ul>
<li>27 pages per minute (a page about every 2 seconds!)</li>
<li>Wired and wireless network connectivity</li>
<li>Auto-duplex (prints on both sides without having to refeed!)</li>
<li>Only $150 shipped.</li>
</ul>
<p>On top of that, the toner cartridges are only $57. That&#8217;s what it already costs me to replace my inkjet cartridges, except the toner cartridges will print about 2600 pages before needing to be replaced, and you can set the printer to toner-save mode to get even better mileage out of them.</p>
<p>Now, granted, it is only a monochrome printer, but I&#8217;m primarily just printing text these days anyway (research papers and whatnot). I&#8217;m particularly excited about the auto-duplexing, because I can save half my paper that way and I might actually have a fighting chance of getting a staple through some of these research papers. In fact, I&#8217;m kinda surprised at how excited I am over&#8230; a printer.</p>
<p>As a disclaimer, I have not received the Brother HL-2270DW yet, so I can&#8217;t comment on whether or not it&#8217;s actually all that and a bag of chips, but the Amazon and Newegg reviews are pretty positive. Assuming it doesn&#8217;t catch fire and burn my house down* when I plug it in, I think I&#8217;ll be happy with it.</p>
<p>* If it does catch fire and burn my house down, I reserve the right to edit this post with vicious commentary representative of only a single user&#8217;s poor experience with the HL-2270DW, neglecting everyone else&#8217;s glowing reviews. You know, like a real blogger would do.</p>
<p>EDIT: I&#8217;ve had the HL-2270DW for over a month now. Yes, it is all that and a bag of chips. Very happy with in, and Newegg has even run a few specials where you can pick it up for around $90. It&#8217;s an absolute steal at that price.</p>
]]></content:encoded>
			<wfw:commentRss>http://sigttou.com/killing-trees/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Murmur (Mumble server) on Fedora 13</title>
		<link>http://sigttou.com/murmur-fedora-13</link>
		<comments>http://sigttou.com/murmur-fedora-13#comments</comments>
		<pubDate>Sat, 09 Oct 2010 05:49:44 +0000</pubDate>
		<dc:creator>Bob Somers</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://sigttou.com/?p=242</guid>
		<description><![CDATA[Just a quick note if you&#8217;re finding yourself stumped when installing murmur (the server component of Mumble) via yum on Fedora 13. The version currently in the yum repositories has a broken init script, so if you try to sudo &#8230; <a href="http://sigttou.com/murmur-fedora-13">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Just a quick note if you&#8217;re finding yourself stumped when installing murmur (the server component of <a href="http://mumble.sourceforge.net/">Mumble</a>) via yum on Fedora 13.</p>
<p>The version currently in the yum repositories has a broken init script, so if you try to <code>sudo service murmur start</code> you&#8217;ll get all sorts of nasty errors. The version currently in updates-testing works great, though. Install it from there like so:</p>
<p><code>sudo yum --enablerepo=updates-testing install murmur</code></p>
<p>That should do it. If you still have problems, try installing the <code>redhat-lsb</code> and <code>qt-sqlite</code> packages and see if that helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://sigttou.com/murmur-fedora-13/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make vim save files with Ctrl-s like Windows</title>
		<link>http://sigttou.com/vim-ctrl-s</link>
		<comments>http://sigttou.com/vim-ctrl-s#comments</comments>
		<pubDate>Sat, 25 Sep 2010 07:27:15 +0000</pubDate>
		<dc:creator>Bob Somers</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://sigttou.com/?p=227</guid>
		<description><![CDATA[Have you ever been working in vim over ssh and hit Ctrl-s by accident? This happens to folks who also work on Windows all the time, because Ctrl-s is the standard Windows keyboard shortcut for saving a file. What happens &#8230; <a href="http://sigttou.com/vim-ctrl-s">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Have you ever been working in vim over ssh and hit <code>Ctrl-s</code> by accident? This happens to folks who also work on Windows all the time, because <code>Ctrl-s</code> is the standard Windows keyboard shortcut for saving a file. What happens over ssh is that you issue a terminal stop command, and your ssh session appears to lock up.</p>
<p>The good news is, it&#8217;s not lost &mdash; just frozen. You can &#8220;unstop&#8221; the terminal by hitting <code>Ctrl-q</code>. Good as new! But we can do more&#8230;</p>
<p>If you&#8217;re a Windows user who ssh&#8217;s into *nix boxes frequently, we can actually make <code>Ctrl-s</code> in vim save the file like you&#8217;re intending. First, add the following to your <code>.bashrc</code> file to disable terminal stopping:</p>
<p><code>stty stop ''</code></p>
<p>You&#8217;ll notice that now the <code>Ctrl-s</code> doesn&#8217;t lock up vim anymore, but it doesn&#8217;t do anything yet. Let&#8217;s add that functionality now with two mappings in our <code>.vimrc</code> file.</p>
<p><code>map &lt;C-s&gt; :w&lt;CR&gt;<br />
imap &lt;C-s&gt; &lt;Esc&gt;:w&lt;CR&gt;i<br />
</code></p>
<p>Boom, done! Now when you hit <code>Ctrl-s</code> in vim, rather than locking up your terminal, it saves the file. In command mode, it just executes the traditional <code>:w</code> command, and in insert mode, it hits escape (to get to command mode), does the <code>:w</code>, and then hits &#8220;i&#8221; to get you back into insert mode where you left off.</p>
<p>I&#8217;m not a vim expert by any means, so if anyone has a better way to do it, I&#8217;m all ears.</p>
]]></content:encoded>
			<wfw:commentRss>http://sigttou.com/vim-ctrl-s/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Compiling Lua with Visual Studio 2010</title>
		<link>http://sigttou.com/lua-visual-studio-2010-2</link>
		<comments>http://sigttou.com/lua-visual-studio-2010-2#comments</comments>
		<pubDate>Tue, 04 May 2010 06:03:15 +0000</pubDate>
		<dc:creator>Bob Somers</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://sigttou.com/?p=193</guid>
		<description><![CDATA[It&#8217;s not often I have to venture into the Microsoftland development environment, but when I do it always seems to take me a while to get used to their visual projects instead of good &#8216;ole Makefiles. I&#8217;ve been using Lua &#8230; <a href="http://sigttou.com/lua-visual-studio-2010-2">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s not often I have to venture into the Microsoftland development environment, but when I do it always seems to take me a while to get used to their visual projects instead of good &#8216;ole Makefiles. I&#8217;ve been using Lua to extend my C and C++ apps a lot recently, so I suddenly found myself needing to include the Lua static library with a Visual Studio 2010 project.</p>
<p>There are already binary distributions out there, but I like to compile things myself, so I whipped up a Visual Studio 2010 project to compile the Lua static library (<code>lua.lib</code>) the command line interpreter (<code>lua.exe</code>) and the script compiler (<code>luac.exe</code>).</p>
<p>First things first. If you just want a zip file with those three binary files (the library is Visual Studio 2010 compatible), look no further:</p>
<ul>
<li><a href="http://sigttou.com/files/lua-5.1.4-bin-vs2010.zip">Lua 5.1.4 binaries compiled with VS 2010</a> (<code>lua</code>, <code>luac</code>, <code>lua.lib</code>, and necessary headers)</li>
</ul>
<p>If you want to build Lua 5.1.4 yourself (like me) just grab the most recent copy of the 5.1.4 source code from the <a href="http://www.lua.org">Lua website</a>. Next, grab these Visual Studio 2010 project files and solution file:</p>
<ul>
<li><a href="http://sigttou.com/files/lua-5.1.4-proj-vs2010.zip">Lua 5.1.4 Visual Studio 2010 projects</a> (to build the binaries yourself)</li>
</ul>
<p>To use the project files, just unzip them into the root directory of your Lua source files (where the <code>README</code>, <code>INSTALL</code>, and <code>COPYRIGHT</code> files are). Then, load up <code>lua-vs2010.sln</code> in Visual Studio 2010. You should see three projects. The first, <code>lualib</code> will build the static library under <code>lib/lua.lib</code>. The second and third, <code>lua</code> and <code>luac</code> will build the Lua interpreter and compiler under <code>bin/lua.exe</code> and <code>bin/luac.exe</code>.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://sigttou.com/lua-visual-studio-2010-2/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Installing TrueType Fonts in Fedora</title>
		<link>http://sigttou.com/fedora-truetype-fonts</link>
		<comments>http://sigttou.com/fedora-truetype-fonts#comments</comments>
		<pubDate>Thu, 15 Apr 2010 03:06:46 +0000</pubDate>
		<dc:creator>Bob Somers</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://sigttou.com/?p=180</guid>
		<description><![CDATA[I&#8217;ve haven&#8217;t written recently because I was completely bogged down finishing up my Bachelors degree and applying to grad schools, but here&#8217;s a quick tip for those of you looking for a painless way to install third party TrueType fonts &#8230; <a href="http://sigttou.com/fedora-truetype-fonts">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve haven&#8217;t written recently because I was completely bogged down finishing up my Bachelors degree and applying to grad schools, but here&#8217;s a quick tip for those of you looking for a painless way to install third party TrueType fonts in Fedora. This may work in other Linux distros, but Fedora is my distro of choice so that&#8217;s why it&#8217;s used here.</p>
<p>If you need to install fonts accessible to all users on the system, you have to do some more complicated voodoo. I hate voodoo, so I&#8217;m not going to cover that.</p>
<p>If all you need is to install a font for your own user, it&#8217;s just this simple:</p>
<p>Put your <code>myfont.ttf</code> file in your home directory, under directory called <code>/.fonts/</code>. So in other words, your font lives at:</p>
<p><code>/home/youruser/.fonts/myfont.ttf</code></p>
<p>Create the directory if it doesn&#8217;t already exist. Finally, restart any application you want to use that font in, and you should see it show up. You&#8217;re good to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://sigttou.com/fedora-truetype-fonts/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing the Fedora 12 VirtualBox Guest Additions problem</title>
		<link>http://sigttou.com/fedora12-virtualbox-fix</link>
		<comments>http://sigttou.com/fedora12-virtualbox-fix#comments</comments>
		<pubDate>Fri, 08 Jan 2010 05:26:30 +0000</pubDate>
		<dc:creator>Bob Somers</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://sigttou.com/?p=167</guid>
		<description><![CDATA[I&#8217;m a frequent VirtualBox user, and as I&#8217;ve noted in my previous posts, I&#8217;m an avid fan of Fedora as well. However, there is a nasty bug in the most recent version of VirtualBox (3.1.2) when combined with Fedora 12. &#8230; <a href="http://sigttou.com/fedora12-virtualbox-fix">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a frequent <a href="http://www.virtualbox.org/">VirtualBox</a> user, and as I&#8217;ve noted in my previous posts, I&#8217;m an avid fan of <a href="http://fedoraproject.org/">Fedora</a> as well.</p>
<p>However, there is a nasty bug in the most recent version of VirtualBox (3.1.2) when combined with Fedora 12. After installing the Guest Additions kernel modules <a href="http://www.virtualbox.org/manual/UserManual.html#id2507643">as per the user docs</a>, the system boots to a black screen with a cryptic error message that looks like a SELinux labeling problem (it&#8217;s not).</p>
<p><code>type=1305 audit(12587840002.571:32444): audit_enabled=0 old=1 auid=4294967295 ses=4294967295 subj=system_u:system_r:readahead_t:s0 res=1</code></p>
<p>The problem is actually with the Guest Additions video driver, the one that gives you the nice resizable desktop window. Once the driver is built and installed, for some reason the X server can&#8217;t find any screens and refuses to start.</p>
<p>Until the bug gets fixed in the video driver, here&#8217;s how you can fix the system so that it will boot correctly, although you&#8217;ll lose the dynamic resizing ability. You&#8217;ll have to stick with fixed, predefined resolutions for now.</p>
<ol>
<li>Mount a Fedora 12 ISO, such as the full or network install discs, and boot to it. Boot into Rescue Mode from the GRUB bootloader screen.</li>
<li>Breeze through the language and network options, but be sure to have it mount your hard disk image (it will mount under /mnt/sysimage).</li>
<li>Drop into a shell and change into your hard disk&#8217;s X11 config directory, so that would be:<br />
<code class="syntax bash">cd /mnt/sysimage/etc/X11</code></li>
<li>Edit your xorg.conf file&#8230; but wait! In Fedora 12, they switched to HAL for X configuration, so there is no xorg.conf file! Never fear, you just need to create one and it will override the HAL:<br />
<code class="syntax bash">vi xorg.conf</code></li>
<li>Now, use the following settings for the new xorg.conf file:
<pre>
Section "Device"
    Identifier "Configured Video Device"
    Driver "vboxvideo"
EndSection

Section "Monitor"
    Identifier "Configured Monitor"
EndSection

Section "Screen"
    Identifier "Configured Screen"
    Monitor "Configured Monitor"
    Device "Configured Video Device"
    SubSection "Display"
        Depth 24
        Modes "1440x900" "1680x1050"
    EndSubSection
EndSection

Section "InputDevice"
    Identifier "vboxmouse"
    Driver "vboxmouse"
    Option "CorePointer"
    Option "Device" "/dev/input/mice"
EndSection

Section "ServerLayout"
   Identifier   "Default Layout"
   Screen      "Configured Screen"   0 0
   InputDevice   "vboxmouse"
EndSection
</pre>
</li>
<li>You&#8217;ll see I&#8217;ve defined two resolutions, 1440&#215;900 and 1680&#215;1050. What this allows me to do is work windowed at 1440&#215;900 and if I want to go full screen (remember, dynamic resizing won&#8217;t work) I can hit the full screen shortcut in VirtualBox (Host+F) and change the resolution within Fedora to match my screen res.</li>
<li>Save from vi (<code>:wq</code>) and reboot the system. Remember to unmount the install disc! The system should boot correctly now, albeit without dynamic resizing.</li>
</ol>
<p>A huge thanks goes out to <a href="http://forums.virtualbox.org/viewtopic.php?f=7&#038;t=24851">Jits in the VirtualBox forums</a> for this fix!</p>
]]></content:encoded>
			<wfw:commentRss>http://sigttou.com/fedora12-virtualbox-fix/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Include dependencies</title>
		<link>http://sigttou.com/include-dependencies</link>
		<comments>http://sigttou.com/include-dependencies#comments</comments>
		<pubDate>Tue, 22 Dec 2009 06:56:46 +0000</pubDate>
		<dc:creator>Bob Somers</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://sigttou.com/?p=139</guid>
		<description><![CDATA[Generally when I write software, I try to keep things relatively well organized. Inevitably, however, things are going to get a bit messy, especially if you&#8217;re working on a large, disorganized codebase that you didn&#8217;t write to begin with&#8230; say, &#8230; <a href="http://sigttou.com/include-dependencies">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Generally when I write software, I try to keep things relatively well organized. Inevitably, however, things are going to get a bit messy, especially if you&#8217;re working on a large, disorganized codebase that you didn&#8217;t write to begin with&#8230; say, oh&#8230; something like the <a href="http://developer.valvesoftware.com">Source SDK</a>.</p>
<p>Frequently you have some class which is composed inside another class, but occasionally needs to access the class it&#8217;s composed inside of. Basically, the classes are composed inside each other, though the abstraction really only makes sense in one direction. Confused yet?</p>
<p>In this example, we&#8217;ll use a Refrigerator class which stores inside it an instance of a Cheese class. Why cheese, you ask? Because cheese is delicious. Also, our refrigerator is from the future and can slice and serve cheese just like the built in ice maker and water dispenser. It&#8217;s a pretty sweet fridge.</p>
<p>Now, we were all taught to keep our <code class="syntax cpp">#include</code>s in our header files, not the implementation files, so like good little programmers we construct our classes like so:</p>
<p><strong>refrigerator.h</strong></p>
<pre class="syntax cpp">#include &quot;cheese.h&quot;

class Refrigerator {
private:
    Cheese *pCheese;
    int temp = 35;

public:
    void ServeCheese();
    int GetTemp();
};</pre>
<p><strong>refrigerator.cpp</strong></p>
<pre class="syntax cpp">#include &quot;refrigerator.h&quot;

void Refrigerator::ServeCheese() {
    printf(&quot;Now dispensing %s cheese!\n&quot;, pCheese-&gt;GetFlavor());
}

int Refrigerator::GetTemp() {
    return temp;
}</pre>
<p><strong>cheese.h</strong></p>
<pre class="syntax cpp">class Cheese {
private:
    Refrigerator *pFridge;
public:
    char *GetFlavor();
    void CheckTemp();
    void BeginMolding();
};</pre>
<p><strong>cheese.cpp</strong></p>
<pre class="syntax cpp">#include &quot;cheese.h&quot;

void Cheese::CheckTemp() {
    if (pFridge-&gt;GetTemp() &gt; 45) {
        BeginMolding();
    }
}

char *Cheese::GetFlavor() {
    return &quot;cheddar&quot;;
}
</pre>
<p>I&#8217;ve left out the constructors in this example for brevity, but let&#8217;s assume that they get the pointers set up correctly so that our instance of the Refrigerator class has a correct pointer to an instance of the Cheese class and vice versa.</p>
<p>Now, at this point you may be screaming that this needs to be refactored and reorganized. Yes, it probably does. But there are many instances where you simply can&#8217;t, and in fact the abstraction really only makes sense one way. The fridge has cheese in it, but the cheese certainly doesn&#8217;t have a fridge in it. We just need that pesky reference around so we can check the temperature of the fridge every so often.</p>
<p><em>(Yes, I am aware that the fridge could push it&#8217;s temperature down to all the items in it, ala the <a href="http://en.wikipedia.org/wiki/Observer_pattern">Observer Pattern</a>. Yes I am aware that would be a better solution. But this is a contrived example anyway, so stick with me here.)</em></p>
<p>Now, the code given above doesn&#8217;t compile, because the Cheese class has no idea what the heck this Refrigerator class is, so we either need to include it or forward declare it. If we try to do this:</p>
<p><strong>cheese.h</strong></p>
<pre class="syntax cpp">#include &quot;refrigerator.h&quot;</pre>
<p>our compiler (more specifically, the preprocessor) is going to get very angry at us, depending on which order it decides to compile refrigerator and cheese. The solution, is a forward delcaration:</p>
<p><strong>cheese.h</strong></p>
<pre class="syntax cpp">class Refrigerator;

class Cheese {
    // ...etc...
};</pre>
<p>Basically what this does is tell the compiler, &#8220;Hey! There&#8217;s this class called Refrigerator that I might talk about, so here&#8217;s an empty declaration of it!&#8221;</p>
<p>The problem, though, is that this is rather limiting. Within the Cheese class, we can declare pointers to Refrigerator class, no problem. Pointers are of fixed size, so the compiler doesn&#8217;t much what care what it&#8217;s a pointer <strong><em>to</em></strong>, since it knows how much memory it needs to hold a pointer to it. When we try to access members of the class, though, like properties or methods, it falls apart because as far as the compiler knows, the class is empty. After all, we told it the Refrigerator class didn&#8217;t have anything in it.</p>
<p>So if we can&#8217;t <code class="syntax cpp">#include</code> it and forward declaring it doesn&#8217;t give us what we want, what can we do?</p>
<p>Well, we can do <strong>both</strong>. Kind of.</p>
<p>The solution is to forward declare in your header file, and <code class="syntax cpp">#include</code> in your implementation file. This will avoid the preprocessor headaches of of the chicken and egg <code class="syntax cpp">#include</code>, while allowing us to access the members of forward declared class in the implementation. In other words, here&#8217;s the fix:</p>
<p><strong>cheese.h</strong></p>
<pre class="syntax cpp">class Refrigerator;

class Cheese {
    ...
};</pre>
<p><strong>cheese.cpp</strong></p>
<pre class="syntax cpp">#include &quot;cheese.h&quot;
#include &quot;refrigerator.h&quot;
</pre>
<p>Again, it goes without saying, the better solution is to refactor or rearchitect your code if you can. These kind of hacks can get really out of hand and are usually a good <a href="http://en.wikipedia.org/wiki/Code_smell">code smell</a> that something needs to be fixed at a deeper level. However, if you&#8217;re working on a large codebase that you can&#8217;t change, this can help out a lot.</p>
]]></content:encoded>
			<wfw:commentRss>http://sigttou.com/include-dependencies/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing entities in the Source SDK</title>
		<link>http://sigttou.com/removing-entities</link>
		<comments>http://sigttou.com/removing-entities#comments</comments>
		<pubDate>Sat, 24 Oct 2009 23:54:49 +0000</pubDate>
		<dc:creator>Bob Somers</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Gaming]]></category>

		<guid isPermaLink="false">http://sigttou.com/?p=133</guid>
		<description><![CDATA[I haven&#8217;t written for a while, mainly because I&#8217;ve been busy with classes and studying for the GRE for my grad school applications, but here&#8217;s a quick tip for those of you meddling around with the Source SDK. It&#8217;s well &#8230; <a href="http://sigttou.com/removing-entities">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t written for a while, mainly because I&#8217;ve been busy with classes and studying for the GRE for my grad school applications, but here&#8217;s a quick tip for those of you meddling around with the Source SDK.</p>
<p>It&#8217;s well documented on how you go about spawning entities, but I couldn&#8217;t find a good place explaining how to <em>remove</em> spawned entities through code.</p>
<p><strong>Don&#8217;t</strong> try meddling with the global entity list (<code class="syntax cpp">gEntList</code>) or calling its <code class="syntax cpp">RemoveEntity()</code> method. It doesn&#8217;t do what you want.</p>
<p><strong>Instead</strong>, used one of the super-handy <code class="syntax cpp">UTIL_*</code> functions. Given a pointer to the entity you want to remove, simply use:</p>
<pre class="syntax cpp">
UTIL_Remove(pEntity);
</pre>
<p>Poof. Entity gone. Remember, entities are created and destroyed on the <strong>server side only.</strong> The server will automatically broadcast any changes to the entity list to its connected clients for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://sigttou.com/removing-entities/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

