Sunday, June 26, 2016

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

Peter Fairbrother <peter@tsto.co.uk>: Jun 26 04:52PM +0100

On 21/02/16 21:38, Chris M. Thomasson wrote:
> choose a point in the n'th level set. The point can be chosen
> by taking a starting point just outside the circle delimiting
> the target set,
 
I don't get this bit. I am not a chaos theorist, and I do not understand
_exactly_ what is being proposed. Could you explain further?
 
Please try and be as precise as you can.
 
 
For example, what is the n-th level set? Is it the same thing as the
target set? (if so, please don't call it by two different names... )
 
I initially thought it was the set of points which remain less than some
value after n iterations (presumably of x -> x^2 + c) - or possibly that
set minus the set for n-1 iterations - but I don't see how that would be
delimited by a circle.
 
 
Can c be freely chosen from some large range?
 
 
> and applying inverse iteration, choosing roots
> by sign according to the bits in the sequence to be encoded.
 
Is that the actual encryption operation?
 
> until the point lands in the target set. The decoded message
> would have n bits determined by writing down the sign of the
> imaginary component of the escape orbit for each iteration.
 
 
This last part 5, decode by repeatedly iterating and taking the sign of
the imaginary parts as plaintext bits, seems like it would work.
 
but oh oh, what is an escape orbit? for each iteration?
 
If you/he means the imaginary part of x, then it seems to make some sense.
 
But what is the imaginary component of the escape orbit of an iteration?
 
 
 
I still don't see how you get the initial ciphertext.
 
Repeated reverse iterations and choosing which root to use, OK, I get
that. But how do you choose the starting point, given some
arbitrarily-chosen c?
 
 
 
 
Assuming you can do that, as a cipher it seems to have several
disadvantages: first, it is computationally expensive.
 
Second, the ciphertext is somewhat longer than the plaintext. For cipher
purposes, you need too be able to encrypt say 128 bits in a block -
there are some 64-bit block ciphers still around, but they are
deprecated, and some people say you need 256 bits in a block nowadays.
 
As a corollary to the above, the actual length needed for the ciphertext
is ... variable, which is a bit disconcerting.
 
Another corollary, you might have to check whether each block decrypts
correctly, so as to tell whether you have enough precision ..
 
So in general it isn't that useful as a cipher.
 
except ..
 
it *may* have a slightly interesting security property, ie a strong
proof of security.
 
This is kinda a holy grail for some cryptologists, and if I am right
about that, it may have some limited use.
 
 
 
> Sounds easy right?
 
Maybe if you are a chaos theorist ..
 
- Peter Fairbrother
 
ps ignore anything austinobyrne has to say - he is a well-known idiot.
 
> the fractal dimension of the Julia set, and the degree of
> imbalance of the contractivity in the tree traversal of the
> Julia set."
 
ps nope, that makes no sense to me either ..
Marcel Mueller <news.5.maazl@spamgourmet.org>: Jun 26 04:31PM +0200

When I use enums with flags an define the type safe bit operators I get
warning in switch statements when I have bit combinations in a case
constant. (case value not in enumerated type)
 
Basically the overloaded operators cause the argument to switch to be of
the enum type rather than int. And now the compiler (here gcc) does some
consistency checks.
It is just a warning and I can turn it off, but this disables another
sometimes useful warning for other enum types that not all enum values
of the switch are handled.
 
Is there anything else I can do except for casting to int at the switch
statement?
 
 
enum Flags
{ None = 0
, Val1 = 1
, Val2 = 2
//...
};
 
inline constexpr Flags operator|(Flags l, Flags r)
{ return (Flags)((int)l|r); }
// further operators
 
int main()
{
Flags f = Val1|Val2;
switch (f)
{default:
return 0;
case Val1:
return 1;
case Val2:
return 2;
case Val1|Val2: // Warning!
return 3;
}
}
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Jun 26 05:19PM +0200

On 26.06.2016 16:31, Marcel Mueller wrote:
> When I use enums with flags an define the type safe bit operators I get
> warning in switch statements when I have bit combinations in a case
> constant. (case value not in enumerated type)
 
[snip]
> return 3;
> }
> }
 
enum Flags
{ None = 0
, Val1 = 1
, Val2 = 2
//...
};
 
inline constexpr Flags operator|(Flags l, Flags r)
{ return (Flags)((int)l|r); }
// further operators
 
int main()
{
Flags f = Val1|Val2;
switch (+f)
{default:
return 0;
case Val1:
return 1;
case Val2:
return 2;
case Val1|Val2: // Warning!
return 3;
}
}
 
 
Cheers & hth.,
 
- Alf
"J. Clarke" <j.clarke.873638@gmail.com>: Jun 26 05:10AM -0400

In article <fcdaa56d-59a0-4b61-925c-f31f55a89cf0@googlegroups.com>,
ootiib@hot.ee says...
 
> That is so silly. The tongue does not matter. What matters is what is
> expressed in it. So better compare what known software is written in
> C++ and what is in C#.
 
So what known software was written in C in 1968 and what does that fact
tell us about the utility of C?
 
Comparing a new language with an old language on the basis of "what was
written in it" seems kind of silly.
"J. Clarke" <j.clarke.873638@gmail.com>: Jun 26 05:34AM -0400

In article <nderds$g8i$1@news.xmission.com>,
legalize+jeeves@mail.xmission.com says...
 
> >Does there exist a list of operating systems/hardware that I can target
> >in C++?
 
> All of them.
 
All of them? Really? So tell us where to get a C++ compiler that
targets the Zuse Z4.

> >My office mate is arguing with me that C# is now more portable than C++,
> >because...mono. He is making me angry.
 
> Every other language sits on top of some layer that is either C or C++.
 
That would be news to Fortran, LISP, ALGOL, COBOL, RPG, APL, Simula,
SNOBOL, Speakeasy, BASIC, PL/I, and JOSS, among others.
 
C++ is highly portable and targets a great many systems, but don't
overstate the case.
"J. Clarke" <j.clarke.873638@gmail.com>: Jun 26 05:49AM -0400

In article <ndi9dc$1raf$2@gioia.aioe.org>, klammerj@NOSPAM.a1.net
says...
 
> I mean it's a nice marketing spin and all, but if the goal is
> portability (as they claim) but it'll only run on windowze,
> something has to be wrong, no?
 
Mono is a subset of dotNet and it doesn't "only run on Windows". You
can write C++ code that "only runs on Windows" you know, all you have to
do is access system services that are not present on other operating
systems.
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: