Friday, September 2, 2016

Digest for comp.lang.c++@googlegroups.com - 9 updates in 4 topics

"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Sep 02 02:22PM -0700

Mr Flibble wrote:
> If you have to ask that question then you probably don't need it.
 
I haven't seen the flood of, "Awesome, Leigh!" "What I've been
looking for!" "Where's the donate button? This is worth its weight
in gold!" "Wow this is so handy and feature rich! Awesome!" posts.
 
Perhaps I haven't given your indexitor contribution to mankind
enough time yet. I'll wait a bit longer for the flood of attaboys,
and I'll deduce from the chatter what I'm missing today.
 
My apologies for responding too quickly.
 
Best regards,
Rick C. Hodgin
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Sep 02 10:56PM +0100

On 02/09/2016 22:22, Rick C. Hodgin wrote:
> enough time yet. I'll wait a bit longer for the flood of attaboys,
> and I'll deduce from the chatter what I'm missing today.
 
> My apologies for responding too quickly.
 
At some point I will write a page about indexitor, it's rationale and
how to use it but briefly:
 
you want a sequence container of items that include a reference to an
element in another (foreign) container, so you could use:
 
std::vector<std::pair<foo, foreign_iterator>>
 
but this is no good if the foreign container iterators can be
invalidated if changes (insert/erase element) are made to the foreign
container however if the foreign container can be indexed numerically
(for e.g. by vector::operator[] or std::deque::operator[]) then you
could use:
 
std::vector<std::pair<foo, std::size_t>>
 
where the second item is the index to the foreign container element
HOWEVER if you change the foreign container (insert/erase element) you
will have to update all indexes after the change which is O(n)
complexity but with:
 
indexitor<foo, std::size_t>
 
the same can be achieved with O(lg N) complexity. How does this work?
Well instead of storing indexes we store intervals and we use a tree to
allow O(lg N) complexity indexing.
 
A common mistake might be to think that I am reimplementing std::map but
indexitor is not an associative container: it is a sequence container
with random access like vector or deque. Also std::map is a single
container whilst this is a solution that allows us to have multiple
foreign containers.
 
/Flibble
Jerry Stuckle <jstucklex@attglobal.net>: Sep 02 04:38PM -0400

On 9/2/2016 3:26 PM, me wrote:
--- nothing worth responding to.
 
You obviously are even more stoopid than some of the other trolls here.
I'm not even going to bother with you any more.
 
--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================
me <crisdunbar@gmail.com>: Sep 02 01:51PM -0700

On Friday, September 2, 2016 at 1:38:14 PM UTC-7, Jerry Stuckle wrote:
> --- nothing worth responding to.
 
> You obviously are even more stoopid than some of the other trolls here.
> I'm not even going to bother with you any more.
 
Classic! I'm sure that will convince readers who can go back and look at
the history ...
Paavo Helde <myfirstname@osa.pri.ee>: Sep 02 11:56PM +0300

On 2.09.2016 22:26, me wrote:
> But 1.9.1 (plus footnote 5) says that if there is _no_ affect
> on observable behaviour (as in my programs above), the implementation
> can do any darn thing it pleases with struct layout.
 
I have got an impression that the most common thing which might happen
with a struct is that the compiler decides to place it into registers
altogether and there is no layout to speak of (what is the padding
between EAX and EBX?).
 
In regard of unions this becomes quite interesting. I imagine the
compiler might easily place the different union members in different
registers (except for the common initial sequence, if any). Using
different registers might make a lot of sense if one member is holding
integers and the other floating-point numbers, for example. I guess the
only thing which might hold the compiler developers back here is that
the union has a long tradition of being illegally abused for type-punning.
 
Cheers
Paavo
me <crisdunbar@gmail.com>: Sep 02 02:16PM -0700

On Friday, September 2, 2016 at 1:51:57 PM UTC-7, me wrote:
> > I'm not even going to bother with you any more.
 
> Classic! I'm sure that will convince readers who can go back and look at
> the history ...
 
Oh, and I humbly thank you for the honour of adding me to the list of
contributors you've called "stoopid".
 
I had a speech prepared ... now where are my notes ...?
Ike Naar <ike@iceland.freeshell.org>: Sep 02 08:52PM

> Funny:
 
>> In short: How do I dereference that "server" variable so
>> the function receives a pointer to the structure ?
 
You seem to be confused about the term "dereferencing".
Given a pointer to an object, dereferencing the pointer gives access
to the object. In C++, one uses the * operator for dereferencing.
 
What you (seem to) want to achieve is the other way around, given
the object, you seem to want to obtain a pointer to that object.
To achieve that, you take the address of the object, using the &
operator.
 
ObjectType object;
ObjectType *pointer_to_object = &object; /* taking the address */
ObjectType copy_of_object = *pointer_to_object; /* dereferencing a pointer */
Jerry Stuckle <jstucklex@attglobal.net>: Sep 02 04:36PM -0400

On 9/2/2016 12:53 PM, Mr Flibble wrote:
 
>> Nope. You have proven youself time and time again to be a trill.
 
> Youself? Trill? Are you having a stroke now? Can't get your troll out
> quick enough eh mate?
 
ROFLMAO! Another stoopid comment by a stoopid troll.
 
But in your case, "trill" might be a better description!
 
> use C++ every day at work as a senior software engineer. These are
> surely amazing feats for someone "who doesn't know C++" and/or "is
> hopeless" and can't "get it right".
 
Yup, and pretty crappy work, at that. I'd be embarrassed to claim work
like that.
 
>> commercial compiler from AT&T was released in (in beta form).
 
> I am amazed that someone with your claimed experience can seemingly do
> nothing but troll others on Usenet.
 
This from a proven troll!
 
 
>> Nope, they are standards. The fact the standards aren't issued by ISO
>> does not mean they are not standards.
 
> Yep, a de facto standard is not the same thing as a standard.
 
A standard is a standard. Period.
 
 
>>> Strawman.
 
>> No, a serious question for you. Maybe you can google it.
 
> No, it is a strawman.
 
Nope. A serious question - but obviously one you can't answer!
 
But then you don't know what a strawman is either, do you?
 
> right?
 
> All the teams I have worked with were competent and I was a member of
> them for years and left them on my own terms.
 
Your posts in this and other newsgroups speak otherwise. I don't know a
single team I've ever worked with who would hire you.
 
> Sony Ericsson was folded back into Sony Mobile and they continue to do
> quite well now. Sony Android phones are great.
 
> /Flibble
 
You got your arse fired for incompetence, you mean. Which is why you've
never been able to get a decent job since then.
 
--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Sep 02 09:45PM +0100

On 02/09/2016 21:36, Jerry Stuckle wrote:
[snip]
 
> You got your arse fired for incompetence, you mean. Which is why you've
> never been able to get a decent job since then.
 
I thought I never had a decent job mate? Backtracking are we? I was at
Ericsson/Sony Ericsson for over four years .. if I was "incompetent" I
wouldn't have lasted five minutes. BTW I have never been fired from a
job in my entire life and my current job is certainly "decent".
 
So how many of your consultancy companies when bankrupt again?
 
/Flibble
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: