Thursday, October 12, 2017

Digest for comp.lang.c++@googlegroups.com - 4 updates in 3 topics

Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Oct 12 11:43PM +0100

On 12/10/2017 19:22, Öö Tiib wrote:
> "atrocious snatch", "deplorable twat", "flagrant muff", "grievous
> vagina", "heinous gash", "nefarious pudenda" ... noise is noise ...
> does not really matter.
 
I hope you were being deliberately ironic because if you were you passed
with flying colours.
 
/Flibble
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: Oct 12 11:31PM +0100

On Thu, 12 Oct 2017 11:03:51 -0700 (PDT)
> std::shared_mutex and non-const member functions use lock, try_lock
> and unlock of it. Then you have both const and thread safety like
> Herb Sutter said. :D
 
Your posting is impenetrable. It certainly misses my point.
 
One thread may reference an object by const reference and another thread
may at the same time reference the same object by non-const reference;
this may happen merely as a consequence of function signatures. The
thread referencing the object by const reference, say as a function
argument, can make no automatic assumptions about whether it can safely
read that object without synchronization.
 
When Herb said "const means thread-safe" he was not referring to
objects which are _created_ as const objects and so which cannot
lawfully be modified at all, if that was your point. He was
interpreting the provision in the standard which provides that in the
absence of concurrent mutation, a type in the standard library can
safely be read concurrently by two (or more) threads without further
synchronization, and extrapolating from that; and he was referring to
objects which are held by const reference or to which const methods are
applied.
 
As I said this was a highly misleading summary. Constness is concerned
with something different from thread safety: by itself it guarantees
nothing about thread safety, unless the object concerned happened to be
created as a const object.
 
Yes, you can lock with read-write locks if the reads significantly
exceed the writes[1]. You can lock with mutexes also. So what? If
you lock correctly, your code is thread safe irrespective of whether
the object concerned is held by any particular thread as const or not.
 
Chris
 
[1] However read-write locks perform poorly unless there is writer
priority to prevent writer starvation (which neither POSIX nor C++
guarantees); and their greater complexity compared to mutexes means that
except where reads considerably exceed writes mutexes are usually
better.
bitrex <bitrex@de.lete.earthlink.net>: Oct 12 05:25PM -0400

On 10/12/2017 12:33 PM, Rick C. Hodgin wrote:
> 8 For by grace are ye saved through faith; and that not of
> yourselves: it is the gift of God:
> 9 Not of works, lest any man should boast.
 
It's saying that grace is not a quid-pro-quo. Penance follows naturally
from grace, not the reverse.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Oct 12 02:38PM -0700

On Thursday, October 12, 2017 at 5:25:54 PM UTC-4, bitrex wrote:
> > 9 Not of works, lest any man should boast.
 
> It's saying that grace is not a quid-pro-quo. Penance follows naturally
> from grace, not the reverse.
 
Exactly. James expounds on this as well. He says that faith without
works is dead, but it's not the works that led to faith, it's the
faith that leads to works.
 
When Jesus changes you on the inside by forgiving your sin, there is
a new spiritual life. That new spiritual life has a natural draw and
pull toward God, and away from sin.
 
It remains in our flesh, fallen in sin, corrupt, that draws us to sin,
and away from God.
 
It's the constant battle, and it takes many Christians down because
the pull of the flesh is real. Even Paul, imbued by God with certain
knowledge of His Kingdom, visited by Jesus Himself in visions, who had
the Lord speaking to Him directly in answer to prayers, etc., was also
still troubled by a thorn in His flesh, a messenger of Satan sent to
buffet him continually.
 
He inquired of the Lord asking for that thorn to be taken away, and
the Lord replied after the third plea in prayer, "My grace is
sufficient," meaning it will not be taken away, but any sin you
commit because of that thorn buffeting you, it will be covered by
his grace.
 
Verse 17:
https://www.biblegateway.com/passage/?search=James+2%3A14-26&version=KJV
 
Verse 9:
https://www.biblegateway.com/passage/?search=2+Corinthians+12%3A7-10&version=KJV
 
When truth-seeking people take time to learn about the Bible, and the
Lord, and sin, and God, and everything therein related, it does make
sense because God opens up your understanding to receive it.
 
But for those who are not seeking the truth, who are looking for fault
in it, who are looking to supplant Biblical knowledge with personal
beliefs as to what truth is, there is a barrier erected between them-
selves and God, and that barrier prevents them from coming to any kind
of knowledge of the truth.
 
Thank you,
Rick C. Hodgin
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: