<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for luminance</title>
	<atom:link href="http://www.luminance.org/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://www.luminance.org/blog</link>
	<description>Programming and Game Development - Kevin Gadd&#039;s Blog</description>
	<lastBuildDate>Wed, 18 Jan 2012 18:18:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Comment on Tiled map loader for XNA by Anne</title>
		<link>http://www.luminance.org/blog/code/2009/06/17/tiled-map-loader-for-xna/comment-page-1#comment-5149</link>
		<dc:creator>Anne</dc:creator>
		<pubDate>Wed, 18 Jan 2012 18:18:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.luminance.org/?p=495#comment-5149</guid>
		<description>I had the exact same error as Soldat, but after following Kael&#039;s instructions, I managed to work it out and it runs fine now.</description>
		<content:encoded><![CDATA[<p>I had the exact same error as Soldat, but after following Kael&#8217;s instructions, I managed to work it out and it runs fine now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Journey Into Linker Hell, And A Mistake by Archaeopteryx</title>
		<link>http://www.luminance.org/blog/code/2011/08/01/a-journey-into-linker-hell-and-a-mistake/comment-page-1#comment-4741</link>
		<dc:creator>Archaeopteryx</dc:creator>
		<pubDate>Thu, 04 Aug 2011 08:28:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.luminance.org/?p=1013#comment-4741</guid>
		<description>Could https://bugzilla.mozilla.org/show_bug.cgi?id=479148 be the shutdown you see?</description>
		<content:encoded><![CDATA[<p>Could <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=479148" rel="nofollow">https://bugzilla.mozilla.org/show_bug.cgi?id=479148</a> be the shutdown you see?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Journey Into Linker Hell, And A Mistake by Trillian</title>
		<link>http://www.luminance.org/blog/code/2011/08/01/a-journey-into-linker-hell-and-a-mistake/comment-page-1#comment-4738</link>
		<dc:creator>Trillian</dc:creator>
		<pubDate>Tue, 02 Aug 2011 21:45:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.luminance.org/?p=1013#comment-4738</guid>
		<description>This sounds like my daily job, but it was still interesting to see your way of approaching the problem. Thanks for the tips!</description>
		<content:encoded><![CDATA[<p>This sounds like my daily job, but it was still interesting to see your way of approaching the problem. Thanks for the tips!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Journey Into Linker Hell, And A Mistake by Brant Gurganus</title>
		<link>http://www.luminance.org/blog/code/2011/08/01/a-journey-into-linker-hell-and-a-mistake/comment-page-1#comment-4736</link>
		<dc:creator>Brant Gurganus</dc:creator>
		<pubDate>Tue, 02 Aug 2011 13:38:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.luminance.org/?p=1013#comment-4736</guid>
		<description>I ran into a similar dual heap issue in the past. We were using a project with GTK/GLIB using the pre-compiled libraries. The issue is that GLIB exposes (at least at the time) g_malloc but not g_free. As a result, it&#039;s impossible to free the memory without a crash as the prebuilt GTK/GLIB links against msvcrt.dll (something that shouldn&#039;t be done) and the main project builds against a version-specific C library like msvcrt700.dll. So you crash if you try to free that memory. So my lesson there is if you ever do an API that exposes a resource like that, you also need to expose the resource release mechanism as well. Otherwise, you either have a crash from mismatched heaps or a memory leak from unfreed memory.</description>
		<content:encoded><![CDATA[<p>I ran into a similar dual heap issue in the past. We were using a project with GTK/GLIB using the pre-compiled libraries. The issue is that GLIB exposes (at least at the time) g_malloc but not g_free. As a result, it&#8217;s impossible to free the memory without a crash as the prebuilt GTK/GLIB links against msvcrt.dll (something that shouldn&#8217;t be done) and the main project builds against a version-specific C library like msvcrt700.dll. So you crash if you try to free that memory. So my lesson there is if you ever do an API that exposes a resource like that, you also need to expose the resource release mechanism as well. Otherwise, you either have a crash from mismatched heaps or a memory leak from unfreed memory.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Journey Into Linker Hell, And A Mistake by Neil Rashbrook</title>
		<link>http://www.luminance.org/blog/code/2011/08/01/a-journey-into-linker-hell-and-a-mistake/comment-page-1#comment-4735</link>
		<dc:creator>Neil Rashbrook</dc:creator>
		<pubDate>Tue, 02 Aug 2011 11:46:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.luminance.org/?p=1013#comment-4735</guid>
		<description>In theory you can link NSPR and XUL against different CRTs because NSPR exposes free functions for all of its allocators, and most of the codebase takes care to match its allocators, although there are still one or two places that don&#039;t.

In jemalloc builds this isn&#039;t a problem, because both NSPR and XUL are tricked into linking against the jemalloc allocator.</description>
		<content:encoded><![CDATA[<p>In theory you can link NSPR and XUL against different CRTs because NSPR exposes free functions for all of its allocators, and most of the codebase takes care to match its allocators, although there are still one or two places that don&#8217;t.</p>
<p>In jemalloc builds this isn&#8217;t a problem, because both NSPR and XUL are tricked into linking against the jemalloc allocator.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Journey Into Linker Hell, And A Mistake by dfarmer</title>
		<link>http://www.luminance.org/blog/code/2011/08/01/a-journey-into-linker-hell-and-a-mistake/comment-page-1#comment-4734</link>
		<dc:creator>dfarmer</dc:creator>
		<pubDate>Tue, 02 Aug 2011 04:20:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.luminance.org/?p=1013#comment-4734</guid>
		<description>I learned a few debugging tips and was entertained. Mission accomplished ;) Thanks for sharing.</description>
		<content:encoded><![CDATA[<p>I learned a few debugging tips and was entertained. Mission accomplished <img src='http://www.luminance.org/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Thanks for sharing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Journey Into Linker Hell, And A Mistake by Kael</title>
		<link>http://www.luminance.org/blog/code/2011/08/01/a-journey-into-linker-hell-and-a-mistake/comment-page-1#comment-4733</link>
		<dc:creator>Kael</dc:creator>
		<pubDate>Tue, 02 Aug 2011 03:48:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.luminance.org/?p=1013#comment-4733</guid>
		<description>I think switching from strdup to _strdup would provide linker behavior equivalent to that for free(), so they&#039;d at least pick the same .dll. The question is whether this would cause problems with other libraries - like, what happens if nspr4.dll imports everything from the debug runtime, but xul.dll imports everything from the release runtime? More heap corruption failures, but now they&#039;ll span modules. On the other hand, I guess cross-module free/malloc on Windows rarely works anyway, because each module gets its own heap...</description>
		<content:encoded><![CDATA[<p>I think switching from strdup to _strdup would provide linker behavior equivalent to that for free(), so they&#8217;d at least pick the same .dll. The question is whether this would cause problems with other libraries &#8211; like, what happens if nspr4.dll imports everything from the debug runtime, but xul.dll imports everything from the release runtime? More heap corruption failures, but now they&#8217;ll span modules. On the other hand, I guess cross-module free/malloc on Windows rarely works anyway, because each module gets its own heap&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Journey Into Linker Hell, And A Mistake by azakai</title>
		<link>http://www.luminance.org/blog/code/2011/08/01/a-journey-into-linker-hell-and-a-mistake/comment-page-1#comment-4732</link>
		<dc:creator>azakai</dc:creator>
		<pubDate>Tue, 02 Aug 2011 03:35:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.luminance.org/?p=1013#comment-4732</guid>
		<description>Amusing and interesting!

So, what can be done here? Is this fixed if we replace strdup with _strdup?</description>
		<content:encoded><![CDATA[<p>Amusing and interesting!</p>
<p>So, what can be done here? Is this fixed if we replace strdup with _strdup?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Performance Challenges in Compiling Code to JavaScript by azakai</title>
		<link>http://www.luminance.org/blog/code/2011/06/18/performance-challenges-in-compiling-code-to-javascript/comment-page-1#comment-4654</link>
		<dc:creator>azakai</dc:creator>
		<pubDate>Sat, 18 Jun 2011 22:49:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.luminance.org/?p=1001#comment-4654</guid>
		<description>&gt; My personal perspective is that if you’re producing javascript, readability and debugger friendliness need to be a primary priority – at least until tools like Firebug and the Chrome debugger understand the concept of JavaScript as an intermediate language, and can map compiled JavaScript back to the original source code.

SpiderMonkey should be able to do this already, with syntax like

//@line 7 &quot;srcFile.c&quot;

I haven&#039;t tried it out myself though.</description>
		<content:encoded><![CDATA[<p>&gt; My personal perspective is that if you’re producing javascript, readability and debugger friendliness need to be a primary priority – at least until tools like Firebug and the Chrome debugger understand the concept of JavaScript as an intermediate language, and can map compiled JavaScript back to the original source code.</p>
<p>SpiderMonkey should be able to do this already, with syntax like</p>
<p>//@line 7 &#8220;srcFile.c&#8221;</p>
<p>I haven&#8217;t tried it out myself though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Performance Challenges in Compiling Code to JavaScript by Kael</title>
		<link>http://www.luminance.org/blog/code/2011/06/18/performance-challenges-in-compiling-code-to-javascript/comment-page-1#comment-4653</link>
		<dc:creator>Kael</dc:creator>
		<pubDate>Sat, 18 Jun 2011 17:45:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.luminance.org/?p=1001#comment-4653</guid>
		<description>&lt;blockquote&gt;
&lt;a href=&quot;#comment-4652&quot; rel=&quot;nofollow&quot;&gt;
&lt;strong&gt;&lt;em&gt;null:&lt;/em&gt;&lt;/strong&gt;
&lt;/a&gt;
 &lt;p&gt;Content omitted&lt;/p&gt;
&lt;/blockquote&gt;I haven&#039;t done extensive comparative benchmarking, but a few of my test cases are pulled from that old alioth benchmark shootout, and on the ones that aren&#039;t heavily dependent on value type semantics, Spidermonkey (with -j and -m) performs on par with debug-mode C#. In some cases, it actually performs slightly better. I&#039;m not sure how much of the difference is due to startup overhead for the C# jit or startup overhead for SM&#039;s tracer/jit, though.

Compiling .NET using the Mono LLVM backend + Emscripten would be an interesting experiment. I think struct based code would probably perform a lot better, but on the other hand, I think you&#039;d end up with the Mono Boehm GC running inside the Spidermonkey GC, and that seems like it would be suboptimal to say the least...

My translation approach could probably also be used to generate Emscripten style code as well, if you got serious about going with a similar &#039;array representing memory, no reference types&#039; model. It would be interesting to see if that would produce better performance, but the need to preserve C# class garbage collection semantics seems like it would prevent it from being truly useful.

My personal perspective is that if you&#039;re producing javascript, readability and debugger friendliness need to be a primary priority - at least until tools like Firebug and the Chrome debugger understand the concept of JavaScript as an intermediate language, and can map compiled JavaScript back to the original source code. It&#039;s already so hard to debug cross-browser javascript that the idea of asking people to debug complete gibberish seems likely to send them screaming into the arms of Flash or Silverlight.</description>
		<content:encoded><![CDATA[<blockquote><p>
<a href="#comment-4652" rel="nofollow"><br />
<strong><em>null:</em></strong><br />
</a></p>
<p>Content omitted</p>
</blockquote>
<p>I haven&#8217;t done extensive comparative benchmarking, but a few of my test cases are pulled from that old alioth benchmark shootout, and on the ones that aren&#8217;t heavily dependent on value type semantics, Spidermonkey (with -j and -m) performs on par with debug-mode C#. In some cases, it actually performs slightly better. I&#8217;m not sure how much of the difference is due to startup overhead for the C# jit or startup overhead for SM&#8217;s tracer/jit, though.</p>
<p>Compiling .NET using the Mono LLVM backend + Emscripten would be an interesting experiment. I think struct based code would probably perform a lot better, but on the other hand, I think you&#8217;d end up with the Mono Boehm GC running inside the Spidermonkey GC, and that seems like it would be suboptimal to say the least&#8230;</p>
<p>My translation approach could probably also be used to generate Emscripten style code as well, if you got serious about going with a similar &#8216;array representing memory, no reference types&#8217; model. It would be interesting to see if that would produce better performance, but the need to preserve C# class garbage collection semantics seems like it would prevent it from being truly useful.</p>
<p>My personal perspective is that if you&#8217;re producing javascript, readability and debugger friendliness need to be a primary priority &#8211; at least until tools like Firebug and the Chrome debugger understand the concept of JavaScript as an intermediate language, and can map compiled JavaScript back to the original source code. It&#8217;s already so hard to debug cross-browser javascript that the idea of asking people to debug complete gibberish seems likely to send them screaming into the arms of Flash or Silverlight.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

