Sunday, April 4, 2010

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

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

comp.lang.c@googlegroups.com

Today's topics:

* implement stack and queue in C or in asm - 7 messages, 2 authors
http://groups.google.com/group/comp.lang.c/t/42b5b866d80be770?hl=en
* In the Matter of Herb Schildt: a Detailed Analysis of "C: The Complete
Nonsense" - 7 messages, 3 authors
http://groups.google.com/group/comp.lang.c/t/caf17fab4e7d8530?hl=en
* Does pointer arithmetic apply here or should I calculate an offset? - 3
messages, 2 authors
http://groups.google.com/group/comp.lang.c/t/aa6f9ebed8a22417?hl=en
* Personal attacks by moderators in a moderated group are unprofessional - 7
messages, 4 authors
http://groups.google.com/group/comp.lang.c/t/fcaffc6b8db42751?hl=en
* Implementing strstr - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c/t/a3fe05ab352d5774?hl=en

==============================================================================
TOPIC: implement stack and queue in C or in asm
http://groups.google.com/group/comp.lang.c/t/42b5b866d80be770?hl=en
==============================================================================

== 1 of 7 ==
Date: Sat, Apr 3 2010 11:17 pm
From: Dr Malcolm McLean


On 3 Apr, 19:26, "io_x" <a...@b.c.invalid> wrote:
>
> than why stack and queue are seen from all one as
> different data structures?
> there is a push in the tail and a pop in the tail (stack)
> but could be
> a push in the head and a pop in the head too.
>
The obvious way to implement a stack is with a memory buffer which
grows in one direction, either upwards or downwards in memory, and
with a single "top" index or pointer. The obvious way to implement a
queue is with a fixed-size memory buffer which grows from one end and
shrinks from the other, eventually looping back on itself in a circle,
and with "head" and "tail" indices or pointers.
However the details aren't really important. You can implement
both with linked lists, for example. The reason we use the structures
is because of the algorithms. An algorithm that traverse a tree will
naturally use a stack. An algorithm that schedules jobs to be passed
to another process will naturally use a queue.

== 2 of 7 ==
Date: Sun, Apr 4 2010 1:09 am
From: "io_x"

"Dr Malcolm McLean" ha scritto nel messaggio
> The obvious way to implement a stack is with a memory buffer which
> grows in one direction, either upwards or downwards in memory, and
> with a single "top" index or pointer. The obvious way to implement a
> queue is with a fixed-size memory buffer which grows from one end and
> shrinks from the other, eventually looping back on itself in a circle,
> and with "head" and "tail" indices or pointers.
> However the details aren't really important.

the details are important!

> You can implement
> both with linked lists, for example. The reason we use the structures
> is because of the algorithms. An algorithm that traverse a tree will
> naturally use a stack. An algorithm that schedules jobs to be passed
> to another process will naturally use a queue.
>


== 3 of 7 ==
Date: Sun, Apr 4 2010 1:09 am
From: "io_x"

"io_x" <a@b.c.invalid> ha scritto nel messaggio
news:4bb7863e$0$1108$4fafbaef@reader2.news.tin.it...
> Xpost[alt.lang.asm,comp.lang.c,comp.programming]
> Is there anyone that implemented these queue and stack using
> only pointers [no indexes]?
> example for write somewhere in queue tail
> C: *p=a; ++p;
> etc
> or asm:
> mov [edx], eax
> inc edx
> etc
> or
> *r=a|++r
it is easy for me doing some error error:
or asm:
mov [edx], eax
add edx, 4
or
*r=a|r+=4

> I would like to know only
> in your implementation what does should it mean head==tail?

== 4 of 7 ==
Date: Sun, Apr 4 2010 1:29 am
From: Dr Malcolm McLean


On 4 Apr, 09:09, "io_x" <a...@b.c.invalid> wrote:
> "Dr Malcolm McLean"  ha scritto nel messaggio
>
> >     However the details aren't really important.
>
> the details are important!
>
What usually matters is the behaviour and the big O complexity of the
functions. Exactly how they are written is of less importance. Micro-
optimisation can produce very significant speedups, but these vary
from platform to platform, and only make a real difference to the
running time of the program if embedded in a routine which itself
accounts for a large part of the running time of the program - almost
always you find that there is one tight inner loop which dominates
runtime.


== 5 of 7 ==
Date: Sun, Apr 4 2010 1:59 am
From: "io_x"

"Pascal J. Bourguignon" <pjb@informatimago.com> ha scritto nel messaggio
news:7ypr2gnw8z.fsf@informatimago.com...
> "io_x" <a@b.c.invalid> writes:
>
>> Xpost[alt.lang.asm,comp.lang.c,comp.programming]
>>
>> It is two days that i write little functions for handle
>> stack and queue [of 32 bits elements,
>> (pointers or unsigned or int of 32 bit)]
>> and they seems to me very good written etc
>>
>> Is there anyone that implemented these queue and stack using
>> only pointers [no indexes]?
>
> Yes. A lot of implementations use only pointers.
>
>> example for write somewhere in queue tail
>> C: *p=a; ++p;
>> etc
>> or asm:
>> mov [edx], eax
>> inc edx
>> etc
>> or
>> *r=a|++r
>>
>> I would like to know only
>> in your implementation what does should it mean head==tail?
>
> It would mean that the stack, or the queue, is empty.
>
>
>> than why stack and queue are seen from all one as
>> different data structures?
>
> This is because they're different abstract data type.
>
> A stack is defined as:
>
> stack make_stack();
> bool stack_empty(stack s);
> stack stack_push(stack s,int object);
> int stack_pop(stack s);

the functions in C or assembly could be:
%define u32 unsigned
int makestack(u32** s);
int stack_empty(u32* s);
int stack_push_tail(u32* s, u32 object);
int stack_pop_tail(u32* object, u32* s);
int stack_push_head(u32* s, u32 object);
int stack_pop_head(u32* object, u32* s);

where s is the stack, the 90% of the above functions can fail

> with these equations:
>
> stack_empty(make_stack()) == true
> stack_empty(stack_push(s,i)) == false (for all stack s and int i).
> i == stack_pop(stack_push(s,i)) (for all stack s and int i).

so i could define the stack-queue something like
u32 *s;
makestack(&s)!=0 => (stack_empty(s)!=0)
Aw,z e u32 (stack_push_tail(s, w)!=0) => (stack_pop_tail(&z, s)!=0 /\ w==z)
Aw,z e u32 (stack_push_head(s, w)!=0) => (stack_pop_head(&z, s)!=0 /\ w==z)


> The time complexity of all the stack operations is O(1).
> But to access the first element pushed, you have to pop all the others
> (O(n)), while you can get the last element in a single pop (O(1)).

== 6 of 7 ==
Date: Sun, Apr 4 2010 2:00 am
From: "io_x"

"Pascal J. Bourguignon" <pjb@informatimago.com> ha scritto nel messaggio
news:7ypr2gnw8z.fsf@informatimago.com...
> "io_x" <a@b.c.invalid> writes:
>
>> Xpost[alt.lang.asm,comp.lang.c,comp.programming]
>>
>> It is two days that i write little functions for handle
>> stack and queue [of 32 bits elements,
>> (pointers or unsigned or int of 32 bit)]
>> and they seems to me very good written etc
>>
>> Is there anyone that implemented these queue and stack using
>> only pointers [no indexes]?
>
> Yes. A lot of implementations use only pointers.
>
>> example for write somewhere in queue tail
>> C: *p=a; ++p;
>> etc
>> or asm:
>> mov [edx], eax
>> inc edx
>> etc
>> or
>> *r=a|++r
>>
>> I would like to know only
>> in your implementation what does should it mean head==tail?
>
> It would mean that the stack, or the queue, is empty.
>
>
>> than why stack and queue are seen from all one as
>> different data structures?
>
> This is because they're different abstract data type.
>
> A stack is defined as:
>
> stack make_stack();
> bool stack_empty(stack s);
> stack stack_push(stack s,int object);
> int stack_pop(stack s);

the functions in C or assembly could be:
%define u32 unsigned
int makestack(u32** s);
int stack_empty(u32* s);
int stack_push_tail(u32* s, u32 object);
int stack_pop_tail(u32* object, u32* s);
int stack_push_head(u32* s, u32 object);
int stack_pop_head(u32* object, u32* s);

where s is the stack, the 90% of the above functions can fail

> with these equations:
>
> stack_empty(make_stack()) == true
> stack_empty(stack_push(s,i)) == false (for all stack s and int i).
> i == stack_pop(stack_push(s,i)) (for all stack s and int i).

so i could define the stack-queue something like
u32 *s;
makestack(&s)!=0 => (stack_empty(s)!=0)
Aw,z e u32 (stack_push_tail(s, w)!=0) => (stack_pop_tail(&z, s)!=0 /\ w==z)
Aw,z e u32 (stack_push_head(s, w)!=0) => (stack_pop_head(&z, s)!=0 /\ w==z)


> The time complexity of all the stack operations is O(1).
> But to access the first element pushed, you have to pop all the others
> (O(n)), while you can get the last element in a single pop (O(1)).


== 7 of 7 ==
Date: Sun, Apr 4 2010 2:21 am
From: "io_x"

"io_x" <a@b.c.invalid> ha scritto nel messaggio
news:4bb85308$0$826$4fafbaef@reader5.news.tin.it...
> the functions in C or assembly could be:
> %define u32 unsigned
> int makestack(u32** s);
better
int makestack(u32** s, u32 Nelements);

> int stack_empty(u32* s);
> int stack_push_tail(u32* s, u32 object);
> int stack_pop_tail(u32* object, u32* s);
> int stack_push_head(u32* s, u32 object);
> int stack_pop_head(u32* object, u32* s);
>
> where s is the stack, the 90% of the above functions can fail
>
>> with these equations:
>>
>> stack_empty(make_stack()) == true
>> stack_empty(stack_push(s,i)) == false (for all stack s and int i).
>> i == stack_pop(stack_push(s,i)) (for all stack s and int i).
>
> so i could define the stack-queue something like

u32 *s, v;
Av e u32 makestack(&s, v)!=0 => (stack_empty(s, v)!=0)
> Aw,z e u32 (stack_push_tail(s, w)!=0) => (stack_pop_tail(&z, s)!=0 /\ w==z)
> Aw,z e u32 (stack_push_head(s, w)!=0) => (stack_pop_head(&z, s)!=0 /\ w==z)

==============================================================================
TOPIC: In the Matter of Herb Schildt: a Detailed Analysis of "C: The Complete
Nonsense"
http://groups.google.com/group/comp.lang.c/t/caf17fab4e7d8530?hl=en
==============================================================================

== 1 of 7 ==
Date: Sun, Apr 4 2010 12:50 am
From: Richard Heathfield


spinoza1111 wrote:
> On Apr 4, 6:39 am, Richard Heathfield <r...@see.sig.invalid> wrote:
>> [I've snipped a few hundred lines of the usualspinoza1111nonsense.]
>>
>> Your first error is...
>>
>>> an attack on Herb Schildt's first edition of "C: the
>>> Complete Reference" which in becoming the sole source of subsequent
>>> claims that Schildt wrote "bad books", which unfairly damaged his good
>>> name.
>> ...here. It is not the sole source of subsequent claims that Schildt
>> wrote bad books. Other sources include, for example, subsequent editions
>> of "C: The Complete Reference".
>
> This is ridiculous. Perhaps in your country a man can be a witness
> against himself?

Sure, if he wants to. Anyone can prove that they're an idiot, if they
try hard enough.


> I am really glad you're some sort of temporary
> programmer and not in politics, because you'd be a BNP nutcase.

As usual, you're 100% wrong. In this case, you manage to be 100% wrong
four times in a single sentence.

>
>> As for the page being a response to the
>> first edition, ISTR that it is actually based on the third edition
>> (perhaps Seebs would clarify this point?).
>
> I don't think he will, for part of reputation destruction is creating
> confusion.

You're 100% wrong. He posted an article a few hours ago (after I posted
the above) in which he did indeed say that his article was based on the
third edition, which makes you 100% wrong again.


> For example, Peter and others like to retail stories about
> weird coworkers and form hypotheses about what I might do in order to
> pad their case, as Peter, it appears, has padded his resume.

I doubt that very much. Almost certainly he has to trim his CV
mercilessly to keep it down to a reasonable length. I know I do. There
is simply no room for padding.

<snip>


>>> Errata. Seebach was invited to work collegially on the sort of errata
>>> which creeps into computer books when the publishers don't allow the
>>> authors post-PDF control, and he refused. Most of these errors were
>>> fixed in subsequent editions.
>> Please cite the page numbers in those subsequent editions in which these
>> errors were fixed.

[no response from EGN]

Nilges was invited to provide evidence to support his wildly spurious
claim, but he refused.


>>> Page 162
>>> Seebach: "Functions are not of type void; functions are of various
>>> types, called collectively the function types. A function may have a
>>> return of type void, which means that its type is something like
>>> 'function taking (…) and returning void'."
>>> Mr. Snoid is lost in the void. Herb knows very well that to return
>>> "void" is to return nothing and not return anything. Syntactically, in
>>> a way the student needs to know, the type of a void function is
>>> "void".
>> No, a function that returns void has a type that includes "function
>> returning void" (but that isn't the whole story, since the type also
>> includes the parameter information).
>
> Please don't play with words. You're not qualified and you'll cut
> yourself.

Actually, I /am/ qualified to play with words. Odd, that. Even now
you're 100% wrong.

Let me spell it out for you.

typename functionname(parameterlist) means that functionname is a
function that has the type "function taking parameterlist and returning
typename". It does not mean that functionname has the type typename. To
say that it does mean that is, at best, a spurious and ill-considered
shortcut and, at worst, ghastlily wrong.


>
>> <snip>
>>
>>> Page 163
>>> Schildt: "You may also declare main() as void if it does not return a
>>> value."
>>> Seebach: "Specifically untrue. ANSI mandates two declarations for
>>> main, and says that main may have declarations compatible with those.
>>> Both return int."
>>> C was not standardized at the time this book was written, it existed
>>> in several different dialects.
>> The first edition was published in 1987, when the standardisation effort
>> was well under way. Note that it was the ANSI C Standard that formally
>> introduced the type "void" into the language.
>
> ....however, a major part of McGraw Hill's target demographic was not
> using a standard compiler, and nobody was by definition before 1989.

By the time the 3rd edition was published, however, practically
everybody was using a standard-conforming compiler, because all the
compiler writers were working hard on conformance whilst the Standard
was still in development. And it was the 3rd edition on which C:TCN was
based. Note, too, that it was ANSI C that introduced the "void" type
into the language.


> John Nash wasn't using a "standard" compiler in 1992, although after I
> switched him to the Borland compiler, his compiler was "more"
> standard.

ISTR your claiming that he was using Microsoft C prior to your alleged
and probably flawed recommendation that he switch to Borland C. In 1992,
Microsoft's compiler was, I believe, at version 5.00A (or subsequent),
and it most definitely claimed ANSI C conformance.

>
> Therefore, it would have been absurd to publish on "standard C"

On the contrary, it would have been absurd not to.

<snip>

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within


== 2 of 7 ==
Date: Sun, Apr 4 2010 1:15 am
From: Seebs


On 2010-04-04, Richard Heathfield <rjh@see.sig.invalid> wrote:
> spinoza1111 wrote:
>> For example, Peter and others like to retail stories about
>> weird coworkers and form hypotheses about what I might do in order to
>> pad their case, as Peter, it appears, has padded his resume.

> I doubt that very much. Almost certainly he has to trim his CV
> mercilessly to keep it down to a reasonable length. I know I do. There
> is simply no room for padding.

Actually, for once, Nilges is entirely correct (though almost certainly
by coincidence).

I have maintained for some time a padded resume.

http://www.seebs.net/res-p.html

As the parent page says:

I was once told you can't get hired if you don't have a padded
resume. Here's mine.

Example listings:

Apple Computer
Product Tester (1988-present)
* Tested products after shipment.
* Funded company.

As you might expect, literally true...

> Nilges was invited to provide evidence to support his wildly spurious
> claim, but he refused.

Actually, it is the case that several of the errors cited were indeed
corrected in the 4th edition. I don't have any reason to believe that
Nilges has a copy of the 4th edition on which to base his claim, but
he happens to be right.

> typename functionname(parameterlist) means that functionname is a
> function that has the type "function taking parameterlist and returning
> typename". It does not mean that functionname has the type typename. To
> say that it does mean that is, at best, a spurious and ill-considered
> shortcut and, at worst, ghastlily wrong.

Ayup.

>> Therefore, it would have been absurd to publish on "standard C"

> On the contrary, it would have been absurd not to.

We can resolve this easily.

From the front cover of C:TCR 3rd Edition:
The One "Must Have"
Book on C --
A Comprehensive
Desktop Reference
Covers ANSI C

The spine says, in big letters (about the same size as the text "the
complete reference", but written in white-on-red to make it more
visible) "covers ANSI C". The back cover likewise asserts that the
book "Covers ANSI C".

The copyright date is 1995. According to the Preface:
When the second edition [of this book] was prepared, the ANSI C
standard had just been adopted. Today, standard C code is
simply a given. (And, with standardization the promise of truly
portable C code was finally fulfilled.)

The book claims repeatedly to cover, and focus on, ANSI C.

Whether it should or not, or whether it lives up to those claims, are
separate questions. However, as usual, Nilges is utterly and delusionally
wrong -- he has mistaken his own prejudices for those of his idol. In
fact, the C standard had been in widespread use for nearly six years
when the third edition was written.

-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!


== 3 of 7 ==
Date: Sun, Apr 4 2010 2:13 am
From: spinoza1111


On Apr 4, 4:15 pm, Seebs <usenet-nos...@seebs.net> wrote:
> On 2010-04-04, Richard Heathfield <r...@see.sig.invalid> wrote:
>
> >spinoza1111wrote:
> >> For example, Peter and others like  to retail stories about
> >> weird coworkers and form hypotheses about what I might do in order to
> >> pad their case, as Peter, it appears, has padded his resume.
> > I doubt that very much. Almost certainly he has to trim his CV
> > mercilessly to keep it down to a reasonable length. I know I do. There
> > is simply no room for padding.
>
> Actually, for once, Nilges is entirely correct (though almost certainly
> by coincidence).
>
> I have maintained for some time a padded resume.
>
> http://www.seebs.net/res-p.html
>
> As the parent page says:
>
>         I was once told you can't get hired if you don't have a padded
>         resume. Here's mine.
>
> Example listings:
>
>         Apple Computer
>         Product Tester (1988-present)
>         * Tested products after shipment.
>         * Funded company.
>
> As you might expect, literally true...

This is quite a level of dishonesty. You might think you're fucking
around, and were your resume only to damage corporations, I wouldn't
necessarily have a problem with it.

However, people who padded their resumes at Bell-Northern Research
when I was there from 1981 to 1986 had of necessity to backstab
coworkers, such as a highly skilled programmer-manager whose reports
ganged up on her because she not only expected them to be on time, but
to submit structured code (which would not include switch statements
with fallthrough).

Listen, at 40, you need to grow up. You're damaging people and abusing
clc and clcm to pad your resume, and this harms people who are all I
care about. This situation is escalating; I have contacted Apress and
will take further steps as needed. You can END IT at any time by
removing "C: the Complete Nonsense" and replacing it with an apology.
>
> > Nilges was invited to provide evidence to support his wildly spurious
> > claim, but he refused.
>
> Actually, it is the case that several of the errors cited were indeed
> corrected in the 4th edition.  I don't have any reason to believe that
> Nilges has a copy of the 4th edition on which to base his claim, but
> he happens to be right.

Which is all the more reason for you to remove the web page. You need
to redo it for the fourth edition, and this time, we need to see all
of what you claim to be errors. If as you say the page was intended to
be a service to prospective buyers, they need you to do your homework
this time.

Furthermore, your new Web page must be a wiki or blog with open
comments because you simply do not know how to separate your opinions
from facts.

I understand that this is a lot of work. Alternatively, simply post an
apology at the original page site. If the site is pulled and an
apology is posted, I will no longer discuss this issue.

>
> > typename functionname(parameterlist) means that functionname is a
> > function that has the type "function taking parameterlist and returning
> > typename". It does not mean that functionname has the type typename. To
> > say that it does mean that is, at best, a spurious and ill-considered
> > shortcut and, at worst, ghastlily wrong.
>
> Ayup.

Wow, someone who can make an adverb out of ghastly telling Schildt how
to write. Ghastly.
>
> >> Therefore, it would have been absurd to publish on "standard C"
> > On the contrary, it would have been absurd not to.
>
> We can resolve this easily.
>
> From the front cover of C:TCR 3rd Edition:
>         The One "Must Have"
>         Book on C --
>         A Comprehensive
>         Desktop Reference
>         Covers ANSI C
>
> The spine says, in big letters (about the same size as the text "the
> complete reference", but written in white-on-red to make it more
> visible) "covers ANSI C".  The back cover likewise asserts that the
> book "Covers ANSI C".
>
> The copyright date is 1995.  According to the Preface:
>         When the second edition [of this book] was prepared, the ANSI C
>         standard had just been adopted.  Today, standard C code is
>         simply a given.  (And, with standardization the promise of truly
>         portable C code was finally fulfilled.)
>
> The book claims repeatedly to cover, and focus on, ANSI C.
>
> Whether it should or not, or whether it lives up to those claims, are
> separate questions.  However, as usual, Nilges is utterly and delusionally
> wrong -- he has mistaken his own prejudices for those of his idol.  In
> fact, the C standard had been in widespread use for nearly six years
> when the third edition was written.

The book jacket was not under Herb's control, and it means partial
coverage because in 1995 C existed (and it exists today) in multiple
dialects.

You don't understand how a proper standard would work. It would not
have introduced "sequence points" nor would it have left actual
parameter evaluation undefined because then the standard is as a non-
deterministic finite automaton with respect to a DFA. Interesting from
a theoretical viewpoint but useless in practice.

It's like taking the mathematical union of English and Chinese such
that your language is "the set of all statements valid in English or
Chinese". This would be called "Chinglish" but for the fact that that
already names a creole with the vocabulary of English and the grammar
of Chinese. It's a useless definition in practice, a mathematical
stunt valid only in formal language theory.

I have no brief here for McGraw Hill's marketers who stamped "ansi" on
a lot of books to sell them, without getting author feedback, any more
for the treatment of authors by such companies and SAMS, which jailed
a friend of mine for setting up a critical web site. The issue is the
personal harm to Schildt, his reputation, and his family.
>
> -s
> --
> Copyright 2010, all wrongs reversed.  Peter Seebach / usenet-nos...@seebs.nethttp://www.seebs.net/log/<-- lawsuits, religion, and funny pictureshttp://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!

== 4 of 7 ==
Date: Sun, Apr 4 2010 2:14 am
From: spinoza1111


On Apr 4, 12:54 pm, Seebs <usenet-nos...@seebs.net> wrote:
> On 2010-04-04,spinoza1111<spinoza1...@yahoo.com> wrote:
>
> > On Apr 4, 6:39?am, Richard Heathfield <r...@see.sig.invalid> wrote:
> >> As for the page being a response to the
> >> first edition, ISTR that it is actually based on the third edition
> >> (perhaps Seebs would clarify this point?).
> > I don't think he will, for part of reputation destruction is creating
> > confusion.
>
> Which is funny, because I already posted a clear answer to that question
> some hours ago.  It is indeed based on the third edition.  The second
> had more errors, and I have never seen the first, but I've been told it
> was even worse.

Lack of diligence+malice+harm == libel.
>
> -s
> --
> Copyright 2010, all wrongs reversed.  Peter Seebach / usenet-nos...@seebs.nethttp://www.seebs.net/log/<-- lawsuits, religion, and funny pictureshttp://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!

== 5 of 7 ==
Date: Sun, Apr 4 2010 3:01 am
From: spinoza1111


On Apr 4, 4:15 pm, Seebs <usenet-nos...@seebs.net> wrote:
> On 2010-04-04, Richard Heathfield <r...@see.sig.invalid> wrote:
>
> > spinoza1111 wrote:
> >> For example, Peter and others like  to retail stories about
> >> weird coworkers and form hypotheses about what I might do in order to
> >> pad their case, as Peter, it appears, has padded his resume.
> > I doubt that very much. Almost certainly he has to trim his CV
> > mercilessly to keep it down to a reasonable length. I know I do. There
> > is simply no room for padding.
>
> Actually, for once, Nilges is entirely correct (though almost certainly
> by coincidence).
>
> I have maintained for some time a padded resume.
>
> http://www.seebs.net/res-p.html
>
> As the parent page says:
>
>         I was once told you can't get hired if you don't have a padded
>         resume. Here's mine.
>
> Example listings:
>
>         Apple Computer
>         Product Tester (1988-present)
>         * Tested products after shipment.
>         * Funded company.
>
> As you might expect, literally true...

Hmm:

* It's OK for you to so obviously pad. I mean, ha ha, we all "get"
it: you've bought and used Apple computers and you've bought stock.
All of us in the in-group grok it.

* But it's also OK for you to waste, not the time of corporations (I
don't give a fuck about corporations) but of HR people who are
punished for not finding enough candidates...who don't walk in like
you would walk in I'd hasard, in a dirty T-shirt, to fail a simple
(but o so flawed in your superior mind) test in C.

* It's also OK for you on the job to cover up for your lack of
programming skill to backstab coworkers.

OK, so my fat pal Adorno is off-topic. Jaron Lanier is a modern
computer scientist, and he charges clowns like you with a completely
exaggerated notion of your intellects coupled with what he calls the
ideology of VIOLATION.

What is the "ideology of violation"?

It is the belief of people who are, or in your case think they are, of
such "superior intellect" that they can play tricks on people who are
(often for racist reasons) considered by them to be of "inferior
intellect".

Jig's up, ASSHOLE. This situation is escalating. End.it.now. Remove
CTCN and post an apology for the harm you have done.
>
> > Nilges was invited to provide evidence to support his wildly spurious
> > claim, but he refused.
>
> Actually, it is the case that several of the errors cited were indeed
> corrected in the 4th edition.  I don't have any reason to believe that
> Nilges has a copy of the 4th edition on which to base his claim, but
> he happens to be right.
>
> > typename functionname(parameterlist) means that functionname is a
> > function that has the type "function taking parameterlist and returning
> > typename". It does not mean that functionname has the type typename. To
> > say that it does mean that is, at best, a spurious and ill-considered
> > shortcut and, at worst, ghastlily wrong.
>
> Ayup.
>
> >> Therefore, it would have been absurd to publish on "standard C"
> > On the contrary, it would have been absurd not to.
>
> We can resolve this easily.
>
> From the front cover of C:TCR 3rd Edition:
>         The One "Must Have"
>         Book on C --
>         A Comprehensive
>         Desktop Reference
>         Covers ANSI C
>
> The spine says, in big letters (about the same size as the text "the
> complete reference", but written in white-on-red to make it more
> visible) "covers ANSI C".  The back cover likewise asserts that the
> book "Covers ANSI C".
>
> The copyright date is 1995.  According to the Preface:
>         When the second edition [of this book] was prepared, the ANSI C
>         standard had just been adopted.  Today, standard C code is
>         simply a given.  (And, with standardization the promise of truly
>         portable C code was finally fulfilled.)
>
> The book claims repeatedly to cover, and focus on, ANSI C.
>
> Whether it should or not, or whether it lives up to those claims, are
> separate questions.  However, as usual, Nilges is utterly and delusionally
> wrong -- he has mistaken his own prejudices for those of his idol.  In
> fact, the C standard had been in widespread use for nearly six years
> when the third edition was written.
>
> -s
> --
> Copyright 2010, all wrongs reversed.  Peter Seebach / usenet-nos...@seebs.nethttp://www.seebs.net/log/<-- lawsuits, religion, and funny pictureshttp://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!

== 6 of 7 ==
Date: Sun, Apr 4 2010 5:05 am
From: spinoza1111


On Apr 4, 6:01 pm, spinoza1111 <spinoza1...@yahoo.com> wrote:
> On Apr 4, 4:15 pm, Seebs <usenet-nos...@seebs.net> wrote:

This matter has become very time consuming, perhaps for all concerned.
Therefore, unilaterally, I'm going to declare a temporary "cease fire"
in order for people to have time to study my document and let cooler
heads prevail.

I will stop posting and reading until Sunday 11 April China time.

I still propose that Peter Seebach undertake to remove "C: the
Complete Nonsense" based on its lack of valid and sufficient content
in proportion to the damage it has done, and to replace it with an
apology for the considerable misunderstanding it has created. I waive
his having to apologize to me for the considerable harm he has done
me.

If Seebach undertakes to do both before 11 April, I would appreciate
his notifying me of this decision and undertaking by email to
spinoza1111@yahoo.com.

If this is not done, I will have to continue this matter, with
escalation to the next level.

Edward G. Nilges


== 7 of 7 ==
Date: Sun, Apr 4 2010 6:13 am
From: Richard Heathfield


spinoza1111 wrote:
> On Apr 4, 6:01 pm, spinoza1111 <spinoza1...@yahoo.com> wrote:
>> On Apr 4, 4:15 pm, Seebs <usenet-nos...@seebs.net> wrote:
>
> This matter has become very time consuming, perhaps for all concerned.

Not for me. It took me a couple of hours last night to catch up with
about 400 clc articles posted over this last week or so, and a few
minutes to reply to a few of them.

> Therefore, unilaterally, I'm going to declare a temporary "cease fire"

You're not supposed to be shooting in the first place, bozo - you're
supposed to be learning.

> in order for people to have time to study my document

I don't see why anyone would want to do that. It's nonsense, and a waste
of time.

> I will stop posting and reading until Sunday 11 April China time.

I doubt that very much.

<nonsense snipped>


--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within

==============================================================================
TOPIC: Does pointer arithmetic apply here or should I calculate an offset?
http://groups.google.com/group/comp.lang.c/t/aa6f9ebed8a22417?hl=en
==============================================================================

== 1 of 3 ==
Date: Sun, Apr 4 2010 12:29 am
From: markhobley@hotpop.donottypethisbit.com (Mark Hobley)


Seebs <usenet-nospam@seebs.net> wrote:
> No.
>
> And the solution is, DON'T DO THAT.
>
> Because it may be misaligned for the data.
>
> In short: Don't use a pointer to your table to hold a pointer that
> isn't actually to your table.
>

Ok. I have noted your comments and will look at this again, when a situation
for this exists. Thanks.

Mark.

--
Mark Hobley
Linux User: #370818 http://markhobley.yi.org/

== 2 of 3 ==
Date: Sun, Apr 4 2010 12:21 am
From: markhobley@hotpop.donottypethisbit.com (Mark Hobley)


Seebs <usenet-nospam@seebs.net> wrote:

> struct buffer;

I would tend to use buffer as the variable name.

struct bufstru buffer;

So I would then refer to buffer.parm for one of its parameters.

I presume here that structure names and variables cannot be the same here.
I can't have struct buffer buffer can I?

> struct buffer *<name>;
>
> where "<name>" has to do with the actual purpose for which the
> set of buffers is being used.

This is going to be part of a library of dynamic buffer allocation routines.
These are general purpose as far as this project is concerned.

It turns out that I will be writing a string handler for manipulating
pathnames that will utilize this library, but that is a separate project.

> I would NEVER label a tag "stru" or "struc" or anything. That it's
> a structure is either obvious or irrelevant.

What would you have called the pointer by the way?
Is is also obvious or irrelevant that it is a pointer?

Mark.

--
Mark Hobley
Linux User: #370818 http://markhobley.yi.org/

== 3 of 3 ==
Date: Sun, Apr 4 2010 1:25 am
From: Seebs


On 2010-04-04, Mark Hobley <markhobley@hotpop.donottypethisbit.com> wrote:
>> struct buffer;

> I presume here that structure names and variables cannot be the same here.
> I can't have struct buffer buffer can I?

Sure. Why not? Tags and types are in their own namespace. The reason
you can't have "int int;" is that int is a magical token, rather than
a defined name; it's not that you can't in general have objects whose
names are the same as the name of a type.

Especially in the absence of a typedef, the mere fact that you're
writing "struct <structname>" means that you never need to point out
that the type is a structure. If you do something like
typedef struct buffer buffer_t;
then it is possible for someone not to know it's a structure, but
usually it doesn't matter -- either you're writing the buffer management
code, and you are obviously aware of what you're working on, or you're
writing code which uses the API, and you don't need to know what a
buffer_t is, only what it does.

>> I would NEVER label a tag "stru" or "struc" or anything. That it's
>> a structure is either obvious or irrelevant.

> What would you have called the pointer by the way?
> Is is also obvious or irrelevant that it is a pointer?

Generally, I give them names which make it clear what they point to, and
yes, it's obvious that it's a pointer. You're using -> on it, so of
course it's a pointer.

So, for instance:

void free_buf(struct buffer *b) {
free(b->data);
free(b);
}

struct buffer *new_buf(char *data, size_t len) {
struct buffer *newbuf;
newbuf = malloc(sizeof(*newbuf));
if (newbuf) {
newbuf->data = malloc(len);
if (!newbuf->data) {
free(newbuf);
return 0;
}
memcpy(newbuf->data, data, len);
}
return newbuf;
}

int
read_input(void) {
struct buffer *line = readbuf(stdin);
...
}

As long as the name tells you the purpose of the variable, the mechanical
type is usually either irrelevant or obvious. Not always true, but
more often than you might think.

-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: Personal attacks by moderators in a moderated group are unprofessional
http://groups.google.com/group/comp.lang.c/t/fcaffc6b8db42751?hl=en
==============================================================================

== 1 of 7 ==
Date: Sun, Apr 4 2010 1:43 am
From: Dr Malcolm McLean


On 3 Apr, 14:44, Julienne Walker <happyfro...@hotmail.com> wrote:
> On Apr 3, 1:01 am, spinoza1111 <spinoza1...@yahoo.com> wrote:
>
> > So that's funny? How about blonde jokes? Women driver jokes?
>
> If they're good jokes, yes. I'm not so full of myself that I can't
> appreciate a joke at my expense.
>
OK, what's the difference between a blonde and a brunette fucntion in
C?

The brunette function accepts parameters.
The blonde tries to take a structure.

== 2 of 7 ==
Date: Sun, Apr 4 2010 1:47 am
From: Dr Malcolm McLean


On 4 Apr, 09:43, Dr Malcolm McLean <malcolm.mcle...@btinternet.com>
wrote:
> On 3 Apr, 14:44, Julienne Walker <happyfro...@hotmail.com> wrote:> On Apr 3, 1:01 am, spinoza1111 <spinoza1...@yahoo.com> wrote:
>
> > > So that's funny? How about blonde jokes? Women driver jokes?
>
> > If they're good jokes, yes. I'm not so full of myself that I can't
> > appreciate a joke at my expense.
>
> OK, what's the difference between a blonde and a brunette fucntion in
> C?
>
> The brunette function accepts parameters.
> The blonde tries to take a structure.
>
Why did the C variable turn away from the blonde and turn to the
brunette?
It was a character pointer.


== 3 of 7 ==
Date: Sun, Apr 4 2010 2:09 am
From: Dr Malcolm McLean


On 4 Apr, 09:47, Dr Malcolm McLean
Why was the blonde programmer on her mobile phone?
She was told to call printf().


== 4 of 7 ==
Date: Sun, Apr 4 2010 2:23 am
From: spinoza1111


On Apr 4, 4:32 am, Seebs <usenet-nos...@seebs.net> wrote:
> On 2010-04-03, Julienne Walker <happyfro...@hotmail.com> wrote:
>
> > *I* think you should butt out of their business. It's not your place
> > to provide unsolicited "self-defense" for others, and I strongly doubt
> > Schildt would approve of how you're doing it.
>
> Nilges has in the past suggested that Schildt approves, though I have
> no idea how much weight to place on that.
>
> > Fortunately, he has no
> > need to worry about your dragging his good name through the mud by
> > bringing up old embarrassments. The chances of anyone who might
> > escalate the damage reading your posts (and blogs) are vanishingly
> > small.
>
> I suspect that people do indeed read them sometimes -- I myself had
> been underestimating how famous Nilges was among people who have been
> reading Usenet for a long time.  However, I think the chances of anyone
> *taking them seriously* are indeed vanishingly small.

Peter, as a result of mere posting on usenet, I was invited to
participate at a Princeton University Press online discussion, I was
invited to contribute to the essay track at the 2005 ACM meeting, and
I was hired at at least one job. I did not in the end contribute to
the essay track owing to lack of funds to travel.

There is an urban legend that I'm "crazy". Recently, at work, a
manager posted a surreptitious photograph on a public blog of a
coworker with a very demeaning comment, and I complained to her
manager. Her defense was that I'd been "thrown out" of a local
placeblog; I'd not been, I'd left in disgust at the behavior of other
moderators besides myself (who was a moderator). The result? She was
disciplined and company rules about this behavior were clarified.

In these Internet "crusades", I've learned to define goals to at least
try to avoid wasting my time on going back and forth here. My goal
here is simple. You need to remove "C: the Complete Nonsense" and post
an apology.
>
> I don't imagine that there's any chance of Schildt or McGraw-Hill suing
> me over that page.
>
> -s
> --
> Copyright 2010, all wrongs reversed.  Peter Seebach / usenet-nos...@seebs.nethttp://www.seebs.net/log/<-- lawsuits, religion, and funny pictureshttp://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!

== 5 of 7 ==
Date: Sun, Apr 4 2010 2:28 am
From: spinoza1111


On Apr 4, 4:22 am, Julienne Walker <happyfro...@hotmail.com> wrote:
> On Apr 3, 2:49 pm, spinoza1111 <spinoza1...@yahoo.com> wrote:
>
> > On Apr 3, 9:44 pm, Julienne Walker <happyfro...@hotmail.com> wrote:
>
> <snip the usual time vampire of a post from a self important asshole>
>
> > > > So that's funny? How about blonde jokes? Women driver jokes?
>
> > > If they're good jokes, yes. I'm not so full of myself that I can't
> > > appreciate a joke at my expense.
>
> > We are beyond joking, kiddo. I think McGraw Hill and Schildt should
> > sue Seebach.
>
> *I* think you should butt out of their business. It's not your place
> to provide unsolicited "self-defense" for others, and I strongly doubt
> Schildt would approve of how you're doing it. Fortunately, he has no
> need to worry about your dragging his good name through the mud by
> bringing up old embarrassments. The chances of anyone who might
> escalate the damage reading your posts (and blogs) are vanishingly
> small.

In ways that shall remain confidential, I did check, after getting the
wikipedia biography to conform to wikipedia's "biographies of living
persons" policies, whether interested parties on the other side of
this issue cared either way about my participation. I received their
approval. It's none of YOUR business how this was done, but as long
ago as early 2009, I was concerned about re-opening old wounds and I
took steps accordingly.

Today, I sent an email to those parties reaffirming that if any time
they would like me to desist, I will do so.

I've already addressed this issue, several times, and at this point,
you're nothing more than a cybernetic mob member, and a bitch,
screaming imprecations at the Chosen One.

== 6 of 7 ==
Date: Sun, Apr 4 2010 3:15 am
From: Ian Collins


On 04/ 4/10 05:50 AM, Seebs wrote:
>
> I will state for the record that I have no interest at all in trying
> to "destroy" Nilges, or undermine his credibility, or anything else.

What credibility?

--
Ian Collins


== 7 of 7 ==
Date: Sun, Apr 4 2010 3:28 am
From: Qwertyioup


On Sun, 4 Apr 2010 02:23:36 -0700 (PDT), spinoza1111
<spinoza1111@yahoo.com> wrote:


>There is an urban legend that I'm "crazy". Recently, at work, a
>manager posted a surreptitious photograph on a public blog of a
>coworker with a very demeaning comment, and I complained to her
>manager. Her defense was that I'd been "thrown out" of a local
>placeblog; I'd not been, I'd left in disgust at the behavior of other
>moderators besides myself (who was a moderator). The result? She was
>disciplined and company rules about this behavior were clarified.

Just for the record, you certainly WERE thrown out of the Lamma forum.
You may have threatened to leave, as you periodically do in this and
every other forum or newsgroup, but as always you expected to come
back a few days later and continue as if nothing had happened. But
though you asked over and over to be allowed back, you were refused.

I assume that you were telling people the fairy tale version, as you
outline above, and they checked up, as the posts are still online,
and found you were lying.

I've looked at your blog, by the way.
Sad how not only your ex-wife, but your sons and you sister all refuse
to have anything to do with you because of your behaviour. Of course
you've learned nothing; still sure that everyone else is wrong and
conspiring against you.

So someone made a "demeaning comment" at work and instead of working
it out you escalated that and got her in trouble. Well done. No doubt
in a short time you'll be railing about the fascists at your current
workplace who forced you out for "telling the truth to power" or
whatever self-aggrandising bullshit you make up to explain that you
were let go for being a complete asshole. Because it is clear that
you can't function in any work, family or social group unless everyone
defers to you.

Well, it's been great to catch up with you. Maybe I'll be back in a
few months or next year to see you explain how you "left your job in
disgust at your colleagues' behaviour".


==============================================================================
TOPIC: Implementing strstr
http://groups.google.com/group/comp.lang.c/t/a3fe05ab352d5774?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Apr 4 2010 5:54 am
From: Josh Holland


I really shouldn't reply, but I just have to.

On 2010-04-03, spinoza1111 <spinoza1111@yahoo.com> wrote:
[snip]
> 15. "But nor is it required"? A completely illiterate grammatical
> solecism. How dare you pretend to be his tech editor? You were offered
> a job finding errors. You found a few. Which means you're a
> pretentious dweeb.
>
> And furthermore, C should reject all-caps: it would do so if it were a
> truly consistent language. But it as a real language in practice it
> allows them because of Microsoft's market power. Get used to it.

Firstly, saying "C should reject all-caps" is irrelevant, as there is no
reference implementation for C, as there is for C# or Python (say). For
that matter, the closest thing to a reference implementation on Un*x
platforms, gcc, does reject all caps.

$ cat caps.c
#include <STDIO.H>

int main(int argc, char *argv[])
{
printf("Hello world!\n");
return 0;
}
$ gcc -Wall -Wextra -ansi -pedantic caps.c
caps.c:1:19: error: STDIO.H: No such file or directory
cc1: warnings being treated as errors
caps.c: In function 'main':
caps.c:5: error: implicit declaration of function 'printf'
caps.c:5: error: incompatible implicit declaration of built-in function
'printf'
caps.c:3: error: unused parameter 'argc'
caps.c:3: error: unused parameter 'argv'
$

--
Josh "dutchie" Holland <jrh@joshh.co.uk>
http://www.joshh.co.uk/
http://twitter.com/jshholland
http://identi.ca/jshholland


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

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