- C++ move constructors - 21 Updates
- new benchmark for my read/write algorithm... - 2 Updates
- About my scalable algorithms and ARM processor architecture.. - 2 Updates
Sam <sam@email-scan.com>: Mar 05 06:59AM -0500 > >implement the copy and move constructors, as written. > Thanks, very helpful. Not. > Clearly my question was too sophisticated, Yes. It was apparently too sophisticated for anyone else to understand. > instead > of & change the object code generated by the compiler if no other part of the > code is changed? Of course it does. The compiler might even refuse to generate any code at all, since the resulting code is now ill-formed. |
Bonita Montero <Bonita.Montero@gmail.com>: Mar 06 01:24PM +0100 >> empty? > The techniques are called Whole Program Optimization and Link Time > Code Generation, supported by all major C++ implementations. Ok, then they could reanimate the export-keyword. ;-) |
blt_7qqoq3m@dphu.org: Mar 06 08:45AM On Tue, 5 Mar 2019 21:58:51 +0100 >generated. I have worked with processors with no "inc" or "add >immediate" instructions, but which have a "subtract immediate". "i++" >would be implemented as "subtract immediate -1". So that compiler would return the result of "i=2;i++" as i = 1? >Your attempts at spiteful sarcasm merely enhance the image we are >getting of you being an ill-mannered and unpleasant character, who hides >his ignorance behind insults. I very politely asked a sensible question and in response I get called ignorant and a fool. Yet somehow I'm being spiteful for responsing in kind? On your bike sunshine. >Is your grand plan to insult and alienate everyone in the group who is >knowledgeable and experienced in C++, and patient and helpful enough to >try to answer your questions or to try to help you ask better questions? I can just post under a completely different handle and you'd never know so what do I care. > I would strongly recommend staying on James' good side - there are few >who have his combination of strong technical knowledge, enviable >teaching skills, and the time and patience to give help freely. I don't suck up to people if they're patronising. |
Paavo Helde <myfirstname@osa.pri.ee>: Mar 06 09:58AM +0200 On 5.03.2019 12:30, Bonita Montero wrote: > code generated for it. How should a compiler just including the > prototype know that the body of a function in another module is > empty? The techniques are called Whole Program Optimization and Link Time Code Generation, supported by all major C++ implementations. |
David Brown <david.brown@hesbynett.no>: Mar 06 11:08AM +0100 >> immediate" instructions, but which have a "subtract immediate". "i++" >> would be implemented as "subtract immediate -1". > So that compiler would return the result of "i=2;i++" as i = 1? No. Try again, but this time read carefully and /think/. What does it mean to subtract -1 ? > I very politely asked a sensible question and in response I get called > ignorant and a fool. Yet somehow I'm being spiteful for responsing in kind? > On your bike sunshine. No, you asked a meaningless question. That in itself is not a bad thing - often a poster's question needs to be refined in order to help them. And often the process of fixing the question gives clearer understanding, and that is what helps the OP most. Once you have figured out the right question, you are halfway to the answer. You have been called a variety of things as a result of your posts after that - your responses to people trying to help you. I didn't call you spiteful for your response to people calling you an ignorant fool - I called you spiteful for because you called others ignorant fools for daring to suggest that your question was bad, and that it showed you misunderstand a lot of things. There is nothing wrong with being ignorant - that is curable by listening to people that are more knowledgeable. There /is/ something wrong with being a fool, and that is harder to deal with. You have shown that you don't understand how compilers work, you don't understand the distinction between a compiler and the language, you don't understand the breadth of possible implementations of the language, you don't understand move constructors and you don't understand rvalue references. /None/ of that is a problem. These are all things that we can help you with - and have tried to help you with. The problem is that you /think/ you understand these things, and you treat anyone who questions your understanding as fools to be insulted. >> try to answer your questions or to try to help you ask better questions? > I can just post under a completely different handle and you'd never know > so what do I care. Feel free to start again with a new posting address (pick /one/, and stick to it) and a new attitude. I would be happy with that. We welcome new people with new questions and a willingness to learn. But if you post in the same style, you will be treated in the same way. >> who have his combination of strong technical knowledge, enviable >> teaching skills, and the time and patience to give help freely. > I don't suck up to people if they're patronising. No one asks you to "suck up" to anyone - we ask for common decency, politeness and respect. |
David Brown <david.brown@hesbynett.no>: Mar 05 12:16PM +0100 >> You have good idea, just pretending being idiot. > Humour me then genius, what has javascript got to do with C++ move semantics > or .o object files? Did you ever bother to read what Öö wrote, or did you just think it would be more fun to attack him and insult him? You made a somewhat confused post about what object code compilers generate for different C++ source code. Öö was trying to point out to you that this is not something defined by the language. The language does not even require a compiler to generate object code - he gave the example of generating asm.js output. The wide variety of C++ compilers, options, flags, target chips, non-native targets, etc., show how meaningless it is to ask "what do compilers generate here". So switch off the condescending and smart-ass attitude, ask your questions, then read the answers. Maybe you'll learn something - perhaps not an answer to the question you asked, but this is a discussion group and not a paid-for support line. |
blt_i39iw07qgX@xlicr_dm5.com: Mar 05 10:28AM On Tue, 5 Mar 2019 02:00:11 -0800 (PST) >> This is a C++ group, I have no idea why you're talking about javascript >> and browsers. Are you drunk? >You have good idea, just pretending being idiot. Humour me then genius, what has javascript got to do with C++ move semantics or .o object files? |
Ian Collins <ian-news@hotmail.com>: Mar 05 03:33PM +1300 On 05/03/2019 15:30, Stefan Ram wrote: > But a recent version of gcc compiles this and prints: > A > d.a = 1 As does recent clang. -- Ian. |
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Mar 05 03:48AM +0100 On 05.03.2019 03:30, Stefan Ram wrote: > But a recent version of gcc compiles this and prints: > A > d.a = 1 C++17 has guaranteed copy construction elision, where earlier standards just /permitted/ it. Among other things this lets a function return a value of a type that can't be copied or moved. Unfortunately the wording seems to almost be intentionally obfuscated, it has to do with "materialization" of rvalues. I can't say I entirely understand it. But then, that's because I refuse to use time on it. :) Cheers!, - Alf |
Manfred <invalid@add.invalid>: Mar 05 09:07PM -0500 On 3/5/19 5:17 AM, Ralf Fassel wrote: > The OPs question was about > Moveable(_const_ Moveable&& rhs) > for the second CTOR. Yes, the example ctor from the OP had const &&, which is incorrect as others have pointed out, but his/her question was: > different code for the given class compared to if it had a standard copy > constructor, or are the && move semantics simply a way of indicating to any > maintenance coders that this constructor will do a move not a copy? So about the "&& move semantics" that he/she was asking about, the answer is: 1) The correct way to code move semantics is Moveable&& (non-const), which is obvious since a move can typically modify the source. 2) No, it is not only syntactic sugar to inform future maintainers. |
blt_648_1yfa6@nxy7efemiq.com: Mar 05 09:50AM On 5 Mar 2019 06:49:23 GMT >> Sam <sam@email-scan.com> wrote: >>>blt_4f6dkyzs@yds5iz0up4o1.gov.uk writes: >Are you switching From: address between every posting? Please don't. Unfortunately due to an idiot in another group who thinks its hilarious to search and replace on my handle in every reply, I've had to resort to a constantly changing one. When he eventually grows up and stops I'll revert back to a normal one. |
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Mar 05 02:13AM +0100 On 04.03.2019 14:20, Öö Tiib wrote: >> explicitly initialized, either in the constructor or by having an >> initializer, is default-constructed. > Unfortunately it is way more complex and complicated than that. No. > b.meaning = 4196608 > b.number = 4196032 > It apparently did nothing (gcc 8.2.0). Yes, that's what I wrote. It's that simple. Cheers!, - Alf |
blt_1daxr209@_44t2ae_.co.uk: Mar 05 05:14PM On Tue, 5 Mar 2019 08:29:07 -0800 (PST) >I already gave three points why your questions were confused and >nonsensical. No one does still know what you were trying actually >to ask if anything. My impression is that you were not asking but Well some do since they answered. The question was simple - what is the difference between a reference and a move type reference in the case of constructors but you were obviously too thick to understand that. >My English is good enough to communicate; that does not matter >when instead of communication you want to pretend being an >idiot. Its "pretend to be an idiot". You use the infinitive of "be", not the present continuous in that construct. |
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Mar 05 04:55PM +0100 On 05.03.2019 11:37, Öö Tiib wrote: >> Yes, that's what I wrote. >> It's that simple. > You wrote that compiler has to generate code for those constructors. No, I wrote that Sam's claim "That's implementation defined" is wrong, /and/ I pointed out that default construction does nothing for POD. > It is more complicated since in above example it clearly does not need > to generate any code for given constructor. This claim, that doing nothing is more complicated than doing nothing, is absurd. You need coffee. Cheers!, - Alf |
blt_wegy@mr3qwrpz7zr0ss9hctqd2nd.com: Mar 06 12:19PM On Wed, 6 Mar 2019 11:08:48 +0100 >> So that compiler would return the result of "i=2;i++" as i = 1? >No. Try again, but this time read carefully and /think/. What does it >mean to subtract -1 ? Ooo, I've no idea, thats such complex maths! Never mind Rainman, clearly you don't get sarcasm either as well as not understanding a simple original question. Its fairly clear this group is a waste of time. |
blt_a2oeug@3depem2rtoo4k9_kbk9ri.gov: Mar 05 04:06PM On Tue, 5 Mar 2019 03:10:32 -0800 (PST) >nothing to do with move and move semantics. The .o files are mid-way >translation artifacts in some programming toolchains that have nothing >to do with move semantics. JavaScript was brought as example how I'm sorry, I should have realised that you don't actually have an answer to my question but being desperate for something to say you decided to be a pathetic pedant about the meaning of "object code" which was obviously confusing you. >JavaScript without mentioning C++ Emscripten toolchain. >Stop pretending being idiot since that trait is not overly popular >anywhere. Or perhaps your English isn't as good as you think it is. |
blt_4h9eyv9m_7@ai8rhnz2.com: Mar 05 05:16PM On Tue, 5 Mar 2019 08:35:41 -0800 (PST) >That doesn't help, because it still doesn't have a unique answer, just >different answers on different implementations of C++. All you've done >by changing it to "output" is to widen the range of possibilities. So C++ compilers behave differently with the same source code? So perhaps you think when presented with "i++" they'll actually do a subtract? Or if I'd asked what is the difference between ++ and -- in the output you'd have quibbled about the meaning of output then too? >No, it's only questions about the output of an unspecified compiler that [Drivel snipped]. I think we've established you didn't understand the question. Don't embarrass yourself any further. |
Paavo Helde <myfirstname@osa.pri.ee>: Mar 07 11:06AM +0200 >> Was it if the compiler logically does s/&&/&/ before starting to compile >> C++ code? > Oh congratulations, you finally figure out part of it. It only took 4 days. I suspected this already before, but I gave you a benefit of doubt. |
blt_Gdd@2s6u1wctmk9lsbz.gov.uk: Mar 07 08:52AM On Wed, 06 Mar 2019 14:40:12 +0200 >> reply. >Good for you, as nobody here still has any clue what you actually wanted >to ask. I've stated 3 the question 3 times. I'd suggest you improve your English comprehension before you accuse others of not making sense. >Was it if the compiler logically does s/&&/&/ before starting to compile >C++ code? Oh congratulations, you finally figure out part of it. It only took 4 days. Well done, your mummy must be proud of you. |
David Brown <david.brown@hesbynett.no>: Mar 06 02:15PM +0100 > Ooo, I've no idea, thats such complex maths! > Never mind Rainman, clearly you don't get sarcasm either as well as not > understanding a simple original question. You can't cover your misunderstanding by retroactively claiming it was sarcasm. You failed to understand what I wrote because you were far too busy trying to find new smart-ass comments to make. The correct response would have been an admission of the error - not compounding your rudeness. > Its fairly clear this group is a waste of time. No one is asking you to post here. |
Sam <sam@email-scan.com>: Mar 07 07:07AM -0500 > Believe what you like. Your ridiculous attempt to get yourself out of a > corner > you painted yourself into is quite amusing however :) I just read that there's a Monty Python remake that's in the works. You should really audition for the role of the Black Knight. You'd be a natural. > >Keep your xenophobia insults to yourself. > We'll note down xenophobia as another subject you don't have a clue about > shall we. Indeed. You're the undisputed xenophobic champion of 2019. Nobody knows more about xenophobia than you. |
"Chris M. Thomasson" <invalid_chris_thomasson_invalid@invalid.com>: Mar 06 12:03PM -0800 On 3/6/2019 4:31 AM, Bonita Montero wrote: >> ___________________________ >> Now, this really reminds me of my algorihtm. :^) > My implementation is just experimental. It is still nice. My work is experimental as well, but then I found out that my algorihtm has been used in the Go Language for the past 7 years. Go figure. ;^) > If you would write a clean > implementation you would throw an exception if either counter saturates. > With this LOCK XADD wouldn't be possible. Humm... Well, I guess you could create a simple rule, if more than 0xFFFF writers hit your algorihtm at the same time, it is undefined behavior, end of story. Mine has that wrt _more_ than LONG_MAX readers hitting it at the same time: Well, another one bites the dust. Also, you can check to see if the return value of XADD, say count, is (count & 0x0000FFFF) == 0xFFFF. That means the writers just intruded into the reader logic, and an exception should be thrown. Humm... |
"Chris M. Thomasson" <invalid_chris_thomasson_invalid@invalid.com>: Mar 06 12:53PM -0800 On 3/6/2019 12:03 PM, Chris M. Thomasson wrote: > Also, you can check to see if the return value of XADD, say count, is > (count & 0x0000FFFF) == 0xFFFF. That means the writers just intruded > into the reader logic, and an exception should be thrown. Humm... That would be after the fact of the mutation. Shi% has already occurred, then you get an exception. Different than CAS loop. However, a simple rule that no more than 0xFFFF writers can hit it at the same time should be sufficient. Perhaps have two different modes. One that throws on anything that is not Kosher, and another one that relies on the user to not break the rules. For some reason choosing CAS just to throw when the user breaks the rules, seems like putting "corks on the forks" to prevent people from hurting themselves. |
"Chris M. Thomasson" <invalid_chris_thomasson_invalid@invalid.com>: Mar 06 01:52PM -0800 On 3/6/2019 1:47 PM, Horizon68 wrote: >> Code it up in C++11? > I will port them to ARM using Delphi and FreePascal, and after that i > will port them to ARM using C++. Nice. :^) |
Horizon68 <horizon@horizon.com>: Mar 06 01:47PM -0800 On 3/6/2019 1:30 PM, Chris M. Thomasson wrote: >> About my scalable algorithms and ARM processor architecture.. > [...] > Code it up in C++11? I will port them to ARM using Delphi and FreePascal, and after that i will port them to ARM using C++. Thank you, Amine Moulay Ramdane. |
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:
Post a Comment