Endless arguing

I

Ian Collins

I'm pretty sure he's killfiled me, which turns out to remove about
half of the responses to his container library posts and discussion.

He appears to have done the same to me, so that removes half of the rest!
 
S

Seebs

I wrote a function GetKeys() that returns a string collection with all
stored keys. Is that what you need?

No. Think of the Lua:
for i,v in pairs(table) do
-- i is index, v is table
end

or the Ruby
table.each_pair do |i,v|
# i is index, v is table
end

or the PHP
foreach ($table => $i, $v) {
# you get the idea
}

That is by FAR the most common way for me to iterate on a hash.
Impossible because that would be container specific (trees) and would
not work with lists.

And this is why I don't think a container library is viabel.
What is important to remember is basic software design principles.
Information hiding means that the user doesn't NEED to know if the
container is a tree or a list. This is a central point in the design of
the library.

That makes it "worst-of-all-worlds". I'd probably go for a design
where GetIterator() has an interface akin to the UNIX fcntl(), where
the available options and flags depend on the kind of thing you're
working with.

The point, I guess, is... Yes, I *DO* need to know whether I'm working with
a tree or a list, because I'm going to pick one that fits my application.

If all I get is a completely generic interface, it's going to be incapable
of doing the things that would make one or another of them useful!
The learning curve is MUCH smaller. The surface that the library
uses in your memory is smaller.

And the functionality is much smaller.

Enough smaller that you might as well just pick one of them, implement
only that, and leave the others out of it, since they won't be good
enough anyway.

That, I think, is the problem with the "only those features which are
completely generic can be implemented" philosophy that a generic "container"
imposes on you.

-s
 
T

Tim Rentsch

Seebs said:
I'm not convinced of that. Overall, DNFTT seems to rely to
some extent on convincing people that a given person is, in
fact, a troll. People who don't believe that are unlikely to
participate in avoiding/ignoring the troll.

It sounds like you're assuming that people won't conclude that
person X is engaging in anti-social behavior unless someone
posts a message saying "person X engages in anti-social
behavior." I submit that this assumption is false; most people
realize who engages in egregious behavior (by their own
standards of course) without needing to have it pointed out. I
encourage you to run an experiment to test out this hypothesis.
Simply refrain from making ad hominem remarks for a month or two
and see if the average quality in the newsgroup goes up. I have
been running my own personal experiment along these lines for
several years now, and I am quite satisfied.

Sometimes, it really *does* matter what you think of the person,
not just what you think of the post.

Of course it does, but having it matter to me personally
and saying that it also should matter to other people
are two very different things. People are welcome to hold
any personal opinions they choose, but when they start
trying to convince me that I should hold the same opinions
they do I consider that a verbal assault at some level.
As an example, look at
Bill Cunningham's endless series of combinations of newbie
questions. A reasonable response to those from someone who has
never seen one before is *very* different from a resaonable response
to them from someone who's seen his last decade or so of asking
questions and then ignoring the answers, or "learning" something
only to have no idea even what the words used to describe it are
a few months later.

Note that we don't have to make any ad hominem remark about Bill
Cunningham to communicate the important information here. Saying
"postings from Bill Cunningham have been asking basically the same
questions and getting the same answers for the last 15 years" (or
whatever fits the actual history) is only a comment about what
he's written, not about him. Saying things about the _writing_
should always be appropriate; saying things about the _writer_
almost never is.
 
I

Ian Collins

That makes it "worst-of-all-worlds". I'd probably go for a design
where GetIterator() has an interface akin to the UNIX fcntl(), where
the available options and flags depend on the kind of thing you're
working with.

The point, I guess, is... Yes, I *DO* need to know whether I'm working with
a tree or a list, because I'm going to pick one that fits my application.

If all I get is a completely generic interface, it's going to be incapable
of doing the things that would make one or another of them useful!

True, consider reverse iteration as a concrete example.

This is one reason why C++ container are split into four (soon to be
five) categories: containers, reversible containers, sequence containers
and associative containers. Each category has a common set of interface
requirements.
And the functionality is much smaller.

Enough smaller that you might as well just pick one of them, implement
only that, and leave the others out of it, since they won't be good
enough anyway.

Quite.
 
T

Tim Rentsch

jacob navia said:
Morris Keesan a @C3{A9}crit :
Quoting someone on a BBC radio programme from a few weeks ago:

-"Remember, if you choose to argue with an idiot, the best possible
outcome is that you've won an argument with an idiot."-
Well, there were around 270 messages in the first thread about
Schildt's book, and there are several hundreds in the following
messages.

When I posted a request about allocators for the container library, I
received 2 answers. [snip elaboration]

Hi Jacob,

If you wouldn't mind a personal suggestion --

if you could manage to be more temperate in your writing, you
might find more people would participate in the discussions
you're interested in. Just an idea for further meditation.
 
E

Ersek, Laszlo

the user doesn't NEED to know if the container is a tree or a list

(I don't really know about the context, but that won't hold me back.)

I do need to know if the container is a tree or a list. They offer
different time complexities.

I claim that once you've chosen your operations and clarified your time
complexity expectations, perhaps also considering the highest number of
elements and the constant factors, you might as well have chosen the exact
data structure. I further claim that you (should) never choose a container
without clarifying your complexity expectations.

lacos
 
S

Seebs

It sounds like you're assuming that people won't conclude that
person X is engaging in anti-social behavior unless someone
posts a message saying "person X engages in anti-social
behavior." I submit that this assumption is false; most people
realize who engages in egregious behavior (by their own
standards of course) without needing to have it pointed out.

Not quite. I'm assuming they won't figure it out very quickly -- and
that means that, as long as there's a regular supply of new users,
the troll has a regular supply of feeders.
I encourage you to run an experiment to test out this hypothesis.
Simply refrain from making ad hominem remarks for a month or two
and see if the average quality in the newsgroup goes up. I have
been running my own personal experiment along these lines for
several years now, and I am quite satisfied.

I've experimented with varieties of this in a few cases, and what I've
found is that a reasonably polite and dispassionate reminder to newbies
that a given poster is trolling them and will not engage is usually
productive, while calling someone a troll while addressing them is usually
not productive.
Of course it does, but having it matter to me personally
and saying that it also should matter to other people
are two very different things. People are welcome to hold
any personal opinions they choose, but when they start
trying to convince me that I should hold the same opinions
they do I consider that a verbal assault at some level.

Well, if I want the group to be usable, it *does* matter to me whether
other people spend time responding to the trolls.
Note that we don't have to make any ad hominem remark about Bill
Cunningham to communicate the important information here. Saying
"postings from Bill Cunningham have been asking basically the same
questions and getting the same answers for the last 15 years" (or
whatever fits the actual history) is only a comment about what
he's written, not about him. Saying things about the _writing_
should always be appropriate; saying things about the _writer_
almost never is.

The exact boundary is pretty arbitrary. You can talk about writing about
the person, vs. writing about the posts. You can talk about addressing
the person directly, vs. addressing other participants. Any of these
basically come down to the same thing; don't fight with the troll, just
warn people that they're not going to get anywhere. Doesn't seem to
matter much whether the exact phrasing is in terms of "this person is
a troll" or "this person's posts do not lead to productive conversation".
They mean the same thing and everyone knows it.

-s
 
S

spinoza1111

I think he makes way more than five a day.  But yes, he does tend to end up
with more responses than his original posts.  And yes, I would agree that
at this point, "challenging" the noisemakers isn't doing anything.

This is a (cowardly) response to me. I don't think you really have the
self-discipline to truly ignore a person, because you've been defined
as my anti-particle and you are in a zero-sum game that you're
losing.

Whereas I would pay you no attention whatsoever, because you're not a
good programmer, your ideas are without any merit, and you're a nasty
piece of work, save for the fact that I have found that you're the
source and the perpetrator of an interesting case of Internet bullying
I need to reverse, and possibly document for a book, on Internet
bullying by "professionals".
 
T

Tim Rentsch

Seebs said:
Not quite. I'm assuming they won't figure it out very quickly -- and
that means that, as long as there's a regular supply of new users,
the troll has a regular supply of feeders.


I've experimented with varieties of this in a few cases, and what I've
found is that a reasonably polite and dispassionate reminder to newbies
that a given poster is trolling them and will not engage is usually
productive, while calling someone a troll while addressing them is usually
not productive.

Someone reviewing the posting history over the last
several months might reach a different conclusion.
Well, if I want the group to be usable, it *does* matter to me whether
other people spend time responding to the trolls.

What matters to me is how much garbage traffic I have to
wade through to get to the material of some interest.
Lately there's been a lot more traffic just generally
disparaging of certain folks than there has been from
people who didn't know what was going on.
The exact boundary is pretty arbitrary. You can talk about writing about
the person, vs. writing about the posts. You can talk about addressing
the person directly, vs. addressing other participants. Any of these
basically come down to the same thing; don't fight with the troll, just
warn people that they're not going to get anywhere. Doesn't seem to
matter much whether the exact phrasing is in terms of "this person is
a troll" or "this person's posts do not lead to productive conversation".
They mean the same thing and everyone knows it.

I'm sorry you see it that way. In my perception there
certainly is a difference between the two kinds of
comments, and my experience has been that the difference is
borne out in terms of what sorts of responses tend to follow
afterwards.
 
U

Uno

jameskuyper said:
Fixing up your analogy to match this reality would involve having the
people of Paris act like idiots (and I'm not trying to suggest that
they are): instead of removing the garbage, each one would have to put
out a piece of food next to each piece of garbage they found on their
own street - to warn people that there's a piece of garbage there.
Various animals would come by to eat the food, adding their own fresh
contribution to the garbage. The citizens of Paris would put out more
food to mark the fresh garbage, etc... How quickly would the streets
of Paris be cleaned up by that approach?

I think you've got it all backwards here, james. The finger food in
Paris is why grande's like me walk around while the significant other
darts in and out of shops.

The streets of paris require no cleaning. Last time I was there, we
named a restaurant "Place de 20 euro beer." They just need more beer.
They almost give wine away, which gives me heartburn.

Meanwhile there's london, where the only thing that holds food down is
copius and extraordinary beer.
 
S

Seebs

I'm sorry you see it that way. In my perception there
certainly is a difference between the two kinds of
comments, and my experience has been that the difference is
borne out in terms of what sorts of responses tend to follow
afterwards.

It hasn't been my experience. In my experience, people are quite aware that
stating that a given person's posts are substance-free baiting, or that there
is no benefit to responding to them, is precisely equivalent to asserting that
they're trolling, or that they're a troll. It's like stating that someone
sometimes kills people for money, because that's much more polite than calling
them an assassin.

There is a secondary problem, which is that in some cases, a community
which never does anything about trolls creates a perception that the behaviors
of the trolls are permissible. The trick is that namecalling back tends to
make it a question of whose insults are welcome, rather than whether insults
are welcome. On message-board forums, there can be moderators who can do
something about it; on Usenet, you're just stuck accepting that trolling
and harassment are de facto permissible.

-s
 
J

jacob navia

Ian Collins a écrit :
The new C++ unordered containers have unspecified order. At least with
the boost versions, the order depends on the number of items in the
container and the hash bucket size.

Yes, boost is VERY interesting. Thanks for pointing me to that libbrary.
By the way, the bug I pointed out wasn't in the library but in the
example. I fixed it and now that example works.
 
J

jacob navia

Ian Collins a écrit :
He appears to have done the same to me, so that removes half of the rest!

I have always said that I have no killfile. I did not answer because you
just replied a short sentence. In general you (and Seebs) always say
that there is no point in doing a container library. You because you
want us to use C++, Seebs because he can't see the advantages of having
code reuse.
 
S

Seebs

I have always said that I have no killfile. I did not answer because you
just replied a short sentence. In general you (and Seebs) always say
that there is no point in doing a container library. You because you
want us to use C++, Seebs because he can't see the advantages of having
code reuse.

This kind of response is why I tend not to try to help you.

I see HUGE advantages in code reuse. I am not opposed to reusable
libraries. I love reusable libraries. I wrote one list library
and one string library and have pretty much used those two ever
since.

But.

"Container" is the wrong level of abstraction. If you make everything
generic, you can't do any of the things that make individual container
types attractive.

There is simply no point to a library to allow you to not decide which
fundamentally completely-different data structure is a good fit for
your project. It's like designing a car which doesn't have a steering
wheel on the grounds that putting the steering wheel on a specific
side of the car prevents it from being used in both the US and the UK.

When you misrepresent my position as "because he can't see the advantages
of having code reuse", how the hell am I supposed to take you seriously?
If you won't do me even the most fundamental courtesy of not outright lying
about what I have said and why, why should I try to help you?

How would you like it if, every time you mentioned your container library,
people said "oh, don't pay any attention to jacob's library, he's just
doing it because he doesn't think C is a good enough language and wants
to turn it into a Java clone"? I'd guess you'd be offended, given that
it's the OPPOSITE of what you've said.

So why do you do that to other people?

-s
 
I

Ian Collins

Ian Collins a écrit :

I have always said that I have no killfile. I did not answer because you
just replied a short sentence.

I thought I offered some useful suggestions and simplifications. The
reply was a couple of finely tuned paragraphs!
In general you (and Seebs) always say
that there is no point in doing a container library.

No, I don't.
You because you
want us to use C++, Seebs because he can't see the advantages of having
code reuse.

I don't want you, or anyone else to use anything. I just point to
alternatives when C might not be the best solution in some environments.
 
N

Nick Keighley

No single human could possibly have any effect on the amount of faulty
information that exists.  You might as well decide to stop the ocean tides.

the attempt was only to correct gross errors on comp.lang.c

Do you *never* correct incorrect information you come across?

I won't be inviting you to any code reviews...
 
N

Nick Keighley

I don't know about the recent one, but I know I've responded to previous
questions on that topic.

It's not a topic I am hugely invested in, just because I don't think a
container library is a good fit for the way I've usually seen C used, but
I think it's interesting, and I have certainly made suggestions about it.

Fundamentally, though, you're working on something that most of the people
here don't think they need, and you aren't saying things which are hilariously
over the top and obviously wrong.  When you do say things which are obviously
wrong, you get more responses, but they're all corrections.

I suspect some of what you're seeing is inertia of various forms; most of us
already have or don't need a list library, for instance.  I quite simply
can't comprehend when I'd end up wanting a "container".  I can see when I
want lists, or when I want arrays, but I can't conceive of ever writing a
piece of code in which I want a container but don't care which of those it
is, or in which my choice of list or array would change.  As a result, I
simply don't see "container" as a useful abstraction for writing code.

oddly, I do. I can well imagine an aplication where the bulk of the
code treated a container as a black box abstraction having, perhaps
add(), remove() and find(). How the container does that the user cares
not. Obviously there has to be some code inside the box which *does*
care.

Containers work well in C++ and are widely used so some programmers
plainly find "containers" useful. I admit it is rare even in C++ to
change container type in mid stream (and sometimes non-trivial).

Of course C isn't C++.
 
I

Ian Collins

might that be expensive with some containers?

Very.

Trying to be too abstract is a flaw in the design. Containers are
chosen based on their properties. If you want a container that is
efficient to append and you only want to iterate forward, a singly
linked list will be appropriate. If you want reverse iteration as well,
a doubly linked list will be required. That extra functionality has a
cost, but potentially significantly less than the cost of reverse
iteration of a singly linked list.

As I mentioned else-thread, the C++ library's split of containers into
categories makes a lot of sense. If the iterator interface is too
abstract, there may as well only be one container type.
 
N

Nick Keighley

I thought I offered some useful suggestions and simplifications.  The
reply was a couple of finely tuned paragraphs!


No, I don't.


I don't want you, or anyone else to use anything.  I just point to
alternatives when C might not be the best solution in some environments.

so he lied about both you
 

Ask a Question

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

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

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top