<?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>Alexey Zakhlestins blog &#187; c++</title>
	<atom:link href="http://blog.milkfarmsoft.com/category/computers/programming/c-plus-plus/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.milkfarmsoft.com</link>
	<description>Programming for Mac and Web</description>
	<lastBuildDate>Sun, 13 Jun 2010 15:42:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" />
	<atom:link rel="hub" href="http://superfeedr.com/hubbub" />
			<item>
		<title>C, headers</title>
		<link>http://blog.milkfarmsoft.com/2008/07/c-headers/</link>
		<comments>http://blog.milkfarmsoft.com/2008/07/c-headers/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 07:52:22 +0000</pubDate>
		<dc:creator>indeyets</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.milkfarmsoft.com/?p=84</guid>
		<description><![CDATA[<p>The concept of headers in C was necessary at its time, but these days it just makes compilation of complex program in complex environment several times more complex. Whenever you have several package-roots (I have /usr, /usr/local, /sw, /opt/local, /opt/some_pkg1, /opt/some_pkg2 at the same time), which have different versions of the same libraries, you need to <span style="color:#777"> . . . &#8594; Read More: <a href="http://blog.milkfarmsoft.com/2008/07/c-headers/">C, headers</a></span>]]></description>
			<content:encoded><![CDATA[<p>The concept of <a href="http://en.wikipedia.org/wiki/Header_files">headers</a> in C was necessary at its time, but these days it just makes compilation of complex program in complex environment several times more complex. Whenever you have several package-roots (I have /usr, /usr/local, /sw, /opt/local, /opt/some_pkg1, /opt/some_pkg2 at the same time), which have different versions of the same libraries, you need to separately check resolution order of libraries and header-files.</p>
<p>Sometimes it feels completely counter-intuitive and you just end up manually hiding some files.</p>
<p>Common end-user solution is just sticking to the package-root provided by distribution (usually &#8220;/usr&#8221;), but that is not an option for developer, who needs to test different combinations of bleeding-edge apps.</p>
<p>How do you manage this stuff?</p>
<p>Example. I need to build php6 (installation prefix /opt/php6) with:</p>
<ul>
<li>iconv from /sw (whle there is other iconv in /usr)</li>
<li>libxml from /usr (while there is other libxml in /sw)</li>
<li>icu from /sw/local (while there are pieces of other icu&#8217;s in /sw and /usr)</li>
</ul>
<p>In reality, there are more libs involved, and complexity arises, when these different libs are needed by the same components of php. I start thinking, that I should create some special package-root and just symlink every needed library in it. And just give it as the only package-root to php. Seems like a complex task, while considering all dependencies.</p>
<p>In my ideal world, there would be no name-resolution at all, compiler would just require exact position of library (which would be represented by the single file)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.milkfarmsoft.com/2008/07/c-headers/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Spread constants</title>
		<link>http://blog.milkfarmsoft.com/2008/05/spread-constants/</link>
		<comments>http://blog.milkfarmsoft.com/2008/05/spread-constants/#comments</comments>
		<pubDate>Wed, 07 May 2008 09:42:36 +0000</pubDate>
		<dc:creator>indeyets</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[data management]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.milkfarmsoft.com/?p=82</guid>
		<description><![CDATA[<p>Playing with Spread Toolkit. Absolutely love their constant-names  </p>

UNRELIABLE_MESS
RELIABLE_MESS
FIFO_MESS
CAUSAL_MESS
AGREED_MESS
SAFE_MESS
REGULAR_MESS

<p></p>
<p>p.s. freshly released php binding <span style="color:#777"> . . . &#8594; Read More: <a href="http://blog.milkfarmsoft.com/2008/05/spread-constants/">Spread constants</a></span>]]></description>
			<content:encoded><![CDATA[<p>Playing with <a href="http://www.spread.org/" title="The Spread Toolkit">Spread Toolkit</a>. Absolutely love their constant-names <img src='http://blog.milkfarmsoft.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<ul>
<li>UNRELIABLE_MESS</li>
<li>RELIABLE_MESS</li>
<li>FIFO_MESS</li>
<li>CAUSAL_MESS</li>
<li>AGREED_MESS</li>
<li>SAFE_MESS</li>
<li>REGULAR_MESS</li>
</ul>
<p></p>
<p>p.s. freshly released php binding is <a href="http://pecl.php.net/package/spread" title="PECL :: Package :: spread">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.milkfarmsoft.com/2008/05/spread-constants/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>@ ohloh.net</title>
		<link>http://blog.milkfarmsoft.com/2007/07/ohlohnet/</link>
		<comments>http://blog.milkfarmsoft.com/2007/07/ohlohnet/#comments</comments>
		<pubDate>Thu, 26 Jul 2007 13:46:33 +0000</pubDate>
		<dc:creator>indeyets</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.milkfarmsoft.com/?p=64</guid>
		<description><![CDATA[<p>By the way, I registered an account at ohloh.net project. You can see all opensource-projects I was involved <span style="color:#777"> . . . &#8594; Read More: <a href="http://blog.milkfarmsoft.com/2007/07/ohlohnet/">@ ohloh.net</a></span>]]></description>
			<content:encoded><![CDATA[<p>By the way, I <a href="http://www.ohloh.net/accounts/6720">registered an account</a> at ohloh.net project. You can see all opensource-projects I was involved in, there.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.milkfarmsoft.com/2007/07/ohlohnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unicode vs. Programming Languages</title>
		<link>http://blog.milkfarmsoft.com/2007/07/unicode-vs-programming-languages/</link>
		<comments>http://blog.milkfarmsoft.com/2007/07/unicode-vs-programming-languages/#comments</comments>
		<pubDate>Thu, 26 Jul 2007 13:40:14 +0000</pubDate>
		<dc:creator>indeyets</dc:creator>
				<category><![CDATA[D language]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[haxe]]></category>
		<category><![CDATA[neko]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[smalltalk]]></category>

		<guid isPermaLink="false">http://blog.milkfarmsoft.com/?p=63</guid>
		<description><![CDATA[<p>I really-really want to see a programming language, which allows using proper unicode symbols for operators.</p>
<p>I mean:</p>

Ã— instead of *
â†’ instead of ->
â† instead if &#60;-
â‰  instrad of !=
â‰¤ and â‰¥ instead of &#60;= and >=

<p>This list can be continued more and moreâ€¦</p>
<p>I perfectly understand the roots of current situation and I don&#8217;t ask to use <span style="color:#777"> . . . &#8594; Read More: <a href="http://blog.milkfarmsoft.com/2007/07/unicode-vs-programming-languages/">Unicode vs. Programming Languages</a></span>]]></description>
			<content:encoded><![CDATA[<p>I really-really want to see a programming language, which allows using proper unicode symbols for operators.</p>
<p>I mean:</p>
<ul>
<li><strong>Ã—</strong> instead of <strong>*</strong></li>
<li><strong>â†’</strong> instead of <strong>-></strong></li>
<li><strong>â†</strong> instead if <strong>&lt;-</strong></li>
<li><strong>â‰ </strong> instrad of <strong>!=</strong></li>
<li><strong>â‰¤</strong> and <strong>â‰¥</strong> instead of <strong>&lt;=</strong> and <strong>>=</strong></li>
</ul>
<p>This list can be continued more and moreâ€¦</p>
<p>I perfectly understand the roots of current situation and I don&#8217;t ask to use ONLY unicode-symbols, but I ask language-manufacturers to allow this.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.milkfarmsoft.com/2007/07/unicode-vs-programming-languages/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>OSNews: Apple Developing a New LLVM C Front-End</title>
		<link>http://blog.milkfarmsoft.com/2007/07/osnews-apple-developing-a-new-llvm-c-front-end/</link>
		<comments>http://blog.milkfarmsoft.com/2007/07/osnews-apple-developing-a-new-llvm-c-front-end/#comments</comments>
		<pubDate>Fri, 13 Jul 2007 08:41:11 +0000</pubDate>
		<dc:creator>indeyets</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[os]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.milkfarmsoft.com/?p=61</guid>
		<description><![CDATA[<p>Somehow, I missed this news earlier, but, I guess, it is very important. Because it means, that:</p>

MacOS would be able to use non-gcc by default (there are some comments, here, describing why it is a good thing)
MacOS would become <span style="color:#777"> . . . &#8594; Read More: <a href="http://blog.milkfarmsoft.com/2007/07/osnews-apple-developing-a-new-llvm-c-front-end/">OSNews: Apple Developing a New LLVM C Front-End</a></span>]]></description>
			<content:encoded><![CDATA[<p>Somehow, I missed <a href="http://www.osnews.com/story.php/18013/Apple-Developing-a-New-LLVM-C-Front-End">this news</a> earlier, but, I guess, it is very important. Because it means, that:</p>
<ul>
<li>MacOS would be able to use non-gcc by default (there are some comments, <a href="http://www.osnews.com/permalink.php?news_id=18013&#038;comment_id=244934">here</a>, describing why it is a good thing)</li>
<li>MacOS would become really-really cross-platform</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.milkfarmsoft.com/2007/07/osnews-apple-developing-a-new-llvm-c-front-end/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>BeOS + SmallTalk</title>
		<link>http://blog.milkfarmsoft.com/2007/06/beos-smalltalk/</link>
		<comments>http://blog.milkfarmsoft.com/2007/06/beos-smalltalk/#comments</comments>
		<pubDate>Sun, 03 Jun 2007 19:34:55 +0000</pubDate>
		<dc:creator>indeyets</dc:creator>
				<category><![CDATA[D language]]></category>
		<category><![CDATA[beos]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[haikuos]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[smalltalk]]></category>

		<guid isPermaLink="false">http://blog.milkfarmsoft.com/?p=50</guid>
		<description><![CDATA[<p>Some internal feeling makes me believe, that Smalltalk would be an ideal language for Haiku-OS/OpenBeOS (which looks more and more alive, again).</p>
<p>BeOS was always about C++, opposing UNIX&#8217;es, MacOS&#8217;es and Windows&#8217;es choice of C (well, formally, windows had C++ api, but, still, it was very C-ish in it&#8217;s essence). Years passed, MacOS switched to Objective-C, Windows <span style="color:#777"> . . . &#8594; Read More: <a href="http://blog.milkfarmsoft.com/2007/06/beos-smalltalk/">BeOS + SmallTalk</a></span>]]></description>
			<content:encoded><![CDATA[<p>Some internal feeling makes me believe, that Smalltalk would be an ideal language for <a href="http://haiku-os.org/">Haiku-OS</a>/OpenBeOS (which <a href="http://www.haikunews.org/">looks more and more alive</a>, again).</p>
<p><a href="http://en.wikipedia.org/wiki/BeOS">BeOS</a> was always about <a href="http://en.wikipedia.org/wiki/C%2B%2B">C++</a>, opposing UNIX&#8217;es, MacOS&#8217;es and Windows&#8217;es choice of C (well, formally, windows had C++ api, but, still, it was very C-ish in it&#8217;s essence). Years passed, MacOS <a href="http://en.wikipedia.org/wiki/Mac_OS_X#History">switched</a> to <a href="http://en.wikipedia.org/wiki/Objective-C">Objective-C</a>, Windows switched to <a href="http://en.wikipedia.org/wiki/C_Sharp">C#</a>. Both of these languages are higher-level OOP languages which have some kind of memory-management. C++, while it has some advantages, still is not as easy and dynamic as these languages are.</p>
<p>Unfortunately, both Objective-C and C# are developed by Apple and Microsoft (correspondingly) behind the closed-doors.</p>
<p>So, what is the alternative? I see two of them:</p>
<ul>
<li><a href="http://www.prowiki.org/wiki4d/wiki.cgi?WhatIsD">D</a></li>
<li><a href="http://www.smalltalk.org/smalltalk/whatissmalltalk.html">Smalltalk</a></li>
</ul>
<p>D is good, as it makes a step from C++ to real life, but is still low-levelish, by design. memory management will solve some headaches, but programming in it won&#8217;t be as fun as it can be. I like to see D as a language for writing libraries.</p>
<p>Smalltalk, on the other hand, is a high-level <a href="http://en.wikipedia.org/wiki/Type_system">dynamic</a> language which is just what is needed. Once you &#8220;taste&#8221; the fruit of dynamic languages you wouldn&#8217;t want to code high-level tasks in static-languages anymore (static is extremely good in low-level, though). To give you a brief idea on what all this is about, there is a nice article by a game developer who switched from C++ to Smalltalk: <a href="http://www.smalltalk.org/articles/article_20060919_a1_LearningToTalk_v1.html">Learning to Talk: Introduction to Talking</a>.</p>
<p>Further reading:</p>
<ul>
<li><a href="http://web.archive.org/web/20020612180858/http://www.dekorte.com/Objective-C/Documentation/2_Comparisons/Comparisons.html">Comparison of Objective-C and Smalltalk</a></li>
<li><a href="http://www.smalltalk.org/versions">Smalltalk implementations</a></li>
<li><a href="http://www.ambrai.com/smalltalk/">Ambrai Smalltalk</a> (Smalltalk for MacOS-X)</li>
<li><a href="http://www.fscript.org/">F-Script</a> (Smalltalk-based scripting environment for Cocoa)</li>
<li><a href="http://en.wikipedia.org/wiki/Comparison_of_programming_languages">Comparison of programming languages</a> @ wikipedia</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.milkfarmsoft.com/2007/06/beos-smalltalk/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>fink: BOOST_FOREACH</title>
		<link>http://blog.milkfarmsoft.com/2007/04/fink-boost_foreach/</link>
		<comments>http://blog.milkfarmsoft.com/2007/04/fink-boost_foreach/#comments</comments>
		<pubDate>Fri, 20 Apr 2007 12:29:13 +0000</pubDate>
		<dc:creator>indeyets</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[fink]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://blog.milkfarmsoft.com/?p=47</guid>
		<description><![CDATA[<p>One more addition to Fink from me: BOOST_FOREACH. This is one of my favorite extensions of C++. It lets one to iterate over virtually anything that can be iterated, while still being extremely effecient.</p>
<p>Here is a very nice introduction to Boost.Foreach.</p>
<p>(If you don&#8217;t knowâ€¦) Fink is a project that brings the full world of Unix Open <span style="color:#777"> . . . &#8594; Read More: <a href="http://blog.milkfarmsoft.com/2007/04/fink-boost_foreach/">fink: BOOST_FOREACH</a></span>]]></description>
			<content:encoded><![CDATA[<p>One more addition to <a href="http://www.finkproject.org/index.php">Fink</a> from me: <a href="http://pdb.finkproject.org/pdb/package.php/boost-foreach">BOOST_FOREACH</a>. This is one of my favorite extensions of C++. It lets one to iterate over virtually anything that can be iterated, while still being extremely effecient.</p>
<p>Here is a very nice <a href="http://www.boost.org/regression-logs/cs-win32_metacomm/doc/html/foreach.html">introduction to Boost.Foreach</a>.</p>
<p><small>(If you don&#8217;t knowâ€¦) <a href="http://www.finkproject.org/index.php">Fink</a> is a project that brings the full world of Unix Open Source software to Mac OS X.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.milkfarmsoft.com/2007/04/fink-boost_foreach/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
