- This is my last post in this forum - 4 Updates
- About my Diploma.. - 8 Updates
- To Bonita Montero and others - 2 Updates
- The divide and conquer philosophy - 2 Updates
- "Trip report: Winter ISO C++ standards meeting (Kona), C++17 is complete" by Herb Sutter - 2 Updates
- Here is my Diploma... - 2 Updates
- THE DIABETES DRUG THAT COULD BE AN ANTI-AGING MIRACLE - 3 Updates
- "Trip report: Winter ISO C++ standards meeting (Kona), C++17 is complete" by Herb Sutter - 1 Update
- a std c++ semaphore example... - 1 Update
aminer68@gmail.com: Mar 26 01:44PM -0700 Hello, I think i will stop posting on this forum because this Bonita and many others are stupid people that don't think efficiently.. This is my last post on this forum Thank you, Amine Moulay Ramdane. |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Mar 26 01:50PM -0700 > [snip] Marked as spam. > This is my last post on this forum The boy who cried wolf has more credibility than you do with regards to this statement, Amine. You have lied consistently. Not one of us expect you to keep your word here because your track record of not keeping your word has been demonstrated time and time and time again when you make this claim. Thank you, Rick C. Hodgin |
fir <profesor.fir@gmail.com>: Mar 26 02:10PM -0700 > Hello, > I think i will stop posting on this forum because this Bonita and many others are stupid people that don't think efficiently.. > This is my last post on this forum wonna bet, idiot ramine? |
"Chris M. Thomasson" <invalid@invalid.invalid>: Mar 26 02:53PM -0700 On 3/26/2017 2:10 PM, fir wrote: >> I think i will stop posting on this forum because this Bonita and many others are stupid people that don't think efficiently.. >> This is my last post on this forum > wonna bet, idiot ramine? lol wrt the bet. ;^) |
aminer68@gmail.com: Mar 26 11:56AM -0700 Hello, About my Diploma.. I have said that i have gotten a Diploma of technician in Microelectronics in 1988, it is not a college level diploma, my Diploma is a university level Diploma, it look like an Associate degree or the french DEUG. Read here about the Associate degree: https://en.wikipedia.org/wiki/Associate_degree Thank you, Amine Moulay Ramdane. |
aminer68@gmail.com: Mar 26 12:02PM -0700 > https://en.wikipedia.org/wiki/Associate_degree > Thank you, > Amine Moulay Ramdane. Hello, About my Diploma.. I have said that i have gotten a Diploma of technician in Microelectronics in 1988, it is not a college level diploma, my Diploma is a university level Diploma, it looks like an Associate degree or the french DEUG. I have salso succeeded one year of pure mathematics at the university level of mathematics. So i have got a college Diploma, and after that i have also studied and succeeded 3 years at the university level. Read here about the Associate degree: https://en.wikipedia.org/wiki/Associate_degree Thank you, Amine Moulay Ramdane. |
aminer68@gmail.com: Mar 26 12:03PM -0700 > https://en.wikipedia.org/wiki/Associate_degree > Thank you, > Amine Moulay Ramdane. Hello, About my Diploma.. I have said that i have gotten a Diploma of technician in Microelectronics in 1988, it is not a college level diploma, my Diploma is a university level Diploma, it looks like an Associate degree or the french DEUG. Read here about the Associate degree: https://en.wikipedia.org/wiki/Associate_degree I have also succeeded one year of pure mathematics at the university level of mathematics. So i have got a college Diploma, and after that i have also studied and succeeded 3 years at the university level. Thank you, Amine Moulay Ramdane. |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Mar 26 12:15PM -0700 Amine, I hate to break this to you, but not only does nobody care, you have spammed this group with so many personal posts about unrelated content and personally held philosophical opinions, of which a great many of those you've posted N times with proofreading corrections, and all on brand new threads rather than follow-up posts, that you have lost all credibility and interest. You're worse than the boy who cried wolf to people. They mark your posts as spam and get angry with the fact you still post. That is the atmosphere you inspire here. If you want to reclaim any degree of respect by the people here, you will need to stop posting about any C++ algorithms you've "invented," get a blog, and post like regulars helping people, adding a tag line to your posts where people who find your replies interesting or informative can go to learn more about your body of work. Thank you, Rick C. Hodgin |
Bonita Montero <Bonita.Montero@gmail.com>: Mar 26 09:25PM +0200 Forget it, by flooding this newsgroup you got a permanent reputation of being a moron. Showing your diplomas doesn't help. -- http://facebook.com/bonita.montero/ |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Mar 26 12:29PM -0700 > [snip] Marked as spam. Thank you, Rick C. Hodgin |
Jerry Stuckle <jstucklex@attglobal.net>: Mar 26 04:53PM -0400 On 3/26/2017 3:25 PM, Bonita Montero wrote: > Forget it, by flooding this newsgroup you got a permanent > reputation of being a moron. Showing your diplomas doesn't > help. Bonita, what do you have against morons that you compare them to Ramine? He doesn't rate that high. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ================== |
"Chris M. Thomasson" <invalid@invalid.invalid>: Mar 26 02:43PM -0700 On 3/26/2017 1:53 PM, Jerry Stuckle wrote: >> help. > Bonita, what do you have against morons that you compare them to Ramine? > He doesn't rate that high. That is pretty hard-core, although, hard to disagree with as well. Humm... I just hope that my recent posts about lock-free algorithms do not make me sound totally crazy. ;^o |
aminer68@gmail.com: Mar 26 12:43PM -0700 Hello, Bonita Montero responded to me: >Forget it, by flooding this newsgroup you got a permanent >reputation of being a moron. Showing your diplomas doesn't >help. I am not flooding this forum, i am just presenting myself very quickly, other than that you have said that my projects are not large projects this is why i am not a capable programmer, but i don't agree with you, because i have also studied, when i have got my diploma in Microelectronics, the Ward/Mellor's real-time system models, so i know about those modeling techniques that represents the essential requirements abstraction of the software system to be constructed for real-time systems, i know how to do external interfaces diagrams (EID) and external events/response list interfaces diagram(EERL) and i know about Object relationship diagrams (ORD) etc. because i have studied also at the unversity level, so i know how to code more larger projects, so don't call me stupid because i am not stupid. Thank you, Amine Moulay Ramdane. |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Mar 26 01:42PM -0700 > [snip] Marked as spam. Thank you, Rick C. Hodgin |
aminer68@gmail.com: Mar 26 01:24PM -0700 Hello, The divide and conquer method and philosophy.. I think that this Bonita is still young, and it is why she doesn't think efficiently, she has for example said that since my projects are not large projects, so that means that i am not a capable programmer.. this is childish thinking, because look for example at my Petri Nets tutorial: https://sites.google.com/site/aminer68/how-to-analyse-parallel-applications-with-petri-nets I have studied Petri Nets at the university level, and this is why i have written about them, you have to look at this from a divide and conquer methodology and philosophy, i am giving you my tutorials and projects to be able to construct from smaller things bigger things, this is also the philosophy of my projects, look for example at my parallel archiver library and parallel compression library here: https://sites.google.com/site/aminer68/parallel-archiver and here: https://sites.google.com/site/aminer68/parallel-compression-library They are about 10000 lines of code that you can add to your projects to be able to construct much bigger softwares.. And all my projects here are the same: https://sites.google.com/site/aminer68/ My projects are like the divide and conquer philosophy, they permit you to construct much bigger softwares. This is why i am not stupid. Thank you, Amine Moulay Ramdane. |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Mar 26 01:42PM -0700 > [snip] Marked as spam. Thank you, Rick C. Hodgin |
ram@zedat.fu-berlin.de (Stefan Ram): Mar 26 08:30PM >The -std::byte- thing is really sad. Is it sad because of the naming (»::std::byte« instead of »byte_t« or a new »byte« keyword) or do you oppose a type with any name for the semantics of »a byte, but neither a number nor a character«? Some do not like the naming because it adds yet another style for fundamental types (after keywords and the names ending in »_t«). >Now optional message for -static_assert-, too late. (To clarify this: We do not have a new message parameter that happens to be optional, but rather we already have had a message parameter; what's new is that it now can be omitted.) >UTF-8 character literal is a way to restrict a character literal on >octet-based machines (just about all modern computers) to ASCII. It's >IMHO the most useless and silly concept in all of C++ history. In my teaching it would be slightly helpful if I understand it correctly. Currently, I teach that ( int )'A' == 65 is true on the computers /in the classroom/, and add that this is not guaranteed by C++ and there might be computers where it is false. If I understand »u« correctly (no pun intended), I might now say that ( int )u'A' == 65 is true. No more restrictions necessary. That would be slightly simpler to teach. >- Alf (a bit disappointed) Many people are disappointed because there are no modules and no concepts and no ... (you name it). But we might be able to use TS /and/ implementations for them before C++20 (which is called »C++19/20« by some now). Of course with regard to a graphical output or a GUI, there does not even seem to be a TS in sight. What made me adopt C++17 very early for my C++ course was that the type of »i« after auto const i { 20 }; is not »initializer_list<int>« in C++17, but rather »int«, which simplifies teaching both »auto« and »initializier_list«s, because before I had to say: "Prefer »auto«, and prefer initializer lists! And, BTW, you can use them together." |
ram@zedat.fu-berlin.de (Stefan Ram): Mar 26 08:37PM >I might now say that >( int )u'A' == 65 >is true. OTOH, now I don't know whether ::std::cout << u'A'; will appear as an »A« on the console everywhere. |
aminer68@gmail.com: Mar 26 12:19PM -0700 Hello, Here is my Diploma called the Brevet de technicien supérieur (BTS) technician certificate is a national diploma of higher education in France, established in 1959, my Diploma is a french Diploma in Microeclectronics(i have done also informatics when i have studied Microelectronics), read about it here: https://en.wikipedia.org/wiki/Brevet_de_technicien_sup%C3%A9rieur The french BTS is like a university level diploma, it is not a college diploma, it looks like an Associate degree: Read here about the Associate degree: https://en.wikipedia.org/wiki/Associate_degree I have also succeeded one year of pure mathematics at the university level of mathematics. So i have got a college Diploma, and after that i have also studied and succeeded 3 years at the university level. Thank you, Amine Moulay Ramdane. |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Mar 26 12:29PM -0700 > [snip] Marked as spam. Thank you, Rick C. Hodgin |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Mar 25 11:28PM > In June, Barzilai, along with academics from the not-for-profit American Federation for Aging Research (AFAR), approached the Food and Drug Administration with an idea: the Targeting Aging With Metformin (TAME) study, to see if metformin could do for humans what it does for animals. It would be the first clinical trial to test if a drug could slow human aging. The FDA said yes, and since that June meeting the media has exploded with excitement over the purported "fountain of youth" drug, with rumors that it could extend human life span up to 120 years. > Read more here: > http://www.newsweek.com/2015/12/25/diabetes-drug-could-be-anti-aging-miracle-404370.html Fuck off you spamming cunt. Keep your promise and stop posting here. /Flibble |
Real Troll <real.troll@trolls.com>: Mar 26 12:01AM -0400 On 25/03/2017 23:28, Mr Flibble wrote: > Fuck off you spamming cunt. Keep your promise and stop posting here. Why do you f** off yourself for posting the link that you knew was spam!! In fact why don't you just ignore that idiot so that he will go away when no body responds to him. |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Mar 26 09:55AM -0700 On Saturday, March 25, 2017 at 7:28:20 PM UTC-4, Mr Flibble wrote: > > ... > [Strong expletives deleted] ... > /Flibble You diminish your contributions to this group, and to your fellow human beings in general, with your extreme vulgarity, Leigh. It is inappropriate and harmful, and you will not be held guiltless for it when you stand before God to give an account of your life after you leave this world: http://biblehub.com/romans/14-12.htm 12 So then every one of us shall give account of himself to God. Jesus said we will even give an account of every idle word: http://biblehub.com/matthew/12-36.htm 36 But I say unto you, That every idle word that men shall speak, they shall give account thereof in the day of judgment. Thank you, Rick C. Hodgin |
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Mar 26 03:02PM +0200 On 25-Mar-17 1:34 AM, Lynn McGuire wrote: > its final ISO balloting. All that remains for C++17 now is some ISO red > tape and minor touch-up to get it officially published, which is > expected to be just mechanical." A summary of core language features with examples, plus some of the library stuff: <url: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md> Not sure how I overlooked coroutines in all that. I'll have to try them, and hey, Visual C++ already supports them. (It was such fun with coroutines in Modula-2.) Cheers!, - Alf |
"Chris M. Thomasson" <invalid@invalid.invalid>: Mar 25 07:53PM -0700 Fwiw, here is a simple example of how one can use C++ atomics and membars to create a fairly efficient semaphore. Its based on the lowest common denominator, a semaphore created with std C++ mutex and condvar relationship. If you are interested and happen to have some free time to kill, go ahead and take a look at the code in here: http://pastebin.com/raw/Q7p6e7Xc (no ads in this link to pastebin) Notice the cpp_sem object: ______________________________ // Basic, bare bones C++ Semaphore struct cpp_sem { int m_count; std::mutex m_mutex; std::condition_variable m_cond; cpp_sem(int count = 0) : m_count(count) { assert(count > -1); } void dec() // wait { std::unique_lock<std::mutex> lock(m_mutex); while (m_count == 0) m_cond.wait(lock); --m_count; } void inc() // post { { std::unique_lock<std::mutex> lock(m_mutex); ++m_count; } m_cond.notify_one(); } }; ______________________________ now, this is not optimized at all, wrt trying to avoid the mutex. Take a look at the following thin layer on top of this, in std C++ and can eliminate many calls to the "slow" underlying blocking nature. Btw, the original algo was invented by Joe Seigh. If interested, take a look at the fsem object: ______________________________ // A faster semaphore using a little spice wrt // "bolting on" std C++ atomics and membars struct fsem { std::atomic<int> m_count; // atomic sema counter cpp_sem m_cpp_sem; fsem(int count = 0) : m_count(count) {} void dec() // wait { int count = m_count.fetch_sub(1, mb_relaxed); if (count < 1) m_cpp_sem.dec(); // conditional wait // we acquired a signal, acquire membar mb_fence(mb_acquire); } void inc() // post { // we are going to release a signal, release membar mb_fence(mb_release); int count = m_count.fetch_add(1, mb_relaxed); if (count < 0) m_cpp_sem.inc(); } }; ______________________________ Imvho, this is fairly straightforward logic. Take note of the calls to m_count.fetch_add/sub(), and the calls to the mb_fence macro, defined as: ______________________________ #define mb_relaxed std::memory_order_relaxed #define mb_consume std::memory_order_consume #define mb_acquire std::memory_order_acquire #define mb_release std::memory_order_release #define mb_acq_rel std::memory_order_acq_rel #define mb_seq_cst std::memory_order_seq_cst #define mb_fence(mb) std::atomic_thread_fence(mb) ______________________________ Here is all the code: ______________________________ // Fast-Semaphore by Joe Seigh // C++ Implmentation by Chris Thomasson // Modeled as a semaphore-as-a-mutex test... #include <cstdio> #include <deque> #include <condition_variable> #include <mutex> #include <memory> #include <thread> #include <atomic> #include <algorithm> #include <cassert> #define mb_relaxed std::memory_order_relaxed #define mb_consume std::memory_order_consume #define mb_acquire std::memory_order_acquire #define mb_release std::memory_order_release #define mb_acq_rel std::memory_order_acq_rel #define mb_seq_cst std::memory_order_seq_cst #define mb_fence(mb) std::atomic_thread_fence(mb) #define THREADS 7 #define N 1000000 static std::mutex g_std_out_mutex; // Basic, bare bones C++ Semaphore struct cpp_sem { int m_count; std::mutex m_mutex; std::condition_variable m_cond; cpp_sem(int count = 0) : m_count(count) { assert(count > -1); } void dec() // wait { std::unique_lock<std::mutex> lock(m_mutex); while (m_count == 0) m_cond.wait(lock); --m_count; } void inc() // post { { std::unique_lock<std::mutex> lock(m_mutex); ++m_count; } m_cond.notify_one(); } }; // A faster semaphore using a little spice wrt // "bolting on" C++ atomics and membars struct fsem { std::atomic<int> m_count; // atomic sema counter cpp_sem m_cpp_sem; fsem(int count = 0) : m_count(count) {} void dec() // wait { int count = m_count.fetch_sub(1, mb_relaxed); if (count < 1) m_cpp_sem.dec(); // conditional wait // we acquired a signal, acquire membar mb_fence(mb_acquire); } void inc() // post { // we are going to release a signal, release membar mb_fence(mb_release); int count = m_count.fetch_add(1, mb_relaxed); if (count < 0) m_cpp_sem.inc(); } }; // Some generic user state struct shared_user_state { fsem m_sema; // acts as mutex sema with init count of 1 int m_user_state; shared_user_state() : m_sema(1), m_user_state(0) {} }; void producer_thread( unsigned int id, shared_user_state& sustate ) { { std::unique_lock<std::mutex> lock(g_std_out_mutex); std::printf("producer_thread(%u)::sustate(%p) - Entry\n", id, (void*)&sustate); } for (unsigned int i = 0; i < N; ++i) { // atomic state mutation sustate.m_sema.dec(); int user_state = ++sustate.m_user_state; sustate.m_sema.inc(); if (!(i % 1003)) { { std::unique_lock<std::mutex> lock(g_std_out_mutex); std::printf("producer_thread(%u)::sustate(%p)::user_state(%d)\n", id, (void*)&sustate, user_state); } } } { std::unique_lock<std::mutex> lock(g_std_out_mutex); std::printf("producer_thread(%u)::sustate(%p) - Exit\n", id, (void*)&sustate); } } void consumer_thread( unsigned int id, shared_user_state& sustate ) { { std::unique_lock<std::mutex> lock(g_std_out_mutex); std::printf("consumer_thread(%u)::sustate(%p) - Entry\n", id, (void*)&sustate); } for (unsigned int i = 0; i < N; ++i) { // atomic state mutation sustate.m_sema.dec(); int user_state = --sustate.m_user_state; sustate.m_sema.inc(); if (!(i % 1003)) { { std::unique_lock<std::mutex> lock(g_std_out_mutex); std::printf("consumer_thread(%u)::sustate(%p)::user_state(%d)\n", id, (void*)&sustate, user_state); } } } { std::unique_lock<std::mutex> lock(g_std_out_mutex); std::printf("consumer_thread(%u)::sustate(%p) - Exit\n", id, (void*)&sustate); } } int main(void) { { shared_user_state sustate; std::thread consumers[THREADS]; std::thread producers[THREADS]; for (unsigned int i = 0; i < THREADS; ++i) { consumers[i] = std::thread( consumer_thread, i + 0, std::ref(sustate) ); producers[i] = std::thread( producer_thread, i + 1, std::ref(sustate) ); } for (unsigned int i = 0; i < THREADS; ++i) { producers[i].join(); consumers[i].join(); } std::printf("sustate(%p)::m_user_state(%d)\n", (void*)&sustate, sustate.m_user_state); assert(sustate.m_user_state == 0); } std::printf("\nComplete, hit <ENTER> to exit...\n"); std::fflush(stdout); std::getchar(); return 0; } ______________________________ Can anybody run this stuff? ;^o I will happily answer any questions, and would love comments, criticisms, all of it. |
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