Monday, May 3, 2010

TBB Actor Model


I have been interested in the Actor Model for some time. I have previously written some functioning actor code, but I was a little overzealous in my application of the model, it was single threaded, and my message-passing scheme was extraordinarily slow. I have also been interested in the potential of TBB for some time. Game Programming Gems 8 has a very well written article by Robert Jay Gould about implementing the Actor Model using Intel Threading Building Blocks (http://www.threadingbuildingblocks.org/). Naturally, I was excited to get my hands on the project and start messing around. Unfortunately, the code associated with this article is missing off the included CD. I figured that I might be able to find it online, and in fact, I did find the project (owned by Robert Jay Gould) at Google Code: http://code.google.com/p/tbb-actor/. GO figure that the project has no source files in Subversion. A bit further digging (OK, the next thing down on the Google search results) resulted in finding the following in the Intel TBB forums: http://software.intel.com/en-us/forums/showthread.php?t=65100. (Associated but older links are http://software.intel.com/en-us/forums/showthread.php?t=62373 and http://software.intel.com/en-us/forums/showthread.php?t=61550). Some acknowledgement is given here: http://software.intel.com/en-us/articles/optimizing-parallel-data-transformation/; however, it simply notes that the project is "embryonic" as of July 21st 2009. I have taken what code gleaned from the TBB forum and I am tinkering with it, but hopefully somebody (read RJG) posts the content that was supposed to be included in GPG8…

Sunday, May 2, 2010

Family Guy - Brian and Stewie

Nausea. So nasty. Never before in my life has a cartoon induced such a negative physical reaction in me (with the possible exception of Junior High Health class). I could smell the diaper - I could visualize the hot nutty schmear piled on top of the absorbent liner... Awesome, totally awesome episode. If you missed it head over to http://www.hulu.com tomorrow (when it should be posted) and check it out.
Sent from my Verizon Wireless BlackBerry

Times Square VBIED

It seems to me that the Vehicle Borne Improvised Explosive Device (VBIED; colloquially 'car bomb') found in Times Square at approximately 6:30 PM Eastern last night was intended to cause one of two outcomes. Terrorism was the means, and terror was the goal. Both were accomplished, although New Yorkers (perhaps because we are all so jaded) aren't exactly freaking out and there are people going about their business as usual in Times Square. They would be well advised to stay on their toes, and this incident provides a timely reminder that all is not well with the world.

Before diving into the possibilities that I see, a discussion of the device is in order. The construction of the device was, in a word, childish, as if it was assembled by a 12 year old with pyromania. I am basing my opinion on the description of the device by NYPD Commissioner Kelly. He described the device as consisting of two 5-gallon canisters of gasoline (evidently not pressurized, and therefore merely flammable) with an 'explosive' between them (M-88 firecrackers evidently serving as primers throughout the VBIED). These were sitting in the back seat. Behind the seat in the cargo area were 3x ~15 pound standard propane tanks of the type that you use on your barbeque grill. One of these had M-88's strapped to it (rather ineffective primer I think). Behind that a metal gun case (dimensionally probably a rifle case of the type you check weapons under the plane in) filled with several 'bags' of an unidentified chemical substance (probably fertilizer per Kelly, and no hints that it was soaked in fuel oil). According to Kelly the system was functioning, referring to the wiring and potential to actually detonate. Taliban claims to the incident are likely unfounded (http://www.ny1.com/1-all-boroughs-news-content/top_stories/117974/nypd--taliban-claims-unfounded-in-times-square-bombing-attempt).

The device evidently would have functioned by first igniting the gasoline, then the ensuing blaze detonating the propane (assuming the M-88 was ineffective), and then detonating the presumed fertilizer in the gun case. This sequence of events could conceivably take only minutes; however, that leaves plenty of time for a warning to be raised (as it was) and people to get safely away. This in and of itself makes the device orders of magnitude less efficient than an instantaneous device. Also, the vast majority of the device was constructed using materials that deliver an impressive fireball but very little oomph (the effects are NOT directly related). These points beg the question: did the perp want the device to be discovered before it hurt anybody?

The ultimate point of terrorism is to scare people into pressuring their government for political change. In this case the message seems to be that it is still possible, even in our current world focused on homeland security, for significant civilian targets (i.e. Times Square) to be hit. The unlikely possiblity exists that this bomb scare was perpetrated by someone simply trying to remind us of that for our own good. This perverse altruism is reinforced by the apparent 'slow' and exposed design of the device (lending itself to discovery and deactivation), and would almost certainly be a product of some delusional psychopathology. Regardless of motive, the individual amateur theory is reinforced by the poor design of the VBIED itself. If they were to operate in a group/cell, they would be far more likely to produce a better bomb (someone in the group could have at least Googled the proper way to build a bomb), and the apparent lack of group involvement lends support to psychopathology. It is important to note that disorders such as Schizophrenia do not necessarily preclude higher brain planning functions and so on. Sub-clinical diagnosis is also possible, or an individual disturbed enough to want to lash out at society (a la Timothy McVeigh). In the latter case, the intended message would more likely be to protest against the excesses of commercialism.

If this was in fact perpetrated by a group, the likely motive would be to observe and analyze the police response for use in future 'real' operations, and/or to provide a distraction and resource sink for the NYPD while something happens elsewhere.

While I am just speculating and rambling, the important thing to take from this is to keep your eyes peeled for things that are out of place and don't be bashful about alerting the authorities to them.
Sent from my Verizon Wireless BlackBerry

Thursday, April 29, 2010

Quake Standards Group


Quakesrc.org redirects to and is apparently parked by an Israeli ISP of some kind or another:

I figured I would post links to the archived versions and duplicated content as I come across them.
For the old tutorials: http://www.quake-1.com/docs/quakesrc.org/
For the site itself, the last useful copy on the web archives is: http://web.archive.org/web/20071027092929rn_1/www.quakesrc.org/news/
After that date the archive doesn't have much except for a splash page about the site going down and/or SQL errors.
Given that the quakesrc forums were where most of the useful information actually was (far beyond the few things that actually got made into tutorials), here is a direct link to them from that date: http://web.archive.org/web/20071010020551/www.quakesrc.org/forums/
The links within the forum don't work, but they should give you an idea what to search for within web.archive.org.
While searching for the quakesrc.org information, I discovered that Pat Aftermoon (frequent quakesrc contributor) already has something like this up on his site: http://www.aftermoon.net/quakesrc-index.html.
Additionally, this inside3d thread provides a bunch of useful information: http://forums.inside3d.com/viewtopic.php?p=9633&sid=1fa0162e83342ddf810f9e45b89fb49f
I hope that somebody finds this useful. When I get some time, I might try to extricate my Bleeding Eye Studios forum and see what I (NeVo) had in there (I still have the vast majority of the code for my Quake2 project, but I do not recall where I left off). L

Visual Studio 2010

The install process took about 90 minutes, not counting the help files that are downloading now. The Help Library Manager is actually a nice tool, but its functionality should really be integrated into the VS installer instead of adding an extra step. It is not necessary to download the help files, as they are simply local versions of what is online, but I personally feel that they will be useful in the event of an internet outage or if I am not in a location with net access… essentially any scenario where I would not have access to the internet. Given that the NYC subway system lacks cellular and internet access for some reason (it is only the capital of the world and we are only in the 21st century) this scenario might be common enough for me. Following the installation of VS2010, yet another reboot is required, which is not really a big deal considering that Windows 7 boots fast enough, but still annoying. In my case, the option to 'Reboot Later' is grayed out inexplicably. The help installer seems to take forever, with the caption on the progress bar (which is not moving) vaguely stating that it is 'merging indexes' (shouldn't it be indices?). The next step is the DirectX SDK (http://msdn.microsoft.com/en-us/directx/default.aspx). I am currently installing the February 2010 edition, but the next one is slated for June (http://msdn.microsoft.com/en-us/directx/ff632024.aspx) which will add official VS2010 support, a few random but useful Direct3D enhancements, and a bunch of housekeeping. Although I don't foresee doing anything so crazy with DirectX that it won't work in VS2010, there are no guarantees that anything I do will work so I may have to use VS2008 to compile in the interim (messy and inconvenient).

Setup of Visual Studio 2010

So today, I am installing Visual Studio 2010 Professional. The installer runs smoothly, but requires a reboot as it installs updates to the .NET Framework and so on. I have already installed the most recent version of the Windows SDK (although it crapped out with an unidentified 'Fatal Error', everything seems to be in place), and I will be installing the DirectX February 2010 SDK shortly. I've got my SVN repository setup already, and I'm planning on getting to work as soon as I get everything else installed… the VS2010 installer is definitely not fast (perhaps they should use an install images similar to what they use for Windows now – I'm pretty sure that Windows 7 installs faster (minus the updates, of course)).

Who Am I

I am a computer-programming hobbyist. I have some formal training in Computer Science; however, the stuff they teach you in school seems to have little to no application in real-world programming. Once upon a time I deconstructed the Quake 2 GPL engine and ran an ill-fated 3.22 update project on QuakeSrc.org (the Quake Standards Group) – unfortunately, nobody else wanted to contribute to the project and the icculus.org version of Quake 2 superseded my project in spirit. Reading through the Quake 2 source page by page, function by function, and tracing the execution path from WinMain onward taught me orders of magnitude more about coding than any university ever could (especially because my university at the time switched from Java to Scheme… can you get any more useless?). Real life, by which I mean the war, interrupted my Quake 2 project and all of my other programming endeavors; however, I am now in a situation where I can dabble in it again at my leisure. A description of the systems I will be using to code is in order I suppose:

2x Windows 7 x64 4 GB RAM systems with dual core processors (1x AMD and 1x Intel) and DirectX 10.1 video cards (1x ATI and 1x Nvidia).

Subversion Server hosted on my Windows Home Server by VisualSVN, running TortoiseSVN and AnkhSVN for clients for Windows Explorer and Visual Studio respectively.

My IDE on both systems is Visual Studio 2010.

For concurrency, I will primarily be using Intel Threading Building Blocks, although I am open to alternatives.

The project I am currently putting together will be closed source, although I may release code snippets to the public domain as I see fit.

Time for me to get to the setup of my systems…