Implementing strstr

B

Ben Bacarisse

spinoza1111 said:
// * 1. Bug (reported by BB): *
// * 2. Bug found by Ben Bacarisse: *

The previous request that my name not be associated with your work
still stands. Not much you can do about it now, but if there is
another version or the code is posted anywhere else, please remove
these remarks. Thank you.
 
S

spinoza1111

The previous request that my name not be associated with your work
still stands.  Not much you can do about it now, but if there is
another version or the code is posted anywhere else, please remove
these remarks.  Thank you.

It's this lack of basic courtesy that's the problem here. Why the ****
do you embarass me in public when you could have sent email about this
matter? Furthermore, there are people here who think it's cute to
splatter my name all over the Internet, associated with the foulest
lies. I was trying to CREDIT you, asshole, in a public newsgroup where
credit and discredit is seen by current and potential employers and
clients.

The main trouble with many of you is that you literally think that
hardware and stupid ideas from the past are more important than
decency, self-respect and personal reputation.

I'd forgot the promise to not name you because it was offensive of you
to ask it, as if I'm some sort of person you "really" care not to
associate with...although for the same reason that internet posting is
publication, your dialog with me is a dialog, in which basic
"discourse ethics" (a fancy word for basic decency) demands a
mutuality of recognition and respect.

I will endeavor in future to steal your ideas and contributions and
not credit you as you request. That's the normalized deviance here,
isn't it.
 
S

spinoza1111

The previous request that my name not be associated with your work
still stands.  Not much you can do about it now, but if there is
another version or the code is posted anywhere else, please remove
these remarks.  Thank you.

After my reply above to Ben, I opened email to discover that he had
erroneously posted.

I apologize for the note to Ben but not globally for foul language and
strong words in other posts. This is because after years of relative
self-restraint, I'm appalled by the REAL foul language here, which is
the language of personal destruction. I thought Ben was intentionally
trying to embarass me. He was not. He is a great technician and
overall somewhat more collegial than others here, and you know who you
are. I agree with Heathfield of all people that Ben never misuses the
ng and never feeds the so-called "trolls".

I am very impressed by his powerful insight into code.
 
S

spinoza1111

spinoza1111wrote:


Ben is a knowledgeable contributor to this newsgroup, and most polite
with it. You, like Richard Bos, would do well to try to emulate him
rather than insult him.

I'm not "insulting" him. Merely using strong language in response to
what appeared at the time to be offensive is not "insulting" a person.

No, "insulting" a person is a matter of grammar...not word choice. You
insult people all the time, in the dulcet-corporate register, by
questioning their bonafides based on the most trivial of errors, that
are artifacts of production processes over which programmers and
software have little or no control.

You have posted letters you claim that I have written and you have
lied about my publication in comp.risks. That's an insult. I'd rather
you were man enough to call me a fucking asshole. To my face. But
you're not.
 
S

spinoza1111

spinoza1111wrote:


No, you only called him an asshole. That's not an insult, is it? Of
course not.

No, in fact it is nothing like your incorrect inferences about Herb
Schildt or Jacques Navia, inferences which are popular in nasty and
anti-intellectual little business offices in which men moronized by
toil are taught to believe that their moronization is intelligence.

"Asshole" is precise, and it refers to specific, in the Now, behavior.
Whereas when you make your silly inferences they simultaneously expose
deep ignorance (for example, of the fact that a linked list is
normally a list of pointers and not data) and call into question the
possibility of computer science, in a manner which makes it possible
for insurance companies and banks to defraud.
No, I haven't. If you disagree, you can easily prove your point by
posting the message ID in which I did this. Since I didn't, however, you
can't prove your point. You will therefore have to resort to weasel
words, pop psychiatry, downright lies, or non sequiturs, as usual.

When your type is cornered you bleat for evidence. Richard, you posted
a forgery. It's legally actionable now. I don't have time to look it
up and waste on you, but if necessary it will appear as evidence in a
court of law.
Wrong again.

Yes, you did. You claimed that you'd scanned headers of comp.risks.
This was a malicious lie, because you knew that the headers don't
contain author names and you hoped that sufficient people would be
even more ignorant than you are.
There's nothing manly about trumpeting one's limited adjectival
vocabulary in public.

Actually, the reason for your hatred and that of Seebach is that
you're both programmers with verbal abilities in writing slightly
above a mean that is low, and getting lower, in both the US and UK,
who fancy yourselves digerati. It has bothered you since 1999 that I
have a much higher and deeper literacy and culture as well as
considerable programming experience, because I exposed you as an
uneducated hack when I created my popular thread in 1999 on
programming professionalism, on the basis of which I was invited by
Princeton University Press to join an online panel with Mike Godwin
and Cass Sunstein on internet liberty.

Therefore, my referring to you as a loudmouth thug and fucking asshole
only shows that words fail, at times, in your case. At other times, I
have offended you, deliberately, in Alexandrine verse, so I am not
exposing any illiteracy of my own when I refer to you as a cocksucker.
Only writing at your reading level.

Words fail in the case of certain reprobate Clowns
Who post from some hovel on the United Kingdom's downs
Pompous piffle, malicious malarkey, and sublunary nonsense
Possibly in the pay of SAMS, for a few pathetic pence.
Words fail the Poet, words fail the philosopher
To describe the ways of some programmer gofer
Who like the Fly would dream of being a Man
Who wakes to cry to dream again when he sees he's got a wingspan.
Words fail this homunculus, this trogdolyte, this clueless ****
Even though this took 30 seconds, and in a thesaurus I did not Hunt.
 
K

Kenny McCormack


Ben is a troll now?

Wow - I guess you really have to watch your back in this NG...

--
(This discussion group is about C, ...)

Wrong. It is only OCCASIONALLY a discussion group
about C; mostly, like most "discussion" groups, it is
off-topic Rorsharch revelations of the childhood
traumas of the participants...
 
S

spinoza1111

Ben is a troll now?

Wow - I guess you really have to watch your back in this NG...

--
(This discussion group is about C, ...)

Wrong.  It is only OCCASIONALLY a discussion group
about C; mostly, like most "discussion" groups, it is
off-topic Rorsharch revelations of the childhood
traumas of the participants...

Yeah, guys who looked like Herb Schildt (who's a big hairy guy,
photographed on a motorcycle in his first book) used to give guys like
Dweebach swirlies, noogies, and Indian burns, and guys like Dweebach
have been nursing the hurt ever since. And confronting their bullying
is NOT itself bullying.
 
S

spinoza1111

spinoza1111wrote:


Yup, them's weasel words all right.


No, I didn't, and no, it isn't, and no, you won't, because you know
you'll end up paying my costs if you do.




You need to look up the meaning of "lie". You have completely
misunderstood what it means.

The British lower middle class have a touching faith in dictionaries
that started with prize giveaways of Johnson's Dictionary, but Becky
Sharp threw it out her carriage window in Thackeray's Vanity Fair.
Some of us learn words by reading, not by memorizing the dictionary,
and you tell lies, Richard.
 
C

Colonel Harlan Sanders

Yeah, guys who looked like Herb Schildt (who's a big hairy guy,
photographed on a motorcycle in his first book) used to give guys like
Dweebach swirlies, noogies, and Indian burns, and guys like Dweebach
have been nursing the hurt ever since. And confronting their bullying
is NOT itself bullying.


So, now you're characterizing your hero Schildt as a bully, as part
of your increasingly ridiculous campaign to ... ah, yes, preserve
Schildt's good name.

You've disappeared up your own anus completely now. Good riddance.
 
S

spinoza1111

So, now you're characterizing your hero Schildt as a bully,  as part
of your increasingly ridiculous campaign to ... ah, yes, preserve
Schildt's  good name.

You've disappeared up your own anus completely now.  Good riddance.

Learn to read. I didn't say that Schildt bullied Dweebach. I said,
Rufus, that perhaps guys who looked like Schildt (a big hairy guy)
bullied Dweebach when he was widdle and he's been nursing the hurt at
heart.

Colonel Harlan Sanders
Ist ein anders
He can't read
A clue doth he need.

And at this point, having shown patience and collegiality with
Dweebach, I will indeed make a joke out of his patronym. I attempted
to contact him politely last January; he said he deleted the mail
unread. He has called me a moron and insane, which causes thugs and
genuinely insane people like you and Bill Reid to post. OK, gloves
off.
 
S

Seebs

So, now you're characterizing your hero Schildt as a bully, as part
of your increasingly ridiculous campaign to ... ah, yes, preserve
Schildt's good name.

This is getting surreal.

The beautiful thing is that Nilges doesn't seem to realize that if,
in fact, Schildt was a bully, and people were confronting the bully by
accurately pointing out flaws in his work this would, by Nilges' own
statements, NOT be a kind of bullying.

It's weird. You sometimes almost get the impression he believes that the
stuff he makes up has some kind of external referent. I think that, as
he imagines things that make him feel victorious, he just sort of assumes
them to be true, rather than imagined. Very weird.

-s
 
S

spinoza1111

This is getting surreal.

The beautiful thing is that Nilges doesn't seem to realize that if,
in fact, Schildt was a bully, and people were confronting the bully by

I'm not saying he was. I am saying that in his publicity for his first
book (Born to Code in C), he was portrayed as a studly guy on a
motorcycle, and I am speculating that this bothered you because of
conflicts you haven't resolved...conflicts that I resolved, in part,
by taking challenging classes at university (such a calculus and
computer science) that I didn't have to since I was a philosophy
major.

Whereas you seem to have avoided challenges all your life and now, at
the age of forty, you are, as a putative C expert, submitting code to
this ng with random fall through in case statements after two months
work, making a fool out of yourself.

accurately pointing out flaws in his work this would, by Nilges' own
statements, NOT be a kind of bullying.

No, not the original document. The bullying was constituted in the
fact that since then, you've not apologized for the document creating
a global bad impression about Schildt who is not a C specialist but
was asked, because he can write, to write a book about C. The bullying
here is your calling me a "moron" and insane because of trivial errors
which I fix, whilst in pseudo.c and elsewhere you consistently make,
and fail to fix errors, repeatedly telling us that you're "rilly" a
genius who gets unimportant matters wrong but does great things.
 
S

spinoza1111

This is getting surreal.

The beautiful thing is that Nilges doesn't seem to realize that if,
in fact, Schildt was a bully, and people were confronting the bully by
accurately pointing out flaws in his work this would, by Nilges' own
statements, NOT be a kind of bullying.

It's weird.  You sometimes almost get the impression he believes that the
stuff he makes up has some kind of external referent.  I think that, as
he imagines things that make him feel victorious, he just sort of assumes
them to be true, rather than imagined.  Very weird.

-s

You also find youself allied, not with good programmers, but with
people like "Colonel" and Bill Reid who come here themselves for one
purpose, and one purpose alone, to find people to abuse.
 
S

spinoza1111

This is getting surreal.

The beautiful thing is that Nilges doesn't seem to realize that if,
in fact, Schildt was a bully, and people were confronting the bully by
accurately pointing out flaws in his work this would, by Nilges' own
statements, NOT be a kind of bullying.

Yes, that is correct, Peter.

However, in normal academic work, which programming needs to use as a
model for truth, you needed to fulfill three requirements in "C: the
Complete Nonsense":

* You needed to be correct about there being "hundreds" of errors in
Schildt's work which you claimed in the document. However, you only
posted twenty, and this simply didn't prove that there were "hundreds"
unless there's a recursive proof that I missed in ctcn.

* You needed to have standing owing to the seriousness of your
charges, which had the effect of damaging Schildt's good name and
McGraw Hill's business. But in two ways you did not.

At the time and today, you by your own admission have not taken any
computer science course work, and this resulted in real errors of your
own, including your belief that it wasn't proper to use the stack in
explaining how runtime works because the word isn't in a standard
published seven years after Schildt's first edition and four years
after ctcn, as well as your belief that heaps only are used in DOS.

Furthermore, we have new evidence in this newsgroup that you're
incompetent as a programmer. You have consistently posted code
snippets that are wrong, not in the typo sense but of the sort a
competent programmer would not dare post here. For example, you posted
strlen with an off by one error and most recently reversed a sign.
When you make these errors, instead of fixing them, you ask for
charity as one who suffers from ADHD, which we'd be happy to extend
but for your lack of charity towards Schildt or myself.

Most egregiously, you have posted a link to a root file op simulator
of some sort for Linux, which is contradictorily marked as copyright
by Wind River Systems and under GNU public license which contains
newbie errors including uninitialized variables and switch cases which
apparently incorrectly fallthrough without break statements. This, you
say, is the product of two months work.

* You needed to be civil and cautious, and prereview your concerns
with McGraw Hill and Herb, and you by your own admission failed to do
so, because you were not able to extort a large sum of money from
McGraw Hill. This is in my experience at Princeton the norm for
academic discourse which the best programmers take as their model to
avoid savage scenes such as the norm here.
 
T

Tim Rentsch

Ben Bacarisse said:
Dr Malcolm McLean said:
~TRUTH == FALSITY;

!FALSITY != TRUTH and !!TRUTH != TRUTH. There is no reason to favour
the action of ~ over that of !. In fact there are good reasons *not*
to favour it. For example, your claim (~TRUTH == FALSITY) is not the
case in two out of the three valid number representations that C
permits.
also, if booleans are one bit, a set bit is -1 in two's complement
notation.

There is no reason to assume that one bit Booleans are signed rather than
unsigned. [snip]

Indeed, C99 explicitly makes its boolean type, _Bool, an unsigned type.
 
D

Dr Malcolm McLean

!FALSITY != TRUTH and !!TRUTH != TRUTH.  There is no reason to favour
the action of ~ over that of !.  In fact there are good reasons *not*
to favour it.  For example, your claim (~TRUTH == FALSITY) is not the
case in two out of the three valid number representations that C
permits.
There is no reason to assume that one bit Booleans are signed rather than
unsigned.  [snip]

Indeed, C99 explicitly makes its boolean type, _Bool, an unsigned type.- Hide quoted text -
Which introduces an inconsistency in the language.

signed bool -> 0 or -1
unsigned bool -> 0 or 1
bool -> signed bool

would be rules consistent with the other types.
 
B

Ben Bacarisse

Dr Malcolm McLean said:
Ben Bacarisse said:
Dr Malcolm McLean <[email protected]> writes:
On 20 Mar, 22:16, "Morris Keesan" <[email protected]> wrote:
What's the point of defining TRUTH as -1, instead of accepting the
language-defined truth value of 1,
~TRUTH == FALSITY;
!FALSITY != TRUTH and !!TRUTH != TRUTH.  There is no reason to favour
the action of ~ over that of !.  In fact there are good reasons *not*
to favour it.  For example, your claim (~TRUTH == FALSITY) is not the
case in two out of the three valid number representations that C
permits.
also, if booleans are one bit, a set bit is -1 in two's complement
notation.
There is no reason to assume that one bit Booleans are signed rather than
unsigned.  [snip]

Indeed, C99 explicitly makes its boolean type, _Bool, an unsigned
type.
Which introduces an inconsistency in the language.

signed bool -> 0 or -1

or 0 and -0 for sign-and-magnitude numbers and 0 and 0 for one's
complement (if you take C's definitions literally). In C, a signed
single bit is a very bad idea.
unsigned bool -> 0 or 1
bool -> signed bool

would be rules consistent with the other types.

That would be inconsistent with char.
 
K

Keith Thompson

Dr Malcolm McLean said:
Ben Bacarisse said:
Dr Malcolm McLean <[email protected]> writes:
On 20 Mar, 22:16, "Morris Keesan" <[email protected]> wrote:
What's the point of defining TRUTH as -1, instead of accepting the
language-defined truth value of 1,
~TRUTH == FALSITY;
!FALSITY != TRUTH and !!TRUTH != TRUTH.  There is no reason to favour
the action of ~ over that of !.  In fact there are good reasons *not*
to favour it.  For example, your claim (~TRUTH == FALSITY) is not the
case in two out of the three valid number representations that C
permits.
also, if booleans are one bit, a set bit is -1 in two's complement
notation.
There is no reason to assume that one bit Booleans are signed rather than
unsigned.  [snip]

Indeed, C99 explicitly makes its boolean type, _Bool, an unsigned type.
Which introduces an inconsistency in the language.

signed bool -> 0 or -1
unsigned bool -> 0 or 1
bool -> signed bool

would be rules consistent with the other types.

char is already inconsistent with the other integer types, in that
plain char may be either signed or unsigned and is distinct from
both signed char and unsigned char.

But even if it's an inconsistency, so what? _Bool is intended only
to hold the values 0 and 1. The conversion rules make it difficult
to store any other value in a _Bool object. How is the inconsistency
a problem, and how would the ability to declare "signed bool" or
"unsigned bool" be helpful?

"A foolish consistency is the hobgoblin of little minds" -- Emerson
 
T

Tim Rentsch

Dr Malcolm McLean said:
Ben Bacarisse said:
Dr Malcolm McLean <[email protected]> writes:
On 20 Mar, 22:16, "Morris Keesan" <[email protected]> wrote:
What's the point of defining TRUTH as -1, instead of accepting the
language-defined truth value of 1,
~TRUTH == FALSITY;
!FALSITY != TRUTH and !!TRUTH != TRUTH.  There is no reason to favour
the action of ~ over that of !.  In fact there are good reasons *not*
to favour it.  For example, your claim (~TRUTH == FALSITY) is not the
case in two out of the three valid number representations that C
permits.
also, if booleans are one bit, a set bit is -1 in two's complement
notation.
There is no reason to assume that one bit Booleans are signed rather than
unsigned.  [snip]

Indeed, C99 explicitly makes its boolean type, _Bool, an unsigned type.- Hide quoted text -
Which introduces an inconsistency in the language.

signed bool -> 0 or -1
unsigned bool -> 0 or 1
bool -> signed bool

would be rules consistent with the other types.

These comments make sense only if the behavior of _Bool were like that
of the other integer types, but it isn't. Storing into a _Bool will
always store either a 0 or a 1; it simply isn't possible to store any
other value because of how conversion to _Bool is defined. There's no
reason to have a signed version of _Bool.

You might want another "boolean" type, let's call it '_Boolean_int',
that behaves the way you suggest. An implementation could define such
a type. But it doesn't make sense to do that for _Bool (and
personally I don't see much value in having a type like _Boolean_int).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top