- Don't be fooled by cpp.sh - 8 Updates
- Probably UB but I am finding it hard to give a fuck (C++ swizzle) - 1 Update
- What cache-archtectures ... - 1 Update
boltar@nowhere.co.uk: Dec 21 04:33PM On Fri, 20 Dec 2019 10:36:14 -0800 (PST) >> How did you manage to write code before? Its just yet more noise. >Lack of answer noted. :D Pathetic snip of shameful strategies that >you likely use also noted. I answer later in post. It was a question to make you think. Clearly either you can't or you have the memory of a goldfish and can't remember how you programmed yesterday, never mind before 2017. >> Or pass in an error parameter. >The case of using optional is when lack of value is *not* *an* >*error*. Exceptions just waste resources and how you store it Exceptions only use resources if thrown, optional uses resources every time its used. And if you want lack-of-value to be a valid return type then write your code in PL/SQL or tSql. This is C++, it deals in boolean logic, not "I don't know". >> How did we manage before 2017. Its a mystery. >Huh? Second time same question? :D Fishing for ideas since you A simple question you still can't answer. >snipped all the obviously embarrassing and inferior to optional >strategies that you use? :D But masters are here for to teach. Teach what? Not English grammar thats for sure. And all I see is a load of indignation and no arguments for your case. >in usage. Tagged unions or variants from various libraries until >when I read about Barton-Nackman's fallible<T> and about 2005 I "Look at me - I read a paper by someone hardly anyone one has heard of 14 years ago, I must be a l33t coder 4sure!" >> Yeah, lets just create pointless object instances all over the place just >> to indicate valid returns. Very efficient. I think you'd like Java. >These beat all the embarrassing strategies that you snipped in The embarrasing strategies that have been used perfectly well for 20+ years? Did you just start coding yesterday? >performance ... and you did fail to tell what is your alternative >"superior" method ... so sorry ... foaming mouth is not argument. :D Hilarious, you should do stand up comedy. I gave the options, if you can't understand them thats your problem, not mine. |
woodbrian77@gmail.com: Dec 21 08:42AM -0800 On Friday, December 20, 2019 at 6:35:48 AM UTC-6, Öö Tiib wrote: > already naturally have it (like pointers and floating points) > and for anything else that may be unknown or missing to use > std::optional. You seem to be high on std::optional. This file: https://github.com/Ebenezer-group/onwards/blob/master/src/cmw/tiers/cmwA.cc has this line: cmwRequest* req=nullptr; You don't like that? I haven't tried it recently, but I suspect making that an optional would puff up the size of my binary without any benefit. I think more highly of std::optional than std::any, but don't find a lot of uses for std::optional. Brian Ebenezer Enterprises http://webEbenezer.net |
"Öö Tiib" <ootiib@hot.ee>: Dec 21 09:11AM -0800 > It was a question to make you think. Clearly either you can't or you have the > memory of a goldfish and can't remember how you programmed yesterday, never > mind before 2017. I started to program biotech applications in eighties. There are long lasting experiments often lasting for days but equipment was often experimental and hiccuping, probes could get contaminated etc. It was common that at least some measurements were missing for one or other time point. Should they throw away the whole experiment data? No, experiments were expensive and there was plenty of information. Should they somehow fake data for measurements that failed? No, science can't be made from fake data. But lack of data is *normal* state of affairs in world we live in. So I used tagged unions to store such points already in C in eighties before I switched to C++. > its used. And if you want lack-of-value to be a valid return type then write > your code in PL/SQL or tSql. This is C++, it deals in boolean logic, not > "I don't know". Nonsense, bool was added to C++ by C++98, I used C++ *long* before that. <https://en.cppreference.com/w/cpp/language/history> I don't know is default answer to every question. Knowledge is rarity. > >strategies that you use? :D But masters are here for to teach. > Teach what? Not English grammar thats for sure. And all I see is a load of > indignation and no arguments for your case. If you can't comprehend me then I don't really care, go discuss stuff with fir. > >when I read about Barton-Nackman's fallible<T> and about 2005 I > "Look at me - I read a paper by someone hardly anyone one has heard > of 14 years ago, I must be a l33t coder 4sure!" Only utter moron denies contributions of John J. Barton and Lee R. Nackman to our industry. Pathetic snip of answer noted again. :D > >These beat all the embarrassing strategies that you snipped in > The embarrasing strategies that have been used perfectly well for 20+ years? > Did you just start coding yesterday? I said I have frowned upon that inefficient crap from eighties. Optional and Variant are just well-made tagged unions. > >"superior" method ... so sorry ... foaming mouth is not argument. :D > Hilarious, you should do stand up comedy. > I gave the options, if you can't understand them thats your problem, not mine. You have only said that you throw exceptions to perfectly normal case of missing data. Your style: Find closest human in room. No humans in room found exception thrown. Program crashed with uncaught exception. Wtf you can program like that? Clown. :D |
boltar@nowhere.co.uk: Dec 21 05:22PM On Sat, 21 Dec 2019 09:11:29 -0800 (PST) >Should they somehow fake data for measurements that failed? No, >science can't be made from fake data. But lack of data is *normal* state >of affairs in world we live in. Yes, lack of data is normal, but you don't include it in the program data as "unknown". It simply isn't used to calculate the results which I presume would be some sort of statistical error bar calculation. >> your code in PL/SQL or tSql. This is C++, it deals in boolean logic, not >> "I don't know". >Nonsense, bool was added to C++ by C++98, I used C++ *long* before that. FFS, do you even know what boolean logic is? Clue: its how computers work and has nothing to do with the language being used. >> of 14 years ago, I must be a l33t coder 4sure!" >Only utter moron denies contributions of John J. Barton and Lee R. Nackman >to our industry. Pathetic snip of answer noted again. :D Never even heard of them nor do I care. But given you don't even know what boolean logic is its obvious you're just a name dropper trying to look clever. >> The embarrasing strategies that have been used perfectly well for 20+ years? >> Did you just start coding yesterday? >I said I have frowned upon that inefficient crap from eighties. That ineffcient crap is exactly what happens at the assembler level no matter what fancy high level constructs you use. There's no register value that means "I don't know". >Wtf you can program like that? Clown. :D Ad hominen, how predictable. |
"Öö Tiib" <ootiib@hot.ee>: Dec 21 09:25AM -0800 > You don't like that? I haven't tried it recently, but I suspect > making that an optional would puff up the size of my binary > without any benefit. That clown boltroll just snips every answer of mine to leave impression that I did not give those. I wrote: "Lot cheaper and cleaner is to use missing state of types that already naturally have it (like pointers and floating points) and for anything else that may be unknown or missing to use std::optional." So if you already have pointers then use nullptr indeed as "missing" state. > I think more highly of std::optional than std::any, but don't > find a lot of uses for std::optional. I also don't find any usage for std::any. How should anyone trust interface that accepts anything? Did they test it? |
"Öö Tiib" <ootiib@hot.ee>: Dec 21 10:18AM -0800 > Yes, lack of data is normal, but you don't include it in the program data > as "unknown". It simply isn't used to calculate the results which I presume > would be some sort of statistical error bar calculation. You just argue but avoid thinking what is really more efficient. Lets say we have 72 hour experiment with growing culture of some kind of insect cells. Lets say every minute something like temperature, weight, pressure, pH is measured at place and some little samples of culture and its exhaust gasses are taken for analyses done elsewhere and entered later. Every little thing of it may fail and every data-point can be therefore become lost and unknown forever. But actually vast majority of data points are known. So now we either have arrays of guaranteed 4320 (72*60) optionals (my suggestion) or we have arrays of up to 4320 (sometimes 4303 sometimes 4278 etc.) time and value pairs (your suggestion). What data takes less storage and is easier to process as well? My 40 years of experience has shown that optionals win by significant margin both in robustness and efficiency. And it does not matter that those were added to C++ library only 2017. > >Nonsense, bool was added to C++ by C++98, I used C++ *long* before that. > FFS, do you even know what boolean logic is? Clue: its how computers work and > has nothing to do with the language being used. You argue with yourself here it is you who said that "This is C++, it deals in boolean logic, use tSql". :D I have used missing state regardless if I program in C, C++ or something else. It was supported from scratch in lot of languages. Objective C, Go, Swift etc. all have nil as value for "I don't know". So C++ had to add it too. > >to our industry. Pathetic snip of answer noted again. :D > Never even heard of them nor do I care. But given you don't even know what > boolean logic is its obvious you're just a name dropper trying to look clever. Nonsense. > That ineffcient crap is exactly what happens at the assembler level no matter > what fancy high level constructs you use. There's no register value that means > "I don't know". There is nothing fancy in lack of data. It is normal. > >Wtf you can program like that? Clown. :D > Ad hominen, how predictable. Find closest human in room. No humans in room found exception thrown. Program crashed with uncaught exception. :D |
Vir Campestris <vir.campestris@invalid.invalid>: Dec 21 09:21PM On 21/12/2019 18:18, Öö Tiib wrote: > years of experience has shown that optionals win by significant margin > both in robustness and efficiency. And it does not matter that those > were added to C++ library only 2017. I rather think this depends on the type of data you are processing. In your case you have data where particular values are missing from a set it's clearly sensible to store all the other data, and have some kind of flag to mark the missing data. If the data was being collected from a remote site, and the problem was loss of comms, then you'd have periods where there was no data from any of the sensors. In that case it's clearly sensible to record the start and end of the lost data period, and not record all the missing values. Equally if your sensor returns data with 50% reliability the cost of handling all the exceptions if one was thrown for each error would be very high. But if it lost one data point in a million the code of checking the validity of each one would be higher. Andy |
"Öö Tiib" <ootiib@hot.ee>: Dec 21 02:30PM -0800 On Saturday, 21 December 2019 23:20:55 UTC+2, Vir Campestris wrote: > In your case you have data where particular values are missing from a > set it's clearly sensible to store all the other data, and have some > kind of flag to mark the missing data. Sure, I tried to give convincing example of usage of optional. I am in no way saying that make everything optional. :D Make all stuff optional that may be normally missing (should not be treated as show stopper error when missing). > loss of comms, then you'd have periods where there was no data from any > of the sensors. In that case it's clearly sensible to record the start > and end of the lost data period, and not record all the missing values. Yes. It depends what data is gathered and what processing is made. Sometimes such simple packing helps with storage. But when it helps then it does not apply only to missing values. If temperature is for hours 23.45°C in some vessel then that can be packed in same way. Depends how it is processed since unpacking takes storage too. ;) > handling all the exceptions if one was thrown for each error would be > very high. But if it lost one data point in a million the code of > checking the validity of each one would be higher. My measuring has shown that somewhere around 1 fail : 5000 successes the exceptions and return value checking break even in current table-based exception handling in overall efficiency. But note that in real time processing the overall efficiency is less valuable. There tiny gain in cost of success loop does not matter but huge difference between success loop and fail loop hurts. Most often those performance considerations do not matter one way or other, then it matters what is more clear and robust. Explaining how to process my data as exported to Lotus 1-2-3 to biologists was simple since all values of same time point were on very same row. That was clear to them. Had I stored it differently then I had probably to convert it anyway to one with missing values here and there. Or how else you suggest to show it in spreadsheet? |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Dec 21 01:23PM > Please don't swear here. Fuck. Off. /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." |
Bonita Montero <Bonita.Montero@gmail.com>: Dec 21 08:18AM +0100 > Yeah. Was thinking that std::hardware_destructive_interference_size can > be L1, and std::hardware_constructive_interference_size different can be > L2. However, this is completely up to the implementation. If L2 has a larger cacheline-size than L1 and L2 is shared, then both values should be at least >= the L2 cacheline-size. > They recommend to pad and align things on 128-byte boundaries. The two > 64-byte halves can contend. Section 3.7.3, Hardware Prefetching for > Second-Level Cache. There were multicore NetBurst-CPUs, not even NetBurst-based Xeons. So there wasn't any opportunity for false sharing. |
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