Friday, April 2, 2010

comp.lang.c - 25 new messages in 6 topics - digest

comp.lang.c
http://groups.google.com/group/comp.lang.c?hl=en

comp.lang.c@googlegroups.com

Today's topics:

* Personal attacks by moderators in a moderated group are unprofessional - 11
messages, 6 authors
http://groups.google.com/group/comp.lang.c/t/fcaffc6b8db42751?hl=en
* Efficency and the standard library - 2 messages, 1 author
http://groups.google.com/group/comp.lang.c/t/ad9fea19f2f7dd61?hl=en
* weird problem with strcmp() - 7 messages, 5 authors
http://groups.google.com/group/comp.lang.c/t/701c12c082eb3aa7?hl=en
* off topic but please forgive me me and answer - 3 messages, 3 authors
http://groups.google.com/group/comp.lang.c/t/47f38c278b5880ee?hl=en
* nothing much - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c/t/3040e7c069dc5b93?hl=en
* Hoping not to do the ugly - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c/t/8055111701d1781b?hl=en

==============================================================================
TOPIC: Personal attacks by moderators in a moderated group are unprofessional
http://groups.google.com/group/comp.lang.c/t/fcaffc6b8db42751?hl=en
==============================================================================

== 1 of 11 ==
Date: Thurs, Apr 1 2010 11:28 pm
From: spinoza1111


http://groups.google.com.hk/group/comp.lang.c.moderated/msg/2cac44082d42dc5f?hl=en

This specific issue is being brought today to Apress' attention.


== 2 of 11 ==
Date: Fri, Apr 2 2010 12:57 am
From: Colonel Harlan Sanders


On Thu, 1 Apr 2010 23:28:17 -0700 (PDT), spinoza1111
<spinoza1111@yahoo.com> wrote:

>http://groups.google.com.hk/group/comp.lang.c.moderated/msg/2cac44082d42dc5f?hl=en
>
>This specific issue is being brought today to Apress' attention.


I didn't think you could top your logical "proof" that "clear= true",
but this, brief though it is, is a classic.

It takes guts to be prepared to look like a pompous douchebag in the
service of a good April Fool's gag.


== 3 of 11 ==
Date: Fri, Apr 2 2010 1:44 am
From: spinoza1111


On Apr 2, 3:57 pm, Colonel Harlan Sanders <Har...@kfc.com> wrote:
> On Thu, 1 Apr 2010 23:28:17 -0700 (PDT), spinoza1111
>
> <spinoza1...@yahoo.com> wrote:
> >http://groups.google.com.hk/group/comp.lang.c.moderated/msg/2cac44082...
>
> >This specific issue is being brought today to Apress' attention.
>
> I didn't think you could top your logical "proof" that "clear= true",
> but this, brief though it is, is a classic.
>
> It takes guts to be prepared to look like a pompous douchebag in the
> service of a good April Fool's gag.

Damn right, yokel. Literally true. I will non-anonymously look like a
pompous douchebags to pompous douchebags, who in general are
unqualified to tell who is and who is not a pompout douchebag.

== 4 of 11 ==
Date: Fri, Apr 2 2010 3:22 am
From: Colonel Harlan Sanders


On Fri, 2 Apr 2010 01:44:44 -0700 (PDT), spinoza1111
<spinoza1111@yahoo.com> wrote:
>
>Damn right, yokel. Literally true. I will non-anonymously look like a
>pompous douchebags to pompous douchebags, who in general are
>unqualified to tell who is and who is not a pompout douchebag.

Great. Push the issue with your publisher.
Look forward to seeing which author's contract they cancel.

Don't worry, there are plenty of vanity presses around that don't care
how much of an idiot you are, though they might draw the line at being
involved in your petty online feuds.

== 5 of 11 ==
Date: Fri, Apr 2 2010 4:46 am
From: spinoza1111


On Apr 2, 6:22 pm, Colonel Harlan Sanders <Har...@kfc.com> wrote:
> On Fri, 2 Apr 2010 01:44:44 -0700 (PDT),spinoza1111
>
> <spinoza1...@yahoo.com> wrote:
>
> >Damn right, yokel. Literally true. I will non-anonymously look like a
> >pompous douchebags to pompous douchebags, who in general are
> >unqualified to tell who is and who is not a pompout douchebag.
>
> Great. Push the issue with your publisher.
> Look forward to seeing which author's contract they cancel.

The contract is already fulfilled. It cannot be canceled. The book is
on-sale, and I'm receiving royalties, same as Seebach. Sorry.
>
> Don't worry, there are plenty of vanity presses around that don't care
> how much of an idiot you are, though they might draw the line at being
> involved in your petty online feuds.

== 6 of 11 ==
Date: Fri, Apr 2 2010 4:59 am
From: James Harris


On 2 Apr, 07:28, spinoza1111 <spinoza1...@yahoo.com> wrote:
> http://groups.google.com.hk/group/comp.lang.c.moderated/msg/2cac44082...
>
> This specific issue is being brought today to Apress' attention.

"Personal attacks"? (In your subject line.) What personal attacks? The
moderator made a small joke at your expense on 1st April. You'd do
better to roll with the joke and have a laugh at it. I suspect you
would gain more respect that way. Your repeatedly shouting that you've
taken such things to higher authorities reminds me of children at
school. So you've told the teacher on him. Well done.

Worse than that, trying to *injure* fellow contributors to these
newsgroups by talking to their publishers is plain spiteful (and
likely of more injury to you than them). Spite is another quality
associated with juveniles. Sorry to say it but IMO it's about time you
grew up and stopped peppering these newsgroups with defences to your
dignity and stuck to talking about C. I guessed from the subject line
that it was you who had started this thread. I can't think of any
other current contributor who behaves as you do.

The post in comp.lang.c.moderated, "Time for a handoff, I think," was
in no way a personal attack (and I hope the OP keeps it that way).
However, your response contained

* profanity
* accusation of the OP having some "psychological disorder"
* assertion that the OP is "incompetent"

In this and in other posts, ISTM that *you* are the one making
personal attacks. I think you therefore also win the award for
hypocrisy. In fact, given the provocation you have provided in the
past I think the OP in comp.lang.c.moderated was being remarkably
restrained.

If you are offended by any of the above please take time to think
about how you come across.

James


== 7 of 11 ==
Date: Fri, Apr 2 2010 5:56 am
From: spinoza1111


On Apr 2, 6:22 pm, Colonel Harlan Sanders <Har...@kfc.com> wrote:
> On Fri, 2 Apr 2010 01:44:44 -0700 (PDT),spinoza1111
>
> <spinoza1...@yahoo.com> wrote:
>
> >Damn right, yokel. Literally true. I will non-anonymously look like a
> >pompous douchebags to pompous douchebags, who in general are
> >unqualified to tell who is and who is not a pompout douchebag.
>
> Great. Push the issue with your publisher.
> Look forward to seeing which author's contract they cancel.
>
> Don't worry, there are plenty of vanity presses around that don't care
> how much of an idiot you are, though they might draw the line at being
> involved in your petty online feuds.

From "You Are Not A Gadget: a Manifesto" by Jaron Lanier:

"'Troll' is a term for an anonymous person who is abusive in an online
environment. It would be nice to believe that there is only a minute
troll population living among us. But in fact, a great many people
have experienced being drawn into nasty exchanges online. Everyone who
has experienced that has been introduced to his or her inner troll."

"I have tried to be aware of the troll within myself. I notice that I
can suddenly become relieved when someone else in an online exchange
is getting pounded or humiliated, because that means I'm safe for the
moment. If someone else's video is being ridiculed on YouTube then
mine is temporarily protected. But that also means I'm complicit in a
mob dynamic. Have I ever planted a seed of mob-beckoning ridicule in
order to guide the mob to a target other than myself? Yes, I have,
though I shouldn't have. I observe others doing that very thing
routinely in anonymous online meeting places."


== 8 of 11 ==
Date: Fri, Apr 2 2010 6:11 am
From: spinoza1111


On Apr 2, 7:59 pm, James Harris <james.harri...@googlemail.com> wrote:
> On 2 Apr, 07:28,spinoza1111<spinoza1...@yahoo.com> wrote:
>
> >http://groups.google.com.hk/group/comp.lang.c.moderated/msg/2cac44082...
>
> > This specific issue is being brought today to Apress' attention.
>
> "Personal attacks"? (In your subject line.) What personal attacks? The
> moderator made a small joke at your expense on 1st April. You'd do
> better to roll with the joke and have a laugh at it. I suspect you
> would gain more respect that way. Your repeatedly shouting that you've
> taken such things to higher authorities reminds me of children at
> school. So you've told the teacher on him. Well done.

I am no longer interested in the "respect" of ill-educated fools. I
propose that they leave this newsgroup, since it's for the civil
discussion of C by adults.

As to your simile: grow up. We AREN'T in kiddie school, and when I was
at Bell-Northern Research in Mountain View, I could see that it would
fail because a critical mass of employees acted as if BNR was a high
school. They stole equipment, had parties at which rapes occured, and
failed to deliver.


>
> Worse than that, trying to *injure* fellow contributors to these
> newsgroups by talking to their publishers is plain spiteful (and
> likely of more injury to you than them). Spite is another quality
> associated with juveniles. Sorry to say it but IMO it's about time you
> grew up and stopped peppering these newsgroups with defences to your
> dignity and stuck to talking about C. I guessed from the subject line
> that it was you who had started this thread. I can't think of any
> other current contributor who behaves as you do.

I may have started this thread, but as usual you don't do your
homework. The fact is that I approached Seebach collegially, offering
to discuss my concerns by email.

He deleted the email unread. He then proceeded to call me names, and
also to demonstrate in a series of incompetent programs that he's not
a qualified C programmer, not in the slightest.

And I will complain to his publisher, since Apress has also published
my book, and his bad behavior makes all Apress authors look bad.


>
> The post in comp.lang.c.moderated, "Time for a handoff, I think," was
> in no way a personal attack (and I hope the OP keeps it that way).
> However, your response contained
>
> * profanity

Well fuck me in the ass. I have already gone on record that it is much
worse to deliberately destroy Schildt's reputation, and cause him and
his family mental anguish, than to use "profanity". My generation
ended a war using "profanity".

> * accusation of the OP having some "psychological disorder"

Peter Seebach has stated that he has psychological disorders (ADHD and
autism). Ordinarily, I would ignore this. However, it's obscene for
him to implicitly claim tolerance for his numerous coding errors based
on this excuse while making wild accusations (in "C: the Complete
Nonsense") that 20 trivial errors are really 100s of errors and that
I'm incompetent, a moron and insane.


> * assertion that the OP is "incompetent"

This was based on my review of several of his programs, in which I
found newbie errors in each.

>
> In this and in other posts, ISTM that *you* are the one making
> personal attacks. I think you therefore also win the award for
> hypocrisy. In fact, given the provocation you have provided in the
> past I think the OP in comp.lang.c.moderated was being remarkably
> restrained.

No, Peter Seebach who is the moderator has a track record of trying to
advance a career as a "programmer" by doing things with null content:

* He probably wrote "C: the Complete Nonsense" to make it appear that
he was more qualified as a C programmer than Schildt, because as it
happens, he has no academic preparation in computer science and is an
incompetent programmer

* He paid his way into the C99 standards board and attended meetings
to add a line to his resume that he then used to add authority to
CTCN. At the meetings, he has said that he didn't contribute.

* He presents trivial and useless routines in this ng to establish
credibility, but these routines (notably a program which is really a
script for replacing one fixed pattern in a very specialized
environment, and which didn't work) are incompetent

>
> If you are offended by any of the above please take time to think
> about how you come across.

I know very well how I "come across". Part of the problem here is that
people are afraid to speak their truth, but want to come across as
something which they are not, and Peter Seebach is exhibit A.

>
> James

== 9 of 11 ==
Date: Fri, Apr 2 2010 6:25 am
From: ImpalerCore


On Apr 2, 3:57 am, Colonel Harlan Sanders <Har...@kfc.com> wrote:
> On Thu, 1 Apr 2010 23:28:17 -0700 (PDT), spinoza1111
>
> <spinoza1...@yahoo.com> wrote:
> >http://groups.google.com.hk/group/comp.lang.c.moderated/msg/2cac44082...
>
> >This specific issue is being brought today to Apress' attention.
>
> I didn't think you could top your logical "proof" that "clear= true",
> but this, brief though it is, is a classic.
>
> It takes guts to be prepared to look like a pompous douchebag in the
> service of a good April Fool's gag.

I was kinda hoping that spinoza would fake being nice, courteous, and
gracious without appearing satirical to Seebach on April 1st, just to
see if he could fake it enough to fool some people that he'd changed
his ways.

Oh well, time to go back to your regularly scheduled flame wars.


== 10 of 11 ==
Date: Fri, Apr 2 2010 7:11 am
From: Bill Reid


On Apr 2, 6:25 am, ImpalerCore <jadil...@gmail.com> wrote:
> On Apr 2, 3:57 am, Colonel Harlan Sanders <Har...@kfc.com> wrote:
> > On Thu, 1 Apr 2010 23:28:17 -0700 (PDT), spinoza1111
> > <spinoza1...@yahoo.com> wrote:
> > >http://groups.google.com.hk/group/comp.lang.c.moderated/msg/2cac44082...
>
> > >This specific issue is being brought today to Apress' attention.
>
> > I didn't think you could top your logical "proof" that "clear= true",
> > but this, brief though it is, is a classic.
>
> > It takes guts to be prepared to look like a pompous douchebag in the
> > service of a good April Fool's gag.
>
> I was kinda hoping that spinoza would fake being nice, courteous, and
> gracious without appearing satirical to Seebach on April 1st, just to
> see if he could fake it enough to fool some people that he'd changed
> his ways.
>
> Oh well, time to go back to your regularly scheduled flame wars.

You guys are missing a new instant classic:

"My generation ended a war using "profanity"."
-- "SpinNosey", 4/2/2010

Gives a whole new meaning to the term "F-bomb"...but
I think he should have also acknowledged the critical
tactical advantage of ethnic slurs, as well...

And since there's only one war I can think of that
was fought by his "generation", I guess he's referring
to soldiers screaming "GODDAMN CHARLIE!!!" as they
pulled out of Vietnam...

---
William Ernest Reid


== 11 of 11 ==
Date: Fri, Apr 2 2010 8:55 am
From: Seebs


On 2010-04-02, James Harris <james.harris.1@googlemail.com> wrote:
> The post in comp.lang.c.moderated, "Time for a handoff, I think," was
> in no way a personal attack (and I hope the OP keeps it that way).

Using someone's comments as a joke is sort of an implicit attack, because
it implies that they're laughable.

The ideal solution, if one does not want to have one's statements mocked,
is not to say things that are laughable.

-s
--
Copyright 2010, 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!

==============================================================================
TOPIC: Efficency and the standard library
http://groups.google.com/group/comp.lang.c/t/ad9fea19f2f7dd61?hl=en
==============================================================================

== 1 of 2 ==
Date: Fri, Apr 2 2010 2:16 am
From: spinoza1111


On Mar 28, 1:52 am, blm...@myrealbox.com <blm...@myrealbox.com> wrote:
> In article <df3a5dac-dd25-4f34-a079-bc222a195...@u15g2000prd.googlegroups.com>,
>
> spinoza1111 <spinoza1...@yahoo.com> wrote:
> > On Mar 7, 3:25 am, Seebs <usenet-nos...@seebs.net> wrote:
> > > On 2010-03-06, blmblm  myrealbox.com <blm...@myrealbox.com> wrote:
>
> > > > Well, it's my impression that more than one person has commented on
> > > > some of your variable names being poorly chosen (the ptrIndexN ones
> > > > in particular), so perhaps the burden is on you to demonstrate that
> > > > they're well chosen.
>
> [ snip ]
>
> > > Unless he's got some great explanation for where the badly-designed part
> > > is that makes it so confusing, the obvious explanation would be that since
> > > the ptrIndex? variable names don't tell you what they are indexes of, just
>
> > And what do your variable names tell us? Argument from shibboleth and
> > local tribal custom, not science.
>
> > > that they are the first four numbered indexes, it is very easy to forget
>
> > Especially if you're attention disordered and completely unqualified.
>
> > > what each of them is supposed to be pointing to at any given time, and
>
> > And one letter shibboleth names make it easier how?
>
> They don't, but if I have to choose between the two mostly-meaningless
> identifiers, the short one, particularly if it's chosen in
> accordance with custom [*] (i or j for an integer index, e.g.),
> strikes me as easier to read.  Others' MMV, I suppose.
>
> [*] Substitute "local tribal custom" or "shibboleth" if you insist.
> I'm inclined to think that there is value to conforming to such,
> in the absence of compelling reasons not to do so.
>
>
>
>
>
> > > that makes bugs more likely.  Even if a given bug isn't directly caused by
> > > a confusion between two of the confusingly-similar indecies, the mere fact
> > > that the programmer must consciously track which index is which, rather than
> > > trusting the name to be informative, chews up cognitive resources and makes
> > > bugs more likely.
>
> > You might have a finite number of cognitive resources. I'd watch the M
> > & Ms. They drain 'em fast. The fact is that reading code is hard, and
> > a skill you don't seem to possess. Instead of reading code, you prefer
> > talking to putatively safe third parties about other people's defects.
>
> > blm, Julienne, io_x, Ben and others have dived into unfamiliar code
> > and understood unfamiliar styles because that is part of a
> > professional programmer's job. I read Willem's code and understood it
> > although his style is very different from mine. You look at a couple
> > of variable names and then start assaulting your colleagues.
>
> You may be giving me too much credit here.  One reason I did *not*
> make more of an effort to fully understand your code (and I think I
> was quite explicit in saying, when I posted about the bug I found,
> that I had not done so) was that I find its style off-putting.

Most technical people below a low level of ability agree with you, for
they've self-selected themselves for the field based on low verbal
accomplishment in schools where instead of being forced to remediate
their verbal abilities, they were tossed aside like garbage. My style
is off-putting because I use complete and often complex sentences in
comments, I write dedicatory poems and I use vowels in data names to
aid pronunciation in structured walkthrus and pair programs.

This style was more characteristic of the most competent generation of
older programmers, including Knuth.

Unfortunately, low verbal ability ordinarily translates into an
unnoticed because normalized incompetence and lack of professional
ethics such as are manifest in Seebach.

Your opinion, nor the opinions of a normalized-deviant community,
cannot in the end control. Even if most contemporary programmers hate
my code because they are aliterate, it would be to betray myself and
"my" truth to code in a different style unless I have contracted, for
a consideration, not to.

Have you noticed, Ms M, that I don't come in here to win a popularity
contest?
>
> [ snip ]
>
> --
> B. L. Massingill
> ObDisclaimer:  I don't speak for my employers; they return the favor.

== 2 of 2 ==
Date: Fri, Apr 2 2010 4:44 am
From: spinoza1111


On Mar 28, 1:48 am, blm...@myrealbox.com <blm...@myrealbox.com> wrote:
> In article <00bedbb5-c247-4af5-afe5-24400a7c5...@t31g2000prh.googlegroups.com>,
>
>
>
>
>
> spinoza1111 <spinoza1...@yahoo.com> wrote:
> > On Feb 27, 1:49 am, blm...@myrealbox.com <blm...@myrealbox.com> wrote:
> > > In article <69e9d9c9-3301-4d5e-94d4-eaa1472e7...@b5g2000prd.googlegroups.com>,
>
> > >spinoza1111<spinoza1...@yahoo.com> wrote:
> > > > On Feb 25, 5:31 pm, blm...@myrealbox.com <blm...@myrealbox.com> wrote:
> > > > > In article <fe121e5d-5292-4160-b1f5-4c5b1cc96...@s36g2000prh.googlegroups.com>,
>
> > > > >spinoza1111<spinoza1...@yahoo.com> wrote:
> > > > > > On Feb 24, 11:41 pm, BruceS <bruce...@hotmail.com> wrote:
> > > > > > > On Feb 24, 8:09 am, Rob Kendrick <n...@rjek.com> wrote:
>
> > > > > [ snip ]
>
> > > > > > [ .... ] Professor Massengill [ .... ]
>
> > > > > That's twice -- well, sort of, because this time you came a little
> > > > > closer to spelling it right, though the variant you chose does
> > > > > lend a bit of credibility to Seebs's suggestion about whether
> > > > > the spelling mistake is a simple typo or something else.  (I'm
> > > > > uncertain about whether to add a :-) here.)
>
> > > > Please don't imagine that he has any credibility. I was merely too
> > > > lazy to check the spelling, and frankly, people have abused my own
> > > > name too much for me to be all sensitive.
>
> > > And yet you don't hesitate to point out others' misspellings, and
> > > to call them -- I forget, is it "illiterate" or "aliterate"?  

"Aliterate" is a real word. I first read it in the New York times
(search for it at their site): it means "able but unwilling to read
and write, replaces reading and writing with media". Usually, the
misspellings I decide to point out are revelatory of a much deeper
level of misunderstanding.

>
> > Give me a break. That reasoning makes no sense. You've got one data
> > point when my posts are long enough to make the magnitude of the error
> > 1/bigX, whereas other posters are large n over small x. I am often too
> > lazy to check my spelling. Wanna know why? Because in fact, I'm
> > literate enough not to have to.
>
> You might want to reconsider this claim -- unless "exagerrate",
> "occurence", and "embarass" are variant spellings I'm not aware of.
> ("occurence" might be a typo, because you also spell it with two r's
> in some posts, but the one-r spelling recurs too.)

I spend quite enough time here casting pearls before swine to check
spelling all the time when my newsreader underscores words in red, and
this in fact seldom happens. Do me the courtesy of not so consistently
confusing the trivial and important in what I've called corporate
commodity fetishism, in which equivocation of concepts is the
victimizing of people. Do me the courtesy of addressing the real
problems in this newsgroup, which is the bullying of qualified and
literate people by aliterate and incompetent thugs.

Orthography is the least reliable marker of literacy, although it's
important in formal writing. Far more important is knowing why in fact
"part of the problem are people" is correct and that in a final draft
this needs to be changed to "people are part of the problem".

Corporate females charged with bear-leading programmers often believe,
in my experience, that they are the most literate person in the room.
I am afraid that this is not the case here.

I don't need to check my spelling because the words, whether spelled
canonically or not, are usually so apposite as to be quite natural
even in the "wrong" spelling.
>
> [ snip ]
>
> --
> B. L. Massingill
> ObDisclaimer:  I don't speak for my employers; they return the favor.

==============================================================================
TOPIC: weird problem with strcmp()
http://groups.google.com/group/comp.lang.c/t/701c12c082eb3aa7?hl=en
==============================================================================

== 1 of 7 ==
Date: Fri, Apr 2 2010 2:24 am
From: "Ersek, Laszlo"


On Fri, 2 Apr 2010, Seebs wrote:

> On 2010-04-02, rabbits77 <rabbits77@my-deja.com> wrote:

>> #include <strings.h>
>
> Don't do this, either. It's <string.h>.
>
> You'd benefit a lot from trying to learn standard C rather than picking
> up weird and obsolete habits that probably made sense on some Unix system
> back in the early 80s.

Not to dispute this, but <strings.h> is not legacy when talking about
UNIX(R). bzero() is.

SUSv1: C435 page 812 (physical page 840)
SUSv2: http://www.opengroup.org/onlinepubs/007908775/xsh/strings.h.html
SUSv3: http://www.opengroup.org/onlinepubs/000095399/basedefs/strings.h.html
SUSv4: http://www.opengroup.org/onlinepubs/9699919799/basedefs/strings.h.html

Cheers,
lacos

== 2 of 7 ==
Date: Fri, Apr 2 2010 4:03 am
From: Noob


Seebs wrote:

> rabbits77 wrote:
>
>> x-no-archive: yes
>
> Why do you do this? It's annoying.

"this" is ambiguous. You might be asking

1) why is X-No-Archive set
2) why is X-No-Archive set in the body of the message

http://en.wikipedia.org/wiki/X-No-Archive

To rabbits77:

"Mozilla Thunderbird has the ability to insert custom fields
into the header of both email and Usenet messages."

http://kb.mozillazine.org/Custom_headers


== 3 of 7 ==
Date: Fri, Apr 2 2010 8:14 am
From: Keith Thompson


Seebs <usenet-nospam@seebs.net> writes:
> On 2010-04-01, rabbits77 <rabbits77@my-deja.com> wrote:
>> x-no-archive: yes
>
> Why do you do this? It's annoying.

That's odd. I don't see an "x-no-archive" in the original message.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"


== 4 of 7 ==
Date: Fri, Apr 2 2010 8:56 am
From: Seebs


On 2010-04-02, Ersek, Laszlo <lacos@caesar.elte.hu> wrote:
> Not to dispute this, but <strings.h> is not legacy when talking about
> UNIX(R).

I would say that it is. Everyone is guaranteed to have <string.h>, and
<strings.h> exists only for historical compatibility. I wouldn't recommend
that people use an interface which is only there for backwards
compatibility when there's a better-supported modern one. (Among other
things, it's one more thing to fix when porting to another system.)

-s
--
Copyright 2010, 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!


== 5 of 7 ==
Date: Fri, Apr 2 2010 8:57 am
From: Seebs


On 2010-04-02, Keith Thompson <kst-u@mib.org> wrote:
> Seebs <usenet-nospam@seebs.net> writes:
>> On 2010-04-01, rabbits77 <rabbits77@my-deja.com> wrote:
>>> x-no-archive: yes

>> Why do you do this? It's annoying.

> That's odd. I don't see an "x-no-archive" in the original message.

It's in the body of the post. But some interfaces may helpfully
hide that.

-s
--
Copyright 2010, 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!


== 6 of 7 ==
Date: Fri, Apr 2 2010 9:08 am
From: Branimir Maksimovic


On 02 Apr 2010 15:56:50 GMT
Seebs <usenet-nospam@seebs.net> wrote:

> On 2010-04-02, Ersek, Laszlo <lacos@caesar.elte.hu> wrote:
> > Not to dispute this, but <strings.h> is not legacy when talking
> > about UNIX(R).
>
> I would say that it is. Everyone is guaranteed to have <string.h>,
> and <strings.h> exists only for historical compatibility. I wouldn't
> recommend that people use an interface which is only there for
> backwards compatibility when there's a better-supported modern one.
> (Among other things, it's one more thing to fix when porting to
> another system.)
>
> -s

What about strcasecmp? It is in strings.h? Posix/Bsd compliant?

Greets!

--
http://maxa.homedns.org/

Sometimes online sometimes not


== 7 of 7 ==
Date: Fri, Apr 2 2010 9:17 am
From: Seebs


On 2010-04-02, Branimir Maksimovic <bmaxa@hotmail.com> wrote:
> What about strcasecmp? It is in strings.h? Posix/Bsd compliant?

On the systems I've used that function on, it was also accessible from
<string.h>.

But I wouldn't usually use it, just because of the portability issues.

-s
--
Copyright 2010, 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!

==============================================================================
TOPIC: off topic but please forgive me me and answer
http://groups.google.com/group/comp.lang.c/t/47f38c278b5880ee?hl=en
==============================================================================

== 1 of 3 ==
Date: Fri, Apr 2 2010 4:57 am
From: Phil Carmody


Seebs <usenet-nospam@seebs.net> writes:
> On 2010-04-01, superpollo <utente@esempio.net> wrote:
>> Seebs ha scritto:
>>> On 2010-04-01, superpollo <utente@esempio.net> wrote:
>>>> how much is one half times one half?
>
>>> That depends on what you're multiplying.
>
>> i what sense?
>
> In the sense that different kinds of objects use different rules
> for multiplication.

Absolutely.

> (1/2) * (1/2) = 0

Nope, that's zero times zero. Fortunately it equals zero as expected.

> (0.5) * (0.5) = 0.25

A very conventional answer. I prefer half times half being three,
as half a dozen times half a dozen is three dozen.

Phil
--
I find the easiest thing to do is to k/f myself and just troll away
-- David Melville on r.a.s.f1


== 2 of 3 ==
Date: Fri, Apr 2 2010 5:15 am
From: Tim Streater


In article <87tyrukqwr.fsf@kilospaz.fatphil.org>,
Phil Carmody <thefatphil_demunged@yahoo.co.uk> wrote:

> Seebs <usenet-nospam@seebs.net> writes:
> > On 2010-04-01, superpollo <utente@esempio.net> wrote:
> >> Seebs ha scritto:
> >>> On 2010-04-01, superpollo <utente@esempio.net> wrote:
> >>>> how much is one half times one half?
> >
> >>> That depends on what you're multiplying.
> >
> >> i what sense?
> >
> > In the sense that different kinds of objects use different rules
> > for multiplication.
>
> Absolutely.
>
> > (1/2) * (1/2) = 0
>
> Nope, that's zero times zero. Fortunately it equals zero as expected.
>
> > (0.5) * (0.5) = 0.25
>
> A very conventional answer. I prefer half times half being three,
> as half a dozen times half a dozen is three dozen.

But the OP didn't say "half a dozen". He said "one half".

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689


== 3 of 3 ==
Date: Fri, Apr 2 2010 10:05 am
From: Ben Bacarisse


Phil Carmody <thefatphil_demunged@yahoo.co.uk> writes:
<snip>
> A very conventional answer. I prefer half times half being three,
> as half a dozen times half a dozen is three dozen.

It's 1/4 of a square dozen (which is 3 dozen as you say).

--
Ben.

==============================================================================
TOPIC: nothing much
http://groups.google.com/group/comp.lang.c/t/3040e7c069dc5b93?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, Apr 2 2010 5:15 am
From: Eric Sosman


On 4/1/2010 6:59 PM, Phred Phungus wrote:
> Eric Sosman wrote:
>> [... concerning integer division ...]
>
> Both Fortran and C round toward the origin.

C99 rounds toward the origin. C90 rounds toward the
origin *or* toward minus infinity at the implementation's
discretion, as explained earlier in the thread. In both
versions, and with both possible C90 choices, the result
of % "compensates for" whatever rounding / does.

<ot>I don't know Fortran. Long ago I knew FORTRAN and
used it quite a lot, but I've never met the upstart lower-case
pretender to the throne and probably wouldn't recognize it.
<ot>Besides, shouldn't it be ForTran?</ot></ot>

--
Eric Sosman
esosman@ieee-dot-org.invalid

==============================================================================
TOPIC: Hoping not to do the ugly
http://groups.google.com/group/comp.lang.c/t/8055111701d1781b?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, Apr 2 2010 8:54 am
From: cri@tiac.net (Richard Harter)


On Thu, 01 Apr 2010 10:07:28 +0200, Hallvard B Furuseth
<h.b.furuseth@usit.uio.no> wrote:

>Richard Harter writes:
>> void response_function(sigil_s, void *, packet_s);
>>
>> The first and third arguments are typedefs for structs. There
>> are very good reasons why they aren't pointers to structs so
>> don't go there. For sundry reasons we don't want the fields of
>> these structs visible to users. (Keepen der sticky Fingers offen
>> die Buttons).
>>
>> User code interacts with system code via an API; the game is to
>> get users to access structs via API calls.
>> One way to do this is to create structs that look like this:
>>
>> struct pseudo_sigil {char[n]}; /* n is sizeof(sigil_s) */
>
>Coming a bit late to this, but I'm curious if the following is right or
>if I've gotten lost in the twisty mazes of the Standard:
>
>When I looked at a similar problem (not due to my own requirements) I
>solved it by giving up, which seemed a nicer solution than what I could
>think of. I've seen some of my reasons in this thread, but not all:
>
>It'd work to memcpy to a struct pseudo_sigil and pass that, but that
>didn't fit my case. Ignoring that solution:
>
>Structs sigil and pseudo_sigil must *both* have the same alignment
>requirements and same size, otherwise either passing it from user code
>to user-invisible code or vice versa can trap. Unless users never pass
>the struct back to the user-invisible code.
>
>So one struct and one union doesn't work, and one struct with a union
>and one without is dodgy at best. The union itself could have alignment
>requirements that do not exist for the members or the struct. In any
>case, I don't remember anything to stop the compiler from using
>different calling conventions for different structs?
>
>This likely means sigil and pseudo_sigil should either be equal sans the
>names, or they should both be unions: The structs as first member, other
>members ensuring alignment and size. (This stopped me: Wanted backwards
>binary compat.) The size member can be larger than the expected struct
>size, wasting some space but allowing the user-visible code to not know
>the exact size of the real struct. A compile-time assert in the
>user-invisible part can check that the size is not too small after all.
>
>But then there are the aliasing rules. An static or stack object has
>the effective type its variable was declared with, and (roughly) should
>be accessed as that type on the pain of undefined behavior. Union
>members are an exception - but reading other members than the one last
>written is undefined, which looks like an exception to the exception.
>
>For that matter, what if some code accesses a float in union sigil_u at
>offset 4, which came from a union pseudo_sigil_u object and that doesn't
>have a float at that offset? That's not supposed to happen, so the
>compiler's implementation of aliasing rules need not be careful about
>it. I suppose it might notice that this float can't possibly have been
>set, or something like that, and optimize on it.
>
>In this case that'd require more magical link-time optimization than
>what i'd heard about so far, so it probably would work and keep
>working. But that's not quite how I prefer to describe my programs.
>
>Anyway, am I getting too paranoid here?

I got lost in your arguments. Clearly alignment has to be taken
care of, but it suffices to create a union of all the relevant
types as a component. Or, IIANM, it suffices to get all structs
from the storage allocator since that must return aligned
addresses.

Did you application absolutely require consistent sizes?
Otherwise I don't see why the pseudo_sigil struct can't be
larger.


>
>
>Some other random notes from reading this thread:
>
>Richard mentioned passing an ID around instead of pointers. Reminded me
>of a pointer representation which allows Boehm-style garbage collection
>to be compacting, if that's of any use in this case: C pointers consist
>of (object ID, offset), and the ID is an index to an internal table of
>(object address, length). Thus the system can move the object and
>change the address without needing to update the C pointer value.

Cute. I've done things like that, but not in the context of
coordinating with a garbage collector. If I were to do that I
would use "pointers" of the form (index,seqno,offset) with the
table holding (seqno,address,length). Whenever a table slot is
reused the sequence number is bumped. The point of this little
song and dance is that you now have a check on stale pointers.

>
>Regarding "hiding pointers", I did that once with ~(intptr_t)(void*)ptr.
>That was to hide the pointer from valgrind though, not the user. And it
>doesn't help against wild pointers. Still, if users are sufficiently
>determined to break the rules for the program, they'll succeed anyway.


Richard Harter, cri@tiac.net
http://home.tiac.net/~cri, http://www.varinoma.com
It's not much to ask of the universe that it be fair;
it's not much to ask but it just doesn't happen.


==============================================================================

You received this message because you are subscribed to the Google Groups "comp.lang.c"
group.

To post to this group, visit http://groups.google.com/group/comp.lang.c?hl=en

To unsubscribe from this group, send email to comp.lang.c+unsubscribe@googlegroups.com

To change the way you get mail from this group, visit:
http://groups.google.com/group/comp.lang.c/subscribe?hl=en

To report abuse, send email explaining the problem to abuse@googlegroups.com

==============================================================================
Google Groups: http://groups.google.com/?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate