<?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>Sorressean&#039;s blog</title>
	<atom:link href="http://tds-solutions.net/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://tds-solutions.net/blog</link>
	<description>Sorressean&#039;s ramblings.</description>
	<lastBuildDate>Thu, 12 Jan 2012 23:10:42 +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>DLLs:A brief overview</title>
		<link>http://tds-solutions.net/blog/?p=124</link>
		<comments>http://tds-solutions.net/blog/?p=124#comments</comments>
		<pubDate>Thu, 12 Jan 2012 22:02:58 +0000</pubDate>
		<dc:creator>Sorressean</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://tds-solutions.net/blog/?p=124</guid>
		<description><![CDATA[In this article, I will discuss how to write a DLL, along with it&#8217;s uses. What is a dll? There are two types of Library; a static and a shared library. Microsoft&#8217;s Shared library is a DLL, or dynamic link library. The idea behind a library is to allow for centralized access to a subset [...]]]></description>
			<content:encoded><![CDATA[<p>In this article, I will discuss how to write a DLL, along with it&#8217;s uses.<br />
<span id="more-124"></span></p>
<p><h1>What is a dll?</h1>
<p>There are two types of Library; a static and a shared library. Microsoft&#8217;s Shared library is a DLL, or dynamic link library. The idea behind a library is to allow for centralized access to a subset of functions. For example, a game might have a sound engine written that other games by the same author can use. Rather than keep reimporting the code (which would be messy and lead to issues keeping up with the same version between all games), a library can be employed. The programmer can either create a static or shared library, which would contain all of the code for handling sounds. From that point, each game could just link to the library that was generated and reuse the code. This has the affect of making programs more modular, where any developer can include a subset of functions, which are used to perform a set of tasks in libraries that can be linked to from any current or future programs.
</p>
<p><h2>Static libraries</h2>
<p>A static library is staticlly linked at compile-time. This means that the execution size will be larger, but there is no dependency on an external library. This may be useful for cases where a developer has security concerns. By using a dynamic library, a user could easily replace the same library with another that exports the same functions, but does not do what the origenal library did. This is common for example where a key management system, which is used for managing a user&#8217;s authorization to run a specific program is handled from within a shared library.
</p>
<p><h2>Shared libraries</h2>
<p>A shared library is useful in many scenarios. First, a set of shared libraries can be distributed when a user will have one or more products installed. This not only decreases the deployment size if the libraries are deployed as a framework, but also means that as long as the interface does not change, you could minimize the size of updates by deploying individual libraries.
</p>
<p>
The modular aspect of shared libraries means that they can be loaded as plugins, which can be used to easily extend applications. A developer of an application can provide an interface through which the application can be controlled by an external shared library.
</p>
<p><h1>How does it work?</h1>
<p>When a dll is loaded, either dynamically through a call to <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms684175%28v=vs.85%29.aspx">LoadLibrary</a>, or dynamically at startup, it&#8217;s code segment is mapped into the address space of the calling process, while the data segments, (unless explicitly marked as shared) remain isolated per program. This means that each program uses the same code segment as all other programs, but the data segment remains separate. This is one of the benefits of shared libraries; if every program were linked statically, it&#8217;s disk and memory usage footprint would be considerably larger. Since pages marked executable can not be written to, the operating system can load one instance of a shared library into memory and allow all programs to access it, thus drastically decreasing the memory consumption of each process.
</p>
<p><h1>Implementation</h1>
<p>Like your average program, a DLL has to start off with an entry point which is called when the library is loaded, or when a process or thread is attached or detached. The <a href ="http://msdn.microsoft.com/en-us/library/windows/desktop/ms682583%28v=vs.85%29.aspx">dllmain</a> function has the following prototype:<br/><br />
<code><br />
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);<br/><br />
</code>
</p>
<p>
The first argument is just a handle to the dll itself. This is useful to pass to functions that require a handle to the module such as <a href="http://msdn.microsoft.com/en-us/library/ms683197%28v=VS.85%29.aspx">GetModuleFileName</a>. The reason is just that; the reason why the <a href ="http://msdn.microsoft.com/en-us/library/windows/desktop/ms682583%28v=vs.85%29.aspx">dllmain</a> function was called, and can be any of the following:<br/></p>
<ul>
<li>DLL_PROCESS_ATTACH: The dll was mapped into the address space of a process, either through a call to <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms684175%28v=vs.85%29.aspx">LoadLibrary</a>, or because it was linked to and loaded at startup.</li>
<li>DLL_PROCESS_DETACH: The dll is being unloaded from memory because the process was terminated, <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms683152%28v=vs.85%29.aspx">FreeLibrary</a> was called, or there was an error.</li>
<li>DLL_THREAD_ATTACH: When a new thread is created, the entry-point of every dll that has been mapped into that process is called.</li>
<li>DLL_THREAD_DETACH: A thread has exited cleanly.</li>
</ul>
<p>The reason argument can be used to manage process and/or thread specific storage. By allocating objects per process, you could deallocate the same objects when the process is detached.
</p>
<p>
The final argument, reserved is the most tricky; it can basically be treated as a boolean value to help determine what happened. If the reason is DLL_PROCESS_ATTACH, then reserved is NULL if the library was loaded dynamically through a call to <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms684175%28v=vs.85%29.aspx">LoadLibrary</a>, or not NULL if the library was loaded statically at startup. If the reason is DLL_PROCESS_DETACH, reserved will be NULL if there was a call to <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms683152%28v=vs.85%29.aspx">FreeLibrary</a>, or if loading of the dll failed. Similarly, reserved will not be NULL if the process terminated cleanly.
</p>
<p>
A return of true will mean that the DLL was loaded successfully. If false is returned and there was a call to <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms684175%28v=vs.85%29.aspx">LoadLibrary</a>, LoadLibrary will return NULL. If false is returned and the DLL was loaded at program startup, the process will terminate with an error.
</p>
<p><h2>Writing the application</h2>
<p>In this tutorial, we will be writing a basic application, which will make a call to a DLL. All the dll will do is add two numbers, but it will show how other functions can be exported.
</p>
<p>
First, we have the code we need to get the numbers from a user:<br/><br />
<code><br />
#include &lt;iostream&gt;</p>
<p>int main()<br />
{<br />
	int a, b;<br />
	std::cout &lt;&lt; "Enter your first number." &lt;&lt; std::endl;<br />
	std::cin &gt;&gt; a;<br />
	std::cout &lt;&lt; "Enter your second number." &lt;&lt; std::endl;<br />
	std::cin &gt;&gt; b;<br />
	std::cout &lt;&lt; Add(a, b) &lt;&lt; std::endl;<br />
	return 0;<br />
}<br />
</code><br />
Next, we need to write the dll:<br/>
</p>
<p><h2>Writing the DLL</h2>
<p>Addlib.h:<br/><br />
<code><br />
#ifndef ADDLIB_H<br />
#define ADDLIB_H<br />
#define WIN32_LEAN_AND_MEAN<br />
#define VC_EXTRALEAN<br />
#include &lt;windows.h&gt;</p>
<p>#define EXPORT __declspec(dllexport)<br />
#define IMPORT __declspec(dllimport)</p>
<p>IMPORT int Add(int a, int b);<br />
#endif<br />
</code><br />
main.cpp:<br/><br />
<code><br />
#include "addlib.h"</p>
<p>EXPORT int Add(int a, int b)<br />
{<br />
	return a+b;<br />
}</p>
<p>BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)<br />
{<br />
	return true;<br />
}<br />
</code>
</p>
<p><h2>Explaination</h2>
<p>When we compile the dll, a static library is generated. A program can link to the library and call the symbols exported. As you may have noticed, in the addlib.h file we defined export and import macros. You need to export functions from the source file, and import them in the header file. In order to access the symbols, you will need to do two things; first, you need to include the header file where your prototypes are declared. From the adder project, since I created the addlib project in the adder directory, I could just use:<br/><br />
<code><br />
#include "addlib/addlib.h"<br />
</code><br />
You will also need to link to the .lib that is generated when you build your dll. Since there is a debug and release version, you will probably want to do this in properties, where you can provide the path to the library based on the build.
</p>
<p><h2>Using DLLs in your own project</h2>
<p>In order to use DLLs in your own project, you will need to create the DLL. From visual studio, go to file->new->project, choose a c++ project and choose Win32 Console Application. Enter the name of the project and click OK. From the wizard, click next and choose DLL. You can either start with an empty project or let Visual Studio help you get started. From there click Finish and you will either have an empty file, or a template project that you can start working with.
</p>
<p><h1>Conclusion</h1>
<p>I hope this article was useful. Please feel free to leave any comments, ideas or suggestions in the comment box below. Also, stay subscribed to my <a href="http://tds-solutions.net/blog/?feed=rss">RSS feed</a> to keep up with future posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://tds-solutions.net/blog/?feed=rss2&#038;p=124</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sharing sessions with screen</title>
		<link>http://tds-solutions.net/blog/?p=118</link>
		<comments>http://tds-solutions.net/blog/?p=118#comments</comments>
		<pubDate>Sat, 07 Jan 2012 17:43:53 +0000</pubDate>
		<dc:creator>Sorressean</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://tds-solutions.net/blog/?p=118</guid>
		<description><![CDATA[Screen is a program that can be used to manage multiple shells from within one connection. You can move back and forth between terminals as well as detach the screen so the programs you are running will continue to run in the background after the connection is broken. Screen has many features, but the two [...]]]></description>
			<content:encoded><![CDATA[<p>Screen is a program that can be used to manage multiple shells from within one connection. You can move back and forth between terminals as well as detach the screen so the programs you are running will continue to run in the background after the connection is broken.<br />
<span id="more-118"></span></p>
<p>Screen has many features, but the two I will concentrate on today are sharing of sessions and logging output, both of which are extremely useful. First though, I will give a brief introduction to Screen and it&#8217;s uses.</p>
<p>If you have not done so already, you will want to install screen either by compiling from source or through your package manager. I will not go into detail on how to install screen, as a quick Google search should explain all you need to know. Once you have Screen up and running, you can create and move through windows. Please note, the keystrokes and commands covered here are just a minimal set of what Screen can do, if you want more functionality, please check the screen manpage.</p>
<p>After you have started a Screen session with the screen command, you have a few keystrokes that are critical to moving through and managing your windows. Please note, all keystrokes begin with control-a, and then are followed by another character. For example, in order to create a window you would use control-a c. The following table assumes you use control-a proceeding all of the commands so only the character is listed.</p>
<table>
<thead>
<tr>
<td>key</td>
<td>Description</td>
</tr>
</thead>
<tr>
<td>c</td>
<td>Creates a window.</td>
</tr>
<tr>
<td>n</td>
<td>Moves to the next window.</td>
</tr>
<tr>
<td>p</td>
<td>Moves to the previous window.</td>
</tr>
<tr>
<td>d</td>
<td>Detaches Screen.</td>
</tr>
</table>
<p>Now that you have the basics of Screen, we can cover logging and sharing sessions. Sharing sessions is useful for example if you wish to help someone perform a task or let them monitor what you type into a shell as you are providing support. In order to share a session, one party needs to establish it by using <code>screen -S foobar</code>. Make sure that the session name is named so that you will remember it. Then in order for the other party to connect, they just need to use <code>screen -x foobar</code>.</p>
<p>You can also skip the -S and use screen -list to find out what the session is, then use -x <session name> from that point.</p>
<p>Logging is yet another useful feature of screen; you can provide support or even keep track of your own actions by using <code>screen -L</code>. Screen will create a &#8220;screenlog.x&#8221; where x is the number of the window you are in to log each window.</p>
<p>As always, comments, ideas and suggestions for this article or future articles is welcome; thanks for reading.</p>
]]></content:encoded>
			<wfw:commentRss>http://tds-solutions.net/blog/?feed=rss2&#038;p=118</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[SOLUTION] BSD:viewing memory usage statistics</title>
		<link>http://tds-solutions.net/blog/?p=110</link>
		<comments>http://tds-solutions.net/blog/?p=110#comments</comments>
		<pubDate>Fri, 23 Dec 2011 18:31:40 +0000</pubDate>
		<dc:creator>Sorressean</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://tds-solutions.net/blog/?p=110</guid>
		<description><![CDATA[I was a bit disgruntled at the apparent lack of a free command in BSD, such as exists in Linux to view my memory usage statistics. This said, I decided to solve the problem and write a script to show the information to me. #!/usr/bin/env python import subprocess def GetVariable(str): proc = subprocess.Popen(['sysctl', str], stdout=subprocess.PIPE) [...]]]></description>
			<content:encoded><![CDATA[<p>
I was a bit disgruntled at the apparent lack of a free command in BSD, such as exists in Linux to view my memory usage statistics.<br />
<span id="more-110"></span><br />
This said, I decided to solve the problem and write a script to show the information to me.
</p>
<p>
<code><br />
#!/usr/bin/env python<br />
import subprocess<br />
def GetVariable(str):<br />
  proc = subprocess.Popen(['sysctl', str], stdout=subprocess.PIPE)<br />
  proc.wait()<br />
  line = proc.stdout.readline()<br />
  return int(line.split(" ")[1])</p>
<p>pagefree = GetVariable("vm.stats.vm.v_free_count")<br />
pagecount = GetVariable("vm.stats.vm.v_page_count")<br />
pagesize = GetVariable("hw.pagesize")<br />
totalmem = (pagecount*pagesize)/1024<br />
freemem = (pagefree*pagesize)/1024<br />
print ("Total memory: %d KB (%d MB)" %(totalmem, totalmem/1024))<br />
print ("free memory: %d KB (%d MB)" %(freemem, freemem/1024))<br />
</code>
</p>
<p>
So, what does it do?<br />
Basically how this works is it uses sysctl to query the needed variables; pagesize (usually 4096 bytes or 4 kb, though it can be changed), total pages and total free pages. Using these numbers, we can multiply both the total pages and the total free pages by pagesize, and from there we have our total and free memory.
</p>
<p>
You can visit the freemem page or download the python script at the following links:</p>
<ul>
<li><a href="Http://tds-solutions.net/files/freemem.py">Freemem Download</a></li>
<li><a href="http://tds-solutions.net/misc_projects/freemem.php">Freemem page</a></li>
</ul>
<p>
As always, thanks for reading; comments, ideas and suggestions are welcome and appreciated.
</p>
<p>
NOTE: This article was updated on 12-25-2011 to reflect code changes. I compared my script&#8217;s output to that of top and found that it was invalid, so I updated it.</p>
]]></content:encoded>
			<wfw:commentRss>http://tds-solutions.net/blog/?feed=rss2&#038;p=110</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beware toshiba</title>
		<link>http://tds-solutions.net/blog/?p=107</link>
		<comments>http://tds-solutions.net/blog/?p=107#comments</comments>
		<pubDate>Tue, 06 Dec 2011 19:43:03 +0000</pubDate>
		<dc:creator>Sorressean</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[depot]]></category>
		<category><![CDATA[toshiba]]></category>

		<guid isPermaLink="false">http://tds-solutions.net/blog/?p=107</guid>
		<description><![CDATA[We purchased a Toshiba laptop in late 2008, near December. While it has been a decent system in terms of hardware, Toshiba has a lot of problems when it comes to repairs. Through the time we purchased the laptop until about Aug of 2009, everything went great. I had no problems with the hardware and [...]]]></description>
			<content:encoded><![CDATA[<p>We purchased a Toshiba laptop in late 2008, near December. While it has been a decent system in terms of hardware, Toshiba has a lot of problems when it comes to repairs.<br />
<span id="more-107"></span><br />
Through the time we purchased the laptop until about Aug of 2009, everything went great. I had no problems with the hardware and liked the laptop.</p>
<p>the problems began in Aug of 2009 when the DC port became loose on the laptop. I sent it in to the depot in KY. Over 3 weeks later, I finally got the system back and it was in pretty bad shape; the system looked like it had been used as a hands-on project for a grade school class learning how to repair computers. The DC port was fixed, but the screen was not tightened up in the frame, so you could tilt the laptop back and the display would just hit the back of the case. The fan constantly ran at a high speed, which was problematic since it drains the battery and was extremely loud, the headphone port was loose and the webcam cover had a corner bent on it. There were also many protectors missing on the screen that basically just stick on to cover the scrues that let you take the screen off of the chassy. So we sent the laptop in -again- to get it fixed. It finally came back, but this time the headphone port was still loose, as well as a USB port that just didn&#8217;t work. The next time we sent it in, they got us in with Nexicore, which was supposed to be a better repair location. I can say the USB port got fixed and we got the laptop back a lot sooner, but the headphone port is still loose. The last time we sent it in, the headphone port still didn&#8217;t get fixed, though they supposedly replaced the system board, the wireless card no longer works, and the fan runs at it&#8217;s constant highest speed again.</p>
<p>Having sent it in four times already, I got in touch with their customer relations management department, who recommended that I send it in yet again. This is the only offer they can make for some reason or another, and their supervisors &#8220;do not communicate with customers.&#8221; that&#8217;s just excellent. They insisted that they were the final contact up the chain of command, and that I just send it in again to get it fixed.</p>
<p>I finally found the number for toshiba corporate on the internet and gave them a call. I got to speak to Robyn Morales who rather than sending it to the depot would like me to send it to the engineers this time instead, because they&#8217;re &#8220;excellent.&#8221; I mentioned getting a replacement, and was directed to a company called Service Net, which &#8220;handles the backend.&#8221; This done, I decided to contact the company.</p>
<p>I put in a claim to Service Net, which basically explained that this would be round 4 to fix what was broken the first time we sent this computer in, and they said someone would look at it. In the meantime, I spoke to Robyn again, who explained that I had to have 3 repairs done before Toshiba would consider doing anything. But, here&#8217;s the catch; the three repairs have to be done in the first year that I have the system, because Service Net takes over after that point. So since I had only sent it in once before that year was over, they wouldn&#8217;t replace it.</p>
<p>Service Net, however tells a whole different story. They do not have the &#8220;backend&#8221; for two years, and even though my system was transfered to them, Toshiba never put in a claim to fix the system itself; they just paid out-of-pocket for all the repairs, which have not been cheap. During the four times it has been in the depot, they have replaced the motherboard as well as numerous other parts, which don&#8217;t come cheap, as well as handled 2-day shipping and handling for both the empty box and the box with the system in it. Given that I have sent this in four times, and it has to go from their depot to my house, back to the depot and back to the house, they have paid for no less than 16 shipments just for one laptop.</p>
<p>With this information, I got in contact with Robyn at corporate yet again to see what there was that she could do about this. She had of course &#8220;looked into everything,&#8221; and recommended I send it in.</p>
<p>With this all said, I will be sending it to the engineers, but this should not have drug on this long. The laptop should have been repaired the first time, and never should have came back from the depot in the condition it was. Even if the depot had made a mistake and messed something up, it should&#8217;ve taken one more trip at minimum to get this fixed. Instead, it&#8217;s taken 3 more trips, and they still haven&#8217;t managed to get this taken care of. Rather than just replace the system, Toshiba would rather continue to pay out of their pocket to replace parts over and over again, not to mention the cost of shipping. I do not know if I will end up with a working system out of this deal, which is pretty bad since we paid a good bit for it, but I will for sure be reporting this to the BBB and the Chamber of commerce. It should not take this much work to get Toshiba to stand behind their products and take care of their customers.</p>
<p>In short, anyone who is currently looking for a laptop I recommend avoid Toshiba. The hardware isn&#8217;t bad, but if you ever have a problem where you need to send in your laptop, you may as well forget using it. To date, there have been approx, 1300 complaints filed with the BBB regarding the repair and depot itself, within the last four years. This is a huge number, especially considering that most people&#8217;s first move would be to just give up after repeatedly sending their system in and go by another. This is just the people that have taken the time to file a report with the BBB in the hopes that something will be done about it, which does not say much for Toshiba.</p>
]]></content:encoded>
			<wfw:commentRss>http://tds-solutions.net/blog/?feed=rss2&#038;p=107</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with RenX</title>
		<link>http://tds-solutions.net/blog/?p=105</link>
		<comments>http://tds-solutions.net/blog/?p=105#comments</comments>
		<pubDate>Mon, 28 Nov 2011 17:23:08 +0000</pubDate>
		<dc:creator>Sorressean</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://tds-solutions.net/blog/?p=105</guid>
		<description><![CDATA[RenX is a library for OSX that assists blind coders in creating guis that look good, while also getting around the accessibility issues of the interface builder in XCode. In this article, I will be discussing how to install RenX. I have tried to get going with RenX a few times and eventually just gave [...]]]></description>
			<content:encoded><![CDATA[<p>
RenX is a library for OSX that assists blind coders in creating guis that look good, while also getting around the accessibility issues of the interface builder in XCode. In this article, I will be discussing how to install RenX.<br />
<span id="more-105"></span><br />
I have tried to get going with RenX a few times and eventually just gave up each time, until now. I finally decided that I wanted to start playing with OSX from a code perspective, so I sat down to figure this out.<br />
Beyond one post on the MV-Dev list, no one has bothered to really help out with this. Though there is a lack of documentation for installation, I&#8217;m not sure if my requests just fell on deaf ears or if there was something else wrong, but I got it all the same. So, here&#8217;s how you go about installing it.
</p>
<h2>Requirements</h2>
<ul>
<li>XCode</li>
<li>Renx:<br />
(<a href="http://blog.bryansmart.com/category/software-development/renaissancex/">http://blog.bryansmart.com/category/software-development/renaissancex/</a>)</li>
<li>MacPorts:<br />
(<a href="http://www.macports.org/">http://www.macports.org/</a>)</li>
</ul>
<h2>procedure</h2>
<ol>
<li>Download and open the RenX package. Create a folder where it will go, and copy everything from the dmg into that folder. Do not forget to Eject the pkg from your finder.</li>
<li>Open the RenX XCode project, and hit command+b to build. you can use command+shift+b to check for any problems.</li>
<li>From the terminal, copy the RenX framework from yourfolder/Renaissance library/Renaissance.framework to /Library/Frameworks. Note that you will need to be root to do this.</li>
<li>Also as root, run port install gnustep-make-cocoa, if you plan to compile packages using Makefiles.</li>
<li>If you plan to compile your apps using Makefiles, as your user type the following into terminal:<br />
<code><br />
echo "source /opt/local/GNUstep/Cocoa/System/Library/Makefiles/GNUstep.sh">> ~/.profile<br />
</code></p>
<p>
that will basically make GNUstep-make create the variables that you will need.</li>
</p>
</ul>
<p>
That should be it! You now have the ability to use RenX with XCode, or through Makefiles as is done in the Tutorials provided in the Doc folder of RenX.
</p>
<h2>Conclusion</h2>
<p>
I hope this article was helpful. If anyone has any questions, comments or ideas please let me knoe via the comments section.</p>
]]></content:encoded>
			<wfw:commentRss>http://tds-solutions.net/blog/?feed=rss2&#038;p=105</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Official announcement of Alpine Games</title>
		<link>http://tds-solutions.net/blog/?p=101</link>
		<comments>http://tds-solutions.net/blog/?p=101#comments</comments>
		<pubDate>Tue, 18 Oct 2011 00:37:32 +0000</pubDate>
		<dc:creator>Sorressean</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[+]]></category>

		<guid isPermaLink="false">http://tds-solutions.net/blog/?p=101</guid>
		<description><![CDATA[As some of you may know, I have been working on a game client for the past couple of months. This post is more of an update on the progress and to officially announce Alpine Games. as I detailed in this post, I wanted to help fix the bugs that exist in the two most [...]]]></description>
			<content:encoded><![CDATA[<p>As some of you may know, I have been working on a game client for the past couple of months. This post is more of an update on the progress and to officially announce Alpine Games.<br />
<span id="more-101"></span><br />
as I detailed in<br />
<a href="http://tds-solutions.net/blog/?p=45">this post</a>,<br />
I wanted to help fix the bugs that exist in the two most popular game clients that currently exist; The Playroom, and RSGames. I will again go over the problems I see with both services.</p>
<h2>RSGames</h2>
<p>RSGames is at best designed by amateurs. The code is sloppy (being written on top of a MOO server), and littered with bugs that have been around for months and in some cases years. The website boasts a custom protocol, which I believe is nothing more than a prefixed line telling the client which lines to display and act on, and which to ignore. This was required because many times players would get tracebacks sent from the MOO server. Now rather than a player getting an error, the client just hangs or happily crashes and life goes on as it should. During my last visit, I was amazed to see some of the problems that exist. The news file boasts the ability to automatically log in with a UID, which took extensive effort to code up, but this appears to be incredibly buggy; logins break about 50% of the time having logged in a few times to join friends in games. I was really disappointed mainly to see the bugs and problems that exist still. At first, one of the main authors of RSGames claimed that the issues stemmed from use of the .net framework, now the claim is that the issues are because they are using the MOO server to run a game that should not have been written in moo to begin with.</p>
<h2>The Playroom</h2>
<p>I have not seen a whole lot of problems with the Playroom. It is designed by a competent coder, and though I don&#8217;t know how it works, I haven&#8217;t encountered to many problems. I know that the support is limited though, and the main author has refused numerous attempts to help him fix the grammar issues that plague the client. While this doesn&#8217;t make it harder to play the game, it detracts from the experience when I have to stop and parse something out. I do not expect everyone to speak perfect English (god knows, I don&#8217;t), but it would be really nice to see it cleaned up.</p>
<h2>What does Alpine Games plan to do that hasn&#8217;t been done before?</h2>
<p>My main goal in creating Alpine Games is to give the users the best experience possible. I have had many years of experience with multiple programming languages, and though I still have a lot to learn, I believe I can use what I know to create a robust game that users can enjoy.</p>
<p>One of the things I believe is happening now is the users acknowledge and know about the bugs that are part of RSGames, but the current attitude is that they&#8217;re not a huge issue, so people just work around them and get over it. I do not believe that a user should have to do this, as again, it detracts from the playing experience. While I know that I will have bugs, as much as I would like to say I won&#8217;t, my goal is to keep them as minimal as possible.</p>
<p>With all this said, I hope to explain a bit about the Alpine Games infrastructure and how it will work. First, the server is going to be a custom server, supporting a custom protocol. Eventually I will be reworking the protocol to be more robust and dynamic, but as is currently, it is extremely light weight and has very minimal overhead. Along with the protocol I am designing a custom server. This will mean that I will not have to work around the limitations of Moo (as had to have been done for the automatic logins), but I can work from a server that was written specifically for the game. This will allow me to both add features and fix bugs on the server a lot faster and also cut down on the overhead server-side of running a huge server like moo for game-play. While server overhead does not sound all that important, the main bonus to this is it will help greatly in cutting back on lag; the less resources that I use in the core of the server, the more players the server will be able to handle. The client on the other hand is going to be written in c++ using WXWidgets as it&#8217;s frontend. This allows me to easily and quickly port the client to other platforms, with minimal changes that can be kept across all versions. The client will also only be used for output; that is to say, all the game-based logic will be done server-side. This again is great for the user, because the only thing that has to happen when I add a new game is the client will have to download a soundpack for that game. This does not mean that client updates will not need to happen; in fact, during the testing and for a while after this becomes open to the public, these will be more frequent, but the client will not have to be downloaded as frequently once we get issues ironed out.</p>
<p>Rather than just closing with the request for comments and suggestions, I&#8217;d like everyone to pass this on to as many people as possible. In the comments below, I&#8217;d like people to both tell me what they think, but also give me ideas for things they do not have in the Playroom and RSGames currently. This includes features in the client, but also might include games. While I currently have a host of ideas already in the pipelines, I would like to start off Alpine Games with what the public wants; after all, it is going to be the public that makes Alpine Games what I invision it to be in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://tds-solutions.net/blog/?feed=rss2&#038;p=101</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Limiting Program Instances</title>
		<link>http://tds-solutions.net/blog/?p=98</link>
		<comments>http://tds-solutions.net/blog/?p=98#comments</comments>
		<pubDate>Thu, 13 Oct 2011 20:01:43 +0000</pubDate>
		<dc:creator>Sorressean</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://tds-solutions.net/blog/?p=98</guid>
		<description><![CDATA[Q: How do I limit the number of instances of a program running? I had someone ask me this question, and wanted to put a solution out there for anyone else. First, you can iterate over the processes and check for a process name that is the same as yours but with a different process [...]]]></description>
			<content:encoded><![CDATA[<p>Q: How do I limit the number of instances of a program running?<br />
<span id="more-98"></span><br />
I had someone ask me this question, and wanted to put a solution out there for anyone else.</p>
<p>First, you can iterate over the processes and check for a process name that is the same as yours but with a different process ID.<br />
Second, and more affective if you want to limit to a single instance would be a named <a href="http://en.wikipedia.org/wiki/Mutual_exclusion">mutex</a>. In short, a mutex is a way of limiting access to a specific resource. In this case, we use a named mutex to determine whether or not an existance of an application is currently running:<br />
<code><br />
bool IsFirstInstance()<br />
{<br />
	HANDLE mu;<br />
mu = OpenMutex(STANDARD_RIGHTS_READ, false, "Application Identifier");<br />
	if (mu)<br />
	{<br />
		return false;<br />
	}<br />
	mu = CreateMutex(NULL, false, "Application Identifier");<br />
	return true;<br />
}<br />
</code><br />
Lets take this step-by-step.</p>
<p>First, we call <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms684315%28v=vs.85%29.aspx">OpenMutex</a>, which allows us to check whether or not the mutex exists. This means that an instance of a program already has a mutex created, which means this is not the first instance. If there is a mutex returned, we return false.</p>
<p>Next, we call <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms682411%28v=vs.85%29.aspx">CreateMutex</a> to create the named mmutex. Though we did not have any error checking, please note that CreateMutex can fail. We did not check for this, but you will want to throw an exception or display a message or something to signal that an error occured. After we create the mutex we return true to signal that this is the first instance.</p>
]]></content:encoded>
			<wfw:commentRss>http://tds-solutions.net/blog/?feed=rss2&#038;p=98</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IOS 5:My thoughts, rants, etc.</title>
		<link>http://tds-solutions.net/blog/?p=92</link>
		<comments>http://tds-solutions.net/blog/?p=92#comments</comments>
		<pubDate>Thu, 13 Oct 2011 02:20:51 +0000</pubDate>
		<dc:creator>Sorressean</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://tds-solutions.net/blog/?p=92</guid>
		<description><![CDATA[As most people know, or those who haven&#8217;t been at the bottom of a lake or something, IOS 5 came out today. Hopefully my experiences can help others, so I&#8217;ve documented them here. First, the actual update. I was running a jailbroken tethered version of 4.2.10, (4.3.5 for you GSM folks on ATNT). This presented [...]]]></description>
			<content:encoded><![CDATA[<p>As most people know, or those who haven&#8217;t been at the bottom of a lake or something, IOS 5 came out today. Hopefully my experiences can help others, so I&#8217;ve documented them here.<br />
<span id="more-92"></span><br />
First, the actual update. I was running a jailbroken tethered version of 4.2.10, (4.3.5 for you GSM folks on ATNT). This presented a bit of a problem.</p>
<p>Please note: The steps and ideas here are not guaranteed to work. Your milage may very. Please make sure you backup your IPhone before trying anything.</p>
<p>The IOS 5 update finally finished downloading, and I was able to move on. It turns out though, that ITunes &#8220;verifies&#8221; with apple. I&#8217;m not exactly sure if they&#8217;re verifying a hash of the current running firmware or if this is something else, but it presented a problem. I was running a jailbroken copy, which means that things aren&#8217;t going to be exactly like Apple would like them to be. So, I dropped into DFU mode and tried that way. No luck. I also tried adding a line to my hosts file to point to cidia, but there were still issues. Finally I got things working. I managed to locate the update in application data, because the servers were swamped and the download would&#8217;ve taken forever, this was a nice find. If you want to get to it, you can type the following from run:<br />
<code><br />
%appdata%\Apple Computer\iTunes\iPhone Software Updates<br />
</code><br />
Note that the IPhone bit of the path will be different if you&#8217;re using another IOS device.<br />
From there, I was able to use Redsn0w to jump into pwned DFU mode. I had to use the 4.2.10 firmware, since Redsn0w does not recognize 5 yet, at least the copy I had. This was easy since I had the firmware to tether jailbreak to begin with. From within the redsn0w app, just browse for the firmware, click next, and when you get to the checkboxes uncheck everything but boot to pwned DFU mode. Make sure you power off your IPhone. Since the instructions confused me that Redsn0w gave me, I&#8217;ll put my own for entering DFU mode here:</p>
<ol>
<li>Hold down the power button for exactly three seconds.</li>
<li>While still holding down the power button, press the home button. You should now be holding down both the power and home button. Hold this combination for 10 seconds.</li>
<li>Let go of the power button, but keep holding down the home button for another 15 seconds or until you hear your windows recognize a new device.</li>
</ol>
<p>This should boot you into DFU mode.</p>
<p>Next, go to ITunes. You will get a warning that you are in recovery mode. Click ok. Tab over to the restore button on the IPhone, and if you are using Jaws hit insert+f3. Then hold down the shift key for about a second, and hit enter. Note that hitting shift+enter without giving the shift key a second doesn&#8217;t work, at least it didn&#8217;t for me. If you do it right, you will get a file browse dialog where you can put in the path of your image, whether you downloaded it from another resource or got the update from ITunes. Select the firmeware file you want and click open. Click restore and you should be able to watch the process complete. If you&#8217;re using Jaws or another screen reader, you can tab around to a textbox where it notes the progress. If you are doing this within the next couple days after IOS has been released, you may get a 3200 error. This just means that Apple&#8217;s servers are flooded and you need to try again later. This took some digging, since the actual error wasn&#8217;t documented. You can usually Google for the error, also make sure that if you&#8217;re getting a 3194 you don&#8217;t have the cidia verification redirect in your hosts file. If you don&#8217;t know what that means, chances are you&#8217;re safe.</p>
<p>Now that you are into IOS5 (hopefully), the setup wizard is pretty straight forward. The only caution I have is with apps and ringtones being synced. ITunes apparently forgot that I wanted to sync apps, so it didn&#8217;t sync anything at all. I was basically left with the default IOS 5, plus voiceover and contacts. I&#8217;ve also heard of other people having this problem. To fix it, just tab over from your IPhone in the sources list until you get to the radio buttons, check apps, go down to the sync apps checkbox and check it. Click apply and do that for ringtones and books or whatever else you want to sync to your IPhone. Tab back to sources, hit applications and then y. Note that IOS 5 does not announce the progress of your sync like 4.x did, nor does it give you a slide to cancel option. You can however see it in the status bar. It is safe to unlock your phone, then just slide your finger on the status bar at the top and it will show up there. You can also tab over to the progress to watch ITunes syncing.</p>
<p>Other than that, there really doesn&#8217;t seem to be to many amazing points to write home about on IOS5. I really do like the clearer voice, The notification setup is nice, but that should&#8217;ve been there a long time ago. The only thing I really didn&#8217;t care for on the notifications center were the stock quotes, which were easily disabled through settings. I also like being able to flick up and down on the page x of x announcement on the home screen. There also stilll appears to be some problems with the home sccreen. For example, I got a page 1 of four when I was rearranging the items on the dock. I hadn&#8217;t moved anything around on the pages, It just created a fourth page for some reason. Hitting the home button forced it to update, but that&#8217;s been there as long as I can remember. Voiceover no longer chops off certain letters if it is running at 100% speed, which is also a rather nice bugfix.</p>
<p>All in all, IOS 5 is decent, and there were some pretty good accessibility advances made. I kind of feel that IOS 5 in general is following along in Android&#8217;s footsteps, so hopefully we will see something new and amazing to keep IPhone worth using. I know there were some cool changes with Camera, but I honestly don&#8217;t care about the camera and whether or not it can make clearer pictures, especially since that seemed to be the high-point of IOS 5.</p>
<p>Please note, you can not downgrade from 5 to 4.x, so if you have any doubts at all about 5, don&#8217;t upgrade until you get those clarified. I was trying to use a IOS 4.2.10 firmware to load back on the phone before I found where ITunes stored it&#8217;s firmware bundle and I got error code 1. The update hadn&#8217;t even finished, but either ITunes or something on the phone that ITunes changed before it realized 5 could not go through errored; this again was an undocumented error, but a Google turned it up. It just means that you&#8217;re trying to downgrade from IOS 5 to IOS 4.</p>
<p>as always, your questions, comments and ideas would be welcome. Thanks for reading, and I hope the information here helped.</p>
]]></content:encoded>
			<wfw:commentRss>http://tds-solutions.net/blog/?feed=rss2&#038;p=92</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>E2M: manpage to ed</title>
		<link>http://tds-solutions.net/blog/?p=88</link>
		<comments>http://tds-solutions.net/blog/?p=88#comments</comments>
		<pubDate>Thu, 08 Sep 2011 22:44:03 +0000</pubDate>
		<dc:creator>Sorressean</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://tds-solutions.net/blog/?p=88</guid>
		<description><![CDATA[I have just released a new utility of soarts, which is used to view manpages in ed. While this isn&#8217;t a very amazing utility, I hope that it will be useful to some. I was prompted to create this script when I had a lot of issues reading some of the manpages in my shell. [...]]]></description>
			<content:encoded><![CDATA[<p>I have just released a new utility of soarts, which is used to view manpages in ed.<br />
<span id="more-88"></span><br />
While this isn&#8217;t a very amazing utility, I hope that it will be useful to some.</p>
<p>
I was prompted to create this script when I had a lot of issues reading some of the manpages in my shell. Usually when I would page up, the bottom line would get cut off, etc etc. Basically how this works, is it takes a manpage that you specify and dumps it to <a href="http://en.wikipedia.org/wiki/Ed_%28text_editor%29">Ed</a>. This makes for much easier viewing of the manpage.
</p>
<p>
You can visit the <a href="http://tds-solutions.net/misc_projects/e2m.php">E2M</a> page, or you can download<br />
<a href="http://tds-solutions.net/files/e2m.sh">e2m.sh</a>.
</p>
<p>
As always, thanks for reading; I hope this is helpful to someone.</p>
]]></content:encoded>
			<wfw:commentRss>http://tds-solutions.net/blog/?feed=rss2&#038;p=88</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My final day at GDB</title>
		<link>http://tds-solutions.net/blog/?p=86</link>
		<comments>http://tds-solutions.net/blog/?p=86#comments</comments>
		<pubDate>Sun, 07 Aug 2011 01:27:45 +0000</pubDate>
		<dc:creator>Sorressean</dc:creator>
				<category><![CDATA[gdb2011]]></category>

		<guid isPermaLink="false">http://tds-solutions.net/blog/?p=86</guid>
		<description><![CDATA[Today was the final day in my guidedog training; O&#8217;Mally and I graduated together. I think the last post I made was a while ago, and was after a bad route O&#8217;Mally and I had together. I&#8217;m glad to say we have both improved a lot within the last week or so. We haven&#8217;t had [...]]]></description>
			<content:encoded><![CDATA[<p>Today was the final day in my guidedog training; O&#8217;Mally and I graduated together.<br />
<span id="more-86"></span><br />
I think the last post I made was a while ago, and was after a bad route O&#8217;Mally and I had together. I&#8217;m glad to say we have both improved a lot within the last week or so. We haven&#8217;t had any more bad walks, and he&#8217;s done an amazing job with everything else. We did some more solo routes, and we both made some big changes that will help us a lot in the future.</p>
<p>Today was the final day of my training; graduation day. I came to GDB about three weeks ago, but it does not seem like it was that long ago. The first two days were spent waiting for our new guide dogs, and after that the time flew. I learned a lot, and made a couple of really awesome friends in the last three weeks here.</p>
<p>We started off the morning meeting the couple that sponsored our chain of puppies, by making a $25000 donation to GDB. After that we got to have lunch, and then the chaos ensued. At around 12:00, the puppy raisers came; this is the family that raised O&#8217;Mally, and I got to meet them and they got to see him for the last time. They were a really cool family, and they really took care of O&#8217;Mally, as might be apparent by the way he works today. After we spent some more time with the puppy raisers, Chris and his family got here, which was really cool because I had not seen his mom since about eighth grade or so. It was really cool seeing them again. After that it was time for pictures and the final graduation.</p>
<p>The final ceremony and everyone leaving was a bittersweet experience. I am really excited for our future and to get home, but I already miss some of the people that were here that I spent the most time with. I never really thought about it before, but it was also hard watching everyone graduate. We spent the last 3 weeks together, pretty much every day at relieving, meals, morning workouts, and talking about how good or bad all of our routes went and sharing experiences. It was hard spending so much time with everyone, then seeing them go off again. On the flipside though, it was also an amazing experience, being able to  see everyone in the class achieve what they wanted.</p>
<p>This class was one of the best times I&#8217;ve had. Though the training was arduous, the students and instructors always kept me laughing and it was a really good experience. I enjoyed watching O&#8217;Mally and everyone else improve, as well as being able to help everyone where ever I could.</p>
<p>If anyone should stumble on this, I want to reiterate my thanks to the GDB staff, O&#8217;Mally&#8217;s puppy raisers, and the instructors for an awesome time, an awesome dog, and an amazing experience. Thanks to everyone who made this possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://tds-solutions.net/blog/?feed=rss2&#038;p=86</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

