<?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>TURBU Tech</title>
	<atom:link href="http://tech.turbu-rpg.com/feed" rel="self" type="application/rss+xml" />
	<link>http://tech.turbu-rpg.com</link>
	<description>My thoughts on Delphi programming in general, and particularly on the technical aspects of developing the TURBU engine and editor.</description>
	<lastBuildDate>Fri, 18 May 2012 18:11:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>You can&#8217;t remove open-source code from public use</title>
		<link>http://tech.turbu-rpg.com/409/you-cant-remove-open-source-code-from-public-use</link>
		<comments>http://tech.turbu-rpg.com/409/you-cant-remove-open-source-code-from-public-use#comments</comments>
		<pubDate>Fri, 18 May 2012 17:58:43 +0000</pubDate>
		<dc:creator>Mason Wheeler</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[X does not work that way]]></category>

		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=409</guid>
		<description><![CDATA[I commented a couple days ago on Smart Mobile Studio&#8217;s release and how happy I was that they&#8217;d found a payment processor that minimizes the hassle for users. Well, I&#8217;m a bit less pleased at the stunt they tried to pull this morning. There&#8217;s a post over on the Smart Mobile Studio dev blog explaining [...]]]></description>
			<content:encoded><![CDATA[<p>I commented a couple days ago on Smart Mobile Studio&#8217;s release and how happy I was that they&#8217;d found a payment processor that minimizes the hassle for users. Well, I&#8217;m a bit less pleased at the stunt they tried to pull this morning.</p>
<p>There&#8217;s <a href="http://op4js.optimalesystemer.no/2012/05/18/strategic-alliance-with-creative-it-and-eric-grange/">a post over on the Smart Mobile Studio dev blog</a> explaining that, due to an arrangement between them and the company that Eric Grange works for, they&#8217;ve obtained the exclusive rights to DWS&#8217;s Javascript code generator, and it&#8217;s</p>
<blockquote><p>hereby withdrawn from public use. Any company currently deploying this technology, or a derivative of it, is bound by international law to abandon it.</p></blockquote>
<p>Well, there&#8217;s just one problem with that: they can&#8217;t do it.  The JS codegen units, like the rest of DWS, were published under the <a href="http://www.mozilla.org/MPL/1.1/">Mozilla Public License</a>, with an MPL header at the top and everything, and the MPL grants those who download the code</p>
<blockquote><p>a world-wide, royalty-free, non-exclusive license under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work.</p></blockquote>
<p>The only ways that a license grant under the MPL can be terminated are specified in section 8: if the licensee fails to comply with the terms of the MPL, or if the licensee tries to sue the developer.  It very conspicuously does <em>not</em> say that the developer can revoke the license.</p>
<p>Even Borland understood this.  They never tried to strip InterBase (which they published under the MPL at one point) of its open-source status when they decided they wanted to keep working on it as a proprietary project.  They just stopped contributing to Firebird, started pretending like it didn&#8217;t exist instead, and kept working on InterBase and trying to differentiate it with new and better features.  And they certainly didn&#8217;t assert that people using or developing Firebird were in violation of international law.</p>
<p>This would be the best course of action for Optimale Systemer AS to take as well.  They&#8217;re free to continue further, proprietary work on it, and now they&#8217;ll need to if they want to differentiate it from what&#8217;s already out there.  Anyone else is still free to use, or even to fork and continue working on, the existing code.  (Which, by the way, has been deleted from SVN in the Google Code repository&#8217;s head, but is still available if you check out to revision #1462.)  Their current position is legally untenable, claims of &#8220;international law&#8221; notwithstanding.  It would never hold up in court, and I certainly hope they don&#8217;t waste any resources proving that.  They&#8217;d be much better spent continuing to improve their product.</p>
<p>I wonder if any other developers will be willing to take up the mantle and continue work on the open-source JS codegen, the way Eric did for DWS itself after Matthias Ackermann stopped working on it?</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.turbu-rpg.com/409/you-cant-remove-open-source-code-from-public-use/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>A smart new way to handle payments</title>
		<link>http://tech.turbu-rpg.com/405/a-smart-new-way-to-handle-payments</link>
		<comments>http://tech.turbu-rpg.com/405/a-smart-new-way-to-handle-payments#comments</comments>
		<pubDate>Thu, 17 May 2012 03:47:34 +0000</pubDate>
		<dc:creator>Mason Wheeler</dc:creator>
				<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=405</guid>
		<description><![CDATA[For those who weren&#8217;t aware, Smart Mobile Studio came out earlier today.  I&#8217;ve been following the project for a while, and when it was released, I went to purchase it&#8230; &#8230;and couldn&#8217;t.  The payment processor they&#8217;ve got set up doesn&#8217;t like free email accounts (which pretty much everyone on the entire Internet has) and the [...]]]></description>
			<content:encoded><![CDATA[<p>For those who weren&#8217;t aware, Smart Mobile Studio came out earlier today.  I&#8217;ve been following the project for a while, and when it was released, I went to purchase it&#8230;</p>
<p>&#8230;and couldn&#8217;t.  The payment processor they&#8217;ve got set up doesn&#8217;t like free email accounts (which pretty much everyone on the entire Internet has) and the only alternative they offered was to mail them a check.  (Seriously?  Do they think it&#8217;s still the 90s or something?)  And they didn&#8217;t even accept PayPal, which is kind of ridiculous in 2012.  So, note to anyone out there who wants to handle payments for something: please avoid Digital River like the plague until they shape up their act.  <strong>Do not make it difficult for your customers to give you their money.</strong></p>
<p>So I emailed Jon Lennart Aasenden about it, explaining the problems I&#8217;d had.  And it&#8217;s kind of magical, the way words like &#8220;your broken payment processor just lost you a few hundred dollars&#8221; can motivate people to act.  I had an email back from Jon within about 5 minutes, and a new purchase link about 3 hours later.<span id="more-405"></span></p>
<p>It was with a service I&#8217;ve never seen before, called <a href="https://gumroad.com/">Gumroad</a>.  And I was a bit shocked at how simple it was.  They asked for my email address and my card data, and that was it.  No signups or logins, no restrictions, no runarounds, no ridiculous forms asking me to fill in my mailing address when I&#8217;m buying a digital download&#8230; nothing.  It was just like handing the cashier my card at a physical store.  They took the card info, processed the payment, and emailed me the download link.  Hopefully the Smart team will be smart enough to set this up as their default payment system!</p>
<p>My experience there was what online payment should have been like all along, and seeing it now, I&#8217;m a bit surprised that it&#8217;s taken someone this long to come up with it!  It&#8217;s one of those things that seems obvious in hindsight.  And according to the email I got from the Smart team, it was just about that simple on their end too:  &#8220;Gumroad made me go WOW when I started to worked with it.  Everything was set up within minutes.&#8221;</p>
<p>I looked around their site a little, and it really does look like it&#8217;s just that easy to set things up, with a simple JSON-based REST API.  The one downside I noticed was that the cut they take of payments was a couple percentage points higher than other, more established services such as PayPal or Google Checkout.  (Though I suspect that if they get more business, economies of scale will allow them to bring that down.)  And they provide an optional callback system where their server can call your server to allow you to process things on your end, to do things like generate a license key, or update a user&#8217;s account with new data.</p>
<p>Overall, I&#8217;m pretty impressed with the system.  This is something I&#8217;d like to see become successful.  So if anyone out there wants to handle payments for something, please avoid Digital River like the plague, and try Gumroad instead.  Your customers will thank you.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.turbu-rpg.com/405/a-smart-new-way-to-handle-payments/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Remember, Black March begins today</title>
		<link>http://tech.turbu-rpg.com/403/remember-black-march-begins-today</link>
		<comments>http://tech.turbu-rpg.com/403/remember-black-march-begins-today#comments</comments>
		<pubDate>Thu, 01 Mar 2012 15:39:12 +0000</pubDate>
		<dc:creator>Mason Wheeler</dc:creator>
				<category><![CDATA[politics]]></category>

		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=403</guid>
		<description><![CDATA[For those who haven&#8217;t heard about Black March, it&#8217;s a continuation of the worldwide copyright abuse protests that have been going on since January.  We who rely on the Internet and love it realize that the proposed laws and treaties intended to abuse copyright law to alter the fundamental principles of the way the Internet [...]]]></description>
			<content:encoded><![CDATA[<p>For those who haven&#8217;t heard about <a href="http://blackmarch.info">Black March</a>, it&#8217;s a continuation of the worldwide copyright abuse protests that have been going on since January.  We who rely on the Internet and love it realize that the proposed laws and treaties intended to abuse copyright law to alter the fundamental principles of the way the Internet operates didn&#8217;t come out of nowhere. They weren&#8217;t thought up by some Congressman who realized one day that he hadn&#8217;t fulfilled his Evil Quota yet.  No, they have a very specific source: the entertainment industry, which has been lobbying non-stop for ever-increasing copyright &#8220;protection&#8221; for the last 3 decades and more.</p>
<p>With Black March, we intend to fight back.  The entertainment industry is made up of corporations, and when people note that corporations are abusing their power, one of the standard responses to any complaint is &#8220;if you don&#8217;t like it, then don&#8217;t buy their products.&#8221;  So we&#8217;re deciding not to.</p>
<p>March is the final month in the first financial quarter, and we&#8217;re celebrating it with a worldwide boycott of all entertainment industry products.  For one month, we will not buy any music, movies, books, magazines or video games from any company that is part of the problem.  This is a move designed to leave a gaping hole in the industry&#8217;s finances for the first quarter.  The Internet has become an essential part of our society, and interference with its operation will not be tolerated.</p>
<p>And although the Black March site doesn&#8217;t mention it, I think that what you <strong>do</strong> do is as important as what you don&#8217;t do.  Not everyone creating and distributing entertainment is part of the problem.  On the other side of the spectrum, we&#8217;ve got independent music and film creators who create and distribute their work without industry control.  We&#8217;ve got game developers like <a href="http://stardock.com/">Stardock</a>, who produce and sell high-quality games and refuse to violate their users&#8217; rights with DRM.  We&#8217;ve got authors like <a href="http://www.schlockmercenary.com">Howard Tayler</a>, a former computer programmer who&#8217;s been supporting himself and his family for several years now on the revenues from merchandise from his consistently-funny webcomic Schlock Mercenary.</p>
<p>There are people, and even a few companies, that are working with the Internet instead of against it to make their income, and I think that it&#8217;s important to support them.  They&#8217;re the future we want to help create as we reject the outdated past that the dinosaurs of the industry are trying to keep us stuck in.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.turbu-rpg.com/403/remember-black-march-begins-today/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>An email from Stardock</title>
		<link>http://tech.turbu-rpg.com/395/an-email-from-stardock</link>
		<comments>http://tech.turbu-rpg.com/395/an-email-from-stardock#comments</comments>
		<pubDate>Fri, 27 Jan 2012 19:53:58 +0000</pubDate>
		<dc:creator>Mason Wheeler</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=395</guid>
		<description><![CDATA[As you may know if you&#8217;ve been reading for a while, I&#8217;m a gamer.  Have been pretty much my whole life.  In fact, it was the prospect of creating my own video games that first got me into programming. A while back, I purchased Elemental, the latest game by Stardock, a company with a reputation [...]]]></description>
			<content:encoded><![CDATA[<p>As you may know if you&#8217;ve been reading for a while, I&#8217;m a gamer.  Have been pretty much my whole life.  In fact, it was the prospect of creating my own video games that first got me into programming.</p>
<p>A while back, I purchased Elemental, the latest game by Stardock, a company with a reputation for making high-quality games and for being a lot more ethical than many gaming companies.  Their <a href="http://tvtropes.org/pmwiki/pmwiki.php/Main/SinsOfASolarEmpire">Sins of a Solar Empire</a> was the best-selling game of 2008, for example, even though they refused to put any DRM on their software.  (So much for piracy destroying sales!)  They&#8217;re also the guys who created Impulse, a Steam competitor that ended up getting bought by GameStop last year.</p>
<p>Elemental, unfortunately, was not a high-quality game.  The basic concept was decent&#8211;not exceptional, but not *bad* either&#8211;but the game itself was a slow, crashy, bug-ridden mess.  Several patches over the course of several months eventually got it to a mostly-decent state, but in no way did it live up to expectations.</p>
<p>They just did something that does a lot to redeem them in my eyes.  I woke up this morning with the following letter in my email:<span id="more-395"></span></p>
<blockquote><p>Dear Stardock Customer,</p>
<p>If you&#8217;re receiving this email it means you purchased Elemental: War of Magic before November 1, 2010.</p>
<p>Elemental: War of Magic was a game we had very high hopes for. Unfortunately, it was a disappointment both to us, as well as to many of our customers. Stardock&#8217;s success in its nineteen years of existence has been because people know when they buy something with our name on it, it&#8217;ll be excellent. With Elemental: War of Magic, we failed that expectation.</p>
<p>For the past year, Stardock has been working on something new &#8212; Elemental: Fallen Enchantress. We went back to the drawing board to create not an expansion, but rather a new game in the Elemental universe.</p>
<p>Fallen Enchantress is currently in beta. The beta has already been added to your Stardock account and the final version will automatically be added free of charge on the day of release.</p>
<p>To access the beta, visit: [download link].</p>
<p>We hope you find Elemental: Fallen Enchantress to be a game that lives up to the expectations you had for War of Magic. We thank you for your support and we look forward to your feedback.</p>
<p>Sincerely,<br />
Brad Wardell &#8211; President &amp; CEO<br />
Stardock Entertainment</p></blockquote>
<p>I really appreciate that.  They didn&#8217;t have any obligation to do that, but it&#8217;s the right thing to do.  When your customers pay for something and then obviously do not get their money&#8217;s worth, you acknowledge it and find a way to make up for it.  If only more game companies (or software companies in general) out there had leaders with Brad Wardell&#8217;s conscience and sense of responsibility&#8230;</p>
<p>http://tvtropes.org/pmwiki/pmwiki.php/Main/SinsOfASolarEmpire</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.turbu-rpg.com/395/an-email-from-stardock/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The worst thing about SOPA</title>
		<link>http://tech.turbu-rpg.com/393/the-worst-thing-about-sopa</link>
		<comments>http://tech.turbu-rpg.com/393/the-worst-thing-about-sopa#comments</comments>
		<pubDate>Wed, 18 Jan 2012 15:29:54 +0000</pubDate>
		<dc:creator>Mason Wheeler</dc:creator>
				<category><![CDATA[politics]]></category>
		<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=393</guid>
		<description><![CDATA[Have you heard of the Golden Mean Fallacy?  I would link to the Wikipedia page, but they&#8217;re blacked out today, so here&#8217;s an excerpt from its description: &#8230;a logical fallacy which asserts that given two positions there exists a compromise between them which must be correct.  [It] implies that the positions being considered represent extremes [...]]]></description>
			<content:encoded><![CDATA[<p>Have you heard of the Golden Mean Fallacy?  I would link to the Wikipedia page, but they&#8217;re blacked out today, so here&#8217;s an excerpt from its description:</p>
<blockquote><p>&#8230;a logical fallacy which asserts that given two positions there exists a compromise between them which must be correct.  [It] implies that the positions being considered represent extremes of a continuum of opinions, and that such extremes are always wrong, and the middle ground is always correct. This is not always the case. Sometimes only X or Y is acceptable, with no middle ground possible. <strong>Additionally, the middle ground fallacy allows any position to be invalidated, even those that have been reached by previous applications of the same method; all one must do is present yet another, radically opposed position, and the middle-ground compromise will be forced closer to that position.</strong></p></blockquote>
<p>I added emphasis to a very important part of the explanation.  All you have to do to make something bad look good is come up with something even worse to compare it to.  And given the human capacity for imagination, that&#8217;s not such a difficult task.<span id="more-393"></span></p>
<p>You&#8217;ve probably heard of SOPA and Protect-IP by now.  Pretty much everyone who looks at these bills, outside of the entertainment industry, agrees on a few simple points:</p>
<ol>
<li>These bills would give private corporations the power to censor the Internet</li>
<li>These bills are unconstitutional, as they violate the 1st amendment</li>
<li>These bills are evil and need to be stopped</li>
</ol>
<p>Well, there&#8217;s some good news, and some bad news.  The good news is that as more and more people are finding out about them, they&#8217;re talking to their congressional representatives, and it looks like support for these bills is falling.  It&#8217;s looking likely that they won&#8217;t pass.</p>
<p>The bad news is the Golden Mean Fallacy.  Take a look at <a href="http://americancensorship.org/">Stop American Censorship</a>, one of the sites that&#8217;s working to coordinate the opposition to this legislation.  Check out the quotes down at the bottom, from experts on the subject.  I was a bit horrified to see multiple people saying, in effect, &#8220;the DMCA is OK, but <em>this</em> goes too far!&#8221;</p>
<p>That&#8217;s the Golden Mean Fallacy talking.  If we accept the Digital Millennium Copyright Act as legitimate, we&#8217;ve already lost.  It&#8217;s every bit as unconstitutional and every bit as evil as SOPA, and to be honest I&#8217;m  shocked that it&#8217;s apparently never been subject to judicial review on 5th or 14th amendment grounds.  You probably know of the 5th amendment as the one that says you can &#8220;take the 5th&#8221; in court, meaning that you have the right to not incriminate yourself.  But it also guarantees that you cannot &#8220;be deprived of life, liberty, or property, without due process of law.&#8221;  The 14th amendment reiterates the whole &#8220;due process of law&#8221; thing, applying it to the states as well as the federal government.</p>
<p>In layman&#8217;s terms, we have a guarantee, repeated twice, in the Bill of Rights that nobody can be punished for a crime without due process of law, which means (among other things) that they have the right to a fair trial.  This is just as important as a foundation for our freedoms as the First Amendment, and the DMCA tramples all over it.</p>
<p>How does a copyright act trample on the right to due process?  I know it sounds strange at first, but the DMCA is a strange law.  It allows copyright owners to send takedown notices to allegedly-infringing Internet sites, claiming that they are hosting infringing material.  Under the law, this material must be removed right away, unless the owner believes that no infringement is taking place and is willing to start a fight over it.</p>
<p>This may not sound too unreasonable, until you realize that <em>it puts the burden of proof on the accused</em>.  It throws one of our most sacred legal traditions, the presumption of innocence (aka &#8220;innocent until proven guilty&#8221;) out the window.  Now you&#8217;re guilty, by default and without a trial, until proven innocent!  You need look no further than <a href="http://www.chillingeffects.org">chillingeffects.org</a> to see the damage that this is doing, by allowing copyright holders to make false or exaggerated copyright claims and get away with it.  The presumption of innocence and the right to due process exists for a reason!</p>
<p>But the DMCA does even worse than that: it also allows the use of DRM technology.  Have you ever had a problem activating a program that you legitimately bought?  Something goes wrong and you can&#8217;t use it even though you&#8217;ve paid for it and done everything right?  Then you can see the problem here.  It&#8217;s like the takedowns, but even worse, as you have no way to fight it.  The DRM software is unaccountable.  If it has a bug, (and all software has bugs,) you&#8217;re not innocent until proven guilty.  You&#8217;re not even guilty until proven innocent.  You&#8217;re simply <strong>guilty</strong>, and screw the proof!  It doesn&#8217;t matter if you actually broke the law or not, the copyright owner&#8217;s interpretation of the law is enforced upon you and there&#8217;s nothing you can do about it.</p>
<p>So the worst thing about SOPA is not SOPA at all.  It&#8217;s the opportunity it provides for the Golden Mean Fallacy to legitimize another piece of equally-evil legislation.  Until the DMCA is repealed, and not only repealed but <em>reversed</em>, giving DRM technology the legal status it truly deserves, which is that of malware with no legitimate use, problems like SOPA will continue popping up again and again, because it&#8217;s built on the foundation of rights abuses codified by the DMCA.</p>
<p>Wikipedia is blacked out today, replacing its articles with a page urging people to contact their Congressmen in opposition to SOPA.  That&#8217;s a good gesture, but ultimately meaningless.  SOPA is getting enough opposition now that it&#8217;s not going to pass.  We&#8217;ve already won this battle.  What people need to contact their congressmen about is rooting out the source of this abuse.  &#8220;Repeal and reverse the DMCA,&#8221; not &#8220;stop SOPA,&#8221; needs to be the soundbite on people&#8217;s minds if we&#8217;re to truly protect our freedom in the Internet Age.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.turbu-rpg.com/393/the-worst-thing-about-sopa/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Job opportunities at WideOrbit</title>
		<link>http://tech.turbu-rpg.com/387/job-opportunities-at-wideorbit</link>
		<comments>http://tech.turbu-rpg.com/387/job-opportunities-at-wideorbit#comments</comments>
		<pubDate>Thu, 12 Jan 2012 14:13:55 +0000</pubDate>
		<dc:creator>Mason Wheeler</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[employment]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=387</guid>
		<description><![CDATA[Just thought I&#8217;d throw this one out there.  My employer, WideOrbit, is currently hiring.  We&#8217;ve got multiple development positions open for both Delphi and C#/Silverlight skillsets.  (SQL experience, especially with MS SQL Server, really helps too.)  At WideOrbit we build industry-leading software for managing broadcast media.  If you live in the USA, there&#8217;s a pretty [...]]]></description>
			<content:encoded><![CDATA[<p>Just thought I&#8217;d throw this one out there.  My employer, WideOrbit, is currently hiring.  We&#8217;ve got multiple development positions open for both Delphi and C#/Silverlight skillsets.  (SQL experience, especially with MS SQL Server, really helps too.)  At WideOrbit we build industry-leading software for managing broadcast media.  If you live in the USA, there&#8217;s a pretty good chance your favorite station is running on WideOrbit software, and we built it in Delphi.  (Mostly.)</p>
<p>Our development office is in Lynnwood, Washington, (about half an hour from Seattle,) and on-site work is preferred, though some exceptions do (infrequently) get made on a case-by-case basis.  It&#8217;s a good location, right across the street from a major mall (plenty of places to go for lunch!), with good pay and working conditions.  The office has a friendly, engineer-centric culture, and it really helps that the manager is a former coder and the boss still is one.  No pointy hair here!</p>
<p>Only those who know what they&#8217;re doing need apply.  The developers take an active part in the interview process, and we&#8217;ve got really high standards.  We understand that the only way to develop good software is with good developers, and we try hard to make sure that that&#8217;s all we get.  But if you&#8217;re good and you can demonstrate that you know what you&#8217;re doing, you&#8217;re likely to get an offer.</p>
<p>If anyone&#8217;s interested, send me a resume at <a href="mailto:mwheeler@wideorbit.com ">mwheeler@wideorbit.com </a>and I&#8217;ll see about getting you an interview.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.turbu-rpg.com/387/job-opportunities-at-wideorbit/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RTTI Script basic examples</title>
		<link>http://tech.turbu-rpg.com/385/rtti-script-basic-examples</link>
		<comments>http://tech.turbu-rpg.com/385/rtti-script-basic-examples#comments</comments>
		<pubDate>Sun, 13 Nov 2011 21:56:57 +0000</pubDate>
		<dc:creator>Mason Wheeler</dc:creator>
				<category><![CDATA[Delphi]]></category>

		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=385</guid>
		<description><![CDATA[After a few requests for examples and an assertion in the comments that noting actually compiles or runs, I&#8217;ve updated the repository a little. I&#8217;ve fixed a few bugs in the parser, and updated the executor to support the Environment object.  I added an Examples folder with two simple Hello World projects.  They both display [...]]]></description>
			<content:encoded><![CDATA[<p>After a few requests for examples and an assertion in the comments that noting actually compiles or runs, I&#8217;ve updated <a href="http://code.google.com/p/rtti-script/source/checkout">the repository</a> a little.<span id="more-385"></span></p>
<p>I&#8217;ve fixed a few bugs in the parser, and updated the executor to support the Environment object.  I added an Examples folder with two simple Hello World projects.  They both display a message box with a simple greeting.  The message box, of course, is not built in to the scripting system, so it has to be imported from the Delphi project.  These two sample programs demonstrate the two ways to do this: through external unit registration and with an Environment object.</p>
<p>The rsCompiler unit provides a class called TrsTypeImporter that&#8217;s used to import new types, variables, constants and routines (hmm&#8230; maybe I should change the name to just TrsImporter?) to make the compiler aware of them.  To register a new external unit, call RegisterStandardUnit on the compiler.  It takes two parameters: a unit name and an anonymous reference to a procedure that takes a TrsTypeImporter as an argument.  The first time a unit with that name is used in the script, the compiler will call the method reference, providing an importer to register things with the compiler.  A unit named &#8220;system&#8221; is always used, so if you want to import things that will always be available to the script, call RegisterStandardUnit and use &#8220;system&#8221; as the unit name.</p>
<p>Any units registered with the compiler also have to be registered with the script executor by a similar process.  The interface for the executor&#8217;s RegisterStandardUnit system is not stable yet, but it currently allows you to register your standalone routines in the callback.  I&#8217;ll add support for registering classes and external variables soon.</p>
<p>The second, simpler way to do imports is through the Environment object.  The second sample program shows how this works.  You declare a class and register it with the compiler, and every public method and property on it will be available to the script engine as if they were global routines and variables declared in the &#8220;system&#8221; import.  Then you register an instance of the class with the script executor before loading the program.  (It&#8217;s important to note that the Environment has to be registered with the compiler <strong>before</strong> compiling, and with the script executor <strong>before</strong> loading the program.)</p>
<p>It&#8217;s possible to use both systems together, of course.  If you want to break up your external routines into groups, you could declare and register multiple external units, but still have a group of globally-available methods in an Environment object.</p>
<p>Hopefully these examples will show people how to get started.  I&#8217;ll add some more examples as needed and when I get some more features ready.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.turbu-rpg.com/385/rtti-script-basic-examples/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>RTTI Script alpha release</title>
		<link>http://tech.turbu-rpg.com/382/rtti-script-alpha-release</link>
		<comments>http://tech.turbu-rpg.com/382/rtti-script-alpha-release#comments</comments>
		<pubDate>Fri, 11 Nov 2011 16:06:57 +0000</pubDate>
		<dc:creator>Mason Wheeler</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[RTTI]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=382</guid>
		<description><![CDATA[Way back at the start of this year, I wrote about how I&#8217;d been working on a new Object Pascal-based script engine built around Delphi&#8217;s extended RTTI system.  And then it got real quiet, because more immediate concerns took priority for me.  But I&#8217;ve gotten to the point in my game engine development where I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tech.turbu-rpg.com/284/dynamic-class-creation-moving-beyond-the-theoretical">Way back at the start of this year</a>, I wrote about how I&#8217;d been working on a new Object Pascal-based script engine built around Delphi&#8217;s extended RTTI system.  And then it got real quiet, because more immediate concerns took priority for me.  But I&#8217;ve gotten to the point in my game engine development where I really need to put in the scripting system, so I spent the last couple weeks finishing up the implementation and tuning the performance a little, and now I&#8217;ve got an alpha version ready.  If anyone would like to try it out, they can find it <a href="http://code.google.com/p/rtti-script/source/checkout">on Google Code</a>.</p>
<p><span id="more-382"></span>Note: <strong>This is an alpha version</strong>.  There are probably plenty of bugs in it.  There are still features I haven&#8217;t gotten around to implementing.  The sight of the code would probably send Barry Kelly fleeing from the room, screaming in horror.  So use at your own risk, and I take no responsibility if this causes your system to crash, your data to come out all wrong, or <a href="http://www.catb.org/~esr/jargon/html/N/nasal-demons.html">demons to fly out your nose</a>.  Specifically, the <strong>program</strong> keyword is not implemented yet, (only units,) <strong>var</strong> parameters don&#8217;t work yet, and a handful of features aren&#8217;t implemented in the script executor.</p>
<p>Having said that, here&#8217;s a few cool features I&#8217;ve come up with:</p>
<ul>
<li><strong>Class creation:</strong>  Defining a new class inside the script code is not supported yet, but the basic framework is there, and script units implement new classes with their routines as methods, accessible to the script executor through the RTTI system.  I&#8217;ll add class creation pretty soon.</li>
<li><strong>Automatic registration:</strong> Ever try to register a class with the script engine in PascalScript?  It&#8217;s a painful process involving generating a registration unit that basically redeclares your entire class, and then has to be kept in sync or things break.  (And if you get the dependency order wrong, it fails silently,  leading to weird errors further down the line.)  I figured that was way too complicated, so for RTTIScript, all you have to do is register a class reference, and it uses the RTTI system to figure out the internal members and dependencies for you.</li>
<li><strong>Execution environment:</strong> You&#8217;ll often have a bunch of little standalone routines and global variables that you want to import into a script to have available at all times, to provide an interface between the script and your program.  So I introduced the concept of the &#8220;environment:&#8221; You create a class and register it with the compiler, and it treats all the class&#8217;s public methods and properties as globals for the script.  (This also means that you can use property getters and setters to have the script&#8217;s interaction with its &#8220;global variables&#8221; invoke side effects.)</li>
<li><strong>Script saving:</strong> I know <a href="http://delphitools.info/2010/10/26/why-no-bytecode-format/">Eric Grange thinks that a fast compiler is good enough</a> and a bytecode version of a script is not necessary, but I don&#8217;t agree.  By his own tests, even a very fast script compiler can take 2 seconds to compile a 100,000 line script.  I&#8217;ve actually got an example of one that big in a project that the author wants to convert over once the TURBU project is ready.  Adding a two-second lag into the loading process and making the player wait while a level loads, which should feel instantaneous, is unacceptable.  I don&#8217;t have script saving implemented yet, but it&#8217;s definitely on the to-do list.</li>
</ul>
<p>Anyway, the alpha version is available for any <del>guinea pigs</del> curious developers out there who&#8217;d like to take a look at it.  It requires Delphi XE, it&#8217;s pretty fast, and when I get the rest of the features set up it&#8217;s going to be awesome!  Feel free to check it out, and to <a href="http://code.google.com/p/rtti-script/issues/list">submit a bug report</a> if you find some errors. (Which I&#8217;m sure plenty of people will.)</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.turbu-rpg.com/382/rtti-script-alpha-release/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>A handle leak in TWinControl?</title>
		<link>http://tech.turbu-rpg.com/375/a-handle-leak-in-twincontrol</link>
		<comments>http://tech.turbu-rpg.com/375/a-handle-leak-in-twincontrol#comments</comments>
		<pubDate>Wed, 26 Oct 2011 03:07:41 +0000</pubDate>
		<dc:creator>Mason Wheeler</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Delphi XE]]></category>
		<category><![CDATA[Memory Management]]></category>

		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=375</guid>
		<description><![CDATA[For the TURBU engine, I&#8217;ve got a custom control that allows me to embed an OpenGL rendering context on a form.  I was working on some new features, and I downloaded gDEBugger, an OpenGL debugging tool, to help out.  One of the things it told me is that my rendering contexts were leaking. They shouldn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>For the TURBU engine, I&#8217;ve got a custom control that allows me to embed an OpenGL rendering context on a form.  I was working on some new features, and I downloaded gDEBugger, an OpenGL debugging tool, to help out.  One of the things it told me is that my rendering contexts were leaking.<span id="more-375"></span></p>
<p>They shouldn&#8217;t be.  I create the renderer in CreateWnd and I destroy it in DestroyWnd, which should get called as part of the component destruction process.  But as it turns out, DestroyWnd is not actually called anywhere!</p>
<p>By tracing through the VCL code, it looks like DestroyWnd is supposed to get called from a call stack that looks something like this:</p>
<p>TMyControl.DestroyWnd //virtual<br />
TWinControl.DestroyHandle<br />
TWinControl.RemoveControl<br />
TControl.SetParent(nil)<br />
TControl.Destroy</p>
<p>But earlier in the form destruction process, TWinControl.Remove gets called.  It does not call RemoveControl on the control being removed, and at the end of the routine, it says:</p>
<p>AControl.FParent := nil;</p>
<p>By directly setting the field to nil instead of calling SetParent(nil), it makes it so that when SetParent(nil) is called, the entire body of code gets short-circuited, so that RemoveControl is never called.  In fact, it&#8217;s not just my control.  I put a breakpoint on the first line of TWinControl.DestroyHandle, ran the program, and closed it, which generates and then frees almost 30 TWinControl descendants.  <em>The breakpoint was never hit.</em></p>
<p>I&#8217;m seeing this in Delphi XE.  I haven&#8217;t tested it in any other version, but from what I can see, it appears that any VCL control created in XE will never call DestroyHandle during component destruction, leading to all window handles (and other resources, such as my rendering contexts) being leaked.</p>
<p>Can anyone confirm this, or say if it affects other versions?  I didn&#8217;t see this in QC, so <a href="http://qc.embarcadero.com/wc/qcmain.aspx?d=100455">I wrote up a bug report.</a>  Please vote for it, especially if you work on a program with lots of complex forms and have users who would be, shall we say, unamused to suddenly hit an &#8220;out of resources&#8221; error for no good reason&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.turbu-rpg.com/375/a-handle-leak-in-twincontrol/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Wish list: Slicing syntax</title>
		<link>http://tech.turbu-rpg.com/370/wish-list-slicing-syntax</link>
		<comments>http://tech.turbu-rpg.com/370/wish-list-slicing-syntax#comments</comments>
		<pubDate>Fri, 16 Sep 2011 17:47:41 +0000</pubDate>
		<dc:creator>Mason Wheeler</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Wish List]]></category>

		<guid isPermaLink="false">http://tech.turbu-rpg.com/?p=370</guid>
		<description><![CDATA[I&#8217;ve been doing a lot of string processing work lately.  Delphi has a lot of strengths, but unfortunately string manipulation really isn&#8217;t one of them.  It gets really messy really quickly if you&#8217;re trying to do anything complicated.  Extracting substrings out of strings quickly degenerates into a mess of difficult-to-read Copy calls.  It would sure [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing a lot of string processing work lately.  Delphi has a lot of strengths, but unfortunately string manipulation really isn&#8217;t one of them.  It gets really messy really quickly if you&#8217;re trying to do anything complicated.  Extracting substrings out of strings quickly degenerates into a mess of difficult-to-read Copy calls.  It would sure be nice if there was a better way.<span id="more-370"></span></p>
<p>There is a better way, by the way.  Python has it; it&#8217;s called &#8220;slicing.&#8221;  You know how in Delphi, you can use array[subscript] notation to get a single item out of an array?  Well in Python you can use an extended version of that to get a subrange (a slice) out of an array.  For example:</p>
<div class="codesnip-container" >
<div class="python codesnip" style="font-family:monospace;">mystring = <span class="st0">&quot;Python string slicing&quot;</span><br />
mystring<span class="br0">&#91;</span><span class="nu0">7</span>:<span class="nu0">13</span><span class="br0">&#93;</span></div>
</div>
<p>returns &#8220;string&#8221;.  (In Python, strings start at index 0.)  Also, you don&#8217;t need a value on both sides of the colon.  If you don&#8217;t provide one, it translates to the beginning/end of the array, as appropriate.  So &#8220;mystring[:6]&#8221; returns &#8220;Python&#8221; and &#8220;mystring[14:]&#8221; returns &#8220;slicing&#8221;.</p>
<p>Now, using a colon here isn&#8217;t very Pascal-ish.  Colons are for variable declarations.  But we do have a range operator that&#8217; s used with arrays: the double dot.  Wouldn&#8217;t it be nice to be able to do stuff like this in Delphi?</p>
<div class="codesnip-container" >
<div class="delphi codesnip" style="font-family:monospace;">name <span class="sy1">:</span><span class="sy3">=</span> <span class="st0">&#8216;Mason Wheeler&#8217;</span><span class="sy1">;</span><br />
firstname <span class="sy1">:</span><span class="sy3">=</span> name<span class="br0">&#91;</span><span class="sy1">..</span>5<span class="br0">&#93;</span><span class="sy1">;</span><br />
lastname <span class="sy1">:</span><span class="sy3">=</span> name<span class="br0">&#91;</span>6<span class="sy1">..</span><span class="br0">&#93;</span><span class="sy1">;</span></div>
</div>
<p>The compiler could translate this syntax to calls to Copy easily enough.  Also, they could improve on the concept a little.  If you feed Python a negative number in a slicing expression, it will error out.  But if Delphi could automatically translate myArray[..-5] into myArray[..high(myArray) - 5], grabbing everything except the last  X number of elements would be that much easier.</p>
<p>Any thoughts?</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.turbu-rpg.com/370/wish-list-slicing-syntax/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

