Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #10063 > unrolled thread
| Started by | jacob navia <jacob@spamsink.net> |
|---|---|
| First post | 2011-09-09 22:53 +0200 |
| Last post | 2011-09-11 13:56 +0200 |
| Articles | 20 on this page of 90 — 31 participants |
Back to article view | Back to comp.lang.c
hexump.c jacob navia <jacob@spamsink.net> - 2011-09-09 22:53 +0200
Re: hexump.c tea strainer <nospam@nospam.com> - 2011-09-09 21:06 +0000
Re: hexump.c jacob navia <jacob@spamsink.net> - 2011-09-09 23:57 +0200
Re: hexump.c NicStevens <nic.stevens@gmail.com> - 2011-09-12 13:22 -0700
Re: hexump.c Ian Collins <ian-news@hotmail.com> - 2011-09-10 09:18 +1200
Re: hexump.c jacob navia <jacob@spamsink.net> - 2011-09-09 23:59 +0200
Re: hexump.c Ike Naar <ike@iceland.freeshell.org> - 2011-09-09 22:29 +0000
Re: hexump.c jacob navia <jacob@spamsink.net> - 2011-09-10 00:39 +0200
Re: hexump.c Ike Naar <ike@iceland.freeshell.org> - 2011-09-09 22:53 +0000
Re: hexump.c jacob navia <jacob@spamsink.net> - 2011-09-10 00:58 +0200
Re: hexump.c Seebs <usenet-nospam@seebs.net> - 2011-09-13 06:44 +0000
Re: hexump.c jacob navia <jacob@spamsink.net> - 2011-09-13 10:33 +0200
Re: hexump.c Fritz Wuehler <fritz@spamexpire-201109.rodent.frell.theremailer.net> - 2011-09-13 18:02 +0200
Teaching C (was Re: hexump.c) Kenneth Brody <kenbrody@spamcop.net> - 2011-09-13 16:36 -0400
Re: Teaching C (was Re: hexump.c) jacob navia <jacob@spamsink.net> - 2011-09-13 22:44 +0200
Re: Teaching C (was Re: hexump.c) Nobody <nobody@nowhere.com> - 2011-09-14 13:31 +0100
Re: Teaching C (was Re: hexump.c) jacob navia <jacob@spamsink.net> - 2011-09-14 15:27 +0200
Re: Teaching C (was Re: hexump.c) Richard Damon <news.x.richarddamon@xoxy.net> - 2011-09-14 11:49 -0400
Re: Teaching C (was Re: hexump.c) Keith Thompson <kst-u@mib.org> - 2011-09-14 13:27 -0700
Re: Teaching C (was Re: hexump.c) pacman@kosh.dhis.org (Alan Curry) - 2011-09-14 20:59 +0000
Re: Teaching C (was Re: hexump.c) Nobody <nobody@nowhere.com> - 2011-09-14 22:20 +0100
Re: Teaching C (was Re: hexump.c) James Kuyper <jameskuyper@verizon.net> - 2011-09-14 17:20 -0400
Re: Teaching C (was Re: hexump.c) pacman@kosh.dhis.org (Alan Curry) - 2011-09-15 01:51 +0000
Re: Teaching C (was Re: hexump.c) Keith Thompson <kst-u@mib.org> - 2011-09-14 19:29 -0700
Re: Teaching C (was Re: hexump.c) Keith Thompson <kst-u@mib.org> - 2011-09-14 19:21 -0700
Re: Teaching C Ben Pfaff <blp@cs.stanford.edu> - 2011-09-14 19:58 -0700
Re: Teaching C Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2011-09-14 21:55 -0600
Re: Teaching C James Kuyper <jameskuyper@verizon.net> - 2011-09-15 06:54 -0400
Re: Teaching C Keith Thompson <kst-u@mib.org> - 2011-09-15 11:58 -0700
Re: Teaching C Tim Rentsch <txr@alumni.caltech.edu> - 2012-01-24 12:57 -0800
Re: Teaching C Nobody <nobody@nowhere.com> - 2011-09-15 14:25 +0100
Re: Teaching C Seebs <usenet-nospam@seebs.net> - 2011-09-16 22:00 +0000
Re: Teaching C (was Re: hexump.c) Kenneth Brody <kenbrody@spamcop.net> - 2011-09-14 12:54 -0400
Re: Teaching C (was Re: hexump.c) James Kuyper <jameskuyper@verizon.net> - 2011-09-14 13:26 -0400
Re: Teaching C (was Re: hexump.c) jacob navia <jacob@spamsink.net> - 2011-09-14 19:33 +0200
Re: Teaching C (was Re: hexump.c) jameskuyper <jameskuyper@verizon.net> - 2011-09-14 11:33 -0700
Re: Teaching C (was Re: hexump.c) jacob navia <jacob@spamsink.net> - 2011-09-14 21:17 +0200
Re: Teaching C (was Re: hexump.c) Kenneth Brody <kenbrody@spamcop.net> - 2011-09-16 11:47 -0400
Re: Teaching C (was Re: hexump.c) Seebs <usenet-nospam@seebs.net> - 2011-09-14 20:43 +0000
Re: Teaching C (was Re: hexump.c) Nobody <nobody@nowhere.com> - 2011-09-14 22:35 +0100
Re: Teaching C (was Re: hexump.c) gordonb.8a7i1@burditt.org (Gordon Burditt) - 2011-09-14 17:31 -0500
Re: Teaching C (was Re: hexump.c) jacob navia <jacob@spamsink.net> - 2011-09-14 19:32 +0200
Re: Teaching C (was Re: hexump.c) Kenneth Brody <kenbrody@spamcop.net> - 2011-09-16 11:27 -0400
Re: Teaching C (was Re: hexump.c) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-16 08:49 -0700
Re: Teaching C (was Re: hexump.c) James Kuyper <jameskuyper@verizon.net> - 2011-09-17 15:04 -0400
Re: hexump.c Keith Thompson <kst-u@mib.org> - 2011-09-13 20:31 -0700
Re: hexump.c Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-14 03:22 -0700
Re: hexump.c "BartC" <bc@freeuk.com> - 2011-09-14 11:40 +0100
Re: hexump.c jacob navia <jacob@spamsink.net> - 2011-09-14 13:54 +0200
Re: hexump.c Nobody <nobody@nowhere.com> - 2011-09-14 13:50 +0100
Re: hexump.c Keith Thompson <kst-u@mib.org> - 2011-09-14 11:35 -0700
Re: hexump.c Seebs <usenet-nospam@seebs.net> - 2011-09-14 19:12 +0000
Re: hexump.c John Bode <jfbode1029@gmail.com> - 2011-09-14 15:31 -0700
Re: hexump.c jacob navia <jacob@spamsink.net> - 2011-09-15 00:59 +0200
Re: hexump.c Kleuskes & Moos <kleuske@somewhere.else.net> - 2011-09-14 23:14 +0000
Re: hexump.c John Bode <jfbode1029@gmail.com> - 2011-09-15 08:52 -0700
Re: hexump.c Jens Gustedt <jens.gustedt@loria.fr> - 2011-09-14 21:22 +0200
Re: hexump.c jacob navia <jacob@spamsink.net> - 2011-09-14 21:26 +0200
Re: hexump.c Ian Collins <ian-news@hotmail.com> - 2011-09-15 07:32 +1200
Re: hexump.c jacob navia <jacob@spamsink.net> - 2011-09-14 21:44 +0200
Re: hexump.c Keith Thompson <kst-u@mib.org> - 2011-09-14 13:49 -0700
Re: hexump.c Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-09-16 00:50 +0300
Re: hexump.c Keith Thompson <kst-u@mib.org> - 2011-09-15 18:34 -0700
Re: hexump.c Keith Thompson <kst-u@mib.org> - 2011-09-14 12:16 -0700
Hypocrites jacob navia <jacob@spamsink.net> - 2011-09-14 21:40 +0200
Re: Hypocrites Keith Thompson <kst-u@mib.org> - 2011-09-14 19:11 -0700
Re: hexump.c Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-14 15:05 +0100
Re: hexump.c Malcolm McLean <malcolm.mclean5@btinternet.com> - 2011-09-14 07:56 -0700
Re: hexump.c "BartC" <bc@freeuk.com> - 2011-09-14 17:23 +0100
Re: hexump.c Seebs <usenet-nospam@seebs.net> - 2011-09-14 19:12 +0000
Re: hexump.c John Bode <jfbode1029@gmail.com> - 2011-09-14 15:24 -0700
Re: hexump.c gordonb.ik17p@burditt.org (Gordon Burditt) - 2011-09-09 18:16 -0500
Re: hexump.c Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-09-12 22:24 +0000
Re: hexump.c "Morris Keesan" <mkeesan@post.harvard.edu> - 2011-09-09 20:33 -0400
Re: hexump.c Ian Collins <ian-news@hotmail.com> - 2011-09-10 12:42 +1200
Re: hexump.c "Morris Keesan" <mkeesan@post.harvard.edu> - 2011-09-10 17:16 -0400
Re: hexump.c jacob navia <jacob@spamsink.net> - 2011-09-10 10:03 +0200
Re: hexump.c Nobody <nobody@nowhere.com> - 2011-09-10 10:04 +0100
Re: hexump.c jacob navia <jacob@spamsink.net> - 2011-09-10 11:41 +0200
Re: hexump.c pete <pfiland@mindspring.com> - 2011-09-10 05:51 -0400
Re: hexump.c jacob navia <jacob@spamsink.net> - 2011-09-10 12:38 +0200
Re: hexump.c Nobody <nobody@nowhere.com> - 2011-09-10 17:53 +0100
Re: hexump.c jacob navia <jacob@spamsink.net> - 2011-09-10 12:46 +0200
Re: hexump.c Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-09-10 13:03 +0100
Re: hexump.c jacob navia <jacob@spamsink.net> - 2011-09-10 15:34 +0200
Re: hexump.c "Morris Keesan" <mkeesan@post.harvard.edu> - 2011-09-10 17:37 -0400
Re: hexump.c jacob navia <jacob@spamsink.net> - 2011-09-11 00:10 +0200
Re: hexump.c Patrick Scheible <kkt@zipcon.net> - 2011-09-10 21:03 -0700
Re: hexump.c Barry Schwarz <schwarz45@yahoo.com> - 2011-09-11 00:37 -0700
Re: hexump.c jacob navia <jacob@spamsink.net> - 2011-09-11 13:56 +0200
Page 4 of 5 — ← Prev page 1 2 3 [4] 5 Next page →
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2011-09-14 13:49 -0700 |
| Message-ID | <lnipoualz1.fsf@nuthaus.mib.org> |
| In reply to | #10246 |
jacob navia <jacob@spamsink.net> writes:
[...]
> No, Heathfield and co never insulted directly.
What does Richard Heathfield have to do with this?
> They let other people do that work and then they would aprove those
> posts, never saying a word against the people that insulted.
That is a lie. There is an occasional troll who goes by the name of
"teapot" or "why tea" or something like that (it varies) who specializes
in insulting you and your compiler. I have flamed him for doing that,
as did most of the regulars at the time.
> Thompson is too mean to directly insult anyone. He just will implicitely
> approve insults.
>
> The only time where he insulted me was when I proposed him to jointly
> write a proposal to the standard committee about integer overflow.
>
> That was too much for him.
That's not how it happened.
I insulted you (yes, it was an insult, and yes, it
was deliberate) in direct response to the multiple
unwarranted insults that you had directed against me.
See message <ln7hw7vhhs.fsf@nuthaus.mib.org>, available at
<http://groups.google.com/group/comp.lang.c/msg/162de225171f97b8>.
That was just over two years ago, and you're still whining about it.
Typical.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | Phil Carmody <thefatphil_demunged@yahoo.co.uk> |
|---|---|
| Date | 2011-09-16 00:50 +0300 |
| Message-ID | <87obyl4grp.fsf@bazspaz.fatphil.org> |
| In reply to | #10244 |
Ian Collins <ian-news@hotmail.com> writes: > On 09/15/11 07:26 AM, jacob navia wrote: > > Le 14/09/11 21:22, Jens Gustedt a écrit : > >> Am 09/14/2011 08:35 PM, schrieb Keith Thompson: > >>> And once again, jacob, you take a technical discussion and turn it into > >>> a personal attack. For the Nth time, what is your problem? > >> > >> Your patience with him is just admirable :) > >> > >> I personally just find his attitude somewhere between annoying and > >> disgusting. > >> > >> And I have impression that his problem is not with you but of a more > >> general nature. > > > > Yes, it is a longer story. Years of supporting insults from him and > > heathfield. > > I've been following this group for a number of years (probably too > many...) and in that time I don't think I've ever seen Keith insult > you or anyone else _even when provoked_. Phil -- "Religion is what keeps the poor from murdering the rich." -- Napoleon
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2011-09-15 18:34 -0700 |
| Message-ID | <lnipot8e2u.fsf@nuthaus.mib.org> |
| In reply to | #10297 |
Phil Carmody <thefatphil_demunged@yahoo.co.uk> writes:
> Ian Collins <ian-news@hotmail.com> writes:
>> On 09/15/11 07:26 AM, jacob navia wrote:
>> > Le 14/09/11 21:22, Jens Gustedt a écrit :
>> >> Am 09/14/2011 08:35 PM, schrieb Keith Thompson:
>> >>> And once again, jacob, you take a technical discussion and turn it into
>> >>> a personal attack. For the Nth time, what is your problem?
>> >>
>> >> Your patience with him is just admirable :)
>> >>
>> >> I personally just find his attitude somewhere between annoying and
>> >> disgusting.
>> >>
>> >> And I have impression that his problem is not with you but of a more
>> >> general nature.
>> >
>> > Yes, it is a longer story. Years of supporting insults from him and
>> > heathfield.
>>
>> I've been following this group for a number of years (probably too
>> many...) and in that time I don't think I've ever seen Keith insult
>> you or anyone else
>
> _even when provoked_.
That's not *quite* true, but the instances have been fairly rare.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2011-09-14 12:16 -0700 |
| Message-ID | <lnty8f9bpa.fsf@nuthaus.mib.org> |
| In reply to | #10216 |
jacob navia <jacob@spamsink.net> writes:
> Le 14/09/11 12:40, BartC a écrit :
>> "Keith Thompson" <kst-u@mib.org> wrote in message
>> news:ln39fzby0w.fsf@nuthaus.mib.org...
>>
>>> But consider this: students who learned to program on a PDP-11 or a VAX
>>> are probably no longer using those systems.
>>
>> I bet they were taught a bunch of other stuff that was also specific to
>> those systems and which is now irrelevant, but still managed to
>> gradually progress to new systems without too much trouble.
>>
>> And the chances are that a couple of decades later, they will be using a
>> different language anyway, if they are still even programming.
>
> This obsession with portability reaches here new heights...
>
> Programs must be written (by beginners) such that they run still
> unmodified in 20 years, so the children of the students can peek into
> their father's homework and copy it unmodified.
That's not what I wrote. It barely even resembles what I wrote.
I even explicitly acknowledged that it might be appropriate to
ignore the issue of whether argv[0] can be null in a tutorial.
The point is not for a little program to be usable without change
20 years later. (But if you *can* easily write it so it's usable
years later, why not do it?)
The point is that the language has a standard, and it has a standard
for good reasons. You seem to be advocating ignoring the parts of
the standard that don't fit into your idea of how implementations
happen to work in 2011.
Should we throw away the parts of the standard that don't happen
to apply to the implementations that most people use today?
Would you like to publish a revised C standard that guarantees that
argv[0] != NULL? That CHAR_BIT==8? That INT_MAX >= 0x7FFFFFFF?
That INT_MAX == 0x7FFFFFFF? That all pointers have the same
size and representation? That a null pointer is all-bits-zero?
That the address space is linear and monolithic? That pointers to
distinct object can meaningfully be compared?
That the underlying architecture is x86?
Does the very idea of checking whether argv[0] == NULL offend you?
[snip ad-hominem nonsense]
Of course you can write non-portable code in C. That's one of the
languages greetest strengths, that you can get close the hardware
and write code that does what it needs to do. But I think it's
important to be aware of when you're writing portable code (by which
I mean code that depends only on what's guaranteed by the language
standard) and when you're writing non-portable code.
Now, jacob, feel free to quote me out of context, misinterpret what
I wrote, and personally insult me for no apparent reason.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | jacob navia <jacob@spamsink.net> |
|---|---|
| Date | 2011-09-14 21:40 +0200 |
| Subject | Hypocrites |
| Message-ID | <j4r003$b64$1@speranza.aioe.org> |
| In reply to | #10240 |
Le 14/09/11 21:16, Keith Thompson a écrit : > > The point is that the language has a standard, and it has a standard > for good reasons. HYPOCRITE 1. a person who pretends to have virtues, moral or religious beliefs, principles, etc., that he or she does not actually possess, especially a person whose actions belie stated beliefs. 2. A person who feigns some desirable or publicly approved attitude, especially one whose private life, opinions, or statements belie his or her public statements. http://dictionary.reference.com/browse/hypocrite Thompson and heathfield rejected the 1999 C standard in countless posts from 1999 to last year or maybe even today. When I posted here code that was conforming to the C99 standard they would again and again point out that "it is not portable since no implementations exists", even if many implementation appeared during all this years. They always again and again said that the only standard C they accepted was C 1989, the only "portable" C. They never ( of course) posted any code. Of course this doesn't bother them now, since most people that participated in those discussions have left this group. Now they start posing with phrases like the one above.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2011-09-14 19:11 -0700 |
| Subject | Re: Hypocrites |
| Message-ID | <lnhb4ea72e.fsf@nuthaus.mib.org> |
| In reply to | #10245 |
jacob navia <jacob@spamsink.net> writes:
> Le 14/09/11 21:16, Keith Thompson a écrit :
>> The point is that the language has a standard, and it has a standard
>> for good reasons.
>
> HYPOCRITE
>
> 1. a person who pretends to have virtues, moral or religious beliefs,
> principles, etc., that he or she does not actually possess, especially
> a person whose actions belie stated beliefs.
>
> 2. A person who feigns some desirable or publicly approved attitude,
> especially one whose private life, opinions, or statements belie his or
> her public statements.
>
> http://dictionary.reference.com/browse/hypocrite
Thank you, I know what the word means. Like most people, I am
probably a hypocrite in some ways (small ones, I hope), but you
are hardly in a position to judge.
> Thompson and heathfield rejected the 1999 C standard in countless
> posts from 1999 to last year or maybe even today.
That is a lie.
(Well, maybe it's not a deliberate lie. I suppose it's possible
that you actually believe it, but I'm not sure that's better.)
I have pointed out the fact that the C99 standard has not been as
widely adopted as the C90 standard, and offered the advice that
writing code that depends on C99-specific features makes that code
less portable than it would be if it used only C90-specific features.
I have also stated repeatedly that I sincerely wish that C99 had been
more widely adopted. I have fairly consistently said that if 100%
portability is not an issue, then there's nothing wrong with using
C99-specific features; if you can count on having C99-compliant
compilers, go ahead and use them. If you can count on having
compilers that implement enough of C99 for your purposes, that's
fine too. And I have praised you personally for doing your part
by releasing a compiler that seems to implement most or all of the
C99 standard.
I am not a C compiler implementer, so there's very little I can do
to improve the level of support for C99.
I do not advocate avoiding C99 altogether. I advocate being aware of
the implications of the regrettably spotty level of support for it,
and making decisions based on that knowledge.
Incidentally, Richard Heathfield has not posted here in over a year.
Perhaps it's time for you stop obsessing over him.
And the aspects of the standard that you were ignoring, which led
to my comment quoted above, are common to both C90 and C99.
> When I posted here code that was conforming to the C99 standard
> they would again and again point out that "it is not portable since no
> implementations exists", even if many implementation appeared
> during all this years. They always again and again said that the only
> standard C they accepted was C 1989, the only "portable" C.
>
> They never ( of course) posted any code.
That is a lie. (Maybe; see above.)
I have posted code. It happens that most of what I post here is
answers to questions. Those answers often, but not always, include
code snippets. They sometimes include complete programs, but they
tend to be fairly small. Since you apparently haven't killfiled
me, you must be aware that I do post code. Why would you claim
that I don't? If you're going to lie about someone, you'd be well
advised not to do so in a forum where the proof is easily available.
> Of course this doesn't bother them now, since most people that
> participated in those discussions have left this group.
>
> Now they start posing with phrases like the one above.
jacob, I have nothing against you personally (or against your
compiler) apart from your obsessive delusion that I am somehow
persecuting you and your repeated unjustifed insults against me.
(I'm not the only target, but I appear to be the primary one
-- along with Richard Heathfield, of course.) I have exercised
extreme patience with you, probably more than I should have, mostly
because you do have some good ideas, you are technically competent,
and you're the author of a C99 compiler. On August 10, I sent you
an e-mail (check your inbox) asking why you treat me as a personal
enemy and asking if we can discuss this like reasonable human beings;
you never responded.
At long last, I have had enough of your crap. I don't know what
your problem is, I don't know what your problem *with me* is, and
I am not qualified either to diagnose it or to help you with it.
I am sick and tired of every technical criticism being treated as
a personal attack, and of of being falsely accused of conspiring
against you.
You recently said, without provocation, that this newsgroup would
be better without me. I'm not going to say that it would be better
without you, but I have little doubt that it will be a more pleasant
place *for me* if you effectively vanish from my view of it.
I am seriously annoyed with you, but I bear you no ill will, and I
wish you the best of luck. I have no advice to offer you because
you surely would not take it.
*plonk*
And the horse you rode in on.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2011-09-14 15:05 +0100 |
| Message-ID | <0.59db1df4e896e5830d8d.20110914150502BST.87litrz0c1.fsf@bsb.me.uk> |
| In reply to | #10213 |
"BartC" <bc@freeuk.com> writes: > "Keith Thompson" <kst-u@mib.org> wrote in message > news:ln39fzby0w.fsf@nuthaus.mib.org... > >> But consider this: students who learned to program on a PDP-11 or a VAX >> are probably no longer using those systems. > > I bet they were taught a bunch of other stuff that was also specific > to those systems and which is now irrelevant, but still managed to > gradually progress to new systems without too much trouble. Yes, but the new knowledge of diversity was added to the old -- it did not simply replace it. The PDP-11 was mixed endian; the VAX had a single endianness. Moving on to, say, 64-bit Intel CPUs you'd see yet another endianness. All had C compilers that made different choices for the sizes of C basic types. After that, it becomes very difficult to, say, use a packed struct to access a network protocol header -- you are all too aware of the many ways it which it can go wrong. I don't see anything wrong in trying to short circuit this learning. Giving people the benefit of experience is one thing that Usenet is good at. > And the chances are that a couple of decades later, they will be using > a different language anyway, if they are still even programming. I am not so sure of that. C is still with us. I'd like to think you are right but I'd bet the other way even so. If C is still around, the future of CPU architecture is unpredictable. Designers of ultra-high performance graphics chips or of fast low-power chips for embedding in your brain stem (or whatever really happens in 2044[1]) may have to make radically different choices. [1] I first wrote a program in 1978, so someone starting now may well be programming in 2044. Consider what's happened in those 33 years and try to hazard a guess as to what will be happening in 2044. -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | Malcolm McLean <malcolm.mclean5@btinternet.com> |
|---|---|
| Date | 2011-09-14 07:56 -0700 |
| Message-ID | <e9fe3b4f-3d67-44e8-b216-edeb1e869165@v8g2000yqa.googlegroups.com> |
| In reply to | #10223 |
On Sep 14, 5:05 pm, Ben Bacarisse <ben.use...@bsb.me.uk> wrote: > > I first wrote a program in 1978, so someone starting now may well be > programming in 2044. Consider what's happened in those 33 years and try > to hazard a guess as to what will be happening in 2044. > I used to "poke" the screen to get character mapped interactive displays. I still write a lot of programs like that. The difference is that I now have to do a little bit of messing about with windowing systems to get a character raster. Then it's back to old habits. See Amino Invaders for an example http://www.malcommclean.site11.com/www. That program's written in Java. It's just a quick throwaway game to teach the amino acid codes.
[toc] | [prev] | [next] | [standalone]
| From | "BartC" <bc@freeuk.com> |
|---|---|
| Date | 2011-09-14 17:23 +0100 |
| Message-ID | <j4qkl1$g0q$1@dont-email.me> |
| In reply to | #10223 |
"Ben Bacarisse" <ben.usenet@bsb.me.uk> wrote in message news:0.59db1df4e896e5830d8d.20110914150502BST.87litrz0c1.fsf@bsb.me.uk... > "BartC" <bc@freeuk.com> writes: >> And the chances are that a couple of decades later, they will be using >> a different language anyway, if they are still even programming. > > I am not so sure of that. C is still with us. I'd like to think you > are right but I'd bet the other way even so. C will be around. I meant the individual could have moved on to something else. (Of course that still leaves any source code he may have written which may or may not still need to work twenty years later, perhaps on very different hardware. But, quite often you *are* only interested in a short-term results, and it's quite possible that older application would need rewriting anyway ten years later, as software gets outdated even if it still works. Or you just emulate the older system.) > If C is still around, the future of CPU architecture is unpredictable. > Designers of ultra-high performance graphics chips or of fast low-power > chips for embedding in your brain stem (or whatever really happens in > 2044[1]) may have to make radically different choices. > > [1] I first wrote a program in 1978, so someone starting now may well be > programming in 2044. Consider what's happened in those 33 years and try > to hazard a guess as to what will be happening in 2044. (My first programs were in 1976, as a student. Some of them used punched cards. Just five years later, I was programming something entirely different. I wouldn't like to predict what might be happening in 2046.) -- Bartc
[toc] | [prev] | [next] | [standalone]
| From | Seebs <usenet-nospam@seebs.net> |
|---|---|
| Date | 2011-09-14 19:12 +0000 |
| Message-ID | <slrnj71u7e.1kqm.usenet-nospam@guild.seebs.net> |
| In reply to | #10209 |
On 2011-09-14, Keith Thompson <kst-u@mib.org> wrote: > I'm not necessarily saying that a tutorial intended for beginners needs > to check for every possibility; assuming that argv[0] != NULL might be > reasonable in that context. But in code that's intended to be robust, a > test is worth the effort, perhaps something like: > const char *const program_name = argv[0] ? argv[0] : "<program>"; > fprintf(stderr, "Usage: %s <filename>\n", program_name); Me, I'd probably just not use argv[0], and use "<program>" in the string, on the grounds that the tutorial program will be easy enough for the user to work with, and they'll know what they're invoking. Getting the program name in there is a cosmetic detail. -s -- Copyright 2011, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated! I am not speaking for my employer, although they do rent some of my opinions.
[toc] | [prev] | [next] | [standalone]
| From | John Bode <jfbode1029@gmail.com> |
|---|---|
| Date | 2011-09-14 15:24 -0700 |
| Message-ID | <8a7d73d2-bc9a-436d-8fcc-528b921b1a61@w21g2000yql.googlegroups.com> |
| In reply to | #10209 |
On Sep 13, 10:31 pm, Keith Thompson <ks...@mib.org> wrote: [snip] > > But consider this: students who learned to program on a PDP-11 or a VAX > are probably no longer using those systems. Students learning today on > a Windows, Linux, or Macintosh system may be using very different > systems in the future. It's never too early to learn good habits. > I learned the value of this early on, even though I didn't realize it at the time. I was one of those students learning on a VAX, and I made the mistake of buying the first edition of Schildt, which assumed you were working on DOS. Most of the examples didn't even compile because they relied on MS-specific extensions and headers. For me, that book was largely useless and a waste of money, especially when compared with K&R or H&S, which made no such platform-specific assumptions. As it was, we were taught pretty vanilla C for our assignments; if we played with any of the VAX C-specific extensions, it was for our own abusement more than anything else.
[toc] | [prev] | [next] | [standalone]
| From | gordonb.ik17p@burditt.org (Gordon Burditt) |
|---|---|
| Date | 2011-09-09 18:16 -0500 |
| Message-ID | <kNydncRQGNLOA_fTnZ2dnUVZ_uWdnZ2d@posted.internetamerica> |
| In reply to | #10072 |
>> Undefined behaviour in the (unlikely) case where argc = 0 and argv[0] = NULL. >> > > Yes. But do you know a system where that happens? > > Never found one. It's easy for a malicious invoker to do that with the UNIX execv() or execl() call. I suppose it's possible to do it accidentally but that's unlikely.
[toc] | [prev] | [next] | [standalone]
| From | Jorgen Grahn <grahn+nntp@snipabacken.se> |
|---|---|
| Date | 2011-09-12 22:24 +0000 |
| Message-ID | <slrnj6t1l8.gtj.grahn+nntp@frailea.sa.invalid> |
| In reply to | #10075 |
On Fri, 2011-09-09, Gordon Burditt wrote: >>> Undefined behaviour in the (unlikely) case where argc = 0 and argv[0] = NULL. >>> >> >> Yes. But do you know a system where that happens? >> >> Never found one. > > It's easy for a malicious invoker to do that with the UNIX execv() > or execl() call. I suppose it's possible to do it accidentally but > that's unlikely. IIRC, the Commodore Amiga did that, if you started a program by clicking it in the GUI (the Workbench). But few people wrote standard-conformant C on that platform. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o .
[toc] | [prev] | [next] | [standalone]
| From | "Morris Keesan" <mkeesan@post.harvard.edu> |
|---|---|
| Date | 2011-09-09 20:33 -0400 |
| Message-ID | <op.v1kg6eax5qv6o3@toshiba-laptop> |
| In reply to | #10063 |
On Fri, 09 Sep 2011 16:53:37 -0400, jacob navia <jacob@spamsink.net> wrote:
> if (argc < 2) {
> fprintf(stderr,"Usage: %s <file name>\n",argv[0]);
> return EXIT_FAILURE;
> }
This misses the usage-error case where argc > 2.
Others have pointed out the possibility that argv[0] == NULL.
And, personally, as a long-time Unix programmer, I prefer to let any
file-processing program work as a filter, so I would have written
something like
FILE *file;
if (argc < 2) {
file = stdin;
} else if (argc > 2) {
fprintf(stderr,"Usage: %s <file name>\n",argv[0]);
return EXIT_FAILURE;
} else {
file = fopen(argv[1], "rb");
etc.
...
> fputc(hex[(oneChar >> 4)&0xf],stdout);
> fputc(hex[oneChar&0xf],stdout);
Assumes CHAR_BIT == 8. I've used systems where this is not true, where
this code will not show the entire value of each char.
--
Morris Keesan -- mkeesan@post.harvard.edu
[toc] | [prev] | [next] | [standalone]
| From | Ian Collins <ian-news@hotmail.com> |
|---|---|
| Date | 2011-09-10 12:42 +1200 |
| Message-ID | <9cvq42Fn7lU1@mid.individual.net> |
| In reply to | #10078 |
On 09/10/11 12:33 PM, Morris Keesan wrote: > On Fri, 09 Sep 2011 16:53:37 -0400, jacob navia<jacob@spamsink.net> wrote: > > >> fputc(hex[(oneChar>> 4)&0xf],stdout); >> fputc(hex[oneChar&0xf],stdout); > Assumes CHAR_BIT == 8. I've used systems where this is not true, where > this code will not show the entire value of each char. Oh come on, do you really think anyone following a basic tutorial will be using such a system? -- Ian Collins
[toc] | [prev] | [next] | [standalone]
| From | "Morris Keesan" <mkeesan@post.harvard.edu> |
|---|---|
| Date | 2011-09-10 17:16 -0400 |
| Message-ID | <op.v1l2qj1l5qv6o3@toshiba-laptop> |
| In reply to | #10079 |
On Fri, 09 Sep 2011 20:42:41 -0400, Ian Collins <ian-news@hotmail.com> wrote: > On 09/10/11 12:33 PM, Morris Keesan wrote: >> On Fri, 09 Sep 2011 16:53:37 -0400, jacob navia<jacob@spamsink.net> >> wrote: >> >> >>> fputc(hex[(oneChar>> 4)&0xf],stdout); >>> fputc(hex[oneChar&0xf],stdout); >> Assumes CHAR_BIT == 8. I've used systems where this is not true, where >> this code will not show the entire value of each char. > > Oh come on, do you really think anyone following a basic tutorial will > be using such a system? > No, but jacob was asking about possible portability problems. That's one. -- Morris Keesan -- mkeesan@post.harvard.edu
[toc] | [prev] | [next] | [standalone]
| From | jacob navia <jacob@spamsink.net> |
|---|---|
| Date | 2011-09-10 10:03 +0200 |
| Message-ID | <j4f5l1$5v5$2@speranza.aioe.org> |
| In reply to | #10078 |
Le 10/09/11 02:33, Morris Keesan a écrit :
> On Fri, 09 Sep 2011 16:53:37 -0400, jacob navia <jacob@spamsink.net> wrote:
>
>> if (argc < 2) {
>> fprintf(stderr,"Usage: %s <file name>\n",argv[0]);
>> return EXIT_FAILURE;
>> }
>
> This misses the usage-error case where argc > 2.
Yes. It should be argc != 2 instead. Never thought of
giving too many arguments to the program, you are right.
>> fputc(hex[(oneChar >> 4)&0xf],stdout);
>> fputc(hex[oneChar&0xf],stdout);
> Assumes CHAR_BIT == 8. I've used systems where this is not true, where
> this code will not show the entire value of each char.
True also. I will mention it in the discussion.
[toc] | [prev] | [next] | [standalone]
| From | Nobody <nobody@nowhere.com> |
|---|---|
| Date | 2011-09-10 10:04 +0100 |
| Message-ID | <pan.2011.09.10.09.04.47.582000@nowhere.com> |
| In reply to | #10063 |
On Fri, 09 Sep 2011 22:53:37 +0200, jacob navia wrote:
> I do not use putchar but fputc to make it easier to add an output
> file later as one more argument.
To make it easier still:
FILE *outfp = stdout;
Then use outfp instead of stdout.
> char *hex = "0123456789abcdef";
This should be "const". And there's no need for a pointer. IOW:
const char hex[] = "0123456789abcdef";
> fprintf(stdout,"[%d] ",address);
Addresses in decimal?
[toc] | [prev] | [next] | [standalone]
| From | jacob navia <jacob@spamsink.net> |
|---|---|
| Date | 2011-09-10 11:41 +0200 |
| Message-ID | <j4fbc3$jq2$1@speranza.aioe.org> |
| In reply to | #10087 |
Le 10/09/11 11:04, Nobody a écrit : > On Fri, 09 Sep 2011 22:53:37 +0200, jacob navia wrote: > >> I do not use putchar but fputc to make it easier to add an output >> file later as one more argument. > > To make it easier still: > > FILE *outfp = stdout; > Yes, that can be done. > Then use outfp instead of stdout. > >> char *hex = "0123456789abcdef"; > > This should be "const". And there's no need for a pointer. IOW: > > const char hex[] = "0123456789abcdef"; > Well, a pointer doesn't harm either. That array wouldn't be zero terminated, that's why I do not use that construct. True, in this case it doesn't matter that it isn't a string but newcomers could be confused to use that construct in other stuations instead of a pointer to a string with very bad consequences... >> fprintf(stdout,"[%d] ",address); > > Addresses in decimal? Yes, and even 1 based! An exercise asks for changing this to hexadecimal and zero based index. Thanks for your input
[toc] | [prev] | [next] | [standalone]
| From | pete <pfiland@mindspring.com> |
|---|---|
| Date | 2011-09-10 05:51 -0400 |
| Message-ID | <4E6B3312.1A33@mindspring.com> |
| In reply to | #10088 |
jacob navia wrote: > > Le 10/09/11 11:04, Nobody a écrit : > >> char *hex = "0123456789abcdef"; > > > > This should be "const". And there's no need for a pointer. IOW: > > > > const char hex[] = "0123456789abcdef"; > > > > Well, a pointer doesn't harm either. That array wouldn't be > zero terminated, that's why I do not use that construct. The array *would be* zero terminated. ISO/IEC 9899:1999 (E) 6.7.8 Initialization 14 An array of character type may be initialized by a character string literal, optionally enclosed in braces. Successive characters of the character string literal (including the terminating null character if there is room or if the array is of unknown size) initialize the elements of the array. -- pete
[toc] | [prev] | [next] | [standalone]
Page 4 of 5 — ← Prev page 1 2 3 [4] 5 Next page →
Back to top | Article view | comp.lang.c
csiph-web