- [Jesus Loves You] Friday evening prayer - 11 Updates
- How to deal with running out of stack space? - 10 Updates
- Switching to C# - 3 Updates
- shared pointer question - 1 Update
rick.c.hodgin@gmail.com: Jun 18 05:49AM -0700 This Friday (June 21, 2019) I would like to invite all Christians to take time out of their evening and say a prayer for the people here in this Usenet group. These are your online friends, acquaintances, some people you may rely upon to provide you with good for information in your program- ming life. I invite you to take time out and join with me in praying for each of them by name. Go back through the posts for some period of time and see who all has posted. Make a list, and then say a prayer for each of them, that God may either open their eyes to His Son, or if they are already a believer that He might increase their devotion and service to His Kingdom. I will be praying for about an hour. I will also fast that day be- fore I pray. If you are a Christian, won't you join with me in praying for the people of comp.lang.c++ this Friday, June 21, 2019, in the evening hours (I'm on EDT). Contact me personally by email if you'd like to coordinate a time, or an online meetup of some kind. Otherwise, mark your calendar, put a reminder in your phone, and prepare yourself spiritually and bodily for this outreach service to those people here in this group. May the Lord reward and bless you richly for your obedience to His call to service here in this world. Amen. -- Rick C. Hodgin |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jun 18 05:10PM +0100 > bodily for this outreach service to those people here in this group. > May the Lord reward and bless you richly for your obedience to His > call to service here in this world. Amen. Two words: Fucking. Demented. /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," Bryne 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." |
rick.c.hodgin@gmail.com: Jun 18 09:13AM -0700 On Tuesday, June 18, 2019 at 12:10:15 PM UTC-4, Mr Flibble wrote: > Two words: .. . Demented. I will pray for you, Leigh. I care enough about you to take special time out of my day and ask the Lord Himself to inter- cede in your life, to make a way out of no way, to do the im- possible, just as He did for me. I want you to have a future that is rich and full, Leigh, be- cause I care about you, because God cares about you and He put that caring for you inside of my heart. -- Rick C. Hodgin |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jun 18 05:17PM +0100 > I want you to have a future that is rich and full, Leigh, be- > cause I care about you, because God cares about you and He put > that caring for you inside of my heart. And Satan invented fossils, yes? /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," Bryne 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." |
rick.c.hodgin@gmail.com: Jun 18 09:53AM -0700 On Tuesday, June 18, 2019 at 12:17:33 PM UTC-4, Mr Flibble wrote: > And Satan invented fossils, yes? Nope. He only invented the belief you have surrounding them, a denial of God's creation, a lie purporting millions of years, all designed to steal your soul away from you blind. He owns you, Leigh, and you don't even know it, won't hear it, and will possibly only find out about it after you leave this world and stand before God on the day of your judgment. -- Rick C. Hodgin |
gazelle@shell.xmission.com (Kenny McCormack): Jun 18 05:25PM In article <w18OE.6315$vt.1613@fx16.fr7>, Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk> quoted some nitwit thusly: ... >> May the Lord reward and bless you richly for your obedience to His >> call to service here in this world. Amen. And then added: >Two words: Fucking. Demented. Actually, it is 3 words: 1) Lunatic, 2) Moron or 3) Troll Pick one. As always, I go with option 3. -- Just for a change of pace, this sig is *not* an obscure reference to comp.lang.c... |
rick.c.hodgin@gmail.com: Jun 18 10:43AM -0700 On Tuesday, June 18, 2019 at 1:26:06 PM UTC-4, Kenny McCormack wrote: > 2) Moron > or 3) Troll > Pick one. As always, I go with option 3. Come to Indiana and observe me this Friday, Kenny. You'll see no trolling activity, but only praying activity for each member of this group by name. You mistake your thoughts about what's really going on with what's really going on. The two aren't always the same, and like Leigh, you have allowed an enemy to be your guide in your thoughts and thinking, and that enemy continually lies to you to keep you under his thumb, so your soul will not be freed by the saving power and love of the Lord Jesus Christ. That enemy has you mocking the one true thing you need to be saved: Jesus, and everything that is true and real regarding Him. -- Rick C. Hodgin |
Szyk Cech <szykcech@spoko.pl>: Jun 18 07:50PM +0200 I suprise you! I wont wait to the friday! Believe or not, but I pray today twice: First: around 7:05 on the tran station platform Second: around 18:00 in my house. In both cases I turn my face to the sun - because I don't know from what direction God look at me - so I think He is like bithtest light to our mind - so I pray to the sun. If you wonder what I am pray for I can tell you: + for briliant mind, + clevernes, + wisdom, + knownledge, + perfect memory (I was hipnotized in the 4,5 yrears age by crap polish sickret service in order to have many difficulties in life - and one of them was: weak memory) - so I have many memory leaks every day. + eficiency and correctnes in my job (I have new job and I am unsure how long I will work - I wish work as long as I can), + lack Ufo mind limiters - they disturb my mind right now - so I am not as efficient as I could. Greys/Ufo perform telephatic mid disturbance, pathological behaviour reminding (like masturbation) and they perform hipnotics effects like memory leaks. + health + money + friends (btw. Can you be my internet friend?) + clevernes (again) @Rick C. Hodgin: Can you tell us for what (beside people) are you praying? more thinking and less stupidity best regards Szyk Cech |
gazelle@shell.xmission.com (Kenny McCormack): Jun 18 05:50PM In article <add23ea7-1f5b-4367-9fa0-61c30b97d4bd@googlegroups.com>, >Come to Indiana and observe me this Friday, Kenny. You'll see >no trolling activity, but only praying activity for each member >of this group by name. OK, so you are saying it is not #3. So, which of the other choices is it? Remember, I've been giving you the benefit of the doubt by assuming Troll. If it were me, I'd much rather be thought a troll than either of the other choices listed above. Maybe you feel differently? -- If Jeb is Charlie Brown kicking a football-pulled-away, Mitt is a '50s housewife with a black eye who insists to her friends the roast wasn't dry. |
rick.c.hodgin@gmail.com: Jun 18 11:18AM -0700 On Tuesday, June 18, 2019 at 1:50:22 PM UTC-4, Szyk Cech wrote: > I suprise you! I wont wait to the friday! The purpose of gathering together is to be one in spirit and agree together. > + clevernes (again) > @Rick C. Hodgin: > Can you tell us for what (beside people) are you praying? Literally, for the strength to stand no matter what comes. For an increase in faith. To overcome my reluctance in stepping up and starting my ministry. To be a more faithful steward of the gifts God gives me. And I routinely pray for increased spiritual gifts. I would like to be able to lay hands on people and heal them. Or to perform miracles. Or to speak in English and have people of all languages understand me in their native language. Or any of the other gifts that accompanied the Apostles. At various times I've prayed for my operating system, my compiler project, my Visual FreePro, project, but each of those prayers is always a "Not my will, but Thy will be done" prayer, because I do not want to direct God. I cast my cares upon Him, and I trust in Him to lead and guide me rightly. I do not place a focus or pri- ority on those projects. I have other goals in this world which are unrelated to those projects, and are related to Him. I've prayed to be a better witness to my son and wife. They see me not feeling well at times, and not meeting deadlines I've self- imposed due to me seemingly just sitting on the couch. I've asked for greater strength in my physical life (spiritual battles that I encounter weaken me to the point where sometimes I have to take off work, for example). I keep seeking to improve my walk. To be more holy. To serve God better and more rightly and truly according to His will. And these are the things I pray for regularly (apart from people). ----- Someone I witnessed to this weekend could use our prayer. Her name is Anne. She's had a rough life on the streets since her early 20s (now early 30s). In and out of jail. Drugs. I was able to speak with her for about an hour. I prayed with her. She could use prayers for salvation from any willing Christian. I gave her my wife's contact information so she can stay in touch and get more assistance if need be. -- Rick C. Hodgin |
Christian Gollwitzer <auriocus@gmx.de>: Jun 18 08:19PM +0200 > here in this Usenet group. > I will be praying for about an hour. I will also fast that day be- > fore I pray. In other words, you will be practicing magic. Performing a symbolic rite with no connection to reality in order to influency the real life. On this friday, it is summer solstice. When the sun sets, I will sprinkle sacred water on the ground and sing a song to open your eyes to the truth of the scientific evidence. You can report afterwards, if it has helped to cure you from superstition. Christian |
James Kuyper <jameskuyper@alumni.caltech.edu>: Jun 17 08:14PM -0400 On 6/17/19 4:09 PM, Chris Vine wrote: ... > So I agree with you except on two points. First, I don't think > allocating and deallocating memory counts as an observable side > effect. It is a feature of the language. It doesn't count as observable behavior, but not for that reason - whether or not something is a language feature doesn't play any roll in the definition of "observable behavior": "The least requirements on a conforming implementation are: — Accesses through volatile glvalues are evaluated strictly according to the rules of the abstract machine. — At program termination, all data written into files shall be identical to one of the possible results that execution of the program according to the abstract semantics would have produced. — The input and output dynamics of interactive devices shall take place in such a fashion that prompting output is actually delivered before a program waits for input. What constitutes an interactive device is implementation-defined. These collectively are referred to as the _observable behavior_ of the program." (4.6p7) The phrase "observable behavior" near the end of that clause is in italics, an ISO convention which identifies this clause as the official definition of that term. |
"Öö Tiib" <ootiib@hot.ee>: Jun 18 01:00AM -0700 On Tuesday, 18 June 2019 00:01:39 UTC+3, Chris Vine wrote: > effect in the abstract machine which we are looking for. Perhaps the > one or two posters who read the C++ standard ten times before breakfast > could help us. I suspect that implementation of standard allocators involves (potentially) system calls that involve (potentially) accesses of volatile glvalues. Result is that code like "delete new int;" won't be optimized out. For same reason usage of std::string won't be optimized out where usage of std::string_view will be. |
Bonita Montero <Bonita.Montero@gmail.com>: Jun 18 10:54AM +0200 > I wish that were true. With our script interpreter I can get a stack > overflow with just calculating factorial of 210 with a simple recursive > procedure. It implements recursion on real stack, ... Ok, that's one of the rare cases where this might happen. But running an interpreter on the real stack is a design-failure. Usually you would parse the code into a code for s stack-machine and interpret the code iterative with a stack in in an allocated memory-block. |
Bart <bc@freeuk.com>: Jun 18 11:48AM +0100 On 18/06/2019 09:54, Bonita Montero wrote: > Usually you would parse the code into a code for s stack-machine > and interpret the code iterative with a stack in in an allocated > memory-block. I write interpreters with a software stack, but up to now have never put in a stack overflow check. It would be too expensive to do so on every push. However I've just put it such a check for a 'call' operation (with a margin of 1000 slots to allow for typical use within a function to evaluate expressions, build argument lists, list constructors etc), but I couldn't measure any significant difference. I tried the highly recursive Ackermann (for stack depth) and Fibonacci (for quantity of calls) benchmarks. The former seemed to run 1% faster (thanks to the crazy way that x64 works), the latter up to 0.4% slower. The use of the stack in such a language is different from C or C++, in that the stack entries consist exclusively of 16-byte slots. There is no arbitrary-sized data such as C structs or fixed arrays or VLAs which could consume 100s or 1000s of bytes or more for one variable. Each would at most be 16 bytes. ------------------- BTW here's a program to calculate 210! It appears to need 4 slots for each call level (for return value, return address, the 'n' argument, and one to hold the 'n' to multiply against), or 3 slots if the multiplication order is reversed, so will work easily with a stack of 1000 entries: proc start= println factorial(210L) end function factorial(n)= return (n<=1 | 1 | n*factorial(n-1)) end Output is 105823...00000 (some 300 digits). Although each 'n' needs to be a big number, each stack slot is a constant 16 bytes. |
Bonita Montero <Bonita.Montero@gmail.com>: Jun 18 01:28PM +0200 > I write interpreters with a software stack, but up to now have never put > in a stack overflow check. It would be too expensive to do so on every > push. If you simply use a vector<T> as a stack you won't have to explicitly check for stack-overflows. Stack-overflows are then just an exception in your code that could be bundeled with several other memory-collapse conditions. |
Bart <bc@freeuk.com>: Jun 18 01:07PM +0100 On 18/06/2019 12:28, Bonita Montero wrote: > check for stack-overflows. Stack-overflows are then just an exception > in your code that could be bundeled with several other memory-collapse > conditions. Actually that wasn't written in C++, and if it was targeted at C++, it wouldn't use such a type. With interpreters you tend not to need to use the higher level features of the host language, as you want as much control as possible (eg. CPython is written in C). Does vector<T> do a bounds check on every access, even when not pushing anything to the stack it represents? That might be too big a hit. In mine, /everything/ revolves around the stack - you are accessing elements that you /know/ are on the stack and not outside it. (The stack also is pushed downwards, but a type like vector<T> would suit an upward-growing stack better. This was for several reasons, but at one time when coding with the help of assembly, it did borrow the machine's stack instructions, with the hardware stack pointer switched to point to the interpreter stack.) |
Paavo Helde <myfirstname@osa.pri.ee>: Jun 18 03:49PM +0300 On 18.06.2019 15:07, Bart wrote: >> check for stack-overflows. Stack-overflows are then just an exception >> in your code that could be bundeled with several other memory-collapse >> conditions. For emulating a stack std::deque would be a better option than std::vector. > With interpreters you tend not to need to use the higher level features > of the host language, as you want as much control as possible (eg. > CPython is written in C). But tensorflow is written in C++, for example. C++ gives you all the control you can imagine and is especially useful in writing script interpreters. For example, I have written some C++ code interfacing Python at the C level, and the needed manual reference counting was a pain. I ended up with writing a little C++ wrapper which performs this reference counting automatically. > Does vector<T> do a bounds check on every access, even when not pushing > anything to the stack it represents? That might be too big a hit. operator[] does not check bounds, the at() member function does. Also, for some compilers you need extra tuning for suppressing all checks, like '#define _SECURE_SCL 0' (however, from the docs it looks like they have come to their senses by now and disabled checked iterators by default in Release mode). > at one time when coding with the help of assembly, it did borrow the > machine's stack instructions, with the hardware stack pointer switched > to point to the interpreter stack.) Using a single line of assembler will drastically reduce the portability of the program and increase the cost of maintenance. I have not yet encountered a performance problem which required assembler coding. The closest I have come is to use compiler intrinsics like __builtin_clzll(). |
Bonita Montero <Bonita.Montero@gmail.com>: Jun 18 04:59PM +0200 > For emulating a stack std::deque would be a better option than std::vector. A vector would be faster since it is extended only when its grown beyond its largest size so far. A deque<T> allocates new items on every push. |
Bart <bc@freeuk.com>: Jun 18 05:15PM +0100 On 18/06/2019 13:49, Paavo Helde wrote: > of the program and increase the cost of maintenance. I have not yet > encountered a performance problem which required assembler coding. The > closest I have come is to use compiler intrinsics like __builtin_clzll(). The version of this particular project about a year ago (which is not written in C), included an /optional/ 6000-line ASM module for x64. Yet it could be translated to C (building as C++ would be feasible with loads of extra casts, but the target would be C), and even run on ARM. The ASM module provided an acceleration layer, which, even combined with its non-optimised native language compiler for the bulk of the code, can make many programs run 2-3 times as fast, compared with translating to C and compiling with gcc-O3. Some applications are special cases where use of ASM can make a real difference, and an interpreter is one such case. Ie. where there are clear bottlenecks. (The trend now seems to be the use special kinds of JIT compilation, to dynamically turn some interpreted code-paths into native code ones, but that is a different to just making byte-code run as fast as possible which is what I do.) |
Paavo Helde <myfirstname@osa.pri.ee>: Jun 18 07:53PM +0300 On 18.06.2019 17:59, Bonita Montero wrote: >> std::vector. > A vector would be faster since it is extended only when its grown beyond > its largest size so far. A deque<T> allocates new items on every push. No, it does not. Maybe you confuse it with std::list? |
"Chris M. Thomasson" <invalid_chris_thomasson_invalid@invalid.com>: Jun 17 11:30PM -0700 On 6/14/2019 5:49 AM, Rick C. Hodgin wrote: >> Fwiw, Keep going on C Alive. I am willing to install, and give it a >> spin. :^) Send me an ISO. > Will do. Thanks. > I'm still working on developing those games I mentioned pre- > viously. It will probably be another year or so until I release CAlive > compared to my original timeline. If you end up getting some time after you are finished, try to perhaps put it up on the web. Using WebAssembly or something? > Life sometimes punches you in the face. Big time. In very unexpected ways. Ahhh... Sometimes, Life can: https://youtu.be/FRRzXDxGQ4g Well, you know. Stink? It's one of the reasons we all > what true Christianity is. It's all about Jesus, and having that daily, > personal relationship with Him. It's not religion. It's love applied > to one's life (with an exclamation point in bold face type). I hope I can go to the Ultimate Good side after I finally die. I just do not know for sure what actually happens. Yikes! |
rick.c.hodgin@gmail.com: Jun 18 02:57AM -0700 On Tuesday, June 18, 2019 at 2:30:55 AM UTC-4, Chris M. Thomasson wrote: > I hope I can go to the Ultimate Good side after I finally die. I just do > not know for sure what actually happens. Yikes! It depends on if you have sin or not. In this current age, in our society, for those who never came to Jesus, they will die in this world and "go to sleep" the Bible teaches. They will remain asleep until Judgment Day when they will be awakened, summoned by name to the Great White Throne judgment by God. People will be judged by what they did in this world, as God has commanded all our acts, words, thoughts, etc., be recorded for that day. Those books will be opened and we will each give an account of our lives to God, self-condemning our own souls in the process. For the one who believes in Jesus, who has asked to be forgiven for their sin, they do not have anything recorded in the books to condemn them. It's all been taken away by God, supernaturally transferred to Jesus at the cross. He died with our sin. He stood before God guilty of what we had done. God punished Him instead of us so that our sin was punished. So we will come to a different type of judgment before God. It will be a place to receive rewards for our service to Him. No condemnation, only accolades. For the one with their own sin, the judgment will be final. One sentence carried out: human souls tossed headlong into the Lake of Fire: https://www.biblegateway.com/passage/?search=Revelation+20&version=NIV;KJV God doesn't WANT to judge anyone: https://www.biblegateway.com/passage/?search=2+Peter+3%3A9&version=NIV;KJV He wants to save everyone. But only those who have their sin forgiven by Jesus will be saved. The rest will be cast into Hell forever. God keeps His Kingdom clean. He has rules. Those rules are not burdensome rules, but more like "Don't touch the electrical lines because you could be harmed" type rules. Even God's rules are designed to give us maximum enjoyment and fulfillment in our lives, but people still cast Him and His rules into some kind of tyrant or brute category, rejecting Him for their thoughts about Him, never taking the time to realize their thoughts about Him are wrong, that He's different than they think. God reaches out His Son to all people in this present age. He does this to restore human souls, to take them out of judgment, to make a way back to Heaven, back to eternal life, back to an ongoing and right and proper relationship with God. He lives us. He's willing to forgive us because of that love. But we must come to Him acknowledging our sin, repenting of it, asking Him for forgiveness. All who do are saved. The rest re- main damned. I saw a YouTube video about this recently: https://www.youtube.com/watch?v=8GN5SN1yrn8 Jesus is returning soon. Those not saved will go through a seven year tribulation. Most will die during this time. A remnant will be saved. After the seven years Jesus returns to setup His 1,000 year Millennial Kingdom. At the end of that 1,000 years, then comes Judgment Day. Read about it, Chris. You must be saved by Jesus Christ in order to enter into Heaven. -- Rick C. Hodgin |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Jun 18 05:08PM +0100 > comes Judgment Day. > Read about it, Chris. You must be saved by Jesus Christ in order > to enter into Heaven. And Satan invented fossils, yes? /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," Bryne 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." |
Juha Nieminen <nospam@thanks.invalid>: Jun 18 09:13AM > However I still would avoid using raw array and use std::vector > or std::array instead. It typically wins in robustness and > simplicity and often even in performance. The thing is, shared_ptr represents, well, a shared resource. Meaning that more than one object can have ownership of the exact same resource, without having to make copies of it, and without having to worry which one of them is the last one to own it. Oftentimes (perhaps most usually) this feature is not needed in practical code, but sometimes it is. This cannot really be achieved with either std::vector or std::array. You can't have several instances of either one point to the same data. The only options are either copying the data for each object that needs it (which can be expensive, and removes the option of them actually functionally sharing the data, eg. to see each other's modifications of it), or passing references/pointers around, which introduces the problem of "who is the last one to reference this data?" The original needs to exist for as long as any object references it. Of course if the data is owned by one object only, and any other code only needs it temporarily (eg. only for the duration of one function call), the std::vector or std::array are probably the better choices. Lately I have myself starting thinking, however, that for things like temporary buffers and other "lightweight" dynamic arrays that do not need any of the functionality that std::vector provides, nor whose size can be determined at compile time, whether it would be better to use an std::unique_ptr<Type[]> instead of std::vector<Type>. The former can be slightly more efficient if Type is a primitive type, and you don't burden your code with everything that std::vector provides. (Of course this is at the cost of everything that it does provide, such as its various assign() functions, size(), empty(), and so on and so forth.) |
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