Although I am no longer working as a programmer (after a successful 30
year career) I am still programming by myself.
The spinoza language is at the bottom of a rather deep stack which
keeps getting topped up with ideas based on my teaching. Currently,
this is yet another implementation of Conway's Game of Life. I need to
write a version without the boundary bug (not filling in invisible
live cells outside the life array, treating the array as floating over
an unbounded array) and with Hashlife before I die.
The UK libel lawsuit project against Richard Heathfield has been re-
activated. I have not engaged a firm of solicitors as yet but I shall
if his behavior persists. Currently I am collecting data from posts
using as a model the DePaul university project which helped to bring
Serbian war criminals to account. This is a very serious matter; the
UK has very strict laws about libel, and although I am an ordinary
person without a lot of financial resources this needs to go forward.
If anyone cares to join me in this lawsuit, pooling our resources,
please send me email.
Possibly he should sue you for libel for comparing his posts to
evidence of Serbian war crimes.
I believe I read where spinoza called Richard a homophobic anti-semite
pedophile. Oh, I also think he believes that Richard works for a secret
government organization with the task of disrupting newsgroups. AFAICT,
spinoza is a very nervous paranoid man suffering from a hard core anxiety
disorder. Perhaps a nice round of insulin coma therapy could possible do him
some good. I actually kind of feel sorry for him. Sad. I really do hate to
killfile anybody. But, this guy, well, anyway...
;^(...
If I were lame enough to be interested in suing him for libel, I would
have plenty of grounds. But I'm not.
I find it amusing, however, that he has to appeal to others for help
with the bus fare to the solicitor's office. The law is a game for
rich people to play. If he does sue (which won't happen), he will
lose money, I may or may not lose money (depending on whether the
judge awards costs against him for wasting everybody's time), and the
fat cat greedy capitalist lawyers (as he no doubt thinks of them)
will feather their nests nicely.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
This line unintentionally left unblank
I didn't. Why do you pass on falsehoods about people? It's criminally
and civilly liable, and, it's wrong.
I do think his conduct manifests homophobia in that he likes to break
up conversations between typically male posters by telling one or the
other that the other is incompetent.
I do believe that his and others' use of "troll" is the use of a
traditionally racist Nordic word that fits into the same types of
sentences as does "Jew".
But I have nowhere stated that he bothers underage posters for sex.
Does he?
>Oh, I also think he believes that Richard works for a secret
> government organization with the task of disrupting newsgroups.
I have noted that he's always online. If I posted with that frequency,
I'd want to be paid. Therefore, I have hypothesized that he's paid by
a corporation (Google? SMERSH?) or a governmental body to disrupt
conversations that may lead to programmer unions, by sowing hatred.
But, as I have also stated, I have no further evidence for this.
Stranger things have happened. And what's nuts is the idea that to
form a theory or hypothesis is mental disorder.
>AFAICT,
> spinoza is a very nervous paranoid man suffering from a hard core anxiety
> disorder. Perhaps a nice round of insulin coma therapy could possible do him
> some good. I actually kind of feel sorry for him. Sad. I really do hate to
> killfile anybody. But, this guy, well, anyway...
You've never killfiled a soul. You are too eager to see people's name
and reputation destroyed.
>
> ;^(...
If you're rich, squire, you're an arrogant toff who's going to get
what's coming to him. But chances are you're not, and you can't afford
a competent defense. Either way you are in for a surprise. We've had
it with your behavior and we want you to go away. If that means a
group lawsuit, so be it.
> I didn't. Why do you pass on falsehoods about people? It's criminally
> and civilly liable, and, it's wrong.
Ahh yes, you are 100% correct. You wrote that Phil Carmody was probably an
incompetent and a pedophile:
http://groups.google.com/group/comp.lang.c/msg/5f2734efe34b76c8
Why would you write such a horrible thing? That sick. Sorry, but it is. Then
you wrote "When in Rome". What did you mean by that?
> I do think his conduct manifests homophobia in that he likes to break
> up conversations between typically male posters by telling one or the
> other that the other is incompetent.
You would actually diagnose Richard with homophobia because of that?
> I do believe that his and others' use of "troll" is the use of a
> traditionally racist Nordic word that fits into the same types of
> sentences as does "Jew".
Wow. You are paranoid. I call some body a troll and "spinoza the brilliant"
thinks I have something again the Jewish people. Give be a break.
> But I have nowhere stated that he bothers underage posters for sex.
> Does he?
Richard is not a pedophile.
> >Oh, I also think he believes that Richard works for a secret
> > government organization with the task of disrupting newsgroups.
> I have noted that he's always online. If I posted with that frequency,
> I'd want to be paid. Therefore, I have hypothesized that he's paid by
> a corporation (Google? SMERSH?) or a governmental body to disrupt
> conversations that may lead to programmer unions, by sowing hatred.
> But, as I have also stated, I have no further evidence for this.
Thinking up conspiracy theories on the fly like that is not very healthy.
> Stranger things have happened. And what's nuts is the idea that to
> form a theory or hypothesis is mental disorder.
You think that Richard works for the government in a conspiracy to break up
the possibility of a programmers union. Wow. You do seem to have a lot in
common with John Nash. Paranoid schizophrenia?
> >AFAICT,
> > spinoza is a very nervous paranoid man suffering from a hard core
> > anxiety
> > disorder. Perhaps a nice round of insulin coma therapy could possible do
> > him
> > some good. I actually kind of feel sorry for him. Sad. I really do hate
> > to
> > killfile anybody. But, this guy, well, anyway...
> You've never killfiled a soul.
I unfortunately have had to killfile some people. :^(
> You are too eager to see people's name and reputation destroyed.
Now you think I enjoy seeing people getting destroyed on USENET. Take some
Diazepam and chill out. Don't let your paranoia get the best of you!
Well, AFAICT, your the one who thinks somebody is an anti-Semite if they use
the word "troll". Your the one who thinks that if somebody spends a lot of
time in USENET then they must be working for the government in a war against
programmer unions. Your the one who calls people incompetents and pedophiles
if they disagree with you. I have a strange feeling that you might let
laughed right out of the court room.
On the other hand, Richard Heathfield has been fairly calm, cool and
collected. Your the one that seems to have a major problem. Perhaps paranoid
schizophrenia? I don't know, but you should seek out some professional help
ASAP! I am only looking out for you spinoza. I feel sorry for you. Ouch!
;^(...
Reading Comprehension 101, Ace Ventura: I wrote "Gee, you're probably
incompetent and a pedophile (when in Rome...). "
The "Gee" was a tipoff, bonehead. It meant that I was using the
literary technique of hyper-bowl (hyperbole, pronounced hy per bol
ee).
"When in Rome" is the way in which a literate, well-read, class act
makes reference to the proverb, "when in Rome, do as the Romans do".
What I meant was that in this dump, this slum, this wasteland, I may
as well converge as rapidly as possible to the idiot and exagerrated
attacks you people make on competent individuals, and save us all a
pile o' trouble.
>
> > I do think his conduct manifests homophobia in that he likes to break
> > up conversations between typically male posters by telling one or the
> > other that the other is incompetent.
>
> You would actually diagnose Richard with homophobia because of that?
Yes, I would.
>
> > I do believe that his and others' use of "troll" is the use of a
> > traditionally racist Nordic word that fits into the same types of
> > sentences as does "Jew".
>
> Wow. You are paranoid. I call some body a troll and "spinoza the brilliant"
> thinks I have something again the Jewish people. Give be a break.
No, you're deficient in logic and understanding.
Let me try again. According to Hannah Arendt and Jean Paul Sartre, the
anti-Semite picks the Jew as a target of convenience. Since he is also
usually an authoritarian personality in Theodore Adorno's sense,
however, if authority makes it clear (through the creation of the
failed rogue colonialist state of Israel) that anti-Semitism is no
longer allowed, then the anti-Semite seeks to relieve the
psychological pressure of his hatred and unresolved childhood problems
by finding an isomorph (in the mathematical sense). For many Israelis,
who as authoritarian and homophobic creeps (see the news) in a failed
state, it is hard also to be anti-Semitic. Therefore the Muslim
becomes the new Jew.
On the Internet, the new Jew is the "troll" for the same reason.
Got it yet?
>
> > But I have nowhere stated that he bothers underage posters for sex.
> > Does he?
>
> Richard is not a pedophile.
I am relieved to hear it.
>
> > >Oh, I also think he believes that Richard works for a secret
> > > government organization with the task of disrupting newsgroups.
> > I have noted that he's always online. If I posted with that frequency,
> > I'd want to be paid. Therefore, I have hypothesized that he's paid by
> > a corporation (Google? SMERSH?) or a governmental body to disrupt
> > conversations that may lead to programmer unions, by sowing hatred.
> > But, as I have also stated, I have no further evidence for this.
>
> Thinking up conspiracy theories on the fly like that is not very healthy.
To the ignorant and unlearned, the most basic cultural literacy
becomes a conspiracy since dey did not get no good edumocation, see?
>
> > Stranger things have happened. And what's nuts is the idea that to
> > form a theory or hypothesis is mental disorder.
>
> You think that Richard works for the government in a conspiracy to break up
> the possibility of a programmers union. Wow. You do seem to have a lot in
> common with John Nash. Paranoid schizophrenia?
No, I did not say that. I have said that if that were true, and I have
at this time no way of knowing whether it is, it would explain his
being online all the time. It's possible he can no longer get hired as
a programmer owing to the fact that his only language is out of date,
and he answered one of those spammy ads to "make money with your
computer", and hit pay dirt.
These are only possibilities. If you can't reason with modal logic, I
doubt you're a competent programmer.
>
> > >AFAICT,
> > > spinoza is a very nervous paranoid man suffering from a hard core
> > > anxiety
> > > disorder. Perhaps a nice round of insulin coma therapy could possible do
> > > him
> > > some good. I actually kind of feel sorry for him. Sad. I really do hate
> > > to
> > > killfile anybody. But, this guy, well, anyway...
> > You've never killfiled a soul.
>
> I unfortunately have had to killfile some people. :^(
Pity. I hope they didn't suffer. Are their heads still in your
refrigerator?
>
> > You are too eager to see people's name and reputation destroyed.
>
> Now you think I enjoy seeing people getting destroyed on USENET. Take some
> Diazepam and chill out. Don't let your paranoia get the best of you!- Hide quoted text -
Never heard of Diazepam. Eat it like candy, do you? How's it helping?
There's a coder named Chris Thomasson
Who's deficient in logic and has no funnybone
His responses are spam
Written under the influence of Diazepam
That unfortunate sod, Thomasson.
>
> - Show quoted text -
I never watched Ace Ventura. Alls I know is you wrote that Phil Carmody is
probably a pedophile, and by the use of "When in Rome" you also included
everybody else in this NG.
> "When in Rome" is the way in which a literate, well-read, class act
> makes reference to the proverb, "when in Rome, do as the Romans do".
I know.
> What I meant was that in this dump, this slum, this wasteland, I may
> as well converge as rapidly as possible to the idiot and exagerrated
> attacks you people make on competent individuals, and save us all a
> pile o' trouble.
I was just confirming that you meant this NG. You basically said all of us
here are probably incompetents and pedophiles. Your sick!
> > > I do think his conduct manifests homophobia in that he likes to break
> > > up conversations between typically male posters by telling one or the
> > > other that the other is incompetent.
> >
> > You would actually diagnose Richard with homophobia because of that?
> Yes, I would.
lol!
> > > I do believe that his and others' use of "troll" is the use of a
> > > traditionally racist Nordic word that fits into the same types of
> > > sentences as does "Jew".
> >
> > Wow. You are paranoid. I call some body a troll and "spinoza the
> > brilliant"
> > thinks I have something again the Jewish people. Give be a break.
> No, you're deficient in logic and understanding.
> Let me try again. According to Hannah Arendt and Jean Paul Sartre, the
> anti-Semite picks the Jew as a target of convenience. Since he is also
> usually an authoritarian personality in Theodore Adorno's sense,
> however, if authority makes it clear (through the creation of the
> failed rogue colonialist state of Israel) that anti-Semitism is no
> longer allowed, then the anti-Semite seeks to relieve the
> psychological pressure of his hatred and unresolved childhood problems
> by finding an isomorph (in the mathematical sense). For many Israelis,
> who as authoritarian and homophobic creeps (see the news) in a failed
> state, it is hard also to be anti-Semitic. Therefore the Muslim
> becomes the new Jew.
> On the Internet, the new Jew is the "troll" for the same reason.
> Got it yet?
You need to get a grip. Wow! In your paranoid mind troll == Jew. Your too
funny.
> > > But I have nowhere stated that he bothers underage posters for sex.
> > > Does he?
> >
> > Richard is not a pedophile.
> I am relieved to hear it.
Now why in the world are you relieved to hear that? This suggests that you
thought he might be one.
> > > >Oh, I also think he believes that Richard works for a secret
> > > > government organization with the task of disrupting newsgroups.
> > > I have noted that he's always online. If I posted with that frequency,
> > > I'd want to be paid. Therefore, I have hypothesized that he's paid by
> > > a corporation (Google? SMERSH?) or a governmental body to disrupt
> > > conversations that may lead to programmer unions, by sowing hatred.
> > > But, as I have also stated, I have no further evidence for this.
> >
> > Thinking up conspiracy theories on the fly like that is not very
> > healthy.
> To the ignorant and unlearned, the most basic cultural literacy
> becomes a conspiracy since dey did not get no good edumocation, see?
> > Stranger things have happened. And what's nuts is the idea that to
> > form a theory or hypothesis is mental disorder.
>
> You think that Richard works for the government in a conspiracy to break
> up
> the possibility of a programmers union. Wow. You do seem to have a lot in
> common with John Nash. Paranoid schizophrenia?
> No, I did not say that. I have said that if that were true,
Why would you even think that? You think of crazy stuff way too much.
> and I have
> at this time no way of knowing whether it is, it would explain his
> being online all the time. It's possible he can no longer get hired as
> a programmer owing to the fact that his only language is out of date,
> and he answered one of those spammy ads to "make money with your
> computer", and hit pay dirt.
> These are only possibilities. If you can't reason with modal logic, I
> doubt you're a competent programmer.
Go ahead and think up whatever you want. I am not so sure you can understand
the type of programming I do. Humm...
> > > >AFAICT,
> > > > spinoza is a very nervous paranoid man suffering from a hard core
> > > > anxiety
> > > > disorder. Perhaps a nice round of insulin coma therapy could
> > > > possible do
> > > > him
> > > > some good. I actually kind of feel sorry for him. Sad. I really do
> > > > hate
> > > > to
> > > > killfile anybody. But, this guy, well, anyway...
> > > You've never killfiled a soul.
> >
> > I unfortunately have had to killfile some people. :^(
> Pity. I hope they didn't suffer. Are their heads still in your
> refrigerator?
lol!
> > > You are too eager to see people's name and reputation destroyed.
> >
> > Now you think I enjoy seeing people getting destroyed on USENET. Take
> > some
> > Diazepam and chill out. Don't let your paranoia get the best of you!-
> > Hide quoted text -
> Never heard of Diazepam.
Oh, I think you most certainly have.
> Eat it like candy, do you? How's it helping?
> There's a coder named Chris Thomasson
> Who's deficient in logic and has no funnybone
> His responses are spam
> Written under the influence of Diazepam
> That unfortunate sod, Thomasson.
LOL!
You make me laugh. Thank you!
:^)
>Wow. You are paranoid. I call some body a troll
... and yet you continue feeding him.
-- Richard
--
Please remember to mention me / in tapes you leave behind.
touch�
Although, I have to admit that the responses I received made me laugh quite
a bit. spinoza is actually pretty funny.
Nope. Don't self-medicate. Do you?
>
> > Eat it like candy, do you? How's it helping?
> > There's a coder named Chris Thomasson
> > Who's deficient in logic and has no funnybone
> > His responses are spam
> > Written under the influence of Diazepam
> > That unfortunate sod, Thomasson.
>
> LOL!
>
> You make me laugh. Thank you!
Unless you're being sarcastic and ironic, you're very, very welcome:
for one of the problems here is the solemnity with which reputations
and people are destroyed. I will if necessary write poetry here on the
topic of C and C programmers to change this newsgroup. All poetry will
be original and written in real time for the response unless
identified as a quote or prewritten.
There is a language named C
Designed by Kernighan and Ritchie.
It's an abomination and a pointer to void
Designed for programmers named Mortimer Snoid
That ridiculous language called C.
Whatever you say clearly about C
Has been made wrong by the Standard, you see:
Your knowledge is out of date
Because vendor money we do not hate
We need to make fortunes from C, see?
There once was a pointer and it pointed to void
And there it found the name of Murgatroyd
Followed by NUL.
It was awful
What happened to the bank account of Murgatroyd.
For (;it is written that; while we do)
We might around with the upper bound, need to screw.
God forbid the loop limit should be precomputed
We goes to Princeton and we is edumocated
So leave us alone with our DEC 10 to spew
Wrong answers at blinding speed...the joke, dear user, is on YOU.
Call me by value: call me by name
But don't even try
To call me by
Reference.
Call me your sweetheart, call me your darlin'
But if you call me by reference at you I'll be snarlin'.
int intIndex = 0;
donot(try, to, be, a, hero);
for(; I;) thinkThat(yourBrain);
willNot(standTheStrain);
user(Java, to, save, your, self, Pain);
There is a low coder named Heathfield
Who lives in a Northumberland wheatfield
He scares off the crows,
And homeward he goes,
To try to make decency yield.
All verse 2 Aug 2009 by Edward G. Nilges. Moral rights have been
asserted by the author, so get bent.
>
> :^)- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
[...]
> > > > Now you think I enjoy seeing people getting destroyed on USENET.
> > > > Take
> > > > some
> > > > Diazepam and chill out. Don't let your paranoia get the best of
> > > > you!-
> > > > Hide quoted text -
> > > Never heard of Diazepam.
> >
> > Oh, I think you most certainly have.
> Nope. Don't self-medicate. Do you?
Na. I just wrote that you should take some because it seems like you worry
about things to much.
> > > Eat it like candy, do you? How's it helping?
> > > There's a coder named Chris Thomasson
> > > Who's deficient in logic and has no funnybone
> > > His responses are spam
> > > Written under the influence of Diazepam
> > > That unfortunate sod, Thomasson.
> >
> > LOL!
> >
> > You make me laugh. Thank you!
> Unless you're being sarcastic and ironic, you're very, very welcome:
I really laughed. Everybody needs a good laugh once in a while so thank you.
> for one of the problems here is the solemnity with which reputations
> and people are destroyed. I will if necessary write poetry here on the
> topic of C and C programmers to change this newsgroup. All poetry will
> be original and written in real time for the response unless
> identified as a quote or prewritten.
[...]
Reading Rainbow, go back to the text and TRY to understand it, willya?
I was saying through hyperbole, not that in this "Rome" you guys are
pedophiles (although you may be), but that exchanges converge at
Godwin speed to claims that the other guy is a pedophile on the
thinnest of evidence. Whereas when I say someone has the proto-Fascism
of the lower middle class, I do my homework.
>
> > "When in Rome" is the way in which a literate, well-read, class act
> > makes reference to the proverb, "when in Rome, do as the Romans do".
>
> I know.
Check out the big brain on Chris! You a smart motherfucker, Chris!
Whatcha havin' for breakfast there?
>
> > What I meant was that in this dump, this slum, this wasteland, I may
> > as well converge as rapidly as possible to the idiot and exagerrated
> > attacks you people make on competent individuals, and save us all a
> > pile o' trouble.
>
> I was just confirming that you meant this NG. You basically said all of us
> here are probably incompetents and pedophiles. Your sick!
No, incompetents and probably homophobes and proto-, just-add-water,
Fascists. Incompetent because you program for money in C, an outdated
and unsafe language, in applications that do not absolutely require
it. Homophobes because you never come to each other's defense, because
this raises issues you have not dealt with. Proto-, just-add-water,
Fascists, because you are typically followers of Fascist politicians
like Palin and Ron Paul who lie to you.
No, who-you-call-troll (usually a poster more intelligent than average
who's criticised someone more popular) is not a Jew. But in your mind
he's the ersatz or replacement Jew.
And, Reading Rainbow, check out the apostrophe sometime. Your well-
advised to distinguish between you're possessive case and "you are",
Bubba. Possessive case is "your". "You are" is "you're".
>
> > > > But I have nowhere stated that he bothers underage posters for sex.
> > > > Does he?
>
> > > Richard is not a pedophile.
> > I am relieved to hear it.
>
> Now why in the world are you relieved to hear that? This suggests that you
> thought he might be one.
Check out Perry Mason in the courtroom! Dig up on Chris da smaht
lawyer. Of course, this being a written medium, you did not hear the
unutterable weariness in my voice, which conveyed a deep, deep,
sarcasm verging on tears.
>
>
>
>
>
> > > > >Oh, I also think he believes that Richard works for a secret
> > > > > government organization with the task of disrupting newsgroups.
> > > > I have noted that he's always online. If I posted with that frequency,
> > > > I'd want to be paid. Therefore, I have hypothesized that he's paid by
> > > > a corporation (Google? SMERSH?) or a governmental body to disrupt
> > > > conversations that may lead to programmer unions, by sowing hatred.
> > > > But, as I have also stated, I have no further evidence for this.
>
> > > Thinking up conspiracy theories on the fly like that is not very
> > > healthy.
> > To the ignorant and unlearned, the most basic cultural literacy
> > becomes a conspiracy since dey did not get no good edumocation, see?
> > > Stranger things have happened. And what's nuts is the idea that to
> > > form a theory or hypothesis is mental disorder.
>
> > You think that Richard works for the government in a conspiracy to break
> > up
> > the possibility of a programmers union. Wow. You do seem to have a lot in
> > common with John Nash. Paranoid schizophrenia?
> > No, I did not say that. I have said that if that were true,
>
> Why would you even think that? You think of crazy stuff way too much.
Dang, home, I do, don't I? Makes y'all uncomfortable, don't it?
>
> > and I have
> > at this time no way of knowing whether it is, it would explain his
> > being online all the time. It's possible he can no longer get hired as
> > a programmer owing to the fact that his only language is out of date,
> > and he answered one of those spammy ads to "make money with your
> > computer", and hit pay dirt.
> > These are only possibilities. If you can't reason with modal logic, I
> > doubt you're a competent programmer.
>
> Go ahead and think up whatever you want. I am not so sure you can understand
> the type of programming I do. Humm...
Are you the auto parts catalog whiz? If so I think I do. Are you doing
space shuttle code or working for a rocket science Wall Street firm,
making sure the heat shield falls off (it's SO cool when it does that)
or that the tranche consists of deadbeat Dads who can't even pay for
the trailer? If so "I tremble for my country when I realize God is
just".
Reading Rainbow, you cannot understand English. So I really, really
hope that what I can't understand is auto parts, not rocket science,
here.
Glad to hear that. See more limericks in another post.
>
> :^)- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
Yes, and there's a lot to worry about.
>
> > > > Eat it like candy, do you? How's it helping?
> > > > There's a coder named Chris Thomasson
> > > > Who's deficient in logic and has no funnybone
> > > > His responses are spam
> > > > Written under the influence of Diazepam
> > > > That unfortunate sod, Thomasson.
>
> > > LOL!
>
> > > You make me laugh. Thank you!
> > Unless you're being sarcastic and ironic, you're very, very welcome:
>
> I really laughed. Everybody needs a good laugh once in a while so thank you.
Great! Now we're getting somewhere. Perhaps I should have been a poet
and not a programmer. I hear there's big money in poetry.
[snipped a bunch of crap]
> > > and I have
> > > at this time no way of knowing whether it is, it would explain his
> > > being online all the time. It's possible he can no longer get hired as
> > > a programmer owing to the fact that his only language is out of date,
> > > and he answered one of those spammy ads to "make money with your
> > > computer", and hit pay dirt.
> > > These are only possibilities. If you can't reason with modal logic, I
> > > doubt you're a competent programmer.
> >
> > Go ahead and think up whatever you want. I am not so sure you can
> > understand
> > the type of programming I do. Humm...
> Are you the auto parts catalog whiz? If so I think I do. Are you doing
> space shuttle code or working for a rocket science Wall Street firm,
> making sure the heat shield falls off (it's SO cool when it does that)
> or that the tranche consists of deadbeat Dads who can't even pay for
> the trailer? If so "I tremble for my country when I realize God is
> just".
> Reading Rainbow, you cannot understand English. So I really, really
> hope that what I can't understand is auto parts, not rocket science,
> here.
lol. Anyway, some people might compare the type of programming I do with
"rocket science", or perhaps compare it to juggling running chainsaws.
Well, let's see if you can accomplish a task that I consider to be fairly
easy. I want to create a reader/writer lock that has wait-free fast-paths on
both the writer and reader side. I want this lock to be 100% starvation-free
for both writers and readers. I want bounded time for both readers and
writers. Your not allowed to use CAS. After you accomplish that, I want you
to augment your algorithm to allow for conditional reader-to-writer
upgrades, and non-conditional writer-reader downgrade. You may use CAS for
the upgrade/downgrade, but not for reader/writer acquisition or release.
BTW, your not allowed to use any loops in the algorithm. Oh, one more thing.
I will make it really easy for you in that you do not have to document any
membars. Once you accomplish this task, then we can begin to discuss some
more exotic synchronization algorithms...
I can complete the task, can you? I will give you a week to come up with
something. BTW, no cheating! That algorithm must be yours. I will be able to
tell if you create a forgery.
Have fun!
BTW, if you give up, I will show you the answer. I invented a very nice
general purpose reader writer lock that can outperform most existing native
OS primitives (e.g., the NPTL).
> There is a low coder named Heathfield
> Who lives in a Northumberland wheatfield
> He scares off the crows,
> And homeward he goes,
> To try to make decency yield.
A kook from the south China seas
Whose bonnet was full of bees
Thought that he oughta
Spew forth his nilgewater
On various Usenet NGs
Good for you. Please stop feeding the troll.
--
Keith Thompson (The_Other_Keith) ks...@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"
Kiki, are you *ever* going to get anything even remotely resembling a
life? Please, for all our sakes...
Um, your (sic) responding to you'reself (sic).
You're pathetic, Sam.
Watch, you're going to write me to explain how you're not because YOU JUST
CAN'T RESIST!
Also, Richard emailed me a couple weeks ago and told me that you once spent a
month in hospital because you got a carrot wedged up your nose. Would you like
the text of it for your lawsuit?
Nilges AND Musatov? Most NGs aren't lucky enough to have even ONE resident
loon!
How did comp.programming come to be so ... blessed? :-)
Shhh. If JSH hears, he might want to join in as well.
rossum
jsh of sci.math? god forbid!
> I really laughed. Everybody needs a good laugh once in a while so
> thank you.
Any chance of persuading you to stop feeding the troll?
Brian
Your (yours and others of your ilk) supposed "killfiles" just don't work
very well, do they?
Bad limerick. The first line has four stressed syllables, the second
two, the third two, the fourth three and the last three, but the
pattern needs to be three, three, two, two, and three. Furthermore
makes no sense: has an unprocessed and thus unexpressed hostility.
Reading Rainbow, what part of "metaphor" don't you understand? My
experience at Bell-Northern Research is that most developers fantasize
a risky and macho world while behind the scenes their work product is
so checked and monitored that they cannot take in fact the risks they
think they're taking.
I won't accept your challenge. It appears to me that you are
overfamiliar with specific technology and perhaps underfamiliar with
the basic science (think Dijkstra). What appears to be "progress" in
computer science is often the faulty elaboration of computing science,
usually in the foolish name of "speed" and sometimes in a deliberately
fraudulent manner.
I would note that my platform simply and elegantly supports
multithreading with a lock{} block and the ability to set semaphores.
I'm sorry Chris but I don't feel
Like reinventing another wheel
This is not my area of expertise.
You MAY, from where I sit, not be aware that it MAY be impossible to
actually do this on arbitrary platforms. If the lock is a single
instruction on your system in machine language the code isn't portable
to another system.
But I concede that you aren't doing auto parts. The question remains
whether or not C is the right tool for what you're doing.
>
> I can complete the task, can you? I will give you a week to come up with
> something. BTW, no cheating! That algorithm must be yours. I will be able to
> tell if you create a forgery.
>
> Have fun!- Hide quoted text -
> On Aug 3, 12:56 am, "Ant" <n...@home.today> wrote:
>> "spinoza1111" wrote:
>> > There is a low coder named Heathfield
>> > Who lives in a Northumberland wheatfield
>> > He scares off the crows,
>> > And homeward he goes,
>> > To try to make decency yield.
>>
>> A kook from the south China seas
>> Whose bonnet was full of bees
>> Thought that he oughta
>> Spew forth his nilgewater
>> On various Usenet NGs
>
> Bad limerick.
Rather like yours in that respect.
> The first line has four stressed syllables, the second
> two, the third two, the fourth three and the last three, but the
> pattern needs to be three, three, two, two, and three.
The unstressed syllables matter too. The metre of limericks has never
been fully defined as far as I'm aware, but it should have a rhythmic
"feel" to it. For example, the rhythm of the first two lines and the
last line should be identical. Here's a popular limerick metre (u =
unstressed syllable, / = stressed):
u/u u/u u/u
u/u u/u u/u
u/u u/u
u/u u/u
u/u u/u u/u
Variations on this are possible, of course.
Your "limerick"'s pattern is:
u/u u/u u/u
u/u uu/u u/u
u/u u/
u/u u/
u/u u/u u/
The third and fourth lines, rhythmically speaking, are fine.
Lyrically, they're a bit pants, but then the whole thing is a bit of
a disaster, lyrically speaking. The first line, again considering
only the rhythm, is fine, but the second line is just terrible. Three
consecutive soft syllables on a single limerick line don't work at
all. Finally - sometimes you can get away with skipping a soft
syllable at the start of the line, but dropping a soft syllable from
the /end/ of the fifth line simply doesn't work (or at least, doesn't
work here).
> Furthermore
> makes no sense: has an unprocessed and thus unexpressed hostility.
But your limerick didn't make any sense either. Its hostility, on the
other hand, was very clear.
ObC, or at least ObK&R2: I think I'm right in saying that there are no
limericks in K&R2, but there is a little Fitzgerald on offer for
those bored enough to find it.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
This line unintentionally left unblank
Creating high-performance reader writer lock is not a waste of time. Heck,
even Sun Microsystems has an entire group working on synchronization
primitives. And guess what? They just released a paper on high-performance
read writer locks. They are using distributed counting technique to increase
scalability. There work in not in vain.
> This is not my area of expertise.
> You MAY, from where I sit, not be aware that it MAY be impossible to
> actually do this on arbitrary platforms. If the lock is a single
> instruction on your system in machine language the code isn't portable
> to another system.
Actually, my synchronization code is portable to a fairly wide range of
architectures. I know the caveats, and I know how to work around them.
> But I concede that you aren't doing auto parts. The question remains
> whether or not C is the right tool for what you're doing.
I use a mixture of C and assembly language. C is low-level enough to allow
me to do what I want. Tell me, if I used C sharp, how could I ensure that,
for instance, data is padded to a L2 cache line and aligned on a L2 cache
line boundary? Do you know why that's important wrt synchronization
algorithms? Don't get me wrong, C# is a fine language and I do use it from
time to time. But, I can reap much better performance if I use C and ASM to
create synchronization libraries. I can then use that library in C#,
everybody wins.
> Reading Rainbow, what part of "metaphor" don't you understand? My
> experience at Bell-Northern Research is that most developers fantasize
> a risky and macho world while behind the scenes their work product is
> so checked and monitored that they cannot take in fact the risks they
> think they're taking.
> I won't accept your challenge.
Okay. How about something else that I think is easy. Create a non-blocking
stack that only uses CAS on producer side, and make the consumer side
wait-free. I also want to see those membars!
:^)
> It appears to me that you are
> overfamiliar with specific technology and perhaps underfamiliar with
> the basic science (think Dijkstra).
I am completely familiar with the basic science (think Hoare). I even hacked
together a construct in C++ that mimics the monitors and the `when' keyword
described by him.
> What appears to be "progress" in
> computer science is often the faulty elaboration of computing science,
> usually in the foolish name of "speed" and sometimes in a deliberately
> fraudulent manner.
Forget about speed for a moment. My advanced algorithms are all about
scalability (think RCU). However, the read writer lock I described is not an
advanced algorithm, it's rather simplistic.
> I would note that my platform simply and elegantly supports
> multithreading with a lock{} block and the ability to set semaphores.
Great. BTW, how are you implementing those semaphores? I know of a really
nice algorithm invented by Joe Seigh over on comp.programming.threads. It
has wait-free fast-paths, and it's fair. Perhaps it might be of use to you.
Also, if you ever decide to support message passing, I can turn you on to
many high-performance queue algorithms that outperform basically anything
else out there.
Perhaps my work can be of service to the runtime of your language. This is
why I like the low-level nature of C and ASM. People can use the libraries I
create to create higher level constructs. Heck, you can even use some of my
stuff to create the multi-thread synchronization scheme in OS kernels.
I forgot to mention that the stack should be unbounded.
[...]
>jsh of sci.math? god forbid!
The very one. :)
rossum
> rossum wrote:
>> On Sun, 2 Aug 2009 14:39:23 -0500, "Bruce C. Baker"
>> <b...@undisclosedlocation.net> wrote:
>>
<snip>
>>>Nilges AND Musatov? Most NGs aren't lucky enough to have even ONE
>>>resident loon!
>>>
>>>How did comp.programming come to be so ... blessed? :-)
>>
>> Shhh. If JSH hears, he might want to join in as well.
>>
> jsh of sci.math? god forbid!
It could be worse. Consider ACL, SN, and THE CHAIR. (c.p folks
probably won't know any of these, but longtime c.l.c-ers will be
familiar with one or more of them.)
I think you mean: They're work [is] not in vein.
> There's a coder named Chris Thomasson
> Who's deficient in logic and has no funnybone
> His responses are spam
> Written under the influence of Diazepam
> That unfortunate sod, Thomasson.
>
The rimes are nice, but there's no rithme.
--
llllllllllllllllllll
ITYouM: Their (possessive pronoun)
--
bites hand
Furthermore, the "correction" (from "vain" to "vein") was incorrect.
It is possible that this was deliberate, but Hanlon's Razor applies
yet again.
> Nilges AND Musatov? Most NGs aren't lucky enough to have even ONE resident
> loon!
The last time that I read news:sci.physics
which was a long time ago,
it was completely infested with netloons.
--
pete
>"spinoza1111" <spino...@yahoo.com> wrote in message
>Great. BTW, how are you implementing those semaphores? I know of a really
>nice algorithm invented by Joe Seigh over on comp.programming.threads. It
>has wait-free fast-paths, and it's fair. Perhaps it might be of use to you.
>Also, if you ever decide to support message passing, I can turn you on to
>many high-performance queue algorithms that outperform basically anything
>else out there.
>
Any references on those queue algorithms?
Richard Harter, c...@tiac.net
http://home.tiac.net/~cri, http://www.varinoma.com
No one asks if a tree falls in the forest
if there is no one there to see it fall.
Post over on comp.programming.threads for MUCH more detailed information.
Anyway, FWIW, here are some algorithms:
Here is one of the fastest unbounded non-intrusive multi-producer/consumer
queue's out there (created by me):
http://software.intel.com/en-us/forums/threading-on-intel-parallel-architectures/topic/66573
Here is a version in C#:
http://cpt.pastebin.com/f72cc3cc1
Please note that this has the same memory management properties that a
lock-free stack does.
Here is one of the fastest unbounded non-intrusive
multi-producer/single-consumer queues out there:
http://relacy.pastebin.com/f4ca417dc
(invented by Dmitriy V'jukov)
Here is the intrusive version:
http://relacy.pastebin.com/f1619ab91
Here is the intrusive unbounded version of a multi-producer/consumer queue:
http://groups.google.com/group/comp.programming.threads/browse_frm/thread/c43d1197c8168b4e
(invented by Dmitriy V'jukov)
This version uses SEH to handle memory management.
Here is bounded single-producer/consumer queue:
http://pastebin.com/f693b64b3
(my me)
Here is bounded multi-producer/consumer queue:
http://relacy.pastebin.com/f4ec057ef
(by me)
if you want to add conditional blocking semantics to any of the queues
above, you can use my eventcount invention:
http://software.intel.com/en-us/forums/threading-on-intel-parallel-architectures/topic/66575
Here are some of the unbounded queues above in C#:
http://cpt.pastebin.com/f2c4d8412
(single-producer/consumer queue by me /w fast-path semaphore by Joe Seigh)
http://cpt.pastebin.com/f52dcc0fc
(single-producer/consumer queue by me /w eventcount by me)
http://heev.pastebin.com/f70a73f00
(multi-producer/single-consumer by Dmitriy V'jukov /w eventcount by me)
http://heev.pastebin.com/f270184be
(multi-producer/single-consumer by Dmitriy V'jukov /w eventcount by me /w
node cache by me)
http://heev.pastebin.com/f10399a09
(multi-producer/single-consumer by Dmitriy V'jukov /w eventcount by me /w
node cache by Dmitriy V'jukov)
Here is a bounded single-producer/multi-consumer queue by Amine:
Here is a dynamic work-stealing deque my me:
http://relacy.pastebin.com/f5bbceb0
Here is work-stealing deque by Sun Microsystems:
http://research.sun.com/scalable/pubs/main-10.pdf
Here is multi-producer/consumer queue by Michael and Scott (IBM):
http://www.cs.rochester.edu/research/synchronization/pseudocode/queues.html
(please note that my multi-producer/consumer queue beats this one to death)
http://webpages.charter.net/appcore
(Some of my experimental algorithms, pre-alpha)
BTW, my website has been referenced by both Sun Microsystems and Intel:
http://developers.sun.com/solaris/articles/chip_multi_thread.html
(search web-page text for "AppCore"; please note that this points to my old
site that has migrated to charter.net. I moved to South Lake Tahoe and they
still have not updated the link)
http://software.intel.com/en-us/articles/multiple-approaches-to-multithreaded-applications
(search web-page text for "Chris Thomasson"; please note that this points to
my old site that has migrated to charter.net. I moved to South Lake Tahoe
and they still have not updated the link)
My website has also been referenced in a lecture by a Professor Arthur
Goldberg in his Spring 2006 Syllabus. A speaker by the name of David
Buksbaum, SVP Development Manager of Systematic Trading, Citadel Investment
includes a reference to my website:
http://www.cs.nyu.edu/artg/internet/Spring2006/syllabus.html
(search webpage text for "David Buksbaum", then click on the link to the
lecture, then search lecture text for "AppCore").
I have also invented a new algorithm which I call "Virtually Zero-Overhead
Object Management" or (VZOOM) for short which won me a T2000 server from Sun
Microsystems CoolThreads Contest:
https://coolthreads.dev.java.net
Here is where I introduce myself to the contest managers:
https://coolthreads.dev.java.net/servlets/ProjectForumMessageView?messageID=11001&forumID=1797
Please note that the VZOOM algorithm I submitted was in a very crude
experimental pre-alpha status, and I still was one of the finalists. Here
are the papers I submitted in order to get accepted into the contest:
http://webpages.charter.net/appcore/vzoom/round-1.pdf
http://webpages.charter.net/appcore/vzoom/round-2.pdf
BTW, VZOOM also has a very high-performance memory allocator. There is an
algorithm in there that allows one to even transform single-threaded
allocator into scaleable multi-threaded allocator; no kidding:
BTW, the proxy collector portion of VZOOM has a patent application out on
it:
http://www.google.com/patents/about?id=c6ybAAAAEBAJ
I could actually go on and on, but please, pay us a visit over on
`comp.programming.threads' where all the non-blocking algorithm experts hang
out.
We will be happy to consult you.
Thanks!
:^)
I left out details on memory barriers for clarity. If you want to use one of
the presented queues, post a query over on `comp.programming.threads' and we
will elaborate about the memory barriers that your going to need.
[...]
Sorry, bad link. Pastebin seems to have lost the post! Anyway, here is Joe
Seigh's fast-path semaphore with a slight modification by me (atomics and
membars handled by Windows API):
______________________________________________________________________
#define UNEXPECTED_ERROR(mp_exp) \
assert((mp_exp)), std::unexpected()
#define UNEXPECTED_ERROR_WIN() \
UNEXPECTED_ERROR(GetLastError() == ERROR_SUCCESS)
class semaphore {
LONG m_count;
HANDLE m_waitset;
public:
semaphore(LONG count = 0)
: m_count(count),
m_waitset(CreateSemaphore(NULL, 0, LONG_MAX, NULL)) {
if (m_count < 0 || ! m_waitset) {
if (m_waitset) CloseHandle(m_waitset);
assert(m_count > -1 && m_waitset);
throw std::exception();
}
}
~semaphore() throw() {
if (m_count < 0) {
UNEXPECTED_ERROR(m_count > -1);
} else if (! CloseHandle(m_waitset)) {
UNEXPECTED_ERROR_WIN();
}
}
public:
void post(LONG count = 1) throw() {
if (count < 1) {
UNEXPECTED_ERROR(count > 0);
}
LONG old_count = InterlockedExchangeAdd(&m_count, count);
if (old_count < 0) {
if (! ReleaseSemaphore(m_waitset,
(-old_count) > count ? count : -old_count, NULL)) {
UNEXPECTED_ERROR_WIN();
}
}
}
void wait() throw() {
if (InterlockedDecrement(&m_count) < 0) {
if (WaitForSingleObject(m_waitset, INFINITE) !=
WAIT_OBJECT_0) {
UNEXPECTED_ERROR_WIN();
}
}
}
};
______________________________________________________________________
This algorithm is portable to any platform with Fetch-and-Add or CAS.
> BTW, VZOOM also has a very high-performance memory allocator. There is an
> algorithm in there that allows one to even transform single-threaded
> allocator into scaleable multi-threaded allocator; no kidding:
>
> http://software.intel.com/en-us/forums/threading-on-intel-parallel-architectures/topic/61145/reply/65555
Sorry, wrong link above, here is corrected link:
http://software.intel.com/en-us/forums/threading-on-intel-parallel-architectures/topic/61145
[...]
>"Chris M. Thomasson" <n...@spam.invalid> wrote in message
>news:f6udm.24979$8B7....@newsfe20.iad...
>> "Richard Harter" <c...@tiac.net> wrote in message
>> news:4a7662a1....@text.giganews.com...
>>> On Sun, 2 Aug 2009 17:50:57 -0700, "Chris M. Thomasson" <n...@spam.invalid>
>>> wrote:
>>>
>>>>"spinoza1111" <spino...@yahoo.com> wrote in message
>>>
>>>>Great. BTW, how are you implementing those semaphores? I know of a really
>>>>nice algorithm invented by Joe Seigh over on comp.programming.threads. It
>>>>has wait-free fast-paths, and it's fair. Perhaps it might be of use to
>>>>you.
>>>>Also, if you ever decide to support message passing, I can turn you on to
>>>>many high-performance queue algorithms that outperform basically anything
>>>>else out there.
>>>>
>>>
>>> Any references on those queue algorithms?
>>
>> Post over on comp.programming.threads for MUCH more detailed information.
>
>I left out details on memory barriers for clarity. If you want to use one of
>the presented queues, post a query over on `comp.programming.threads' and we
>will elaborate about the memory barriers that your going to need.
Thanks for the links. I will dig into them.
> Rather like yours in that respect.
Any chance we could get you to stop feeding yet another troll?
Brian
> makes no sense: has an unprocessed and thus unexpressed hostility.
Edward Nilges was perplexed
Hostility was not processed
All because he couldn't see
His own expressed hostility
it is funny to see that trolls abund in every culture and language,
protected from shame by semi-anonymity.
in the italian math group (news:it.scienza.matematica) there is a guy
who says to everybody else that they are wrong because (he says) one and
zero are the same number, and then he goes on ranting in a way it is
impossible to cope with. and the troll is constantly fed (by mee too,
mea culpa).
then there used to be one guy that simply said zero is not a number and
should not be used, and noticed the abuse about everyone that told him
he's an asshole. an so on.
but i must admit that this spinoza guy is of another league (for good
and for bad): at least he's literate.
bye
Hello Mr. Nilges!
You and I read the same newspaper; I know because I see your
Letters to Editor from time to time. They're usually well-argued.
It would be nice if you exercised the same care in your Usenet
postings.
> Why do you pass on falsehoods about people? It's criminally
> and civilly liable, and, it's wrong.
Yes, we agree again. Slandering people is wrong. But methinks
you are more the slanderer than slanderee.
> ... conduct manifests homophobia in that he likes to break
> up conversations between typically male posters by telling one or the
> other that the other is incompetent.
"Homophobia???" Check your dictionary.
> I do believe that his and others' use of "troll" is the use of a
> traditionally racist Nordic word that fits into the same types of
> sentences as does "Jew".
The word "troll" becomes anti-Semitic??? Wow!!
Ed, I don't know what tickles your fancy -- you might try the girls
with
handcuffs and whips -- but whatever it is, try it for a few hours and
then repost. It will surely lead to an improvement.
James
...if over-edited, I not being a prestigious chap. Thanks for reading
the abbreviated letters, however. I'd say the fact that I have passed
the editorial bar, which is set high at our mutual newspaper (a
prestigious world paper of record), along with the fact that I've
published articles and a book should give you pause before you make
certain assumptions that are made by others.
> It would be nice if you exercised the same care in your Usenet
> postings.
I believe I do.
>
> > Why do you pass on falsehoods about people? It's criminally
> > and civilly liable, and, it's wrong.
>
> Yes, we agree again. Slandering people is wrong. But methinks
> you are more the slanderer than slanderee.
This is NOT the case.
You see, people see what's being said about them and their instinct is
to defend themselves, perhaps with equal force if hopefully with no
fraud. But as I have said elsewhere, other posters don't see the
sequence of events, and very often confuse a person vigorously
defending herself with the attacker, since they read a couple of
recent posts and jump to conclusions.
Furthermore, corporate life makes people less brave and less apt to
defend themselves, thus a vigorous self defense against a nasty,
enabling and/or snide comment, of the sort that Heathfield specializes-
in, seems like bad behavior. But note that the US Constitution, the
oldest written constitution in the world, recognizes the need of men
to have freedom of speech so as to defend themselves...whether against
"noble lords" or their bully boys makes no difference.
>
> > ... conduct manifests homophobia in that he likes to break
> > up conversations between typically male posters by telling one or the
> > other that the other is incompetent.
>
> "Homophobia???" Check your dictionary.
The dictionary is a poor guide to the meaning of words. Most truly
literate people learn vocabulary from reading books other than the
dictionary, for the lexicographer reports either his personal
understanding (as did Samuel Johnson in his Dictionary), or general
received usage, which is often just wrong, and lowest-common-
denominator in terms of insight.
Overt gay-bashing "homophobia" might be what the dictionary reports.
However, it is not the lexicographer's job to do social science, nor
to theorize that homophobes may be ordinary thugs enforcing norms
which society needs to enforce as a whole...but which the more genteel
are loth to enforce themselves. Homophobia may be a special case of a
common male inability to relate, connect and talk about feelings
EXCEPT in cases of war and stress under the buddy system.
>
> > I do believe that his and others' use of "troll" is the use of a
> > traditionally racist Nordic word that fits into the same types of
> > sentences as does "Jew".
>
> The word "troll" becomes anti-Semitic??? Wow!!
Again, this is NOT what I am saying. I am saying that two major
theorists of anti-Semitism, Sartre and Arendt, have pointed out (Anti-
Semite and Jew: The Origins of Totalitarianism) that the Jew was a
target of convenience for the French anti-Semite in Sartre and the
German anti-semite in Arendt.
The French anti-semite transferred his unacceptable feelings of
weakness and failure onto the closest and most Other. Today these
feelings are transferred to Palestinians, made stateless in effect as
the Jews once were (Gazans are unable to elect a leader and have the
international community accept this: they are not given sovereignity).
Arendt's anti-Semite turned on the Jews because they'd lost princely
support once German states and after 1870 the Reich cultivated non-
Jewish sources of finance. They were targets of convenience. There was
nothing "essential" in the Jew to attract the hatred of the anti-
Semite in either case; indeed to hypostatize some magical power of
repulsion would itself be a species of anti-Semitism.
This means that anti-Semitism is anti- first and instantiated with a
target later, and that target could be Jews, Palestinians, or perhaps
in a minor way right here, the male poster's "idea" of the troll.
In Sartre, the anti-Semite constructs an image of the Jew built
introspectively out of his own unacceptable feelings of being weak as
well as is unavowable fantasies of power, the result being "der Ewige
Juden" who is, at one and the same time, a world banker and
contemptible little merchant.
In anti-trollismus, the male poster envisions the "troll" as he fears
himself to be: without friends, a crappy or nonexistent job, and no
girlfriend or social life. By calling posters "trolls", posters like
me who are outlier cases for the most part because we can write gude
wif gude gramer and speling, whose posts look different on their
screen because they resemble polished text and not random horse shit,
the male poster hopes that his own secret weakness will stay well
hidden.
>
> Ed, I don't know what tickles your fancy -- you might try the girls
> with
> handcuffs and whips -- but whatever it is, try it for a few hours and
> then repost. It will surely lead to an improvement.
Been there, done that. Telling a guy to get laid is the usual answer
in an administered world to original thought. But we have all that
shit here in Hong Kong.
>
> James
Gee, you're completely unqualified to address my points so you start
babbling about some other guy. So Musatov does this and this other guy
does that, and both are people with unusual idees fixe. How is that
germane to my concerns about the fraudulent promotion of C? My
experience with Nash taught me that "loonies" are not interchangeable:
each has his own story. I'm a loonie in the statistical sense (being
unusual and an "outlier" curve-wise) but there is an infinite number
of ways to be totally out of it. Furthermore, my experience at Bell
Northern Research and reading of Diane Vaughan's study of Challenger
showed me that entire communities can be statistically "normal" and
deviant at the same time.
Marcuse foresaw in 1970 that men would eventually, and willingly, line
up like sheep in rank order, with little computer programmers forced
to acknowledge the deep insight of fat men with more "experience" in
crappy programming languages. One Dimensional Man, like a character in
Edwin Abbot's Flatland restricted to one dimension, can only look to
his left and see someone a little bit richer and to his right someone
a bit poorer. He can't "process" characters who refuse to get in line,
so he reduces them to the simple category of "loonie".
Ant labored mightily
With a thesaurus and rhyming dictionary
To produce almost acceptable
Poetry. Thus we see the fable
Of the rubber tree.
Ant missed the mark, in the dark,
Because I am perfectly aware of mine own
Hostility. This thing of darkness I acknowledge
As did Prosper his Caliban.
I'm not worthy! I;m not worthy!
Looks like a great stack o' stuff; I will look into it. I use
multithreading only in the most elementary ways.
But your accomplishments would have been greater had you used a
language other than C.
Well, THAT took a while for you brainiacs to get right. You sure that
C doesn't damage the ability to use a more important language, such as
English?
>
> --
> bites hand
Not if you read it in World Received Pronunciation or Britiish-posh.
If y'all read it like George Bush it is not rhythmic. Here is how to
stress it:
There's a CODer named CHRIS ThomasSON
Who's defICient in LOGic and has no funnyBONE
His reSPONses are SPAM
Written UNder the INfluence of DiazePAM
That unFORTunate SOD, ThomasSON.
Chris probably doesn't pronounce his name that way, but the use of
"bone" forces the reader to do so in an amusing fashion. The other
stresses are normal.
>
> --
> llllllllllllllllllll
> BTW, if you give up, I will show you the answer. I invented a very nice
> general purpose reader writer lock that can outperform most existing
> native OS primitives (e.g., the NPTL).
Okay, since spinoza does not see any need to take on the challenge, here is
my read/write lock:
http://software.intel.com/en-us/forums/intel-threading-building-blocks/topic/65822
Here is a version which complies with all the rules of the challenge:
http://software.intel.com/en-us/forums/intel-threading-building-blocks/topic/65822/reply/87849/
Here is a version of it which will work on any IA-32 platform which supports
POSIX (e.g., has semaphores), and GCC:
You can test it's performance against the native read/write lock by simply
defining `USE_PTHREAD_NATIVE_RWLOCK'. Here are the results I am getting from
the test as-is on Linux Fedora Core 10. This mainly tests read performance.
Writes are VERY few and far between. So writer-to-reader contention will
probably never show up. Anyway, here is the command line I used to compile
my version:
gcc -Wall -pedantic -DNDEBUG -O3 rwmutex.c -lpthread
And here is the one I used for the NPTL:
gcc -Wall -pedantic -DNDEBUG -DUSE_PTHREAD_NATIVE_RWLOCK -O3
rwmutex.c -lpthread
Here is the relevant portion of the output I get from my version:
TEST RUN 1 of 2 RUNNING...
READERS ACHIEVED 249999 ITERATIONS PER-THREAD-PER-SECOND
TEST RUN 1 of 2 COMPLETED!!!
------------------------------------
TEST RUN 2 of 2 RUNNING...
READERS ACHIEVED 249999 ITERATIONS PER-THREAD-PER-SECOND
TEST RUN 2 of 2 COMPLETED!!!
------------------------------------
And here is the output I get from the NPTL version:
TEST RUN 1 of 2 RUNNING...
READERS ACHIEVED 133333 ITERATIONS PER-THREAD-PER-SECOND
TEST RUN 1 of 2 COMPLETED!!!
------------------------------------
TEST RUN 2 of 2 RUNNING...
READERS ACHIEVED 133333 ITERATIONS PER-THREAD-PER-SECOND
TEST RUN 2 of 2 COMPLETED!!!
------------------------------------
As you can see, my version is getting 116666 more reads
per-second-per-thread. AFAICT, that is a very significant number. Imagine if
those reads represented searches in a shared data-structure. Pretty nice
speed up over the native NPTL. Please note, I have test this under
OpenSolaris and Fedora Core 10. I have not tried it against the most recent
version of Fedora.
Enjoy!
:^D
so you cannot tell a compliment from an offense. good shot boy.
bye
> >> The UK libel lawsuit project against Richard Heathfield has been
> >> re- activated. I have not engaged a firm of solicitors as yet but I
> >> shall if his behavior persists [...] although I am
> >> an ordinary person without a lot of financial resources this needs
> >> to go forward.
<snip>
> I find it amusing, however, that he has to appeal to others for help
> with the bus fare to the solicitor's office. The law is a game for
> rich people to play.
particularly the english libel laws! Legal Aid (state assisted legel
assistance)
won't cover it. I doubt legal insurance would either (insurance
companies
aren't stupid enough of to step into that particular tar pit). So he's
left with either the No Fee No Pay Ambulance Chasers Pro Bono who
tend to prefer big fat companies to sue or rely on Pro Bono. That is
a lawyer who is willing to give his time for nothing.
> If he does sue (which won't happen), he will
> lose money, I may or may not lose money (depending on whether the
> judge awards costs against him for wasting everybody's time), and the
> fat cat greedy capitalist lawyers (as he no doubt thinks of them)
> will feather their nests nicely.
I can't see where the money is to come from
I am unqualified to debate these issues with you at this time. I
studied the subject in graduate school but IMO at the time, the field
of low-level code was too inchoate and inarticulate, with manufacturer
greed and arrogance creating a toxic smog of disinformation.
Everybody seemed to have their own axe to grind, and I could never
tell the difference between a valid technical claim and OEM greed
speaking through a hired hand. I vastly preferred compiler development
since programming language arose like human speech itself, outside
market forces.
But I concede that you have done significant work. My question
remains: was it your talent and genius that did the work, or some
magical property of C? I would say it is the former.
>
> > But I concede that you aren't doing auto parts. The question remains
> > whether or not C is the right tool for what you're doing.
>
> I use a mixture of C and assembly language. C is low-level enough to allow
> me to do what I want. Tell me, if I used C sharp, how could I ensure that,
> for instance, data is padded to a L2 cache line and aligned on a L2 cache
> line boundary? Do you know why that's important wrt synchronization
That seems to this relative layperson pretty silly. It festishizes a
"cache boundary" which is not a law of nature, but the result of
another developer wanting, for a good reason or bad, to do bit shifts
rather than addition or subtraction...I think.
It's absurd to reason from such a specific need to the conclusion that
C is great.
> algorithms? Don't get me wrong, C# is a fine language and I do use it from
> time to time. But, I can reap much better performance if I use C and ASM to
> create synchronization libraries. I can then use that library in C#,
> everybody wins.- Hide quoted text -
You need some sociology to go with all those bits and bytes. Critical
theory teaches us that modern society needs for its continued
viability to present a "naturalized" face to the ordinary person.
Social structures which were questioned in the French revolution, in
1830, in 1848 and in the Paris Commune need to be thought of a
"reality", and this is the reason why programmers think inside the
box.
I've never written an OS exclusively in a high level language, but I
believe it's been done. Those efforts fell by the wayside because they
would have in their day commodified mainframes, and this was
unacceptable. Therefore, programmers learned to build in all sorts of
dependencies in their code in order to make it a unique product that
would not interoperate, until Open Source. But by that time, the
damage had been done. Countless architectures had been built around
the quirks of C, for example.
Elvis Costello has a song about the Thatcher era: all this useless
beauty. Much of technology is useless beauty because if we'd done it
right in the first place, there would be no need for all this
Beautiful Code.
A society with a World Government and a World Mainframe running Cobol
would be boring, but would probably feature a three day work week.
Everyone secretly prefers such a fantasy to the one we have which is
in the process of going arse up, in some small part thanks to "new
paradigms" like C without originality that produce much heat but
little light in the long run.
[OK, not Cobol. Some language as yet unwritten. Like mine. Yeah,
right. Well you get the picture: we wanted socialism but like Captain
America and Billy in Easy Rider, we blew it.]
Let me return however to a more technical subject. You are saying
something true GIVEN the existing state of technology: that languages
like C# and Java with a runtime cannot run by themselves without an
underlying codebase that does deep and nasty things in ASM and C.
For C# or Java to work all the way down to the bare metal, the bare
metal would have to be a C# or Java machine perhaps with microcode to
check for type safety, and the "computer designed for the language"
would walk again as it did pre-Risc.
But this means that there's nothing special about C. It was the
madness or the wisdom of a crowd.
> I'm not worthy! I;m not worthy!
I know that your a smart guy and will probably be able to progressively
catch on. Although, some REALLY smart people have a hard time getting a grip
on this kind of stuff. Unfortunately, these types of algorithms are not for
everybody. I have been on consulting jobs where peoples eyes glaze over and
they seem like they are spaced out.
> Looks like a great stack o' stuff; I will look into it. I use
> multithreading only in the most elementary ways.
I think you might be able to use some of these algorithms in the runtime of
your language.
> But your accomplishments would have been greater had you used a
> language other than C.
You know, I think I am going to have to agree with you on this one. Humm...
Well, luckily I have several fully-self contained examples of some of my
non-blocking queues and my eventcount in C# that you can dive into and play
around with:
http://cpt.pastebin.com/f72cc3cc1
(multi-producer/consumer queue by me /w eventcount by me)
http://cpt.pastebin.com/f52dcc0fc
(single-producer/consumer queue by me /w eventcount by me)
http://heev.pastebin.com/f70a73f00
(multi-producer/single-consumer by Dmitriy V'jukov /w eventcount by me)
http://heev.pastebin.com/f270184be
(multi-producer/single-consumer by Dmitriy V'jukov /w eventcount by me /w
node cache by me)
http://heev.pastebin.com/f10399a09
(multi-producer/single-consumer by Dmitriy V'jukov /w eventcount by me /w
node cache by Dmitriy V'jukov)
I have to admit, coding these algorithms in C# is ___extremely___
convenient. Especially for the first example, which needs a form of tricky
memory management when coded in C/C++. The C# garbage collector takes care
of everything, and its really nice to work with.
Take a look at the C# code before looking at the more raw examples I posted
because I think it will be easier for you to grasp. BTW, these C# programs
are portable to different operating systems and architectures through the
Mono project:
This excellent project ported the .NET platform to a lot of new platforms.
Pretty cool!
;^)
Another excellent project was created by my friend Dmitriy V'jukov:
http://groups.google.com/group/relacy
Relacy Race Detector is my personal tool of choice for verifying the
correctness of some of my algorithms. Dmitriy is very smart and has been
interviewed by Intel and the go-parallel team:
http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=212903326
he became a black belt member and was interviewed again:
Enjoy!
:^)
> Not if you read it in World Received Pronunciation or Britiish-posh.
> If y'all read it like George Bush it is not rhythmic.
lol :^)
<snip>
> Let me return however to a more technical subject. You are saying
> something true GIVEN the existing state of technology: that languages
> like C# and Java with a runtime cannot run by themselves without an
> underlying codebase that does deep and nasty things in ASM and C.
<snip>
Oh, they're hardly nasty, or even ugly for that matter. Have you seen
inheritance
and polymorphism implemented in C? Now *that*'s the devil's work right
there. :-)
But hey, I love C for the same reasons Mr.Thomasson uses it - which as
you say imply
something about my wit, which I'll snatch as a grand compliment.
I wonder though; if not for C, which high-level language would we use
to satisfy
the need to code on an abstraction level that is sufficiently close to
the machine?
Doesn't the fact that C satisfies that need makes it a good tool for
that purpose?
Richard, this is just nonsense. You're the pub bore who has to be the
authority on everything, and the real authority on certain things has
just walked in to sort you out. You think a Limerick can be writ by
rote and your half-literacy is plain.
Who LIVES in a NorthUMBerland WHEATfield deliberately breaks your rule
while being aware of it because that's the essence of poetry...to know
and break the rules. The implied speaker has nothing but a well-
justified contempt for you, and therefore makes you and the lads wait
for the UMB beat. Poets as opposed to pedants do this all the time.
The poem is meant to be delivered in what you Limeys call a posh
manner, a self-confident drawl as opposed to the clipped anxiety of
the clerkish class.
I considered "who lives in a northern wheatfield" but this implies
that you live in Canada.
And you humorlessly and pedantically reply without writing your own
attempt, showing you to be a fellow, look you, of no wit. As in the
case of C, you know the rules but cannot create. Instead, you try to
destroy people like Navia and Schildt who can.
There is a yob named Heathfield
Who sallies forth enarmit with sword...but no shield
He gets whacked in the head
And is then left for dead
That unfortunate Yob, named Heathfield
There is a glorified Clerk who with clipped Anxiety
Repeats his saws with at best a gloomy Piety
He groans from his Farm
And causes Alarm.
I daresay one should avoid his Society.
In Britain there lives a low programmer
Deficient in wit, hopeless in style, and hapless in grammar:
His name is Dickie Boy
I like with him to Toy
Because he's a vicious little thug and incompetent as a
Programmer.
[Had enough? Then stop bullying people!]
There's a lesson there. Perhaps they think you're a "troll" even if
you aren't.
>
> > Looks like a great stack o' stuff; I will look into it. I use
> > multithreading only in the most elementary ways.
>
> I think you might be able to use some of these algorithms in the runtime of
> your language.
Ah yes: I am working on it during my commute in Victoria Harbor, which
gets rougher and rougher as containership traffic increases and the
harbor is artificially narrowed.
>
> > But your accomplishments would have been greater had you used a
> > language other than C.
>
> You know, I think I am going to have to agree with you on this one. Humm...
> Well, luckily I have several fully-self contained examples of some of my
> non-blocking queues and my eventcount in C# that you can dive into and play
> around with:
>
> http://cpt.pastebin.com/f72cc3cc1
> (multi-producer/consumer queue by me /w eventcount by me)
>
Thanks.
> http://cpt.pastebin.com/f52dcc0fc
> (single-producer/consumer queue by me /w eventcount by me)
>
> http://heev.pastebin.com/f70a73f00
> (multi-producer/single-consumer by Dmitriy V'jukov /w eventcount by me)
>
> http://heev.pastebin.com/f270184be
> (multi-producer/single-consumer by Dmitriy V'jukov /w eventcount by me /w
> node cache by me)
>
> http://heev.pastebin.com/f10399a09
> (multi-producer/single-consumer by Dmitriy V'jukov /w eventcount by me /w
> node cache by Dmitriy V'jukov)
>
> I have to admit, coding these algorithms in C# is ___extremely___
> convenient. Especially for the first example, which needs a form of tricky
> memory management when coded in C/C++. The C# garbage collector takes care
> of everything, and its really nice to work with.
>
> Take a look at the C# code before looking at the more raw examples I posted
> because I think it will be easier for you to grasp. BTW, these C# programs
> are portable to different operating systems and architectures through the
> Mono project:
>
> http://www.mono-project.com
It's interesting that open source tends in the direction of machine
independence, since its programmers don't have to make other people
rich.
>
> This excellent project ported the .NET platform to a lot of new platforms.
> Pretty cool!
>
> ;^)
>
> Another excellent project was created by my friend Dmitriy V'jukov:
>
> http://groups.google.com/group/relacy
>
> Relacy Race Detector is my personal tool of choice for verifying the
> correctness of some of my algorithms. Dmitriy is very smart and has been
> interviewed by Intel and the go-parallel team:
>
> http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=21...
>
> he became a black belt member and was interviewed again:
>
> http://software.intel.com/en-us/articles/in-conversation-with-dmitriy...
>
> Enjoy!
>
All this is pretty heady stuff. Thanks.
> :^)
You know, its a shame I did not try and code as many of my inventions as I
can in C#. I only did a few of them. Unfortunately, I cannot port all of my
stuff to C# because of some technical issues. For instance, C# does not have
DWCAS (Double-Width Compare-and-Swap). However, I promise that I will try to
port more and more of my stuff to C#, and even Java which incidentally does
have DWCAS.
I think it will open my hard work up to a MUCH wider audience. Coding these
things in C and ASM is like juggling chainsaws, and it can be fairly
tedious. Coding the algorithms that are compatible with C# and Java is a
hell of a lot "easier".
I am also thinking of granting a patent license for my vZOOM algorithm to
open-source non-commercial software only.
[...]
<snip>
> Richard, this is just nonsense. You're the pub bore who has to be
> the authority on everything, and the real authority on certain
> things has just walked in to sort you out. You think a Limerick can
> be writ by rote and your half-literacy is plain.
FCOL. If you don't believe me, check it out in a poetry newsgroup.
<nonsense snipped>
Agreed. Pass around the rouge.
>You sure that
> C doesn't damage the ability to use a more important language, such as
> English?
>
Importance is a relative, subjective measure. You seem to persist
in conflating such estimations with absolute, objective reality.
The importance of that little exchange is that everyone was nice to
each other, striving for truth. Even if C were all that you claim,
why the fuss? If we are all so braindead as to indulge in such
degrading behavior as to attempt to make use of the C programming
language, how can you expect our debilitated minds to appreciate
the severity of our depravity?
What the real goal here is?
>
> > --
> > bytes hard
>
>
It's amazing that technicians can be so utterly dogmatic on their
choice of language yet as regards the humanities and natural language,
regard issues as "subjective"...especially because since the 17th
century and the dawn of the modern era, "subjective" and "objective"
have reversed meaning: "subjective" used to mean that "man is the
measure of all things" and able, indeed required, to make valid
judgements, while "objective" meant uninterpreted facts: today,
"subjective" means something approximately like they say in the Army,
that "opinions are like assholes, everyone's got one"...a stance which
makes it impossible for judgement to trump force and its enabler,
*schlamperei*, going along to get along.
It's far more sensible to judge that there is a reality in important
matters, because absent this willingness to judge, the unused facility
of judgement finds refuge in formalistic mathematics such as suduko or
meaningless programming horseshit.
As human beings we judge. But modern society tells us we should not
judge, and that opinions are like assholes: one's opinion is just as
good as any other, so the local loudmouth (such as Heathfield) gets
his thug way. So, programmers take refuge in an apolitical praxis in
which they can judge without interference, their natural instinct
being thwarted.
>
> The importance of that little exchange is that everyone was nice to
> each other, striving for truth. Even if C were all that you claim,
> why the fuss? If we are all so braindead as to indulge in such
> degrading behavior as to attempt to make use of the C programming
> language, how can you expect our debilitated minds to appreciate
> the severity of our depravity?
>
> What the real goal here is?
>
>
>
>
>
> > > --
> > > bytes hard- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
The term for this is 'bigotry'. You are guilty of synecdoche.
--
lxtrog
Wow, such a FONT of information that would be. What next? One of those
online poetry contests?
There is a fella named Dickie
Who gets his info 'bout Poetry
From fools in newsgroups
Who are as he be the dupes
Of companies that take his mon-nee!
Jose Ortega y Gasset
Practically blew himself a gasket
Thinking of the revoltin' masses:
The reign of boors, and bullies, and asses
But this the Internet sure surpasses!
Richard Heathfield fancies himself an Authority
On all things, from programming to Poetry.
But alas we see
From prosody to C
He's as wrong as wrong can be!
I can Interchange a 64 bit Long as an atomic operation in the current
free release of C Sharp "express":
System.Threading.Interlocked.Exchange(ref lngValue, lngValue2);
Is this what you mean?
I can do this with double precision values in addition to Longs.
Is this what you mean?
I can even do this with reference objects using generics.
Is this what you mean?
Whoa, cowboy. You're saying that to oppose bigotry in a general form,
an inability to relate and a tendency to exclude, is bigotry.
But that would mean that one could never object to bigotry. How nice
for bigots. They only have to start whining about "reverse
discrimination".
>
> --
> lxtrog- Hide quoted text -
Hey, thanks for pointing that out. MY BAD. I so seldom get anything
but shit sometimes I don't see someone saying something nice. I
apologize quite sincerely to the poster above! I thought he was merely
spinning tales about Wacks I've Known, but I didn't see where he
conceded that at a minimum I'm a Wack what can write literate prose.
I'll have a bake sale. I will add giggle weed to the brownies. We'll
all get baked.
I'll stage an international rock and roll festival on Lamma Island.
> On Sun, 2 Aug 2009 14:39:23 -0500, "Bruce C. Baker"
>
> >Nilges AND Musatov? Most NGs aren't lucky enough to have even ONE resident
> >loon!
> >
> >How did comp.programming come to be so ... blessed? :-)
> Shhh. If JSH hears, he might want to join in as well.
I suggest inviting that MI5 guy in, as well.
Richard
> System.Threading.Interlocked.Exchange(ref lngValue, lngValue2);
I need to be able to spinoza mutate a reference to an object along with an
integer. In C, the data-structure would look like this for a 32-bit system:
struct anchor64 {
void* ptr; /* assume void* is 32-bits */
int32_t count;
};
static struct anchor64 g_anchor64 = { NULL };
Now, I can use DWCAS (e.g., CMPXCHG8B on IA-32) to atomically mutate
`g_anchor64'.
in a 64-bit system it would look like:
struct anchor128 {
void* ptr; /* assume void* is 64-bits */
int64_t count;
};
There are some "hacks" that I can apply in the 64-bit version in order to
squeeze everything into 64-bit anchor (e.g., pointer packing/compression).
Windows 64 does this with their InterlockedSList API:
http://msdn.microsoft.com/en-us/library/ms684121(VS.85).aspx
In Java this can be accomplished via `AtomicStampedReference':
http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/atomic/AtomicStampedReference.html
Is there an analog of `AtomicStampedReference' in C#? Please try and bear
with be here because I am certainly no expert in C#!
thanks for you help spinoza; I appreciate it. If I can pull this off in C#,
I will be happy!
:^)
Ummm, that should read as:
spinoza, I need to be able to mutate a reference to an object along with an
integer. In C, the data-structure would look like this for a 32-bit system:
Sorry about that.
;^/
> struct anchor64 {
> void* ptr; /* assume void* is 32-bits */
> int32_t count;
> };
>
>
> static struct anchor64 g_anchor64 = { NULL };
>
>
> Now, I can use DWCAS (e.g., CMPXCHG8B on IA-32) to atomically mutate
> `g_anchor64'.
[...]
Chris:
If you want to discuss C# or Java, please take it to a forum that
discusses those languages. If you want to discuss "spinoza" (is that
a language?), you might try comp.lang.misc or e-mail; comp.programming
might be appropriate as well, but comp.lang.c is not.
--
Keith Thompson (The_Other_Keith) ks...@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"
Well, here is what I came up with:
It seems we have liftoff spinoza!
:^D
DAMN IT!!!!!!! ARGH. I think I spoke too soon! Something is NOT working
here. This is an example:
This simple contrived example was designed to force the DWCAS to fail by
explicitly setting the counter portion of the comparand to 5, while the
target's counter was 1. However, it erroneously succeeded anyway. The DWCAS
should have failed. I must be missing something here.
I have to go right now, but I will post this query over on a C# newsgroup. I
will post a link to my question here, so that any followers can continue
reading the discussion over there.
thank you for you patience.
The DWCAS returns true, however, no actual update was made to the target. I
have a feeling that this is not going to work out in C#.
DAMN!
Anyway here is my query on a C Sharp NG spinoza:
An actual discussion has started without disruption. The question is
whether the safer language C Sharp can replace C, so Thomasson's
discussion is on-topic. What offends you is that he came in here to
mock me but was mocked in a creative fashion with a limerick you
couldn't have written, so we had a laugh and simmered down...so now
you're coming in with a topic canard and flame because you have a
vested interest in this ng being a haven for incompetent bullies.
I can't follow all his technology but I am trying, so I'll thank you
to desist.
No problem, but you're doing all the significant work here. I more or
less blindly identified a feature I don't use all that much but seemed
to be what you wanted.
Cool site, pastebin. I will play with the code on the commute to work
and see what I can come up with.
> > thank you for you patience.- Hide quoted text -
> No problem,
thank you! :^D
> t you're doing all the significant work here. I more or
> less blindly identified a feature I don't use all that much but seemed
> to be what you wanted.
Trust me spinoza, you hit the nail directly on the head. Anyway, here is
full self-contained compliable example code in C and IA-32 asm (MSVC 6.0
and higher) that I am trying to accomplish/mimic in C#:
___________________________________________________________________________
#include <stdio.h>
__declspec(naked) int
IA32_DWCAS(
void volatile* const _pthis,
void* const pcmp,
void const* const pxhcg
) {
_asm {
PUSH ESI
PUSH EBX
MOV ESI, [ESP + 16]
MOV EAX, [ESI]
MOV EDX, [ESI + 4]
MOV ESI, [ESP + 20]
MOV EBX, [ESI]
MOV ECX, [ESI + 4]
MOV ESI, [ESP + 12]
LOCK CMPXCHG8B QWORD PTR [ESI]
JNE x86_DWCAS_failed
MOV EAX, 1
POP EBX
POP ESI
RET
x86_DWCAS_failed:
MOV ESI, [ESP + 16]
MOV [ESI], EAX
MOV [ESI + 4], EDX
MOV EAX, 0
POP EBX
POP ESI
RET
}
}
struct DWCAS_Anchor {
void* ptr;
unsigned __int32 counter;
};
static struct DWCAS_Anchor g_anchor = { NULL };
int main(void) {
struct DWCAS_Anchor cmp = g_anchor;
struct DWCAS_Anchor xchg = { NULL, 666 };
printf("Before DWCAS:\nDWCAS_Anchor.ptr = %p\nDWCAS_Anchor.counter ==
%lu\n\n",
g_anchor.ptr, g_anchor.counter);
if (IA32_DWCAS(&g_anchor, &cmp, &xchg)) {
printf("After DWCAS:\nDWCAS_Anchor.ptr = %p\nDWCAS_Anchor.counter ==
%lu\n\n",
g_anchor.ptr, g_anchor.counter);
}
cmp.counter = 666;
xchg.counter = 555;
if (IA32_DWCAS(&g_anchor, &cmp, &xchg)) {
printf("After DWCAS:\nDWCAS_Anchor.ptr = %p\nDWCAS_Anchor.counter ==
%lu\n\n",
g_anchor.ptr, g_anchor.counter);
}
cmp.counter = 123;
xchg.counter = 999;
if (IA32_DWCAS(&g_anchor, &cmp, &xchg)) {
printf("After DWCAS:\nDWCAS_Anchor.ptr = %p\nDWCAS_Anchor.counter ==
%lu\n\n",
g_anchor.ptr, g_anchor.counter);
} else {
printf("After DWCAS FAILED:\nDWCAS_Anchor.ptr = %p\nDWCAS_Anchor.counter
== %lu\n\n",
g_anchor.ptr, g_anchor.counter);
}
return 0;
}
___________________________________________________________________________
If you can give me any hints pointers, I will be absolutely grateful.
BTW, thank you for your valuable time. I am glad we can get along now. I
learn a lesson from you: DO NOT JUMP TO CONCLUSIONS LIKE A STUPID MORON!
:^)
Sorry about that non-sense!
;^(...
No. I said what I said. I did not say what you said.
You did not say what I said. You said what you said.
> But that would mean that one could never object to bigotry. How nice
> for bigots. They only have to start whining about "reverse
> discrimination".
False premise implies dubious conclusion. Big surprise!
A unilateral prejudice against bigotry is itself bigotry;
but (IMHO) it is the least destructive kind, and the only
alternative is that strange little philosophy described
by Jeshua ben Miriam which few are capable of following
in earnest.
>
> > --
> > lxdroog- Hide quoted text -
The nice thing about the philosophies of Jesus, Ghandi, and Dr. King
is that they don't have to be followed "in earnest". Following them
just a little and for shits and giggles heals the world, whereas to
follow the silly philosophy that they are just a charming species of
bigot takes too much work and usually leads to the war of all against
all.
>
>
>
>
>
> > > --
> > > lxdroog- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
I am working with your code in C# Express right now. I am surprised
that I can be of help since I now work full time as a K-12 teacher,
having left the field after publishing Build Your Own .Net Language
and Compiler (Apress 2004) owing to disgust with programmers here. But
this is an interesting and challenging project. Thanks.
Preliminary answer:
http://msdn.microsoft.com/en-us/library/system.threading.interlocked.compareexchange.aspx
CompareExchange<(Of <(T>)>)(T%, T, T) Compares two instances of the
specified reference type T for equality and, if they are equal,
replaces one of them.
But your cmp is a NEW anchor. The types are "equal" only if their
names refer to the same instance. So, the compare never occurs.
I have some kids coming for the next class, will continue to
research...
Is the code at the end of this post what you wanted? I changed cmp to
set it to target so that the equality holds. It is not possible for
CompareExchange to determine whether two objects are internally
identical in all particulars, since equality-of-objects is only
predefined for value objects and strings (and in the case of strings,
there are different theories, such as case sensitivity versus case
insensitivity, as to what constitutes inequality).
class application
{
class anchor<T>
{
public T m_ptr;
public long m_counter;
public anchor(T foo, long counter)
{
m_ptr = foo;
m_counter = counter;
}
};
static bool DWCAS<T>(ref anchor<T> dest, ref anchor<T> cmp,
anchor<T> xchg)
{
anchor<T> ret = System.Threading.Interlocked.CompareExchange
(ref dest, xchg, cmp);
if (ret.m_ptr.Equals(cmp.m_ptr) && ret.m_counter ==
cmp.m_counter) return true;
cmp = ret;
return false;
}
static void Main(string[] args)
{
anchor<string> target = new anchor<string>("Hello", 1);
anchor<string> xchg = new anchor<string>("Goodbye", 2);
anchor<string> cmp = target; // new anchor<string>
(target.m_ptr, 1); ***** CHANGED ******
System.Console.WriteLine("Before DWCAS:\ntarget.m_ptr == " +
target.m_ptr +
"\ntarget.m_counter == " + target.m_counter + "\n");
if (DWCAS(ref target, ref cmp, xchg))
{
System.Console.WriteLine("After DWCAS:\ntarget.m_ptr == "
+ target.m_ptr +
"\ntarget.m_counter == " + target.m_counter + "\n");
}
System.Console.WriteLine("\n\nPress <ENTER> to exit...");
System.Console.ReadLine();
}
};
RESULTS
Before DWCAS:
target.m_ptr == Hello
target.m_counter == 1
After DWCAS:
target.m_ptr == Goodbye
target.m_counter == 2
Press <ENTER> to exit...
Thus the only meaningful "equality" of objects is Leibnizian and as
such reminiscent of the philosopher Leibniz' "identity of
indiscernibles". Leibniz' ontology, if memory serves, consisted of
monads (objects) all distinct because no matter how closely they
match, they had different locations in space and time (raum undt
zeit). Thus in software, two objects are only the same if they are the
same, viz., two names of the same object return identical "space time
coordinates" (addresses in von Neumann space).
Interestingly however, this raises a problem for Leibniz if not
software. NAMES cannot themselves be monads because NAMES do not
occupy Leibnizian space and time. Interestingly computer storage
models the philosophical problem, because at runtime absent a
debugger, the NAMES of objects go away and have no location in von
Neumann space and time. Leibniz may have failed, in his ontology, to
account for language if he intended monads to explain everything.
But I digress. Or, as Dan Appleman wrote on my manuscript during his
dev edit of Build Your Own .Net Language and Compiler, "yeah, you
digress".
We seem to be in comp.programming and not comp.lang.c. If you made
that change Chris, cool. If anyone else did, not cool. This discussion
is as much about C undt seinem grossen deficiencies, undt ihren
replaceablity by C Sharp EVEN FOR DER LOW LEVEL SYSTEM
PROGRAMMERUNGEN, as it is about C Sharp. Keith Thompson, if it was
you, quit screwing around.
My brother in law is a hardcore C guy and has a very low opinion
of .Net. For me it works fine and the full-featured Express editions
of C Sharp, VB and C++ are free. To me, C code is coyote ugly whereas
the above C Sharp code seems rather straightforward. It means you can
do some systems programming in C Sharp, if not all. But I can't
convince my brother in law of that.
Even high level languages that sharply depart from Von Neumann such as
rexx and lisp can be compiled down to straight binary with no runtime.
Rexx has one data type (the string), unlimited precision decimal
arithmetic, and an associative memory in which arrays and other data
structure can be indexed with strings. With a smart-enough compiler
such as exists for Rexx, you could write an OS in Rexx (I wrote a
parser generator in Rexx in 1991).
It might be "slow", but the Princeton economist Paul Krugman points
out in today's International Herald Tribune that using superfast
computers with blazingly fast software to make trades faster than any
other kid on Wall Street (sometimes canceling trades at the last
minute in a fraudulent but legal way) produces NOTHING of value for
society. I'm tired of faster and faster computers and every year
dumber and more vicious people, and I'd hasard there's a relationship.
Perhaps people who like fast computing should have gone into
electrical engineering and computer architecture, there to figure out
how to support languages in which the goal is truth-as-correctness,
not idiot ape speed for Chrissake. "Speed" of calculation is basically
a metaphor. CORRECTNESS is not.
mu. phoo, too.
"homo" schmoe know' no mo'.
when, then, friend,
will you make sense?
>
> > > > --
> > > > 1*dv00&-~~~~~...*
>
> That seems to this relative layperson pretty silly. It festishizes a
> "cache boundary" which is not a law of nature, but the result of
> another developer wanting, for a good reason or bad, to do bit shifts
> rather than addition or subtraction...I think.
> It's absurd to reason from such a specific need to the conclusion that
> C is great.
I have no time to make full response, but padding critical portions of your
shared data-structures up to the size of a L2 cache-line, and strictly
aligning them on L2 cache-line boundaries can eliminate so-called
false-sharing which can totally destroy the performance, and any chance of
scalability of a multi-threaded application.
In C, I can actually hack something together. Unfortunately, not really
possible in managed code without resorting to the use of unmanaged
libraries...
[...]
There is a frog, named luserxtrog
With the poetic ability of an untrained dog
Words of wisdom words of sense
To him are meaningless, now and hence
To the fool wisdom is not cool:
Idiocracy is his general rule.
Good style is to him stuck up,
And all he'll say, is,
"You talk like a fag, and your shit's all fucked up"
Such fool's approval stings, and their honor stains
They shall be washed down the sewer in the coming rains.
>
>
>
>
>
> > > > > --
> > > > > 1*dv00&-~~~~~...*- Hide quoted text -