<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.developerdotstar.com/community" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>developer.* Blogs - Wayne&amp;#039;s World of C Code (The Sieve of Eratosthenes) - Comments</title>
 <link>http://www.developerdotstar.com/community/node/291</link>
 <description>Comments for &quot;Wayne&#039;s World of C Code (The Sieve of Eratosthenes)&quot;</description>
 <language>en</language>
<item>
 <title>That is correct</title>
 <link>http://www.developerdotstar.com/community/node/291#comment-1220</link>
 <description>&lt;p&gt;omundo.&lt;/p&gt;
&lt;p&gt;Note also that this compiler isn&#039;t &quot;free&quot;. My Bonehead Hobbyist use is OK but even a professor in a university cannot use it for &quot;free&quot;.&lt;/p&gt;
&lt;p&gt;I never got back up to speed in C although I was thinkin&#039; about it last winter when my Vaio was on its last legs, and I was outraged that I&#039;d spent all that money to get a system that only lasted three years. I am now working with Microsoft VB and C# express which are free for noncommercial use and I will get Visual Studio next month.&lt;/p&gt;
&lt;p&gt;My error illustrates that even if you return to C coding after years away, and especially if you are new, you need to get input on your code (but not from lawn trolls who use their knowledge of C as a marker of personal adequacy, of course).&lt;/p&gt;
&lt;p&gt;But even when I used C regularly, I used it in a nonstandard way, with long identifiers and heavy use of the preprocessor. I was seeking OO in C because this is what a programmer with intelligence does. Bjarne Stroustrup was supposed at Bell Labs to be working on something other than a massive preprocessor for C which became C++.&lt;/p&gt;
&lt;p&gt;There&#039;s no point in reinventing suffering or the wheel, or casting your pearls before swine.&lt;/p&gt;
</description>
 <pubDate>Sat, 24 Jun 2006 23:13:00 -0700</pubDate>
 <dc:creator>Edward G Nilges</dc:creator>
 <guid isPermaLink="false">comment 1220 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>See blog</title>
 <link>http://www.developerdotstar.com/community/node/291#comment-1219</link>
 <description>&lt;p&gt;&quot;Fix to my evil seive&quot;&lt;/p&gt;
</description>
 <pubDate>Sat, 24 Jun 2006 23:03:53 -0700</pubDate>
 <dc:creator>Edward G Nilges</dc:creator>
 <guid isPermaLink="false">comment 1219 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Comments on my error</title>
 <link>http://www.developerdotstar.com/community/node/291#comment-1214</link>
 <description>&lt;p&gt;...will be treated with courtesy and respect for indeed I FORGOT that strcat needs memory to concatenate into, IF those comments are not so absurdly global and personal as above.&lt;/p&gt;
&lt;p&gt;A &quot;flame&quot; war erupted this evening in comp.lang.c. But I&#039;ve resigned from this flame war since for me to so heavily participate in a newsgroup in which I claim no special expertise in C (as opposed to software) would violate nettiquette.&lt;/p&gt;
&lt;p&gt;You are welcome to courteously post a replacement for my erroneous use of strcat. That would be most constructive.&lt;/p&gt;
</description>
 <pubDate>Sat, 24 Jun 2006 12:43:39 -0700</pubDate>
 <dc:creator>Edward G Nilges</dc:creator>
 <guid isPermaLink="false">comment 1214 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>segfault =&gt; clueless author</title>
 <link>http://www.developerdotstar.com/community/node/291#comment-1212</link>
 <description>&lt;p&gt;The fact that you must understand a computer in order to use C properly is not an indictment of the language.  If anything, it is a strong indicator that learning C will help a person to understand the computer.  I fail to see how that is a bad thing.&lt;/p&gt;
&lt;p&gt;The fact that your tutorial segfaults when I execute it with the &quot;/?&quot; option to return the usage statement is a strong indicator that you understand neither the C language, the conventions of modern programming, nor your computer. Why on earth should I examine your code more thoroughly?  You&#039;ve attempted to write your usage message into a random section of memory prior to printing it.  That&#039;s not a &quot;trivial beginner error&quot;--it&#039;s a glaring proof that the author of this code has no clue what he&#039;s doing.&lt;/p&gt;
</description>
 <pubDate>Sat, 24 Jun 2006 00:13:33 -0700</pubDate>
 <dc:creator>bill pursell</dc:creator>
 <guid isPermaLink="false">comment 1212 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Names are wrong:
lcc was</title>
 <link>http://www.developerdotstar.com/community/node/291#comment-1211</link>
 <description>&lt;p&gt;Names are wrong:&lt;br /&gt;
lcc was written by Chistopher Fraser, David Hanson.&lt;br /&gt;
lcc-win32 was implemented by Jacob Navia based on the above work.&lt;/p&gt;
</description>
 <pubDate>Fri, 23 Jun 2006 23:34:24 -0700</pubDate>
 <dc:creator>Friedrich</dc:creator>
 <guid isPermaLink="false">comment 1211 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Do I treat assertion failure differently in debug v production?</title>
 <link>http://www.developerdotstar.com/community/node/291#comment-625</link>
 <description>&lt;p&gt;No.&lt;/p&gt;
&lt;p&gt;The great Bjarne Stroustrup, in his magisterial Introduction to C++ (a book not only on the mechanics of C++ but also on the normative ethics of programming, if written from a rather dour, Scandinavian perspective, that eschews my sort of malarkey) asks a very simple question.&lt;/p&gt;
&lt;p&gt;Perhaps because as a Dane, Stroustrup loves ships and boats, he asks the reader if in a boat, you would keep the life rafts and the life presevers on a shakedown cruise in the harbor...and jettison them when you are Outward Bound to the open sea.&lt;/p&gt;
&lt;p&gt;Of course, Bruce Ismay of the White Star line did just this, overriding his chief engineer. We all know, courtesy of The Greatest Chick Flick of All Time, what happened to the Titanic.&lt;/p&gt;
&lt;p&gt;No, in my view, objects should self-inspect and enter a Safe mode (in which they respond by raising a standard error and either doing nothing, and/or returning a default value).&lt;/p&gt;
&lt;p&gt;The mention of Ismay, who was a coward who stole a seat meant for women and children, is apposite.&lt;/p&gt;
&lt;p&gt;Because to handle runtime errors, including the most serious runtime error, a bug in the program that has made the check, the programmer necessarily has to code in excess of requirements.&lt;/p&gt;
&lt;p&gt;Which gives managers the willies.&lt;/p&gt;
&lt;p&gt;Ismay thought it not economic to carry a sufficient number of lifeboats. The engineer could not make a &quot;business case&quot; in 1912 because marine safety requirements did not call for them at the time (because of the Titanic, they were changed).&lt;/p&gt;
&lt;p&gt;Runtime checks should be pretty much the same for production and for debugging unless, of course, they are excessive in terms of time given the nature of the problem.&lt;/p&gt;
&lt;p&gt;If the run time checks are indeed excessive, the source code should keep the checks, using the preprocessor to suppress their generation for the run build as opposed to the debug build.&lt;/p&gt;
&lt;p&gt;&quot;Build it safe and build it stout, out of things you know about&quot; - Bell Northern Research engineer, circa 1981&lt;/p&gt;
</description>
 <pubDate>Wed, 23 Nov 2005 03:10:34 -0800</pubDate>
 <dc:creator>Edward G Nilges</dc:creator>
 <guid isPermaLink="false">comment 625 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>C should be given a Viking funeral, IMO</title>
 <link>http://www.developerdotstar.com/community/node/291#comment-620</link>
 <description>&lt;p&gt;...*qua* C, it has to provide access to aliased variables and as such should no longer be used.&lt;/p&gt;
&lt;p&gt;Oh, I suppose it could have a &quot;safe mode&quot; with aliasing turned off...but this is a mistake (witness the way in which different semantics from different Option statements causes problems).&lt;/p&gt;
&lt;p&gt;Furthermore a safe and OO C already exists. It is called Java.&lt;/p&gt;
&lt;p&gt;The reason I&#039;m using C apart from job requirements at this time is that I managed to smoke my installation of Visual Studio 2003 and while waiting for a replacement I wanna code. So I downloaded a free C compiler from Jacques Navia and David Hanson of Princeton (with whom I studied briefly, before I bailed out of his compiler course owing to work demands).&lt;/p&gt;
&lt;p&gt;I am working on some representative solutions and one idea I have is to make them suitable for use in the developing world by restricting them to a standard command line interface. Ultimately, I want to create a library of tools that could be used even on hand-cranked laptops or cell phones in the developing world.&lt;/p&gt;
&lt;p&gt;In a paradox, one is told that one&#039;s desire to use low level facilities to recreate high level facilities is self-indulgent but I MAY see an opportunity here to &quot;reinvent the wheel&quot;.&lt;/p&gt;
&lt;p&gt;That&#039;s my image, chains as heaps of pearl.&lt;/p&gt;
</description>
 <pubDate>Sun, 20 Nov 2005 01:16:19 -0800</pubDate>
 <dc:creator>Edward G Nilges</dc:creator>
 <guid isPermaLink="false">comment 620 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>The Sieve of Nilges</title>
 <link>http://www.developerdotstar.com/community/node/291#comment-619</link>
 <description>&lt;p&gt;Hi Edward,&lt;/p&gt;
&lt;p&gt;There&#039;s a few gems hidden in this innocent-looking post about a C-language prime number exercise. I&#039;m going to start experimenting with the inspect() method idea, which you&#039;ve written about before. Do you treat the failure of a given assertion differently in debug vs. production mode?&lt;/p&gt;
&lt;p&gt;Reading your post also reminded me of &lt;a href=&quot;http://www.pacificdataworks.com/aboutus.html&quot;&gt;Andrew Binstock&#039;s&lt;/a&gt; recent column in &lt;a href=&quot;http://www.sdtimes.com/&quot;&gt;SD Times&lt;/a&gt;, titled &quot;The Slow Demise of C?&quot;. He points out an interesting fact: &quot;The foundation on which the open source community is built (Linux - Apache Web server - MySQL - Python/Perl, aka LAMP) is entirely written in C.&quot;&lt;/p&gt;
&lt;p&gt;He also points out that &quot;a fair part of Java&quot; and &quot;of course, C++&quot; are written in C.&lt;/p&gt;
&lt;p&gt;These facts are interesting in and of themselves, but I think Binstock&#039;s real point is, &quot;So, with C being the key to so much important software, why does the language get so little respect these days?&quot;&lt;/p&gt;
&lt;p&gt;I wish I could quote the whole column (or link to it--it&#039;s not available online), because he makes a number of good points, including &quot;the trouble is, of course, that despite the great systems software in C, most developers need more productivity out of their language--certainly more than they need the extra performance kick of C.&quot; But he also feels that with language improvements and tool support C productivity could be improved.&lt;/p&gt;
&lt;p&gt;He also laments the fact that the ANSI C99 standard &quot;sits around unread by compiler writers today,&quot; and finally concludes that, &quot;by this process of a thousand cuts, the language that continues to serve faithfully atrophies for lack of tending by vendors.&quot;&lt;/p&gt;
&lt;p&gt;I&#039;ve quoted prodigiously here, but there is much more in the column than the highlights I&#039;ve selected, and he brings up several issues that could all in themselves be discussions. Binstock&#039;s call for improvements to a languishing C language reminded me, Edward, of your assertion against a &quot;loyalty to artifacts.&quot; This from your post is a beauty, by the way:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Someday in the far future a fabulist will tell of mad men in a city who called their chains, heaps of pearl.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Is that a reference, or is that yours?&lt;/p&gt;
&lt;p&gt;You both come at the subject of the past, present, and future of C from different directions, but your post and Binstock&#039;s column criss-crossed in my brain today.&lt;/p&gt;
&lt;p&gt;Best,&lt;br /&gt;
Dan&lt;/p&gt;
</description>
 <pubDate>Sat, 19 Nov 2005 14:10:11 -0800</pubDate>
 <dc:creator>Daniel Read</dc:creator>
 <guid isPermaLink="false">comment 619 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Wayne&#039;s World of C Code (The Sieve of Eratosthenes)</title>
 <link>http://www.developerdotstar.com/community/node/291</link>
 <description>&lt;p&gt;I had to develop an instructor solution to a simple C problem, the calculation of primes using the &lt;i&gt;Sieve of Eratosthenes&lt;/i&gt;. Because I knew that C programming is consistently more bug-ridden than programming in a truly high-level language, I coded an &quot;inspect&quot; routine to check the sieve upon completion of the requested table of primes for all and only prime numbers.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.developerdotstar.com/community/node/291&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.developerdotstar.com/community/node/291#comment</comments>
 <category domain="http://www.developerdotstar.com/community/taxonomy/term/20">Software Development</category>
 <pubDate>Thu, 17 Nov 2005 23:51:58 -0800</pubDate>
 <dc:creator>Edward G Nilges</dc:creator>
 <guid isPermaLink="false">291 at http://www.developerdotstar.com/community</guid>
</item>
</channel>
</rss>
