Re: Seeking computer-programming job (Sunnyvale, CA)

R

rwanderley

Moi said:
Well, to me this whole thread proves that VLA's were a bad invention
after all.
* They serve no purpose (since they are forbidden inside structs, there
will still be a need for 'struct hacks')
* they change the semantics of sizeof
* they drive people to a condition that is close to insanity.
* they cause grown up man to cry and start eating babies.
* they accelerate the decline of usenet.

IMHO, VLA's have 'designed by committee' written all over them.
lol


HTH,
AvK
 
B

Ben Bacarisse

Richard, Willem, et al: Is this comp.programming, or comp.bedlam? And if the
latter, what does that make us?

[...] In the 18th century people used to
go to Bedlam to stare at the lunatics. For a penny one could peer into their
cells, view the freaks of the "show of Bethlehem" and laugh at their antics,
generally of a sexual nature or violent fights. Entry was free on the first
Tuesday of the month. Visitors were permitted to bring long sticks with
which to poke and enrage the inmates. [...]"

http://en.wikipedia.org/wiki/Bethlem_Royal_Hospital

I take your point, but I disagree. SMR's behaviour is consistent with
his being of entirely sound mind. In fact the technique he is using
is standard practise for some publicists, lobbyists and PR firms these
days. I suspect it is also quite effective. The small technical
error he made that started this whole thing is now buried in a snow
storm of personal accusations, out-of-context quotes and what could
most charitably be called "editorialised" messages.

I agree with what I assume is your main point: that replying is not a
good idea. Not because replies are like the sticks in your quote, but
because every reply (no doubt including this one!) is just a hook on
which hang another editorial comment.
 
P

Paul Donnelly

Richard Heathfield said:
Ben Bacarisse said:



The first small technical error he made (which received a polite
response, no matter what he make think) can be exhumed using this


Well, nobody can take the shovel away from him, so I suppose he'll
keep digging his hole.

You could at least take away the earth he's digging in.
 
B

Bruce C. Baker

[...]
I take your point, but I disagree. SMR's behaviour is consistent with
his being of entirely sound mind. In fact the technique he is using
is standard practise for some publicists, lobbyists and PR firms these
days. I suspect it is also quite effective. The small technical
error he made that started this whole thing is now buried in a snow
storm of personal accusations, out-of-context quotes and what could
most charitably be called "editorialised" messages.

I agree with what I assume is your main point: that replying is not a
good idea. Not because replies are like the sticks in your quote, but
because every reply (no doubt including this one!) is just a hook on
which hang another editorial comment.

Replying to SMR sure seems like aiding and abetting either his technique or
his lunacy, will not advance the discussion, and certainly does no credit to
any of the parties involved. It smacks of bear-baiting.
 
L

luserXtrog

Richard Heathfield said:







I suppose I'd better say it before he does - there is ONE exception
to (1), the VLA thing, and of course that exception doesn't apply
to struct tm anyway so is of no consequence in this discussion.

Please correct any errors in the following coda.

Given the following C99 function,

int oogabooga (int n) {
int vla[n];
return sizeof *vla;
}

The length of the array (variable here, but the same otherwise)
has no bearing upon the value of the expression (sizeof *vla)
as only a single element is referenced. The return value of
this function is therefore a compile-time constant, requiring
0 run-time to compute. As it's such a small number, on all
but the strangest machines it could be an immediate operand
embedded into the machine instruction.

In this nasty

int booger (int n) {
int vla[n];
return sizeof vla;
}

The size of an individual element is known at compile time,
and the size of the whole array is therefore merely n * how-
big-an-int-may-be. Surely the compiler would use a multiplication
or shift instruction. Nothing to dereference. No "evaluation".

In lisp parlance, I believe one would say the operands of
sizeof are implicitly quoted.

With normal, compiled, C, sizeof doesn't actually *do* anything.
It's merely an arithmetic shorthand for a compile-time constant
or (in the one exception) a multiplication.

IMO FWIW HTH YMMV IIRC AMEN
 
B

Ben Bacarisse

luserXtrog said:
Please correct any errors in the following coda.

Given the following C99 function,

int oogabooga (int n) {
int vla[n];
return sizeof *vla;
}

The length of the array (variable here, but the same otherwise)
has no bearing upon the value of the expression (sizeof *vla)
as only a single element is referenced. The return value of
this function is therefore a compile-time constant, requiring
0 run-time to compute. As it's such a small number, on all
but the strangest machines it could be an immediate operand
embedded into the machine instruction.

Yes, there is no evaluation and no dereference because the argument to
sizeof is not a VLA.
In this nasty

int booger (int n) {
int vla[n];
return sizeof vla;
}

The size of an individual element is known at compile time,
and the size of the whole array is therefore merely n * how-
big-an-int-may-be. Surely the compiler would use a multiplication
or shift instruction. Nothing to dereference. No "evaluation".

There is evaluation but no dereference. There is no dereference
because there is no * operator, but there is evaluation. The
evaluation of the operand simply involves yielding the array as the
result. Any multiplication that might be needed is not part of the
evaluation of the operand -- it is part of what sizeof has to do.
Evaluating the operand is so simple that the compiler probably
generates no code for it at all. The evaluation is there because the
standard says it is there. It's effect can be optimised away.

A more subtle case:

void f(int n, bool null)
{
int vla[n];
int (*vlap)[n] = null ? NULL : &vla;
printf("%zu\n", sizeof *vlap);
}

f(10, false) prints 10 * sizeof(int) and is well-defined. What about
f(10, true)? The type of the operand of sizeof is a VLA type so the
operand is evaluated and I think that second call is UB. I am not
sure why things are defined this way; I can't think of a case where
the evaluation is needed for sizeof to do its job, but that does not
mean there is not such case or no such implementation.
In lisp parlance, I believe one would say the operands of
sizeof are implicitly quoted.

Except when the type is a VLA type.
With normal, compiled, C, sizeof doesn't actually *do* anything.
It's merely an arithmetic shorthand for a compile-time constant
or (in the one exception) a multiplication.

I am not sure why you want to say this. It reads to me as "sizeof
does not need to do anything except when it has to so something" :)
 
L

luserXtrog

I am not sure why you want to say this.  It reads to me as "sizeof
does not need to do anything except when it has to so something" :)

It was an attempt to reiterate the compile-time/run-time distinction.
I was trying to be more insistent that sizeof has access to all its
information at compile-time (with the exception that variable sizes
have to be scaled at run-time) such that sizeof need not have any
real *presense* in the executable image. Its behavior is to yield
a value, but that value can be obtained by the running program
without "performing its 'sizeof' operation and propagating that
value down to a parent frame". [This is not a quotation: imagine
I'm waving two fingers on each hand up and down in the air to
simulate these quotation marks.]

I feel like I'm trying to convey something significant and important
but I fear i am failing and that I may not be up to the challenge.

I may even be wrong.
 
T

Thomas A. Russ

[Post targets trimmed, replies trimmed even more]

Seamus MacRae said:
I said personal criticisms, not disagreement. In particular,
disagreement is fine if phrased in such a way as to allow for the
possibility that I'm not wrong.

But you ARE often wrong. And I find it quite refreshing when posts
specifically and directly say that. Certainly in the co-called "lisp
vs. Java" thread you often posted objectively false information based on
a fundamental technical ignorance of what you were describing. So those
were cases where you were flat-out wrong. So why should we suppress the
facts?
 
B

Ben Bacarisse

luserXtrog said:
I am not sure why you want to say this.  It reads to me as "sizeof
does not need to do anything except when it has to so something" :)

It was an attempt to reiterate the compile-time/run-time distinction.
I was trying to be more insistent that sizeof has access to all its
information at compile-time (with the exception that variable sizes
have to be scaled at run-time) such that sizeof need not have any
real *presense* in the executable image. Its behavior is to yield
a value, but that value can be obtained by the running program
without "performing its 'sizeof' operation and propagating that
value down to a parent frame". [This is not a quotation: imagine
I'm waving two fingers on each hand up and down in the air to
simulate these quotation marks.]

I feel like I'm trying to convey something significant and important
but I fear i am failing and that I may not be up to the challenge.

I may even be wrong.

Do you think there is a substantive difference between:

size_t f(int n) { int tmp[n]; return sizeof tmp; }

and

size_t g(int n) { return n * sizeof(int); }

? Both need to access n and do a multiplication at run-time. I am
not sure the distinction you are making is a good one.

[It may soon be time to trim the groups to comp.programming. There
have been no complaints for the good folk in the two language specific
groups but they can't be that interested. I am never sure when the
best time to trim groups or set followup-to is.]
 
B

Bruce C. Baker

Seamus MacRae said:
Richard said:
Seamus MacRae said:

Well, who'd have thunk it?

Apparently you didn't.
[calls me an idiot]

No, you're the idiot, remember?
Yes, I do have that right

No, you don't. It's called defamation. Google it.
You might want to read up on defamation law.

[calls me a liar]

No, really. Google it if you don't believe me.

P.S. No, you're the liar, remember?

Seamus, if you had half a brain, you'd declare victory and move on. Ditto
for the rest of you.
 
W

Willem

Notice: I have now also pointed followups (however, I pointed them to an
existing newsgroup). Let's see if Seamus takes his own advice and respects
the Followup-To: header.

Seamus MacRae wrote:
) Willem wrote:
)> (NB: Followups were set to a different newsgroup, without notice. This, in
)> and of itself is deceitful.)
)
) Not when the intent is to suppress

Suppressing others, are we ? Where do you think we are, North Korea ?

) You don't seem to take a hint, so I guess I have to spell it out
) for you: SHUT. UP.

You first.

)> I did not actually call you those names.
)
) Yes, you did. You implied that I was a liar and an idiot.

These two statements contradict each other.
Furthermore, neither of them represents the truth.

Note: In the rest of your post, you were only replying to yourself
(i.e. your 'editorial comments'), so I deleted it unread.


SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
 
W

Willem

Notice: followups set. To an existing newsgroup.

Seamus MacRae wrote:
) Willem wrote:
)> Setting followups without notification is deceitful and dishonest.
)
) Not when the purpose is to suppress a lie.

No, you're the liar, remember ?


SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
 
W

Willem

Notice: Followups were dishonestly and deceitfully set to a non-existing
newsgroup, and therefore ignored. Followups have now been set to a
sensible and existing newsgroup, and should therefore be followed.

Seamus MacRae wrote:
) that when the criticizee speaks up in his own defense and addresses the
) criticisms, certain people don't simply leave it at that,

Of course not. Civil people, when confronted with evidence of their
mistakes, usually admit those mistakes instead of feeling insulted.

) a right to have each side have said their peace and then that's
) the end of it.

Then why did you keep on replying after Richard said his piece ?
(When he told you you were wrong about sizeof evaluating its operand.)


SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
 
W

Willem

Notice: Followups set.

Seamus MacRae wrote:
) Richard Heathfield wrote:
)> Ben Bacarisse said:
)>> [calls me an idiot]
)>
)> [calls me an idiot]
)
) I am not. You are, remember?
)
)> [implies another insult]
)
) I hereby state for the record that the insulting thing that Richard just
) implied is factually incorrect.

You wrote every single word in the above post(*). Not a single letter has
been written by anybody else. Do you enjoy talking to yourself ?


*) With the exception of 'Ben Bacarisse said:' and perhaps
'Richard Heathfield wrote:', which were written by posting software.


SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
 
W

Willem

Notice: Followups have been set.

Seamus MacRae wrote:
) Willem wrote:
)> Seamus MacRae wrote:
)> ) Willem wrote:
)> )> You accused Richard
)> )
)> ) I accused nobody of anything
)>
)> Then what do you call your comment
)
) A comment. Not an accusation.

You called Richards comment an accusation.
You are using a double standard.


SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
 
W

Willem

Notice: Followups have been set.

Seamus MacRae wrote:
)> On Sun, 14 Jun 2009 18:18:50 +0000, Willem wrote:
)>> Then what do you call your comment
)
) A comment. No personal accusation was expressed or implied.

Your 'comment' implied at least as much accusation as Richard's.

Moreover, your comment was factually incorrect, whereas that of
Richard was factually correct.


SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
 
K

Kaz Kylheku

["Followup-To:" header set to comp.lang.lisp.]
Bruce C. Baker said:



But those with a *complete* brain realise that it isn't about
winning or losing. It's about correctness. Seamus MacRae has made
the following claims:

1) sizeof evaluates a (non-VLA) operand - a claim he made in article
<[email protected]>

Once the subject has been beat to death and substantially documented with all
the relevant references, there is really nothing more to say. Anyone following
the thread can sort out the right from the wrong. The subsequent shouting is no
longer about correctness; correctness is only a thin pretext for browbeating
some lunatic into admitting that he's wrong, which will likely never happen.
It's okay to let it be.

I recommend that if you can't refrain from following up to MacRae, then at
least refrain from following up to a MacRae when he's already ``defending''
himself against some prior correction.

Only if he posts a new piece of misinformation, then correct it.

Of course he will have some inane retort for it, but that retort isn't
a new piece of technical misinformation, just crap like ``stop attacking me''
or ``[vicious personal attack snipped] I am not wrong''.

This non-content is not worth responding to. By now, you know exactly what the
result is of responding to it. There will never be any other result.
 

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
474,434
Messages
2,571,689
Members
48,796
Latest member
Greg L.

Latest Threads

Top