<?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 on: Comparing python to C &#8230;</title>
	<atom:link href="http://www.philhassey.com/blog/2008/08/06/comparing-python-to-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.philhassey.com/blog/2008/08/06/comparing-python-to-c/</link>
	<description>game dev blog</description>
	<lastBuildDate>Fri, 06 Jan 2012 23:00:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
	<item>
		<title>By: Freddie, not C!</title>
		<link>http://www.philhassey.com/blog/2008/08/06/comparing-python-to-c/comment-page-1/#comment-7918</link>
		<dc:creator>Freddie, not C!</dc:creator>
		<pubDate>Thu, 11 Sep 2008 13:29:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=147#comment-7918</guid>
		<description>Yeah, I got excited and was expecting a title box... :P</description>
		<content:encoded><![CDATA[<p>Yeah, I got excited and was expecting a title box&#8230; <img src='http://www.philhassey.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: C!</title>
		<link>http://www.philhassey.com/blog/2008/08/06/comparing-python-to-c/comment-page-1/#comment-7917</link>
		<dc:creator>C!</dc:creator>
		<pubDate>Thu, 11 Sep 2008 13:28:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=147#comment-7917</guid>
		<description>Does this mean you&#039;re re-writing the linux version =&gt; no more need for python2.4?! The increased speed would be very welcome. I hate the fact my machine stutters with 2 cpu players and me... it&#039;s not that old! :(</description>
		<content:encoded><![CDATA[<p>Does this mean you&#8217;re re-writing the linux version =&gt; no more need for python2.4?! The increased speed would be very welcome. I hate the fact my machine stutters with 2 cpu players and me&#8230; it&#8217;s not that old! <img src='http://www.philhassey.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joachim Bengtsson</title>
		<link>http://www.philhassey.com/blog/2008/08/06/comparing-python-to-c/comment-page-1/#comment-6743</link>
		<dc:creator>Joachim Bengtsson</dc:creator>
		<pubDate>Fri, 22 Aug 2008 13:39:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=147#comment-6743</guid>
		<description>PoV: Evolve a single skill as far as you can get, or shift your entire way of thinking about the skill by learning a new (good) language/library? I guess you could argue for the former, but I prefer the latter :)</description>
		<content:encoded><![CDATA[<p>PoV: Evolve a single skill as far as you can get, or shift your entire way of thinking about the skill by learning a new (good) language/library? I guess you could argue for the former, but I prefer the latter <img src='http://www.philhassey.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kenny</title>
		<link>http://www.philhassey.com/blog/2008/08/06/comparing-python-to-c/comment-page-1/#comment-6713</link>
		<dc:creator>Kenny</dc:creator>
		<pubDate>Thu, 21 Aug 2008 16:14:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=147#comment-6713</guid>
		<description>Why not write a python script to generate your header files from the .c files? It&#039;s really quite simple - put the structs and any includes etc in a comment block at the top of the .c file to be read in for the .h file, then parse your file for functions if it has changed and put declarations into the .h file. 

I do something similar with Objective C and it works well - no longer have to worry about putting declarations in by hand.</description>
		<content:encoded><![CDATA[<p>Why not write a python script to generate your header files from the .c files? It&#8217;s really quite simple &#8211; put the structs and any includes etc in a comment block at the top of the .c file to be read in for the .h file, then parse your file for functions if it has changed and put declarations into the .h file. </p>
<p>I do something similar with Objective C and it works well &#8211; no longer have to worry about putting declarations in by hand.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philhassey</title>
		<link>http://www.philhassey.com/blog/2008/08/06/comparing-python-to-c/comment-page-1/#comment-6458</link>
		<dc:creator>philhassey</dc:creator>
		<pubDate>Wed, 13 Aug 2008 02:14:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=147#comment-6458</guid>
		<description>I would have used curl (I considered it) but it&#039;s bigness scared me.  Though I probably would have broke even / saved time if I had bothered to work it out.  Maybe next time :)

I did use enet and some md5 lib though.  Those saved huge amounts of time.</description>
		<content:encoded><![CDATA[<p>I would have used curl (I considered it) but it&#8217;s bigness scared me.  Though I probably would have broke even / saved time if I had bothered to work it out.  Maybe next time <img src='http://www.philhassey.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I did use enet and some md5 lib though.  Those saved huge amounts of time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rene Dudfield</title>
		<link>http://www.philhassey.com/blog/2008/08/06/comparing-python-to-c/comment-page-1/#comment-6457</link>
		<dc:creator>Rene Dudfield</dc:creator>
		<pubDate>Wed, 13 Aug 2008 00:57:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=147#comment-6457</guid>
		<description>This also shows that domain knowledge always trumps any advantages you get from languages.

It also shows that using a good library can speed up development more than using a higher level language too.

If your program can already scale like Phils can, you really don&#039;t need erlang.  It&#039;s easier to just keep adding servers.  Since each server only allows say 8 people at once to join it... there&#039;s only that shared state.</description>
		<content:encoded><![CDATA[<p>This also shows that domain knowledge always trumps any advantages you get from languages.</p>
<p>It also shows that using a good library can speed up development more than using a higher level language too.</p>
<p>If your program can already scale like Phils can, you really don&#8217;t need erlang.  It&#8217;s easier to just keep adding servers.  Since each server only allows say 8 people at once to join it&#8230; there&#8217;s only that shared state.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PoV</title>
		<link>http://www.philhassey.com/blog/2008/08/06/comparing-python-to-c/comment-page-1/#comment-6446</link>
		<dc:creator>PoV</dc:creator>
		<pubDate>Mon, 11 Aug 2008 17:42:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=147#comment-6446</guid>
		<description>Heh, yeah.  Read a book, spend weeks on end studding and learning new languages and API&#039;s, or hack it in and move on to the next project.

Hmmm...</description>
		<content:encoded><![CDATA[<p>Heh, yeah.  Read a book, spend weeks on end studding and learning new languages and API&#8217;s, or hack it in and move on to the next project.</p>
<p>Hmmm&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joachim Bengtsson</title>
		<link>http://www.philhassey.com/blog/2008/08/06/comparing-python-to-c/comment-page-1/#comment-6381</link>
		<dc:creator>Joachim Bengtsson</dc:creator>
		<pubDate>Fri, 08 Aug 2008 15:31:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=147#comment-6381</guid>
		<description>I&#039;ll gladly explain :) It boils down to different abstraction layers. At the bottom of user space you have Core Foundation, which serves as a common ground for the higher-level APIs above it. It&#039;s plain C, and it provides, among others, CFString. You can use this from your current C code to clean string handling up if you feel you need it :)

Above that, on a desktop Mac, you have several APIs, e g Cocoa, Carbon and Java, that all have wrappers around CFString. In Cocoa, and on the iPhone, Cocoa Touch, you have NSString, which is an ObjC wrapper around CFString.

CFString and NSString are toll-free bridged, which means that you can send a pointer to the one to a function requesting a pointer to the other (i e, doing (CFString*)myNSStringInstance is okay) (e g if you want to propagate an NSString down to your C code without copying and/or degrading it to a char buffer).

I&#039;m guessing that the third string you found was NSMutableString. The distinction is that an NSString (and almost all other container class bases in Cocoa) is immutable (like const), for performance, and so that you can share one instance in many places without having to worry about it changing under you (sharing instances is an area where ObjC shines, for being a C language). Thus, if you want a string which you can change in-place, you&#039;d use NSMutableString.

Then there&#039;s also NSAttributedString, which is for styled text.

If you want a book on ObjC/Cocoa, I&#039;d recommend Aaron Hillegass&#039; &quot;Cocoa Programming for Mac OS X&quot;. It&#039;s probably the best programming book or maybe even computing book I&#039;ve read.


For networking and high performance servers I&#039;m learning Erlang, a distributed concurrent language, and it&#039;s really cool, stable and fast :)</description>
		<content:encoded><![CDATA[<p>I&#8217;ll gladly explain <img src='http://www.philhassey.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  It boils down to different abstraction layers. At the bottom of user space you have Core Foundation, which serves as a common ground for the higher-level APIs above it. It&#8217;s plain C, and it provides, among others, CFString. You can use this from your current C code to clean string handling up if you feel you need it <img src='http://www.philhassey.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Above that, on a desktop Mac, you have several APIs, e g Cocoa, Carbon and Java, that all have wrappers around CFString. In Cocoa, and on the iPhone, Cocoa Touch, you have NSString, which is an ObjC wrapper around CFString.</p>
<p>CFString and NSString are toll-free bridged, which means that you can send a pointer to the one to a function requesting a pointer to the other (i e, doing (CFString*)myNSStringInstance is okay) (e g if you want to propagate an NSString down to your C code without copying and/or degrading it to a char buffer).</p>
<p>I&#8217;m guessing that the third string you found was NSMutableString. The distinction is that an NSString (and almost all other container class bases in Cocoa) is immutable (like const), for performance, and so that you can share one instance in many places without having to worry about it changing under you (sharing instances is an area where ObjC shines, for being a C language). Thus, if you want a string which you can change in-place, you&#8217;d use NSMutableString.</p>
<p>Then there&#8217;s also NSAttributedString, which is for styled text.</p>
<p>If you want a book on ObjC/Cocoa, I&#8217;d recommend Aaron Hillegass&#8217; &#8220;Cocoa Programming for Mac OS X&#8221;. It&#8217;s probably the best programming book or maybe even computing book I&#8217;ve read.</p>
<p>For networking and high performance servers I&#8217;m learning Erlang, a distributed concurrent language, and it&#8217;s really cool, stable and fast <img src='http://www.philhassey.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philhassey</title>
		<link>http://www.philhassey.com/blog/2008/08/06/comparing-python-to-c/comment-page-1/#comment-6379</link>
		<dc:creator>philhassey</dc:creator>
		<pubDate>Fri, 08 Aug 2008 14:53:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=147#comment-6379</guid>
		<description>No problem.  While we&#039;re on the subject - one thing that I noticed which made me very nervous about ObjC is that it seemed to me that there were at least 3 different String objects that I came across.  

For a &quot;noob&quot; to ObjC, that&#039;s scary as all get out.  Which string do I use?  Why are there 3?  Should I be concerned?  Is there some real difference?  etc ...

The speed thing is actually really nice, I&#039;m going to be able to host dozens of servers on a single CPU :)  Which will be great if the MP game takes off.</description>
		<content:encoded><![CDATA[<p>No problem.  While we&#8217;re on the subject &#8211; one thing that I noticed which made me very nervous about ObjC is that it seemed to me that there were at least 3 different String objects that I came across.  </p>
<p>For a &#8220;noob&#8221; to ObjC, that&#8217;s scary as all get out.  Which string do I use?  Why are there 3?  Should I be concerned?  Is there some real difference?  etc &#8230;</p>
<p>The speed thing is actually really nice, I&#8217;m going to be able to host dozens of servers on a single CPU <img src='http://www.philhassey.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Which will be great if the MP game takes off.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joachim Bengtsson</title>
		<link>http://www.philhassey.com/blog/2008/08/06/comparing-python-to-c/comment-page-1/#comment-6378</link>
		<dc:creator>Joachim Bengtsson</dc:creator>
		<pubDate>Fri, 08 Aug 2008 14:49:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=147#comment-6378</guid>
		<description>I hope you don&#039;t mind me rebutting :)

- C style coding is terse, but on the other hand, you have to write a lot of blanket code, both because of the language itself (e g &quot;int i = 0; for(; i &lt; someLength; i++)&quot;  vs &quot;for(obj in collection)&quot; and because the standard library is so small. Also, I like Cocoa&#039;s verbosity, because it lends to self-documenting code (a method&#039;s complete functionality is in its name, rarely with non-obvious side effects).
- If you wish to do code in ObjC/Cocoa in the future, I&#039;d love to help out, just contact me :) I love the language, can&#039;t stop evangelizing it :P
 - You already got Python for desktop OS&#039;s ;) Yeah, I know, speed...</description>
		<content:encoded><![CDATA[<p>I hope you don&#8217;t mind me rebutting <img src='http://www.philhassey.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>- C style coding is terse, but on the other hand, you have to write a lot of blanket code, both because of the language itself (e g &#8220;int i = 0; for(; i &lt; someLength; i++)&#8221;  vs &#8220;for(obj in collection)&#8221; and because the standard library is so small. Also, I like Cocoa&#8217;s verbosity, because it lends to self-documenting code (a method&#8217;s complete functionality is in its name, rarely with non-obvious side effects).<br />
- If you wish to do code in ObjC/Cocoa in the future, I&#8217;d love to help out, just contact me <img src='http://www.philhassey.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I love the language, can&#8217;t stop evangelizing it <img src='http://www.philhassey.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /><br />
 &#8211; You already got Python for desktop OS&#8217;s <img src='http://www.philhassey.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Yeah, I know, speed&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

