- About why is memory reclamation so important? - 2 Updates
- What version of C++ - 15 Updates
- who's at fault, me or compiler? - 4 Updates
- About Wait-free and Lock-free and about OneFile.. - 2 Updates
aminer68@gmail.com: Jul 13 02:08PM -0700 Hello, About why is memory reclamation so important? I am a white arab, and here is one more proof that i am smart like a genius: Read the following from a PhD researcher: http://concurrencyfreaks.blogspot.com/2017/08/why-is-memory-reclamation-so-important.html It says the following: "Atomic Reference Counting is just what the name says, it's a "reference counting" technique but with atomics. The details are a bit more tricky than your usual reference counting (aka smart pointers), but it's still graspable for most. They can be implemented in a wait-free way (in x86) but they have two main drawbacks: they're slow and they aren't universal. They're slow because whenever we have to traverse a list of nodes we need to atomically increment a counter in one node and decrement a counter in another... even though we're just reading." I think that this PhD researcher is not so smart, because look at my following invention of a Scalable reference counting that is Wait-free: https://sites.google.com/site/scalable68/scalable-reference-counting-with-efficient-support-for-weak-references My invention above is really powerful, and it is a proof that i am smart like a genius. Thank you, Amine Moulay Ramdane. |
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Jul 13 02:11PM -0700 > http://concurrencyfreaks.blogspot.com/2017/08/why-is-memory-reclamation-so-important.html > It says the following: > "Atomic Reference Counting is just what the name says, it's a "reference counting" technique but with atomics. The details are a bit more tricky than your usual reference counting (aka smart pointers), but it's still graspable for most. They can be implemented in a wait-free way (in x86) but they have two main drawbacks: they're slow and they aren't universal. They're slow because whenever we have to traverse a list of nodes we need to atomically increment a counter in one node and decrement a counter in another... even though we're just reading." I don't think you understand what atomic reference counting can be. There are many flavors. Check this out for fun: https://patents.google.com/patent/US5295262 Btw, have you ever heard of proxy reference counting? Each node does not need a counter. |
woodbrian77@gmail.com: Jul 12 05:28PM -0700 On Sunday, July 12, 2020 at 4:08:06 PM UTC-5, Öö Tiib wrote: > was added by C++17 into if but also "succes" is not a word > and // comment goes until end of line. So the whole thing there > screams that it is some quick pseudo-code garbage. Why do you point out that // comment goes until the end of the line? |
Juha Nieminen <nospam@thanks.invalid>: Jul 13 06:20AM > Yes you are correct that the pointless optional init statement > was added by C++17 Pointless... I suppose the 'for' loop syntax is pointless too, because the exact same thing can be achieved with a 'while' loop. While we are at it, 'while' is pointless too, because the same thing can be achieved with 'if' and 'goto'. And 'switch' is pointless because the same thing can be done with 'if ... else if ...' (In fact, concatenated ifs are even more versatile than 'switch' because the comparison and the types involved don't have to all be the same, which makes 'switch' even more pointless.) And why do we even need support for declaring variables inside blocks? It's enough to declare all variables at the beginning of the function. Everything else is pointless. |
"Öö Tiib" <ootiib@hot.ee>: Jul 13 03:53AM -0700 > > screams that it is some quick pseudo-code garbage. > Why do you point out that // comment goes until the end > of the line? Because code like posted does not compile: if (condition) { //succes } else { //failure } Was it too hard to write something that follows language rules? if (condition) { /*success*/ } else { /*failure*/ } Or why not? Just to be demonstratively sloppy, lousy, shoddy and dirty? |
"Öö Tiib" <ootiib@hot.ee>: Jul 13 04:39AM -0700 On Monday, 13 July 2020 09:20:24 UTC+3, Juha Nieminen wrote: > Pointless... > I suppose the 'for' loop syntax is pointless too, because the exact same > thing can be achieved with a 'while' loop. It was added for backward compatibility with C so why to bother? Bart in comp.lang.c keeps critiquing it sometimes ... I don't care. Something with backward compatibility to seventies may look awkward, it is fine. > While we are at it, 'while' is pointless too, because the same thing > can be achieved with 'if' and 'goto'. Yeah why C++17 did not add pointless optional init statement to while as well to make it somewhat like half of that "good old" for? > concatenated ifs are even more versatile than 'switch' because the > comparison and the types involved don't have to all be the same, > which makes 'switch' even more pointless.) Switch got also that pointless init statement. What is wrong with switch is that there must be "break;" everywhere while it is more logical to have "do not break;" on that very rare case when we do not want to break. But again for backward compatibility with code written in seventies it is OK perhaps. > And why do we even need support for declaring variables inside blocks? > It's enough to declare all variables at the beginning of the function. > Everything else is pointless. Because features that make code easier to follow are not pointless. That is logically sound: value x = source(); if ( x.has(certain_property) ) x.do_something(); I read it "value x is acquired from source, if x has certain property then do something with x". Garbage features that make code less logically sound, uglier and harder to follow however are clearly pointless. That is logically unsound: if ( type x = source(); x.has(some_property) ) x.do_something(); Even Yoda did not have his reasoning so messed up. Better have block if you want to narrow the scope of x; no need to screw up its coherence: { value x = source(); if ( x.has(certain_property) ) x.do_something(); } |
woodbrian77@gmail.com: Jul 13 09:15AM -0700 On Monday, July 13, 2020 at 6:39:34 AM UTC-5, Öö Tiib wrote: > value x = source(); > if ( x.has(certain_property) ) x.do_something(); > } I don't think it's a garbage feature. I'd rather remove std::any than the 2017 changes to 'if' statements. Brian Ebenezer Enterprises https://webEbenezer.net |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jul 13 05:27PM +0100 >> } > I don't think it's a garbage feature. I'd rather remove > std::any than the 2017 changes to 'if' statements. std:::any is great because type erasure is great. /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin "You won't burn in hell. But be nice anyway." – Ricky Gervais "I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
woodbrian77@gmail.com: Jul 13 09:44AM -0700 On Monday, July 13, 2020 at 11:27:11 AM UTC-5, Mr Flibble wrote: > > I don't think it's a garbage feature. I'd rather remove > > std::any than the 2017 changes to 'if' statements. > std:::any is great because type erasure is great. I'm not seeing interest in std::any here or on Reddit. |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jul 13 05:55PM +0100 >>> std::any than the 2017 changes to 'if' statements. >> std:::any is great because type erasure is great. > I'm not seeing interest in std::any here or on Reddit. And that matters why exactly? That has no bearing on whether or not people actually use std::any. /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin "You won't burn in hell. But be nice anyway." – Ricky Gervais "I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
Keith Thompson <Keith.S.Thompson+u@gmail.com>: Jul 13 10:50AM -0700 > On Monday, 13 July 2020 03:28:28 UTC+3, woodb...@gmail.com wrote: [...] > { /*success*/ } else { /*failure*/ } > Or why not? Just to be demonstratively sloppy, lousy, shoddy and > dirty? I think everyone here knows that // comments go to the end of the line. The meaning of the code snippet was clear enough. Sure, it was a bit sloppy, but why go out of your way to be insulting? -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */ |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jul 13 07:04PM +0100 On 13/07/2020 18:50, Keith Thompson wrote: > I think everyone here knows that // comments go to the end of > the line. The meaning of the code snippet was clear enough. Sure, > it was a bit sloppy, but why go out of your way to be insulting? Insulting bigots is allowed. /Flibble -- "Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin "You won't burn in hell. But be nice anyway." – Ricky Gervais "I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
woodbrian77@gmail.com: Jul 13 01:14PM -0700 On Monday, July 13, 2020 at 1:05:01 PM UTC-5, Mr Flibble wrote: > > the line. The meaning of the code snippet was clear enough. Sure, > > it was a bit sloppy, but why go out of your way to be insulting? > Insulting bigots is allowed. I refuse to be canceled by boneheads. Brian Ebenezer Enterprises |
"Öö Tiib" <ootiib@hot.ee>: Jul 13 01:20PM -0700 > > } > I don't think it's a garbage feature. I'd rather remove > std::any than the 2017 changes to 'if' statements. I am not certain about std::any ... maybe it is niche type useful for someone? Same is with std::valarray. May be someone needs specially it and no full-blown linear algebra libraries like Armadillo or Eigen? Also there are some standard features that I never use not because I don't want to but because major vendor like Microsoft never fixes their implementation. For example their <ctime> is always buggy in some way. But I use ifs a lot and for what these needed such extension? It helps with nothing. Just another "don't use" rule in coding standard. |
"Öö Tiib" <ootiib@hot.ee>: Jul 13 01:20PM -0700 On Monday, 13 July 2020 20:50:32 UTC+3, Keith Thompson wrote: > I think everyone here knows that // comments go to the end of > the line. The meaning of the code snippet was clear enough. Sure, > it was a bit sloppy, but why go out of your way to be insulting? Sorry, if I insulted someone. Wasn't planned. |
Ian Collins <ian-news@hotmail.com>: Jul 14 08:32AM +1200 On 14/07/2020 08:20, Öö Tiib wrote: >> std::any than the 2017 changes to 'if' statements. > I am not certain about std::any ... maybe it is niche type > useful for someone? I have used it on occasion, most recently in a library used to read kernel statistics from a C interface. Snippet: std::any NamedKstatsType::value() const { switch( stat->data_type ) { case KSTAT_DATA_CHAR: return stat->value.c; case KSTAT_DATA_INT32: return stat->value.i32; case KSTAT_DATA_UINT32: etc... -- Ian. |
Keith Thompson <Keith.S.Thompson+u@gmail.com>: Jul 13 01:33PM -0700 Öö Tiib <ootiib@hot.ee> writes: [...] > I don't want to but because major vendor like Microsoft never > fixes their implementation. For example their <ctime> is always > buggy in some way. [...] Can you be more specific about that? How is Microsoft's <ctime> implementation buggy? -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */ |
boltar@nowhere.co.uk: Jul 13 09:00AM On Sat, 11 Jul 2020 08:29:41 +1200 >You do realise that you are arguing with a bloke who can't count past >two or compile code, don't you? >https://groups.google.com/g/comp.lang.c++/c/W5ScyR_J6pc/m/zWgA5FfyAgAJ Says the donkey who doesn't realise you need a google account to view that. |
boltar@nowhere.co.uk: Jul 13 09:04AM On Fri, 10 Jul 2020 17:22:58 +0000 (UTC) >No, they haven't. I already explained how code may access members of an >object using offsets, but not necessarily all the members are accessed >and thus their offset are not stored anywhere. Oh ok. So new heap memory allocated to an object or structure is accessed correctly how exactly? >Besides, this is irrelevant to your original assertion, which was that No, its entirely relevant. >Your original claim was not "the layout of the class is stored in the >binary". Your original claim was "the class cannot be instantiated if >its layout isn't in the binary". This whole thing started with your Well its layout IS in the binary in some form even if thats hardwired offsets in assembler. Are you even going to argue that point too now? >As I have said, I have seen people with your problem many many times >over the past 25 years. Maybe over the next decade or two you will >grow up and wisen up. Oh please. Perhaps your English comprehension will also improve by then but I have my doubts. |
boltar@nowhere.co.uk: Jul 13 09:04AM On Fri, 10 Jul 2020 16:30:21 +0100 >what I am talking about as a way of disguising that you will learn how things >work from such proof isn't going to work, mate. If you want people to teach >you things then you will have to learn to stop being such a cockwomble. Thats rich coming from you. As I said - pot meets kettle. |
boltar@nowhere.co.uk: Jul 13 09:06AM On Mon, 13 Jul 2020 09:04:08 +0000 (UTC) >>and thus their offset are not stored anywhere. >Oh ok. So new heap memory allocated to an object or structure is accessed >correctly how exactly? Heap or stack memory before someone decides to nitpick. Again. |
aminer68@gmail.com: Jul 12 05:49PM -0700 Hello, About Wait-free and Lock-free and about OneFile.. I am a white arab, and i think i am smart like a "genius", since i have invented many scalable algorithms and there implementations, and today i will make you understand more: Look at this new invention of a PhD researcher: OneFile - The world's first wait-free Software Transactional Memory http://concurrencyfreaks.blogspot.com/2019/04/onefile-worlds-first-wait-free-software.html And look carefully at this video about it by its inventor: Pedro Ramalhete — Wait-free data structures and wait-free transactions https://www.youtube.com/watch?v=oDfr9w9p8XY So i think that this invention is not so smart, because i have just read its source code here: https://github.com/pramalhe/OneFile/blob/master/stms/OneFileWF.hpp And it says the following: Progress condition of the readers transactions: wait-free (bounded by the number of threads + MAX_READ_TRIES) and: The progress condition of the writers transactions: wait-free (bounded by the number of threads) 1- So as you are noticing it has a weakness and it is the same as the Lock-free one, and it is that it wastes CPU time on the Progress condition, so this wasting time is not good for scalability and it is then not good for parallel programming, because so that it "generalizes", it has also to work correctly not only for the much more read-mostly but also for other cases where the writes transactions are of more greater proportion "relative" to the whole of the readers and writers transactions, so my scalable and fair lock-based read-write locks are better in this regard, since read about my new invention below of of the Holy Grail of locks that i will use, and 'you will notice that it is powerful. 2- Second weakness of the above invention, is that is is a complex algorithm and this complexity of it is not good, and i think that lock-based algorithms are much simpler , so they are easy to think about and to implement. I have invented a scalable algorithm that is a scalable fast Mutex that is remarkable and that is the Holy Grail of scalable Locks, it has the following characteristics, read my following thoughts to understand: About fair and unfair locking.. I have just read the following lead engineer at Amazon: Highly contended and fair locking in Java https://brooker.co.za/blog/2012/09/10/locking.html So as you are noticing that you can use unfair locking that can have starvation or fair locking that is slower than unfair locking. I think that Microsoft synchronization objects like the Windows critical section uses unfair locking, but they still can have starvation. But i think that this not the good way to do, because i am an inventor and i have invented a scalable Fast Mutex that is much more powerful , because with my scalable Fast Mutex you are capable to tune the "fairness" of the lock, and my Fast Mutex is capable of more than that, read about it on my following thoughts: More about research and software development.. I have just looked at the following new video: Why is coding so hard... https://www.youtube.com/watch?v=TAAXwrgd1U8 I am understanding this video, but i have to explain my work: I am not like this techlead in the video above, because i am also an "inventor" that has invented many scalable algorithms and there implementions, i am also inventing effective abstractions, i give you an example: Read the following of the senior research scientist that is called Dave Dice: Preemption tolerant MCS locks https://blogs.oracle.com/dave/preemption-tolerant-mcs-locks As you are noticing he is trying to invent a new lock that is preemption tolerant, but his lock lacks some important characteristics, this is why i have just invented a new Fast Mutex that is adaptative and that is much much better and i think mine is the "best", and i think you will not find it anywhere, my new scalable Fast Mutex has the following characteristics: 1- Starvation-free 2- Tunable fairness 3- It keeps efficiently and very low its cache coherence traffic 4- Very good fast path performance 5- And it has a good preemption tolerance. 6- It is faster than scalable MCS lock 7- Not prone to convoying. Thank you, Amine Moulat Ramdane. |
Scott Newman <scott69@gmail.com>: Jul 13 08:44AM +0200 > I am a white arab, and i think i am smart like a "genius", ... Yes, you're a genius and your posts are welcome here. |
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