Friday, February 23, 2018

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

Vir Campestris <vir.campestris@invalid.invalid>: Feb 23 09:16PM

I can't see one - but is there any way to distinguish an expired
weak_ptr (which normally refers to a control block with a zero strong
reference count) and one that has never been set (not referring to any
control block)?
 
I'd like to distinguish them. The latter case indicates a logic error in
our code.
 
Andy
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Feb 23 11:27PM +0100

On 23.02.2018 22:16, Vir Campestris wrote:
> control block)?
 
> I'd like to distinguish them. The latter case indicates a logic error in
> our code.
 
You can wrap it in a class that doesn't have default constructor.
 
Static check better than dynamic. ;-)
 
 
Cheers!,
 
- Alf
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 22 07:13PM -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.
 
Evidence on things happening 2000 years ago is difficult to come by.
As it bears true historical significance to the literal crucifixion
of God Almighty on the cross, the enemy of this world is at work very
hard to suppress that information.
 
However, over time little bits and pieces are showing up which validate
that which we possess today in the Bible as being legitimate, backed up
by real archaeological findings:
 
Major biblical discovery: Archaeologists may have found the Prophet
Isaiah's 'signature'
 
http://www.foxnews.com/science/2018/02/22/major-biblical-discovery-archaeologists-may-have-found-prophet-isaiahs-signature.html
 
Always that little seed of doubt however. I think God leaves it that
way on purpose. With proof it's not faith. Without proof it is faith.
Since God is spirit, and we are flesh, we must accept on faith that
which our eyes cannot see. This leads us to come to Jesus, ask forgive-
ness, whereby we are forgiven and transformed with our new spirit life.
 
Then, from within our new spiritual eyes are we able to know the truth
in a way our flesh-alone cannot.
 
--
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 23 04:09PM

On 23/02/2018 03:13, Rick C. Hodgin wrote:
> ness, whereby we are forgiven and transformed with our new spirit life.
 
> Then, from within our new spiritual eyes are we able to know the truth
> in a way our flesh-alone cannot.
 
There is no physical or archaeological evidence for Jesus.
 
--
 
Thank you,
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 23 01:04PM -0800

On Friday, February 23, 2018 at 11:10:02 AM UTC-5, Rick C. Hodgin wrote:
> There is no physical or archaeological evidence...
 
 
I, the real Rick C. Hodgin, did not write the post I'm replying to.
 
Please examine the headers to see that there is someone usurping my
identity (and without my permission). I post from Eternal September
and Google Groups only.
 
--
Rick C. Hodgin
Manfred <invalid@invalid.add>: Feb 23 02:35AM +0100

On 2/22/2018 1:45 PM, Öö Tiib wrote:
> * i/o errors raise SIGSEGV on Mac and EXECUTE_IN_PAGE_ERROR
> on Windows. Handling user ejecting mapped media during access
> is fun.
 
Your idealization of 'fun' is...
 
Fun :)
Paavo Helde <myfirstname@osa.pri.ee>: Feb 23 09:03AM +0200

On 22.02.2018 14:45, Öö Tiib wrote:
> * memory mapping uses fixed page length (lets say multiplies of 4KB).
> That does not on general case match with (lets say 5KB) file sizes
> and mismatch always provides niche for fun to next maintainer.
 
In C++ you can always create a wrapper class providing a more robust
interface and taking care of closing the resources, and which can keep
account on the file size as well. There is no need to twiddle with the
mmap C interface at the application level.
 
> * when file size exceeds the addressable space (say 3GB on 32 bit
> system whose kernel uses 2 GB) then orchestrating portions mapped
> can be fun.
 
Fortunately our software is built in 64-bit for many years already. Got
a 10 GB TIFF file (BigTIFF, to be more exact)? No problem, just map it
in the address space. Well, actually there are problems because the
actual address space is not really 64-bit, but we haven't run into the
limits yet.
 
In principle a C++ abstraction layer can take care about the windowing
as well, but then it might be indeed easier to just use fread() or
something.
 
 
> * i/o errors raise SIGSEGV on Mac and EXECUTE_IN_PAGE_ERROR
> on Windows. Handling user ejecting mapped media during access
> is fun.
 
That's the most serious argument. Maybe I should review our abstraction
layer and switch off mmap-ing for removable media.
 
Cheers
Paavo
Egor <egor@ruby.local>: Feb 23 02:48AM +0200

> I thought C++11 introduced sleep_for(). Why not use the standard function?
OP posted the question to both comp.lang.c and comp.lang.c++, so I
provided a C-oriented answer.
 
Didn't know about sleep_for in C++ though, so thanks for your addition.
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: