- Using #define in the construction of an array - 3 Updates
- Hateful abusive posts by Leigh Johnston, round #2 - 14 Updates
- Using port 465 (TLS) instead of 25 SMTP (PlainText). - 3 Updates
- On-line code generation - 1 Update
- Compile-time constructors? - 1 Update
- Using port 465 (TLS) instead of 25 (PlainText), SMTP. - 1 Update
- About Single Responsibility Principle - 2 Updates
Louis Krupp <lkrupp@nospam.pssw.com.invalid>: Nov 12 07:26PM -0700 On Fri, 9 Nov 2018 09:12:07 -0800 (PST), Paul <pepstein5@gmail.com> wrote: ># define B6(n) B4(n), B4(n+1), B4(n+1), B4(n+2) > B6(0), B6(1), B6(1), B6(2) >}; I just read Item 15, "Use constexpr unless someone on comp.lang.c++ gives you a good reason not to," in Scott Meyers's _Effective Modern C++, so here goes: === #include <bitset> #include <iostream> const int N = 256; // I didn't invent this. constexpr int ones(unsigned int n) { auto t = 0; while (n) { t++; n &= (n - 1); } return t; } class ones_array_obj { public: constexpr ones_array_obj() noexcept; constexpr int operator[] (unsigned int n) const noexcept; private: int ones_array[N]; }; inline constexpr ones_array_obj::ones_array_obj() noexcept : ones_array{0} { for (int n = 0; n < N; n++) { ones_array[n] = ones(n); } } inline constexpr int ones_array_obj::operator[] (unsigned int n) const noexcept { return ones_array[n]; } constexpr ones_array_obj oa; int main() { for (unsigned int n = 0; n < N; n++) { std::cout << std::bitset<8>(n) << " " << oa[n] << "\n"; } } === g++ version 8.2.1 compiles this and (with no optimization options) puts ones_array in the code file. Louis |
scott@slp53.sl.home (Scott Lurndal): Nov 13 01:46PM >> sys 0m0.01s >> about 4x faster than (a). >Hm, I would have expected 2x, or less of a difference. I didn't bother changing the constexpr to static in a.cc, which may have made a small difference. |
Melzzzzz <Melzzzzz@zzzzz.com>: Nov 13 04:51PM > user 0m1.33s > sys 0m0.01s > about 4x faster than (a). ~/projects/popcount >>> clang -O2 -march=native a.cc -o a -lstdc++ ±[●][master] ~/projects/popcount >>> clang -O2 -march=native b.cc -o b -lstdc++ ±[●][master] ~/projects/popcount >>> time ./a ±[●][master] 1962026240 ./a 1.98s user 0.00s system 99% cpu 1.989 total ~/projects/popcount >>> time ./b ±[●][master] 1962026240 ./b 1.04s user 0.00s system 99% cpu 1.043 total ~/projects/popcount >>> His version with clang... -- press any key to continue or any other to quit... |
gazelle@shell.xmission.com (Kenny McCormack): Nov 13 12:01AM In article <96cea06f-97f0-4059-a550-41048bac1468@googlegroups.com>, >On Monday, November 12, 2018 at 4:48:59 PM UTC-5, Scott Lurndal wrote: >> Please stop posting your nonsense. >I do my best to never post nonsense. With a 100% failure rate. -- The people who were, are, and always will be, wrong about everything, are still calling *us* "libtards"... (John Fugelsang) |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Nov 12 04:25PM -0800 On Monday, November 12, 2018 at 6:11:17 PM UTC-5, Chris M. Thomasson wrote: > Mutation:(A->B): Abducted by Aliens, and implanted with an divine > experiment, or perhaps the best try of a clone of God (head Alien) itself. > State B: No longer a Virgin. It's described in the Bible how it happened. It was the power of God which created the child within her. The child was also foretold in the Old Testament, even what He would look like. It's recorded there is nothing comely about Him, that there is nothing on the outside that He should be desired, for every- thing that is beautiful in Christ is in who He is, His actions, His love, His inner invisible parts. Contrast that with Lucifer, who is stunningly beautiful beyond words, but who has a heart blacker than coal. https://www.biblegateway.com/passage/?search=Luke+1%3A31-37&version=KJV 31 And, behold, thou shalt conceive in thy womb, and bring forth a son, and shalt call his name Jesus. 32 He shall be great, and shall be called the Son of the Highest: and the Lord God shall give unto him the throne of his father David: 33 And he shall reign over the house of Jacob for ever; and of his kingdom there shall be no end. 34 Then said Mary unto the angel, How shall this be, seeing I know not a man? ==> 35 And the angel answered and said unto her, The Holy Ghost shall come upon thee, and the power of the Highest shall overshadow thee: therefore also that holy thing which shall be born of thee shall be called the Son of God. 36 And, behold, thy cousin Elisabeth, she hath also conceived a son in her old age: and this is the sixth month with her, who was called barren. 37 For with God nothing shall be impossible. The power of God showed up and worked God's miracle in the virgin. It was to fulfill prophecy, and it came to pass at the proper time. > Humm... There is truth, and then there is falseness. It would be best to sort out the two so you don't confuse them, Chris. The Bible will teach you all you need to know about everything related to it. -- Rick C. Hodgin |
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Nov 12 04:28PM -0800 On 11/12/2018 4:25 PM, Rick C. Hodgin wrote: >> State B: No longer a Virgin. > It's described in the Bible how it happened. It was the power > of God which created the child within her. Is the child a clone of God? [...] |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Nov 12 05:36PM -0800 On Monday, November 12, 2018 at 7:29:07 PM UTC-5, Chris M. Thomasson wrote: > > It's described in the Bible how it happened. It was the power > > of God which created the child within her. > Is the child a clone of God? The Bible says this: https://www.biblegateway.com/passage/?search=Hebrews+1%3A1-3&version=KJV 1 God, who at sundry times and in divers manners spake in time past unto the fathers by the prophets, 2 Hath in these last days spoken unto us by his Son, whom he hath appointed heir of all things, by whom also he made the worlds; ==> 3 Who being the brightness of his glory, and the express image of his person, and upholding all things by the word of his power, when he had by himself purged our sins, sat down on the right hand of the Majesty on high: It helps to understand our nature. We have a soul. Our soul is "us." It is our core, the exact person we are. From our soul we "outreach" into the universe, by our body, and by our spirit (for those who are born again). Our spirit and our body manifest our presence in this universe, but they are not us solely. They are a component of us, and merely an outward manifestation of us. Our body will die, for example, but we are given a new eternal body after leaving this world. It's why our lives here are not the full level of importance people place on them when they can't see life after death, and a new body after we shed this one. Here sin reigns, and disease, damage, loss, and death are the result. But there, and as God originally intended things to be, there is no sin, no disease, no death, no damage, no loss. Only life. Our soul is under condemnation because of sin. Our bodies are very clearly in sin (they become diseased, age, die). And our spirit is dead, meaning we have no spiritual life that is our own, only this "life spirit" on loan from God for our duration of existence here on this Earth. Once that spirit is recalled, our bodies here die. When a person comes to Jesus and asks forgiveness for their sin, a real transaction takes place. Our sin leaves us, and goes to Jesus. This has side-effects. Our soul is no longer under condemnation, and our spirit comes alive. This new state is an augmented existence, such that the Bible says the old passes away, and the new has come into being. This new state is what makes the changed man on the inside. Out- wardly we look the same. But our actions in this shell will change. The reasons why we do things will change. We will be moved by new things, and repulsed by new things. The Bible says the things we used to love we now hate, and the things we used to hate we now love. It's due to the complete switch in polarity for our desires, because we are no longer suffering from death being influenced only by our fallen-in-sin flesh (which loves death things), but rather we are then not only influenced by our spirit, but by God's own Holy Spirit who communes with us. It is an earnest payment for the full reclamation of our new life that will be given us after we leave this world. But God keeps us here even after we're saved so we can go forth and reach others. We also earn rewards in Heaven for the things we do here in service to Him. -- Rick C. Hodgin |
Daniel <danielaparker@gmail.com>: Nov 12 05:39PM -0800 On Monday, November 12, 2018 at 4:19:22 PM UTC-5, Ian Collins wrote: > You can't reason someone out of a position they didn't reason them > selves into. I suggest you find a new windmill... Just so. Rick Hodgin's statements are based on revelation, not reasoning or observation. Hence what he believes is impervious to counterarguments or evidence. Daniel |
Daniel <danielaparker@gmail.com>: Nov 12 05:50PM -0800 On Monday, November 12, 2018 at 7:25:14 PM UTC-5, Rick C. Hodgin wrote: > It's described in the Bible how it happened. It was the power > of God Just a question, yes/no will suffice. Did you know that in ancient mythology there are many stories of miraculous births involving intervention by a deity that predate Christianity? Thanks, Daniel |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Nov 12 06:03PM -0800 On Monday, November 12, 2018 at 8:50:38 PM UTC-5, Daniel wrote: > > It's described in the Bible how it happened. It was the power > > of God > Just a question, yes/no will suffice. Did you know that in ancient mythology there are many stories of miraculous births involving intervention by a deity that predate Christianity? You say in the previous post that I do not have input of revelation, reasoning, or observation ... so what difference does it make to you what I believe? You already have it all figured out, right? -- Rick C. Hodgin |
Daniel <danielaparker@gmail.com>: Nov 12 06:17PM -0800 On Monday, November 12, 2018 at 9:04:01 PM UTC-5, Rick C. Hodgin wrote: > You say in the previous post that I do not have input of > revelation, reasoning, or observation ... so what difference > does it make to you what I believe? This isn't a question about belief/non-belief, it's just a question about whether you're knowledgeable about one point in ancient history, which is the product of scholarship (including Christian scholars.) Thanks, Daniel |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Nov 12 07:34PM -0800 On Monday, November 12, 2018 at 9:17:47 PM UTC-5, Daniel wrote: > question about whether you're knowledgeable about one point > in ancient history, which is the product of scholarship > (including Christian scholars.) Anyone who's read the Bible learns traits about Satan. He is an imitator, not an originator. He offers up alternatives, but does not originate anything. He only takes what God has created ... and perverts it. Consider: There were things foretold to man before we recorded things as part of the Jewish faith from Abraham on down. There is a book of Enoch, who is a special character in the Bible, one taken up by God without having tasted death. He was translated from this world to God's Kingdom, because Enoch walked with God. If you read the book of Enoch, you read of a type of wisdom that's been lost in the modern world, yet even the canon New Testament scripture refers to the book of Enoch. That wisdom was handed down by tradition for centuries, given first- and second-hand by Noah and others who were there, or who were direct descendants of those who were there. Such a wisdom would've also been known to the enemy of this world, as he would've been listening to their conversations, hearing the things they passed down over time. In any event, there are three times we hear the actual voice of Satan recorded in scripture: (1) in Genesis when he is tempting Eve, (2) in Job where he's talking to God, and (3) in the desert when he's tempting Jesus for 40 days. In Genesis he basically tells Eve, "God's not being good enough to you. He's withholding His blessing. Follow my guidance, and you'll receive the full blessing of God, to know both good and evil." In Job he basically tells God, "You're being too good to them. Allow me to harm them and they'll curse you to your face." And in the desert he basically tells Jesus, "If you'll bow down and worship me, I'll be better to you than God will." He sets man against God, God against man, and then offers to step in and be God in God's place. His m.o. is clear. Satan wants to be God. In the end times he'll physically inhabit a man's body and set himself up to be god here in this world. And all who are damned will follow him, because they are being led by his evil spirit influence upon their flesh, and not by the spirit of God at work with their spirit, having been born again after receiving forgiveness of their sin. ----- Throughout history, Daniel, the enemy of God, who is also a spirit, and who has incredible power and authority and has been temporarily given a lease of reign here on this Earth, has sought to sully the things God has done, will do, or has foretold. If you look no further than the ways of the world, you'll only see the enemy at work in deception. If you'll look to the ways of God as are written about in the Bible, you will learn the truth, and they will shine the light on the enemy's actions in this world, exposing them for what they are. The choice is yours. -- Rick C. Hodgin |
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Nov 12 07:47PM -0800 On 11/12/2018 7:34 PM, Rick C. Hodgin wrote: > an imitator, not an originator. He offers up alternatives, > but does not originate anything. He only takes what God has > created ... and perverts it. It sounds like God warned satan not to muck around with the entities on Earth. satan, well, he gave the middle finger and created the hybrids, or giants. The flood took care of them right? [...] |
Daniel <danielaparker@gmail.com>: Nov 12 08:48PM -0800 On Monday, November 12, 2018 at 10:34:32 PM UTC-5, Rick C. Hodgin wrote: > > in ancient history, which is the product of scholarship > > (including Christian scholars.) > ... Satan ... etc. I take it that's a no :-) I would encourage you to read some scholarly books about religious history. I understand that you're not that interested in the history of religion, as opposed to the stories in the Christian tradition. But if you want to talk about religion, you should have some modest familiarity about its origins. This has nothing to do with your faith, which has been revealed to you in some way that most of us don't understand, but shouldn't be affected by learning more about ancient myths of miraculous births involving intervention by a deity. Daniel |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Nov 13 02:18AM -0800 On Monday, November 12, 2018 at 11:48:41 PM UTC-5, Daniel wrote: > > > (including Christian scholars.) > > ... Satan ... etc. > I take it that's a no :-) It's not a no. It's an explanation of why such things exist. There are always people trying to "get ahead" of Christianity by worldly knowledge, scientific discovery, identifying matters of history as conclusive points disproving Christianity, or the many teachings of the Bible. Such claims are of the flesh, of our reasoning, of our alrwady corrupt- in-sin nature, and Satan owns our flesh because of sin, and because of the death of our spirit due to sin. In short: we are deceived all day long. What Jesus does is take away our sin. He restores our spiritual life, raising us from the dead (spiritually), and giving us a down payment (the guidance of His Holy Spirit) while here on this Earth, an "earnest payment" of our future full receipt in full of our salvation. Your pursuit of alternate explanations, Daniel, denies the spirit nature, the receipt of God's Holy Spirit guidance, and is founded solely in that place of deception where Satans owns all of us: our flesh-based faculties. > some way that most of us don't understand, but shouldn't be affected by > learning more about ancient myths of miraculous births involving > intervention by a deity. Jesus was born of a virgin because He entered this world from His own Father (God), and was not of the seed of Adam (i.e. corrupt in sin), but was born without sin, having His Holy Spirit in tact, not being spiritually dead, able to be guided directly by God at all points, and in that way being obedient to God, never yielding to sin, able to become mankind's passover Lamb, killed in our place, a substitutionary death of atonement to satisfy God's Law that all sin is punished, yet without destroying the people whom Jesus saved. The virgin birth is not just a miracle, it is a necessity, so that Jesus could accomplish His task of saving us. It is an absolutely essential part of Judaism and Christianity, one Satan would most certainly look to sully. And for all who seek man's knowledge and wisdom, and do not seek the truth, Satan's efforts have borne fruit. But for all who will seek the truth, God reaches into their lives spiritually, and saves them. Seek the truth, Daniel. Investigate the things of the Bible on their own merits. Do so with a truth-seeking heart. Literally demand answers, and press in hard to attain them. You'll be amazed at what God reveals to you. -- Rick C. Hodgin |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Nov 13 02:44AM -0800 On Monday, November 12, 2018 at 10:47:33 PM UTC-5, Chris M. Thomasson wrote: > It sounds like God warned satan not to muck around with the entities on > Earth. satan, well, he gave the middle finger and created the hybrids, > or giants. The flood took care of them right? Lucifer was the greatest angel, the one with closest access to God, the most beautiful, the smartest, the most capable. The Bible says he was complete on the day he was created, meaning he didn't have to go to school, but was made to be in his full faculties, possessing the full skills and mastery of all his abilities. He saw himself as so capable, believing in his heart he was as capable as God. He launched a rebellion against God. War broke out in Heaven. Satan and one third of the angels rebelled, but they were not strong enough, and Satan lost his place in Heaven, as did his angels (now called demons, or fallen angels). The Bible records their bodies are locked up in chains, and we learn through revelation of our spirit nature that angels also have a spirit, and they now leave their bodies in spirit and come here to our physical world to corrupt and destroy everything. Satan is a defeated foe, but he has taken Adam's lease om this planet, and for a time remains here "in control" of things (God remaind in ultimate control, but Satan has been given a wide latitude). The day is coming soon when this current existence will end, and the next phase of God's plan for Earth is initiated. It is a time of untold destruction and devastation world-wide as the Earth and its inhabitants who were not saved have Earthly judgment and wrath poured out on them. Very few people will survive. Billions will die. The Earth's food and water supplies will be contaminated. It will be the worst period in all of history for man. People will even long to die, but death will not be given them. Imagine decaying, rotting, maimed bodies, yet still your life spirit is present in it. No release of death is given. The pain enduring, the thievery, the rape, pillage, plunder. It will be unimaginable. All of this is part and parcel of God's judgment. True judgment comes in Heaven based on what we did here, and there are none who will escape eternal flames in Hell by their sin. The only way out is to have no sin, and to be saved by Jesus taking your sin away. He will also spare everyone who is saved from that coming wrath, as He saved Noah and his family, and Lot and his. In any event, these things are taught to people for those who will be saved. God is already confirming inside of people's hearts His true calling, such that the things I post will be known to be true already on the inside, and not through reasoning or thinking it all through. It is God Holy Spirit brought to bear upon those who are being saved, such that His new source of input will override all others, and we arrive at the foot of the cross almost unaware, to ask forgiveness, and to receive the same, and to be born into eternity once again, by God's grace and mercy, on that very day. This day will come to all who are being saved. It will not come to other people. If you hear His call on the inside, rejoice and jump up and down for joy, because He is reaching out to save you, and give you eternal life. -- Rick C. Hodgin |
Daniel <danielaparker@gmail.com>: Nov 13 08:22AM -0800 On Tuesday, November 13, 2018 at 5:18:44 AM UTC-5, Rick C. Hodgin wrote: > The virgin birth is an absolutely essential part of ... Christianity Do you really think so? Apart from the first two chapters of Matthew and Luke, the New Testament makes no further mention of it, nor does St Paul. And the scholars suggests that virgin is most likely a mistranslation of the Hebrew word for young woman. Of course, it became important in later Christian orthodoxy. Daniel |
Jeff-Relf.Me @.: Nov 12 10:30PM -0800 |
Jeff-Relf.Me @.: Nov 12 10:35PM -0800 |
Wolf K <wolfmac@sympatico.ca>: Nov 13 09:17AM -0500 > Jeff-Relf.Me/Diff.PNG > See also: gMail.C and X.CPP in "Jeff-Relf.Me/X.ZIP". > Visual Studio 2017, Windows-10. What's your email client? I have no problems with SS:L/TLS on Thunderbird 60.3.0 on Win 8.1. -- Wolf K kirkwood40.blogspot.com People worry that computers will get too smart and take over the world, but the real problem is that they're too stupid and they've already taken over the world (Pedro Domingos) |
gazelle@shell.xmission.com (Kenny McCormack): Nov 13 02:02PM In article <4a608e69-f391-4f44-b74d-7685ff3f1e70@googlegroups.com>, >It is admirable how you pursue your software, and reach >out to offer it to others. You have my respect and my >admiration in your diligence. Try as you may, I don't think he is going to date you. -- In the corner of the room on the ceiling is a large vampire bat who is obviously deranged and holding his nose. |
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Nov 13 03:13AM -0800 On Monday, November 12, 2018 at 6:23:20 PM UTC-5, Alf P. Steinbach wrote: > A "compile time constructor" is simply a `constexpr` constructor. Is that a user-specified thing, or a compiler-determined thing? -- Rick C. Hodgin |
Jeff-Relf.Me @.: Nov 12 10:37PM -0800 |
Pavel <pauldontspamtolk@removeyourself.dontspam.yahoo>: Nov 12 11:26PM -0500 JiiPee wrote: > Renderer gets the Windows draw message itself? This could be done in Views > message map by saying there that the the draw message handler function is in > Render class? Is this what you mean? No, I mean it is unnecessary (can be removed from the design). |
Pavel <pauldontspamtolk@removeyourself.dontspam.yahoo>: Nov 12 11:54PM -0500 JiiPee wrote: >> clear reward for writing it > Do you mean that the Renderer is dependent on the View class? Renderer needs a > pointer to view-object? No, all I am saying, I do not see a clear benefit from creating Renderer -- but it is obvious it comes with at least some costs -- which begs the question "do we really need it?" > Dont fully understand.. because for example using getters and setters is not > dependent on the View. If we have getters and setters in Renderer Dialog could > also use them. But obviously you mean something else... Take a look at the Web references I posted before in this thread. If you want to make your UI "object-oriented", e.g. you want to be able to click at a corner of your OpenGL-rendered object and drag to rotate it, you would need some way to translate the 2-D discrete coordinates of your click (which is what you will get as a CPoint in some CWnd or CView callback) to the coordinates of your object in OpenGL 3-D coordinate system -- for which there are multiple ways, some of which are described at those references. And in general you will need some coordinates or other numbers (translation parameters?, the results of ray rendering at your CView plane?) that can be computed along with OpenGL rendering for such translation. Of course, if you are ok with a simpler UI (e.g. "rotate left/right/up/down" buttons outside of the view that renders your objects), this is not needed, so I am saying "maybe". But a simple UI may be difficult to use if you want to render more than one object in the view, because you would need to invent some way, other than point-and-click, to select the object for rotation. > Or you are talking about some kind of feedback function which needs to pass data > live to View as its doing calculations? Yes, it could be a callback (probably with some accompanying data, so maybe an object and a member) or simply some data structure (probably a member of your custom CView) that your 3-D drawing code will keep up-to-date and your mouse event callback would use. For the relatively simple task you described, the callback seems a little over-engineering to me (again) although it could be a good idea for some more complex problem. |
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