- Why it is important to check what the malloc function returned - 4 Updates
- Mother Teresa - 2 Updates
- Boulder Paradox (Burrito Reprise) - 2 Updates
- [Jesus Loves You] Re: Burrito Paradox - 6 Updates
- Praying - 2 Updates
- Evidence for the existence of God? - 2 Updates
- OT: Github - 1 Update
- [Jesus Loves You] Seek the truth - 2 Updates
- Optional arguments or overloading? - 4 Updates
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Feb 02 12:00PM -0800 On 2/2/2018 4:31 AM, Manfred wrote: > } > are ubiquitous in C code, but this is one major reason for which Bjarne > introduced exceptions in C++. C++ is a very nice tool to have in the box! :^) |
Richard Damon <Richard@Damon-Family.org>: Feb 03 12:19PM -0500 On 2/2/18 10:23 AM, David Brown wrote: > from malloc, it will/not/ fail. There is/no/ realistic chance of it > failing. You would be better worrying about a lightening strike > blasting the PC to bits than worrying about the malloc failing. Even on your 8 GB Linux desktop, your program might be running as a process which has been assigned to limited ram, and thus malloc may fail. If you really intend that your function can not be run in an environment like this, there really should be a GREAT BIG COMMENT that this function assumes unlimited available heap, and that comment needs to be copied to every function that calls such a function, all the way to the main, and into the documentation for the program. |
Manfred <noname@invalid.add>: Feb 03 10:11PM +0100 On 2/3/2018 6:19 PM, Richard Damon wrote: > assumes unlimited available heap, and that comment needs to be copied to > every function that calls such a function, all the way to the main, and > into the documentation for the program. And in more general terms malloc() is a system function that is specified to be subject to failure, with no further guarantees. Any causes for malloc() to fail are simply out of the control of the programmer, hence the requirement for serious code to be prepared for its failure. The only option for the programmer to make use of its reasonable unlikelihood, and ease handling of this situation, is to adopt a simple solution, so that "being prepared" often just means "abort with no further action". |
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Feb 03 02:24PM -0800 On 2/3/2018 1:11 PM, Manfred wrote: > unlikelihood, and ease handling of this situation, is to adopt a simple > solution, so that "being prepared" often just means "abort with no > further action". Fwiw, I remember trying to send a signal for a malloc failure in a server that told the system that %^^$ hit the fan, and it should start freeing cache and even start purging connections that have the lowest response times along with trying to give the purged users an overloaded error condition. This actually worked. I could see the malloc failure signals start to artificially drop load in the server during testing phases. Fwiw, malloc was only used to handle conditions in the server when the current load needed more memory that was pre-allocated and guaranteed in system startup. So, it just allocated more blocks using malloc, that can fail. BTW, the signals sent to the systems event loop after malloc failure did not require a subsequent malloc to create. I remember checking errno for ENOMEM after malloc failure wrt returning NULL as well. |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 03 08:11PM Mother Teresa was not a friend of the poor. She was a friend of poverty. She said that suffering was a gift from God. She spent her life opposing the only known cure for poverty, which is the empowerment of women and the emancipation of them from a livestock version of compulsory reproduction. -- Thank you, Rick C. Hodgin |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 03 04:31PM -0500 On 2/3/2018 3:11 PM, Rick C. Hodgin wrote: > the only known cure for poverty, which is the empowerment of women and > the emancipation of them from a livestock version of compulsory > reproduction. I, the real Rick C. Hodgin, did not write this post above. Please examine the headers. I post from Google Groups and Eternal September. -- Rick C. Hodgin |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 02 04:31PM -0800 On Friday, February 2, 2018 at 5:24:15 PM UTC-5, Rick C. Hodgin wrote: > If God is able to manifest a boulder that is... I, the real Rick C. Hodgin, did not write this. An identity thief has posted under my identity. I apologize for any confusion the thief has caused. -- Rick C. Hodgin |
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Feb 03 01:00PM -0800 On 2/2/2018 4:31 PM, Rick C. Hodgin wrote: > I, the real Rick C. Hodgin, did not write this. An identity > thief has posted under my identity. > I apologize for any confusion the thief has caused. Hummm... The Burrito Reprise gave it away for me, without looking at the headers. ;^) |
"Öö Tiib" <ootiib@hot.ee>: Feb 03 05:09AM -0800 Rick C. Hodgin wrote: >>> I apologize for the confusion. I have tried to prevent it. If >>> anyone has any advice on how to proceed please feel free to email >>> me. Thank you in advance for your assistance. The numerous attempts to prosecute them have shown to you that you are toothless in practice. So you ask others to assist against Giganews and Leigh. > I pity you, Leigh. But more than that, I forgive you. After asking for others to help in it you claim that you forgive him. :D No satire can beat that level of sanctimonious comedy and irony. No one doubts that you will continue to search the ways of revenge. May be that we did not love you enough. But no one can join your religion because of the posts that you write. You present it as something repulsive and its followers (you) as duplicitous lunatics who dream how others rot in hell but lie how you love them and forgive them. As result everybody who does not share your faith yet starts to hope that either there are no trace of truth in your philosophy or you have skewed it beyond recognition. |
woodbrian77@gmail.com: Feb 03 06:53AM -0800 On Saturday, February 3, 2018 at 7:09:27 AM UTC-6, Öö Tiib wrote: > them and forgive them. As result everybody who does not share your > faith yet starts to hope that either there are no trace of truth > in your philosophy or you have skewed it beyond recognition. For those who want to better understand the conflict here, I suggest reading or listening to Ben Shapiro over at https://www.dailywire.com . He says, "The argument for atheism is that there is no freewill - we are just balls of flesh wandering through the universe. I don't find that completely implausible. That's a possibility. I'm not going to pretend that atheism isn't a possibility. I will suggest that I find it not more plausible than the explanation that we have freewill, we are capable in changing in our own lives, that our action is in our own hands. That we are endowed with reason that extends beyond just neuronal firing. That I think is a more compelling case. So what I'm suggesting is that belief in G-d does not have to be certainty to be probability. And so I believe that G-d exists and that He controls the universe, is involved in our lives and that He has handed to us a set of precepts that help guide our lives and make better civilization. One of the reasons for that is almost utilitarian which is that the only great civilization in the history of the world in my viewpoint is the Judeo-Christian civilization springing from those foundations." That's my attempt at transcribing part of Ben's podcast https://www.dailywire.com/podcasts/26684/ep-467-its-memo-day -- around 55 minutes and 35 seconds -- into text. Brian Ebenezer Enterprises - "Free at last, free at last; thank G-d Almighty we are free at last." Pastor Martin Luther King Jr. http://webEbenezer.net |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 03 07:21AM -0800 On Saturday, February 3, 2018 at 8:09:27 AM UTC-5, Öö Tiib wrote: > forgive him. :D No satire can beat that level of sanctimonious > comedy and irony. No one doubts that you will continue to search > the ways of revenge. I do not seek revenge. I want the coward to stop posting using my identity. I don't care if he behaves as vulgar Peter Cheung has toward me. I want him doing so under the name "Leigh Johnston," and not behind a mask designed to disparage my name and cause me harm, because each bit of harm he inflicts toward me is multiplied back on him by the damage it does to other people. Leigh Johnston is a criminal, and I will continue to seek ways to get him to stop posting under my identity because it confuses people and harms the clarity of the message because his attacks stem from my name. A random person happening in on these posts would be completely confused, resulting in much harm done to them and Leigh by that confusion and its misleading nature. That is isolated from my forgiveness for him. I do not want him punished by God for his actions, so I personally forgive him. But he is still accountable to God for his actions, and the harm done to many people. -- Rick C. Hodgin |
"Öö Tiib" <ootiib@hot.ee>: Feb 03 11:18AM -0800 > For those who want to better understand the conflict here, > I suggest reading or listening to Ben Shapiro over at Must be better preacher than Rick since one has likely to subscribe and to pay for to hear his bollocks. > "The argument for atheism is that there is no freewill - > we are just balls of flesh wandering through the universe. > I don't find that completely implausible. That's a possibility. What he puts up seems typical straw-man argument that conflates unrelated questions, but that is fine for me. The conflict here is not about questions if there are ghosts, afterlife, transmigration of souls, yetis and UFOs. The conflict isn't even if it is correct to satirize crazy people like Rick. The only conflict here is if this newsgroup is appropriate place for discussing those beliefs. |
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Feb 03 12:33PM -0800 On 2/3/2018 11:18 AM, Öö Tiib wrote: > The conflict here is not about questions if there are ghosts, afterlife, transmigration of souls, yetis and UFOs. The conflict isn't even if it > is correct to satirize crazy people like Rick. The only conflict here > is if this newsgroup is appropriate place for discussing those beliefs. Imvvho, UFOs are more interesting. |
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Feb 03 12:40PM -0800 On 2/3/2018 7:21 AM, Rick C. Hodgin wrote: > my identity. I don't care if he behaves as vulgar Peter Cheung has > toward me. I want him doing so under the name "Leigh Johnston," and > not behind a mask designed to disparage my name and cause me harm, Perhaps yet another Pot Kettle Syndrome: Imho, you are basically harming Jesus by posting all of this %J^% as if you are directly representing him. Afaict, your %^%$#@% makes Jesus look pretty darn bad, some people are basically begging you to post about some actual C++ code. IMVVVHO, Jesus wants you to lay off when everybody in the damn room starts to get $%$%#! off and wants you to %^^*^&^ get the heck out. At least create a damn C++ program that does the preaching for you. The code would be more on topic? Btw, what is the topic of this group? Don't give me any %^%$ about disobeying orders from generals. Blah! ;^o [...] |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 03 07:21PM Praying is hilarious. Surely he knows what you want already? "I just want to hear you say it! Beg! That's better. I'll think about it." -- Thank you, Rick C. Hodgin |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 03 11:53AM -0800 On Saturday, February 3, 2018 at 2:21:55 PM UTC-5, Rick C. Hodgin wrote: > Praying is hilarious... I, the real Rick C. Hodgin, did not write the post above. Please check the headers. -- Rick C. Hodgin |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 03 03:55PM That which can be asserted without evidence, can be dismissed without evidence. -- Thank you, Rick C. Hodgin |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 03 08:25AM -0800 On Saturday, February 3, 2018 at 10:55:50 AM UTC-5, Rick C. Hodgin wrote: > That which can be asserted without evidence, can be dismissed without > evidence. I, the real Rick C. Hodgin, did not write the post above, but I will teach you the truth: God is spirit. The flesh cannot know Him, which is why there is no direct evidence of Him, but only everything in creation being made and designed by Him. The way to God is to seek the truth, being willing to admit you were wrong if you discover something that contradicts your prior asserted beliefs. If you do this, God will draw you from within, invisibly, supernaturally, such that you will be shown and know in a new way that you have not known before, who He is, His ways, and you'll be drawn to His Son. Those who seek only in their flesh, by pure flesh-based reasoning, will never see it, never find it. But for those willing to seek the truth for real, they will find it because God will bring it to them. ----- People do not see God in things because they aren't looking, but are asserting their own beliefs as to why things exist, and what they are, rather than seeking the truth and being willing to be wrong. It divides all people: truth-seekers, and everyone else. Seek the truth, and God will lead you to His Son, so you can be saved. -- Rick C. Hodgin |
woodbrian77@gmail.com: Feb 03 08:13AM -0800 On Monday, May 29, 2017 at 12:23:35 PM UTC-5, Jorgen Grahn wrote: > only way to avoid broken builds. And you lose most of the benefits of > using Make, compared to using e.g. a straight shell script. --- But > if it works for you, I cannot object. I think my makefile could be more concise, but am not sure what to do to get there. https://github.com/Ebenezer-group/onwards/blob/master/makefile Thanks in advance. Brian Ebenezer Enterprises http://webEbenezer.net |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 03 06:04AM -0800 Until a person seeks the truth with a solid seeking, pressing in and truly wanting to know the truth, it will forever elude them. That person will think they know something, but it is of deception from the enemy who seeks to provide people with an alternate path from the true path of God. The enemy provides many such paths, tailored to suit your personal propensity toward believing a lie. But for the one who seeks the truth honestly, sincerely, diligently, God sees you so seeking. He Himself enters in to your life and lifts you toward the truth, drawing you from within out of falseness. He gives you supernatural knowledge, things your flesh can't know. He draws you in a way that compels you from within to move toward those things which lead you to Christ. This movement remains a mystery, and unattainable to everyone who will not seek the truth. But for those who truly seek the truth, this transformation I describe manifests in a person's life, so they are drawn to Jesus. And once they ask forgiveness, the old man dies, and the new man is born. This born again nature is spirit, and it is eternal life. No longer flesh-only, now an augmented existence enabling one to hear the call of God continually, and to place value on that calling. It's free for all who will receive it. No one who comes truly seeking is turned away, and Jesus will raise them up on the last day. Please investigate this claim personally. You can do so be resolving within yourself that you truly do want to know if what I teach is true or not. If you would like help, please contact me. I will pray for you, and teach you the truth, guiding you to Biblical passages, guiding you to established and grounded teachers like Steve Lawson, Charles Spurgeon, DL Moody, and others. God wants to save you. He asks you to come to Him asking forgiveness. All who do are saved that day. But stay close to established Christians because the enemy will still seek to deceive you even after salvation. This won't affect your salvation, but it will diminsh your witness and walk in this world, causing more sin, and less reward in Heaven. God loves you. It's why He offers you salvation for free. I love you. It's why I teach you these things. -- Rick C. Hodgin |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 03 06:08AM -0800 From DL Moody, preserved for us in history: https://mobile.twitter.com/DLMoodydaily/status/959788815035576320 "There is no hope for a sinner until he sees the condemnation is a just condemnation; because he has sinned, and come short of the glory of God." Romans 3:23. Romans 6:23. Revelation 22. -- Rick C. Hodgin |
legalize+jeeves@mail.xmission.com (Richard): Feb 02 11:38PM [Please do not mail me a copy of your followup] Marcel Mueller <news.5.maazl@spamgourmet.org> spake the secret code >> overloading. >If you have /many/ optional arguments, overloading is no longer an >option as it would require 2 to the power of N overloads. Many arguments to a function usually indicates that there is some other small-to-medium level abstraction awaiting extraction from your existing code. The canonical example is a 2D point class instead of constantly passing x and y separately everywhere. For large bags of arguments where most of the time you have reasonable defaults, the "builder pattern" combined with method chaining is a readable alternative. Here's a blog post I wrote about using builder pattern to initialize such bags of argument structs used in the Direct3D API: <https://legalizeadulthood.wordpress.com/2009/07/12/description-helpers-for-direct3d-10-10-1-and-11/> I've used similar builder patterns to create Qt widgets and layouts. Doing this made the code smaller and eliminated a bunch of temporary variable names whose only purpose was to capture a value so that more properties could be set on it before the value was used. With appropriate indentation used to reveal layout/widget hierarchy, you can concisely describe a bunch of nested widgets and layouts in a way that their visual appearance in code reflects their relationship in the parent/child hierarchy as well. -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Terminals Wiki <http://terminals-wiki.org> The Computer Graphics Museum <http://computergraphicsmuseum.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Feb 03 07:43AM +0100 On 2/3/2018 12:15 AM, Marcel Mueller wrote: >> overloading. > If you have /many/ optional arguments, overloading is no longer an > option as it would require 2 to the power of N overloads. No, I think you're conflating things here. Defaulted arguments in a call are always at the end of the argument list, so it's simply N overloads. If all arguments have defaults then that means writing O(N^2) formal argument declarations, but that's something else. --- The situation with 2^N overloads comes about when one desires to emulate perfect forwarding of N arguments in C++03, with const or non-const for each argument. Since there are 2^N combinations of argument types that's also the number of overloads. --- That said, I think core language support for named arguments would be nice, especially for GUI stuff. The Boost Parameters sub-library goes some way towards solving it but only via a brittle and extreme-ugly macro magic front-end, and a hard-to-grok too clever implementation (essentially they identify arguments via types, types as names of arguments). Also, as I recall it doesn't support constructors. Cheers!, - Alf |
Marcel Mueller <news.5.maazl@spamgourmet.org>: Feb 03 08:47AM +0100 On 03.02.18 00.38, Richard wrote: > Many arguments to a function usually indicates that there is some > other small-to-medium level abstraction awaiting extraction from your > existing code. A typical use case is the initialization of UI metadata. Let's have business objects with a bunch of properties. If you do not want to pollute this objects with visualization hints you need a dictionary with this information in the GUI layer where either the data type or, more refined, the BO class and the field is the key and the visualization styles and methods are the values. I have to admit that this pattern is not that useful in the C++ language because of the lack of named parameters at function calls. > For large bags of arguments where most of the time you have reasonable > defaults, the "builder pattern" combined with method chaining is a > readable alternative. This is definitely an option. But I would call it "work around" for the missing named parameters to some degree. Furthermore, It is quite hard to keep it all constexpr as it always requires the temporary object that carries all the parameters. Marcel |
Ian Collins <ian-news@hotmail.com>: Feb 03 09:47PM +1300 On 02/03/2018 08:47 PM, Marcel Mueller wrote: > styles and methods are the values. > I have to admit that this pattern is not that useful in the C++ language > because of the lack of named parameters at function calls. In similar situations I have used functions that take just one parameter: a JSON blob. The optional bits were indicated by the presence or otherwise of fields in the blob. For example when creating a file there are a mix mandatory fields (name) and optional fields (such as meta data not inherited form parent). -- Ian. |
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