Thursday, September 19, 2019

Digest for comp.lang.c++@googlegroups.com - 25 updates in 5 topics

James Kuyper <jameskuyper@alumni.caltech.edu>: Sep 18 07:59PM -0700

On Wednesday, September 18, 2019 at 5:41:28 PM UTC-4, peteolcott wrote:
> > On 18/09/2019 16:02, peteolcott wrote:
> >> On 9/18/2019 2:35 AM, Juha Nieminen wrote:
> >>> In comp.lang.c++ peteolcott <Here@home> wrote:
...
 
> > For the field of real numbers, no, there isn't.  Take your meds.
 
> > /Flibble
 
> Did I say that it was a Real number?
 
See <https://en.wikipedia.org/wiki/Number_line>
"In basic mathematics, a number line is a picture of a graduated
straight line that serves as abstraction for real numbers, denoted by R.
Every point of a number line is assumed to correspond to a real number,
and every real number to a point."
...
"In advanced mathematics, the expressions real number line, or real line
are typically used to indicate the above-mentioned concept that every
point on a straight line corresponds to a single real number, and vice
versa."
 
When you say that you're talking about the "number line", you're being,
at best, confusing, and at worst, deliberately misleading, since if it
contains things that aren't real numbers, then it isn't the "real number
line" that most people think of when you say "number line". You should
give your concept a special name to clearly distinguish it from the real
number line. For the purposes of the following discussion, I'll call it
the Olcott Number Line, ONL for short.
 
Keith was not agreeing with you - he was pointing out an inherent
limitation to your results due to the fact that you're talking about the
ONL, rather than the conventional number line.
 
You have not described your infinitesimals in any detail on this
newsgroup, nor have you described how the ONL differs from the real
number line. Your description of your a[i] notation doesn't make any
sense when applied to the real number line, and what you haven't
explained about the ONL means we can't be sure what it might mean when
applied to the ONL. I don't have enough interest in your ideas to
justify bothering to track down whether you've ever addressed those
issues anywhere else. Depending upon those details that you haven't
provided, it might be the case that you can prove that the ONL is
countable. That in turn implies that the real numbers which are on the
ONL are also countable; but that would not imply that the real numbers
which aren't on the ONL are countable - that's the fundamental problem
that you face.
 
If the things you've said about the ONL are true (namely that 0.0[i] for
i an integer from 1 to infinity generates every point on the ONL to the
right of 0.0), then there must be real numbers which are not in the ONL
- a lot of them - in fact, the infinitely overwhelming majority of real
numbers cannot be on the ONL. Your description of your a[i] notation
implies that that the real numbers in the ONL are ordered (I have no
idea whether the infinitesimals are ordered, since you've provided no
description of their properties). In other words, if a[i] and a[j] are
both real, then a[i] < a[j] iff i < j. Is that true? If so, it's not
only feasible, but trivial, to prove that most real numbers aren't on
the ONL.
Juha Nieminen <nospam@thanks.invalid>: Sep 19 05:54PM

>>> THERE IS A POINT ON THE NUMBER LINE IMMEDIATELY ADJACENT TO 0
 
>> Ok, what is that number?
 
> It is the Infinitesimal Number 0.0[1] one point offset from 0.0.
 
What are the properties of that number that make it different from 0?
peteolcott <Here@Home>: Sep 19 01:26PM -0500

On 9/19/2019 12:54 PM, Juha Nieminen wrote:
 
>>> Ok, what is that number?
 
>> It is the Infinitesimal Number 0.0[1] one point offset from 0.0.
 
> What are the properties of that number that make it different from 0?
 
[0, 1] - (0, 1] = {0} the first interval has exactly one point that the
second interval does not have, making the first interval Infinitesimally
longer than the second one.
 
The first interval begins at 0.0[0] and
The second interval begins at 0.0[1].
 
 
--
Copyright 2019 Pete Olcott All rights reserved
 
"Great spirits have always encountered violent
opposition from mediocre minds." Albert Einstein
Siri Cruise <chine.bleu@yahoo.com>: Sep 19 12:28PM -0700

In article
<581781046.589713241.741596.DerTopper-web.de@news.eternal-september.org>,
> hypothesis). This implies that there are things in mathematics that cannot
> be proven. This culminated in Goedels incompleteness theorem, which is
> considered by many mathematicians as a severe throwback in maths.
 
Goedel's incompleteness theorem is not that a specific proposition is unprovable
but that any system complex enough to prove number theory theorems will have
either true propositions which cannot be proven (incompleteness) or false
propositions which can be proven (w-inconsistency).
 
Picture the boundary between truth and falseness as if a fractal curve, truth
and falseness become so entangled that it takes a nondenumerably infinite proof
to distinguish.
 
We can force the issue on a finite subset of propositions asserted or denied as
postulates without introducing inconsistency. Experience has shown the continuum
hypothesis like the parallel postulates does not lead to inconsistency.
 
--
:-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @
'I desire mercy, not sacrifice.' /|\
The first law of discordiamism: The more energy This post / \
to make order is nore energy made into entropy. insults Islam. Mohammed
Siri Cruise <chine.bleu@yahoo.com>: Sep 19 12:34PM -0700

In article <T9mdnX__WZbR9OvAnZ2dnUU7-R_NnZ2d@giganews.com>,
 
> The number of real numbers is the number of adjacent geometric
> points on a number line, countable using integers.
 
You're misreading the axiom of choice. While the axiom can be assumed for
nondenumerable sets, no has come up with an orderring of, say, reals that an
open set has a distinguished minimum.
 
--
:-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @
'I desire mercy, not sacrifice.' /|\
The first law of discordiamism: The more energy This post / \
to make order is nore energy made into entropy. insults Islam. Mohammed
Siri Cruise <chine.bleu@yahoo.com>: Sep 19 12:45PM -0700

In article <pMqdnQFBSMfCXurAnZ2dnUU7-d3NnZ2d@giganews.com>,
> line that is immediately adjacent to 3.0 on its right side. This geometric
> point is an infinitesimally larger than 3.0: encoded as the first point in
> the interval: (3,4]
 
The axiom of choice says the set has a distinguished minimum with respect to
some orderring, but not what that orderring is. The usual < order does not work;
nobody has yet discoverred an orderring that does. Assuming choice produces
unsettling results like this, but not inconsistencies, so it is allowed.
 
Real numbers do not have infinitesimals. That was discoverred a couple of
hundred years of ago. This is why most treatments of calculus use limits instead
of the infinitesimals of Newton and Liebniz.
 
--
:-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @
'I desire mercy, not sacrifice.' /|\
The first law of discordiamism: The more energy This post / \
to make order is nore energy made into entropy. insults Islam. Mohammed
Siri Cruise <chine.bleu@yahoo.com>: Sep 19 12:54PM -0700

In article <qlefjm$300c$1@adenine.netfront.net>,
> > the interval: (3,4]
 
> That would be "the smallest real number larger than 3". Which does not
> exist.
 
Not for the usual < order. Someday someone might come up with an order that can
do this. According the axiom of choice, it's out there. Somewhere.
 
[X-Files theme music] Do you believe?
 
--
:-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @
'I desire mercy, not sacrifice.' /|\
The first law of discordiamism: The more energy This post / \
to make order is nore energy made into entropy. insults Islam. Mohammed
peteolcott <Here@Home>: Sep 19 02:58PM -0500

On 9/19/2019 2:34 PM, Siri Cruise wrote:
 
> You're misreading the axiom of choice. While the axiom can be assumed for
> nondenumerable sets, no has come up with an orderring of, say, reals that an
> open set has a distinguished minimum.
 
I have updated this on the basis of feedback:
 
(1) There cannot be a real number associated with the point
immediately adjacent to 0.0 because real numbers must be divisible
by 2 and single points are indivisible.
 
(2) If there is no real number immediately adjacent to 0.0 then
there is always a measurable gap after 0.0. By dividing the
size of the gap by 2 it gets smaller and smaller yet never closes,
there are always points in the gap that are unaccounted for.
 
This is where Infinitesimal numbers come in:
[0,1] - (0,1] = {0} a single point on the number line.
Thus proving a difference (in length) of one point between the first
interval and the second interval.
 
In all of the years where the width of a single point has been defined
to be 0 it was defined incorrectly, the actual width is Infinitesimal.
 
Infinitesimals sometimes act as if they had zero width and other times
act as if they minimum width. This is similar to the dichotomy of the
particle versus wave theories of light.
 
When we adapt (0,1] to the Infinitesimal number notational conventions it becomes
[0[1], 1] indicating an interval beginning with a single point offset from 0.
 
This notational convention allows us to reference subsequent immediately
adjacent points on the number line: [0[1], 1] - {0[1]} = [0[2], 1].
 
--
Copyright 2019 Pete Olcott All rights reserved
 
"Great spirits have always encountered violent
opposition from mediocre minds." Albert Einstein
peteolcott <Here@Home>: Sep 19 03:04PM -0500

On 9/19/2019 2:28 PM, Siri Cruise wrote:
 
> We can force the issue on a finite subset of propositions asserted or denied as
> postulates without introducing inconsistency. Experience has shown the continuum
> hypothesis like the parallel postulates does not lead to inconsistency.
 
Bottom line (A great simplification of Wittgenstein's notorious paragraph)
http://liarparadox.org/Wittgenstein.pdf
 
For every formal system the only way that we know that a sentence
is true is that this sentence satisfies a sequence of finite strings
that concurrently make this same sentence provable.
 
--
Copyright 2019 Pete Olcott All rights reserved
 
"Great spirits have always encountered violent
opposition from mediocre minds." Albert Einstein
peteolcott <Here@Home>: Sep 19 03:09PM -0500

On 9/19/2019 2:54 PM, Siri Cruise wrote:
 
> Not for the usual < order. Someday someone might come up with an order that can
> do this. According the axiom of choice, it's out there. Somewhere.
 
> [X-Files theme music] Do you believe?
 
As explained in this reply
 
On 9/19/2019 2:58 PM, peteolcott wrote:
Provably unprovable eliminates incompleteness [ COMPLETE-2 ]
 
There is no such real number, because all Reals are divisible by 2
there is such an Infinitesimal number: a single indivisible point
on the number line.
 
 
--
Copyright 2019 Pete Olcott All rights reserved
 
"Great spirits have always encountered violent
opposition from mediocre minds." Albert Einstein
Siri Cruise <chine.bleu@yahoo.com>: Sep 19 01:13PM -0700

In article <qlkrir$1iva$1@adenine.netfront.net>,
 
> In fact, even if you limit yourself to rational numbers, it still
> doesn't exist. There is no "smallest rational number larger than 3".
 
You can enumerate rationals, E:rationals to naturals. Then define the order O to
be xOy = E(x)<E(y). The smallest rational larger than 3 would be 4 or
thereabouts. This might not be the most useful order but does show the axiom of
choice works on rationals.
 
Note that you define a total order on R^n: each real in the orderred n-tuples
has a decimal representation. You can interleave the digits of the n reals into
a single real and define the total order of R^n to be the usual < on this R^1
set of interleaved reals. Again not a particularly useful order, but it does
prove you can total order R^n for any natural n. Once you understand tricks like
this are allowed, you realise maybe there is some order on reals that satisfies
the axiom of choice.
 
--
:-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @
'I desire mercy, not sacrifice.' /|\
The first law of discordiamism: The more energy This post / \
to make order is nore energy made into entropy. insults Islam. Mohammed
Siri Cruise <chine.bleu@yahoo.com>: Sep 19 01:33PM -0700

In article <O9udnZdFPogAkBzAnZ2dnUU7-c3NnZ2d@giganews.com>,
> > real number but that has a location on the number line, directly
> > adjacent to the real number 0. It is greater than 0 and less than
> > any positive real number.
 
iota > iota^2 > iota^3 > ...
 
> He elaborates this understanding much more completely in his
> 9/16/2019 11:38 PM, reply.
 
Infinitesimals cannot be reals. A couple of centuries ago it was shown this
leads to inconsistency. Recently nonstandard analysis has reintroduced
infinitesimals and their reciprocals. Positive infinitesimals are an infinite
set each greater than zero and less than any positive real. Their reciprocals
are greater than any real number and defined since infinitesimals are nonzero.
 
Note that for an infinitesimal dx, dx > dx^2 > dx^3 > ... . So with the usual <
infinitesimals also lack a minimum element. Choice assumes an order exists, but
we haven't found it.
 
--
:-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @
'I desire mercy, not sacrifice.' /|\
The first law of discordiamism: The more energy This post / \
to make order is nore energy made into entropy. insults Islam. Mohammed
Siri Cruise <chine.bleu@yahoo.com>: Sep 19 01:37PM -0700

In article <PYKdnZj3lqVg2x_AnZ2dnUU7-IWdnZ2d@giganews.com>,
> > real number but that has a location on the number line, directly
> > adjacent to the real number 0. It is greater than 0 and less than
> > any positive real number.
 
Unless you can prove the set of numbers satisfying this definition is finite,
all you're doing is adding another infinite set to the issue.
 
Hint: it's an infinite set.
 
--
:-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @
'I desire mercy, not sacrifice.' /|\
The first law of discordiamism: The more energy This post / \
to make order is nore energy made into entropy. insults Islam. Mohammed
peteolcott <Here@Home>: Sep 19 04:05PM -0500

On 9/19/2019 3:33 PM, Siri Cruise wrote:
 
> Note that for an infinitesimal dx, dx > dx^2 > dx^3 > ... . So with the usual <
> infinitesimals also lack a minimum element. Choice assumes an order exists, but
> we haven't found it.
 
This is the Pete Olcott copyright 2018, 2019 notion of
infinitesimals that have a bijection to every point on
the number line indexed by integers.
 
Reals have no point immediately adjacent to 0.0, infinitesimals
name this point 0.0[1].
 
 
--
Copyright 2019 Pete Olcott All rights reserved
 
"Great spirits have always encountered violent
opposition from mediocre minds." Albert Einstein
peteolcott <Here@Home>: Sep 19 04:07PM -0500

On 9/19/2019 3:37 PM, Siri Cruise wrote:
 
> Unless you can prove the set of numbers satisfying this definition is finite,
> all you're doing is adding another infinite set to the issue.
 
> Hint: it's an infinite set.
 
If all of the points on the number line can be counted using integers
then all infinite sets have the same cardinality.
 
--
Copyright 2019 Pete Olcott All rights reserved
 
"Great spirits have always encountered violent
opposition from mediocre minds." Albert Einstein
Siri Cruise <chine.bleu@yahoo.com>: Sep 19 03:04PM -0700

In article <m6ydnRGwy51ucB7AnZ2dnUU7-KudnZ2d@giganews.com>,
 
> If all of the points on the number line can be counted using integers
> then all infinite sets have the same cardinality.
 
They can't be.
 
--
:-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @
'I desire mercy, not sacrifice.' /|\
The first law of discordiamism: The more energy This post / \
to make order is nore energy made into entropy. insults Islam. Mohammed
peteolcott <Here@Home>: Sep 19 05:32PM -0500

On 9/19/2019 5:04 PM, Siri Cruise wrote:
 
>> If all of the points on the number line can be counted using integers
>> then all infinite sets have the same cardinality.
 
> They can't be.
 
I already proved this in other replies to you.
 
--
Copyright 2019 Pete Olcott All rights reserved
 
"Great spirits have always encountered violent
opposition from mediocre minds." Albert Einstein
Soviet_Mario <SovietMario@CCCP.MIR>: Sep 20 12:22AM +0200

Surely this will sound a very trivial or silly question to
experienced C++ programmers, but I have many doubts about
it, starting with the very fact it is feasible or not.
 
I'd like to overload binary operator '+' for native CHAR *
operands on both sides, and return an std::string for the
resulting expression (like a "const" append or chain +
operator).
 
I suspect it would be slow (with "a lot" of temporaries
built and destroied), assumed it's possible.
 
What other risks should I try to avoid ?
 
a code like
 
std::string operator + (const char * A, const char * B)
{ return (std::string (A) + std::string (B)); }
 
does not compile with QT creator (it says : must have a
class or enumerated type operand).
How to circumvent the limitation without again "wrapping"
another std::string around the char * ?
 
I'd have thought that the std::string return type required
could have been enough, but it had not :\
 
 
the aim would be to allow "mixed" multiple chain operation
in composing strings in a sequence, with at least one
STD::STRING somewhere in the sequence, but also one or more
simple native literals (CHAR *) consecutive in it.
 
What other "semantic" could be altered to allow such
smoother integration between the two types ?
 
 
 
in the message it mentions __Cx11. Is it the standard implied ?
TY.
 
 
 
--
1) Resistere, resistere, resistere.
2) Se tutti pagano le tasse, le tasse le pagano tutti
Soviet_Mario - (aka Gatto_Vizzato)
Bonita Montero <Bonita.Montero@gmail.com>: Sep 19 07:05PM +0200

> {
>     return &static_cast<D &>(b);
> }
 
Look wat happnens if I do this instead with MSVC:
 
D *f( B &b )
{
__assume(&b != nullptr);
return &static_cast<D &>(b);
}
 
The resulting code isn't this:
 
>     test    rcx, rcx
>     cmove   rax, rdx
>     ret     0
 
But this:
 
lea rax, QWORD PTR [rcx-12]
ret 0
 
MSVC is such a cool compiler.
David Brown <david.brown@hesbynett.no>: Sep 19 07:34PM +0200

On 19/09/2019 19:05, Bonita Montero wrote:
 
>     lea        rax, QWORD PTR [rcx-12]
>     ret        0
 
> MSVC is such a cool compiler.
 
As you said in your first post, gcc generates that anyway - without an
"__assume". That makes gcc a cooler compiler :-)
Bonita Montero <Bonita.Montero@gmail.com>: Sep 19 08:05PM +0200


>> MSVC is such a cool compiler.
 
> As you said in your first post, gcc generates that anyway
> - without an "__assume".  That makes gcc a cooler compiler :-)
 
I just found the following:
 
gcc handles null-Pointers according to the standard:
 
D *f( B *b )
{
return static_cast<D *>(b);
}
 
This results in this:
 
testq %rdi, %rdi
je .L3
leaq -12(%rdi), %rax
ret
.L3:
xorl %eax, %eax
ret
 
So on one side gcc is so clever as to assume that references
are never null, but on the other side you have no way to say
gcc that a pointer to be downcastet won't be null.
Paavo Helde <myfirstname@osa.pri.ee>: Sep 19 10:00PM +0300

On 19.09.2019 21:05, Bonita Montero wrote:
 
> So on one side gcc is so clever as to assume that references
> are never null, but on the other side you have no way to say
> gcc that a pointer to be downcastet won't be null.
 
Except that you have:
 
D *f( B *b ) {
if (b) {
return static_cast<D *>(b);
} else {
__builtin_unreachable();
}
}
 
> g++ -O2 -c test1.cpp -S
 
_Z1fP1B:
.LFB0:
.cfi_startproc
leaq -12(%rdi), %rax
ret
.cfi_endproc
queequeg@trust.no1 (Queequeg): Sep 19 02:24PM

Hi,
 
I'd like to read a book (Kindle ebook strongly preferred) explaining C++11
and C++14 features to someone who already works with C++03. Do you have
any recommendations?
 
--
https://www.youtube.com/watch?v=9lSzL1DqQn0
"Öö Tiib" <ootiib@hot.ee>: Sep 18 11:50PM -0700

On Wednesday, 18 September 2019 18:30:13 UTC+3, Rick C. Hodgin wrote:
> through the edit-and-continue code, you'll see function calls going
> to a branching off place, and then going to their destination. This
> allows functions to be swapped out as they are changed.
 
I meant that the whole "branching off" of changed functions is likely
part of debuggers assets, the original process did not have it.
 
> changed if it's not too radical. And code already on the call stack
> will still navigate back through the stale versions, only new calls
> will go to the new ones.
 
So what does detaching that debugger even mean? The "stale versions"
of functions are still present as part of original executable and
the "vtable-like" hooking mechanism with "branching off places" are
new goods owned by debugger. Avoiding detaching it does not sound
like entirely policy-based decision.
 
> Edit-and-continue is, by far, the greatest developer asset I have.
> In languages I code where I don't have edit-and-continue, it is
> sorely missed.
 
But that is totally orthogonal to need of detaching from such
processes.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Sep 19 08:31AM -0400

On 9/19/2019 2:50 AM, Öö Tiib wrote:
> So what does detaching that debugger even mean?
 
In Windows, a process launches and has its own allocation, threads,
open handles, etc. It runs in isolation and is protected against
corruption from other processes that may later crash or try to ac-
cess its data by hardware and OS protection mechanisms.
 
A debugger is like a hand that reaches out to grab a tennis ball.
The hand wraps around the ball and holds onto it. When that hap-
pens, the debugger "attaches" to the process being debugged. It
shares information about it as a debugger debugging another proc-
ess. It has access to the same memory, access to handles, etc.
The debugger typically recognizes compile-time information from
something like a PDB (program database) created at compile + link
time. That PDB allows a correlation between binary location ac-
cess in memory (even through the ABI loader's randomizer) and the
source code which relates to that code.
 
By making changes to the source code, re-compiling, and applying
the code changes to the running ABI, many common things changed
in source code (adding code, altering code, deleting code, doing
the same for variables, etc.), the ABI can be expanded or con-
tracted as needed by the debugger changes.
 
When the debugger is done making changes to the running ABI foot-
print in memory, it can detach. This is the same as taking your
hand off that tennis ball and letting it go. The process that
had been being debugged is then released, left again to its own
encapsulated existence.
 
> the "vtable-like" hooking mechanism with "branching off places" are
> new goods owned by debugger. Avoiding detaching it does not sound
> like entirely policy-based decision.
 
They are committed into the running process's memory. They're
just not on the disk file, though honestly I cannot see why the
OS + compiler + debugger couldn't coordinate an exchange which
allows the .exe on disk to be updated with the new changes.
 
I know in VS when you exit a process you've been working on, it
does an auto-link after terminating the process so it can update
the disk image. Seems an unnecessary step IMHO.
 
>> sorely missed.
 
> But that is totally orthogonal to need of detaching from such
> processes.
 
The advantage of edit-and-continue is the saved contextual state.
You can attach to a running process, suspend its execution where
it is, examine things, change things, inject new things, etc.,
and then resume from where you were. It saves the time of loading
the app, getting back to the place where you were, selecting the
data options you were working with, to get to the point where the
algorithm you're debugging exists.
 
Using an edit-and-continue ABI reduces code performance by about
20% or so. But the time it saves the developer more than makes
up for that. In addition, most CPUs today on most applications
today running at 80% of their full potential speed is more than
fast enough. Running at 20% of their full potential speed is
probably usable.
 
I have an old 2007 HP Pavillion desktop computer. It was getting
slow on Windows 7 with a dual-core 2.2 GHz CPU and SATA hard disk.
I upgraded to a quad-core 2.4 GHz CPU, 8 GB of RAM, and an SSD,
and it's like a new machine. I couldn't believe the difference.
That $110 investment resurrected (scavenged DRAM from another
machine, bought CPU on eBay, new SSD) the aging computer and I've
been using it for even Java development in Eclipse without any
performance issues.
 
In any event, most people I know do not appreciate edit-and-con-
tinue. I find it difficult to code without it. I am 10x or more
productive when I have an edit-and-continue toolset because it
allows me to code as I go, testing bits as I go, which greatly
helps me overcome the issues I code into my code by my dyslexia.
 
--
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: