C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Proposal for 'std::fiber<T>' Language-level Extension in C++23

From: 1one1 <ahshabazz_at_[hidden]>
Date: Fri, 7 Jul 2023 15:03:47 +0000 (UTC)
I would like to stay on the topic of my proposal, because the use and or usefulness of large language models is still being debated by society ...


In this next API call example, ```struct Data { int id; std::vector<int> numbers }; std::fiber<Data> _fiber_;```, we're creating a std::fiber<> wrapper for a Data struct. Each fiber can independently processes its own Data struct.




Since std::fiber<Data> employs RCU or COW semantics, it can safely read from Data.id, Data.numbers, etc. without causing any data races. Also, if a fiber needs to modify its Data member, it will only copy the parts of the data that it's going to modify (lazy copying), which helps to optimize memory usage.




If the committee decides to make Data's members private by default, then using an accessor-method, we can safely share the Data struct member with other fibers. This is similar to how we can share a std::shared_ptr<> with other threads.




```// Each fiber reads and updates the commonNumber via accessor methods // int localCopy = _fiber_.read(OtherSharedData.commonNumber); localCopy += 1; // Increment our local copy // _fiber_.write(OtherSharedData.commonNumber, localCopy); // Write back to shared data //```




Moreover, with deterministic memory management (like reference counting), we can ensure aggregates, such as in ```std::vector<std::fiber<Data>> _fibers_;``` are not prematurely deleted when they are still being used by the fibers.




Hopefully, this example showcases the simplicity and clarity of the std::fiber<T> API, making it easy for developers to create and manage.
Regards,Abdul S.

On Friday, July 7, 2023, 10:39, Sebastian Wittmeier via Std-Proposals <std-proposals_at_[hidden]> wrote:


AW: [std-proposals] Proposal for 'std::fiber<T>' Language-level Extension in C++23#yiv5014438243 body {font-family:Arial, Verdana, Sans-Serif important;font-size:12px;padding:5px 5px 5px 5px;margin:0px;border-style:none;background-color:#ffffff;}#yiv5014438243 p, #yiv5014438243 ul, #yiv5014438243 li {margin-top:0px;margin-bottom:0px;}
There is a reason, why current language models are frowned upon, when the users just rely on them instead of understanding _and_ checking the subject topics.

 

They are forbidden on stackoverflow.com (https://meta.stackoverflow.com/questions/421831/temporary-policy-generative-ai-e-g-chatgpt-is-banned),

lawyers could get sanctioned for not checking their submissals (https://lsj.com.au/articles/lawyer-faces-sanctions-for-using-bogus-citations-from-chatgpt/),

etc.

 

If you do not even invest the time to check the answers on this mailing list and the link references yourself, you are wasting everyone's else's time.

So please, even if you let yourself help by ChatGPT, you have to read, understand and improve upon the topics, you are providing proposals for, in depth!

Perhaps you think, you are smart, just using those tools, when actually it is kind of fake, if you do not use a disclaimer in your messages and in your proposal that it actually has not been fully written by yourself.

 

 


 

-----Ursprüngliche Nachricht-----
Von: 1one1 via Std-Proposals <std-proposals_at_[hidden]>
Gesendet: Fr 07.07.2023 15:51
Betreff: Re: [std-proposals] Proposal for ‘std::fiber<T>‘ Language-level Extension in C++23
An: Jonathan Wakely via Std-Proposals <std-proposals_at_[hidden]>; Bjorn Reese <breese_at_[hidden]>;
CC: 1one1 <ahshabazz_at_[hidden]>;
#yiv5014438243 body {font-family:monospace;} Thanks for the URL Bjorn. I will supply the link to my OpenAI GPT Model to further help me hone the key concepts of my proposal. If there are any mistakes in this proposal which need correcting, they are my own! And the very gifted people on this standards committee need to stop denigrating other members whom use these large language models to better clarify their ideas; It's like Einstein bullying the kid in the back of the class room because he uses a calculator, admonishing him to properly attribute his to Casio or Texas Instruments... Regards,Abdul S.


 --
 Std-Proposals mailing list
 Std-Proposals_at_[hidden]
 https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
  
-- 
Std-Proposals mailing list
Std-Proposals_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2023-07-07 15:05:58