Sunday, February 4, 2018

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

"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 04 05:49PM

If you are doing what you are doing for reward and punishment then it
isn't really morality.
 
--
 
Thank you,
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 04 05:28PM

"No one of illegitimate birth shall enter the assembly of the LORD; none
of his descendants, even to the tenth generation, shall enter the
assembly of the LORD." -- Deuteronomy 23:2
 
Jesus Christ was himself illegitimate as his Father was not married to
the whore Mary.
 
--
 
Thank you,
Rick C. Hodgin
"Öö Tiib" <ootiib@hot.ee>: Feb 03 04:30PM -0800

On Saturday, 3 February 2018 17:21:46 UTC+2, Rick C. Hodgin wrote:
 
> That is isolated from my forgiveness for him. I do not want him punished
> by God for his actions, so I personally forgive him. But he is still
> accountable to God for his actions, and the harm done to many people.
 
Nonsense, "to forgive" means to stop being angry and wishful to
punish. Your duplicity fools yourself if you can actually
somehow imagine that you can both forgive and then still punish.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 03 04:38PM -0800

On Saturday, February 3, 2018 at 7:31:04 PM UTC-5, Öö Tiib wrote:
 
> Nonsense, "to forgive" means to stop being angry and wishful to
> punish. Your duplicity fools yourself if you can actually
> somehow imagine that you can both forgive and then still punish.
 
It is not punishment I seek. It is only for him to stop posting using
my own name and online identity. There will be nothing sought beyond
having him cease. My desire is that he would do it voluntarily, and
stand up on his own two feet and rise against me with his beliefs if
he wishes, but to do it as Leigh Johnston, and not pseudo-Mr. Flibble,
and not as my own identity.
 
--
Rick C. Hodgin
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Feb 04 12:52AM

On 04/02/2018 00:38, Rick C. Hodgin wrote:
> stand up on his own two feet and rise against me with his beliefs if
> he wishes, but to do it as Leigh Johnston, and not pseudo-Mr. Flibble,
> and not as my own identity.
 
That would be an option if you would engage in honest debate but you
don't. You ignore other people's arguments and simply respond by pasting
passages from the Bible without dealing with the other person's
argument: i.e. you are deliberately, wilfully obtuse. Even if that was
not the case this technical Usenet newsgroup is NOT THE PLACE for such
debate which is why the only weapon in my armoury is satire which will
continue whilst you continue your off topic spam.
 
/Flibble
 
--
"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" <rick.c.hodgin@gmail.com>: Feb 03 05:15PM -0800

On Saturday, February 3, 2018 at 7:52:54 PM UTC-5, Mr Flibble wrote:
> don't. You ignore other people's arguments and simply respond by pasting
> passages from the Bible without dealing with the other person's
> argument: i.e. you are deliberately, wilfully obtuse.
 
I have posted much that you've responded with "tl;dr". The things I
post are the things you NEED to address the things you THINK. But even
though I post what you need, you will not hear it because you're already
convinced you're right.
 
You post the same signature on all of your posts, citing a lost man who
does not understand God, who does not understand sin, who does not have
any inkling of an idea what's coming for him when he dies in such utter
rebellion against God, leading other people to also be against God.
 
You have been sold a lie in this world by the enemy of this world I've
tried with great passion and effort to expose to you and teach you of,
but you would hear none of it. As I say, I pit you, Leigh. You are as
I was before I came to faith, except I was willing to seek the truth,
and you are not. You are indicating you will stand upon your own beliefs
already possessed within you, convinced you are right, straight into the
mouth of Hell.
 
> not the case this technical Usenet newsgroup is NOT THE PLACE for such
> debate which is why the only weapon in my armoury is satire which will
> continue whilst you continue your off topic spam.
 
The greatest cowards hide behind masks. Your actions speak loudly about
the quality of your character, Leigh. And your inability to seek the
truth speaks loudly of your self-condemnation.
 
--
Rick C. Hodgin
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Feb 03 07:21PM -0800

On 2/3/2018 5:15 PM, Rick C. Hodgin wrote:
>> On 04/02/2018 00:38, Rick C. Hodgin wrote:
>>> On Saturday, February 3, 2018 at 7:31:04 PM UTC-5, Öö Tiib wrote:
>>>> On Saturday, 3 February 2018 17:21:46 UTC+2, Rick C. Hodgin wrote:
[...]
 
Try _really_ hard to create a little hyper basic online program that
funnels user created code into a highly protected and encrypted sandbox
running your experimental compiler, protected because we want to avoid
user input corrupting your back-end systems... Say, this is highly
experimental, and it only does hello world programs.
 
I can create a program like:
 
Say you gave some instructions to pre-define a macro to indicate
something in your experimental compilers early online stages:
_________________
#define RH_CALIVE_C_MODE_TEST 0x123
#define RH_CALIVE_C_MODE RH_CALIVE_C_MODE_TEST
 
#include <stdio.h>
#include <assert.h>
 
int main(void)
{
int status = printf("Hello World!");
printf("\nstatus:(%d)\n", status);
assert(status > 0);
//assert(status == 12);
return 0;
}
_________________
 
And it gives something like:
 
Hello World!
status:(12)
 
 
? Try to do something like that. Then everybody can use it without
downloading a damn thing! ;^)
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 03 07:37PM -0800

On Saturday, February 3, 2018 at 10:21:46 PM UTC-5, Chris M. Thomasson wrote:
> [snip]
 
I do not take my cues from you. You represent almost continually a
person to be avoided. You are using profanity in one post, vulgarity
in another, and you don't seem to care about anything. I have tried
to help you when I've had inspiration with fractals, given you an idea
that I might pursue if I had time or interest. I have reached out to
you with teaching after teaching, and all you come back to me with is
your flippancy, and your personal beliefs about how I should best pro-
ceed. I have no respect for you whatsoever, Chris. I have literally
never met anyone like you online before. I'm not even sure how to
respond to you, so after this post it will be back to ignoring your
posts again.
 
FWIW, I am working on a goal that takes through 2025 to complete the
tasks I've laid out before me. So far I am pretty much on schedule,
but I have a long way to go. That will be 12+ years from the time I
started this project. It's evolved in the first few, but it's been
stable for the last couple of years, and I am at peace with moving
forward as I have outlined.
 
--
Rick C. Hodgin
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Feb 03 07:49PM -0800

On 2/3/2018 7:21 PM, Chris M. Thomasson wrote:
>     return 0;
> }
> _________________
 
Btw, a real question... If I add a \n the following line in the program:
 
int status = printf("Hello World!");
 
and turn that final assert on, say:
_________________
#define RH_CALIVE_C_MODE_TEST 0x123
#define RH_CALIVE_C_MODE RH_CALIVE_C_MODE_TEST
 
#include <stdio.h>
#include <assert.h>
 
int main(void)
{
int status = printf("Hello World!\n");
printf("\nstatus:(%d)\n", status);
assert(status > 0);
assert(status == 13);
return 0;
}
_________________
 
Well, is status guaranteed to equal 13? Or can a \r be inserted and
increase status? Will the assert wrt:
 
assert(status == 13);
 
ever trip?
 
 
 
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Feb 03 08:07PM -0800

On 2/3/2018 7:37 PM, Rick C. Hodgin wrote:
> in another, and you don't seem to care about anything. I have tried
> to help you when I've had inspiration with fractals, given you an idea
> that I might pursue if I had time or interest.
 
You did give me an idea about fractals. Thank you.
 
 
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 04 09:18AM -0800

On Saturday, February 3, 2018 at 11:07:24 PM UTC-5, Chris M. Thomasson wrote:
> You did give me an idea about fractals. Thank you.
 
I was thinking about you today and I think I figured out what
it is. You are probably a lot like I was before coming to a
saving knowledge of Jesus Christ. I didn't have any grounding
on life directions, and was unreliable in many ways. I still
struggle with that at times, though due to other factors these
days.
 
--
Rick C. Hodgin
David Brown <david.brown@hesbynett.no>: Feb 04 12:38PM +0100

On 03/02/18 07:43, Alf P. Steinbach wrote:
 
> macro magic front-end, and a hard-to-grok too clever implementation
> (essentially they identify arguments via types, types as names of
> arguments). Also, as I recall it doesn't support constructors.
 
Named arguments would be a huge benefit to C++, IMHO. They would
clearly be useful in cases where you have lots of parameters, perhaps
with many default parameters. But they would also be useful when you
have only a few parameters. If you have a function "drawBox" taking 4
int parameters, and see "drawBox(100, 200, 500, 700)" - is that "x, y,
width, height", or "x1, y1, x2, y2", or something else? It is
especially unclear when some numpty thinks it is a good idea to declare
the function as "void drawBox(int, int, int, int)" instead of naming the
parameters.
Marcel Mueller <news.5.maazl@spamgourmet.org>: Feb 04 01:33PM +0100

On 04.02.18 12.38, David Brown wrote:
> Named arguments would be a huge benefit to C++, IMHO.
 
Ack.
 
But there are side effects because the name of the arguments become part
of the public API.
First of all programmers might not be aware of that and rename their
args due to of refactoring. OK, one could refactor only the names in the
/implementation/.
Furthermore consistency aspects may arise when overriding functions with
different argument names. Restrictions would be helpful but they would
break existing code.
 
> clearly be useful in cases where you have lots of parameters, perhaps
> with many default parameters. But they would also be useful when you
> have only a few parameters.
 
I would also add overload resolution: named parameters could
disambiguate calls.
It might even be allowed to have two overloads with identical types but
distinct semantics, e.g. substring(int start, int length) vs.
substring(int start, int end). Unfortunately the latter requires ABI
changes.
 
 
Marcel
Marcel Mueller <news.5.maazl@spamgourmet.org>: Feb 04 01:44PM +0100

On 03.02.18 07.43, Alf P. Steinbach wrote:
 
> No, I think you're conflating things here.
 
> Defaulted arguments in a call are always at the end of the argument
> list, so it's simply N overloads.
 
Comparing to the current language standard you are right. A C++ function
with N optional arguments can only replace N+1 overloads.
 
> If all arguments have defaults then that means writing O(N^2) formal
> argument declarations, but that's something else.
 
No, it is still 2^N as each argument can either exist or not. O(N^2) is
typical for pair correlations.
Or are you talking about a combination of overloads an default arguments?
 
 
Marcel
Robert Wessel <robertwessel2@yahoo.com>: Feb 04 10:02AM -0600

On Sun, 04 Feb 2018 13:44:10 +0100, Marcel Mueller
 
>No, it is still 2^N as each argument can either exist or not. O(N^2) is
>typical for pair correlations.
>Or are you talking about a combination of overloads an default arguments?
 
 
Unless I've missed the change, it's N. If you have three default
arguments, you can call the function with zero, one, two or three
arguments, but then you'll get all three, the first two, the first or
none of the default arguments. You can't call and get only the first
and third defaults, while passing the second argument.
David Brown <david.brown@hesbynett.no>: Feb 04 06:01PM +0100

On 04/02/18 13:33, Marcel Mueller wrote:
 
> Ack.
 
> But there are side effects because the name of the arguments become part
> of the public API.
 
I see that as a bonus, and a good thing. Pick good names for your
arguments that say what they do - and use them for the declarations
/and/ definitions. I would be absolutely fine with the idea that these
are required to match, that mismatches would be a compilation (or
linking) error, and even that they are part of name mangling.
 
> Furthermore consistency aspects may arise when overriding functions with
> different argument names. Restrictions would be helpful but they would
> break existing code.
 
Extra limitations on argument names would indeed be a compatibility
problem. The solution would simply be to say that only functions where
the identifiers matched up could be used for named argument calls.
 
 
> distinct semantics, e.g. substring(int start, int length) vs.
> substring(int start, int end). Unfortunately the latter requires ABI
> changes.
 
It does not need any ABI calls when you have named arguments. The
compiler has the original declaration, which gives the order required
for the definition (which must match). If you write "substring(.start =
2, .length = 10);" and then "substring(.length = 10, .start = 2);", then
the compiler will match up the parameter order to fit the declaration
(and therefore the definition).
 
This is the way it works in many other programming languages - named
arguments is standard practice in modern language design, and C++ stands
out by missing this feature.
asetofsymbols@gmail.com: Feb 03 11:15PM -0800

malloc() can fail: In that case return 0.
 
(if not is this amd someone add exceptions rises to that function other than write out of memory: It is all insecure and the person make that change better change its work)
David Brown <david.brown@hesbynett.no>: Feb 04 05:43PM +0100

On 04/02/18 00:33, Christian Gollwitzer wrote:
> with the out-of-memory case if you can really handle it, i.e. if you
> catch it or ask for the nothrowing version; in most cases you simply
> want the program to abort cleanly, which the exception handles for you.
 
Throwing an exception is just another way of handling errors - with its
disadvantages and advantages compared to checking error returns and
handling it at the time. If you call a function that can fail in some
way - be it malloc, new, or anything else - you have a problem to
handle. You have to have some way of turning that failure into a
success, or punting the problem upstream to the calling program, the
user, etc.
 
The /best/ solution is not to have a system where these sorts of errors
can occur. Clearly, that is not practical in many cases - for most PC
software, you can't place limits on what other uses are made of the
shared resources of the system. But where you /can/ do it, such as by
pre-allocating all the resources you are going to need and not starting
the program proper until you have them, then that is better than any
sort of exception or error handling mechanism.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 04 01:40AM

Imagine if you carried on believing in Santa and the tooth fairy into
adulthood. And even killed & started wars over it. Haha. Imagine that.
 
--
 
Thank you,
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 03 05:47PM -0800

On Saturday, February 3, 2018 at 8:40:14 PM UTC-5, Rick C. Hodgin wrote:
> Imagine if you carried on believing in Santa and the tooth fairy into
> adulthood. And even killed & started wars over it. Haha. Imagine that.
 
I, the real Rick C. Hodgin, did not write the above post.
 
Please examine the headers to see who the real author is. I post from
Google Groups and Eternal September only.
 
--
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 04 01:20AM

God doesn't prevent terrible things because:
A) He can't
B) He doesn't want to
C) He causes them
D) He doesn't exist
 
Please Vote now.
 
--
 
Thank you,
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Feb 03 05:35PM -0800

On Saturday, February 3, 2018 at 8:20:26 PM UTC-5, Rick C. Hodgin wrote:
> C) He causes them
> D) He doesn't exist
 
> Please Vote now.
 
I, the real Rick C. Hodgin, did not write the above post. However, I
will answer this question with the truth given from the Bible:
 
E) Because of sin, God allows certain things to happen here in
this world, teaching us that this world is not the end of
our existence, at that all those who trust in Him will not
see death, even though they perish in this world, and for
all of the hard times seen in this world He repays us in
Heaven with rewards that will not diminish or wear out, for
in Heaven you can figuratively have your cake and eat it too,
you can figuratively have a billion dollars and spend it too,
and the blessings the Lord gives you in eternity do not go
away when used, nor do thieves march in and steal them, nor
do they decay.
 
God is teaching us His eternal nature, and guiding us to trust in Him
and not in our eyes, not in our selves, not in any thing here, for all
here is tainted with sin, and will not endure.
 
--
Rick C. Hodgin
Jorgen Grahn <grahn+nntp@snipabacken.se>: Jan 29 08:05PM

On Mon, 2018-01-29, Ben Bacarisse wrote:
 
>> Personally, I've always been happy with X Athena Widgets myself. Simple
>> and efficient.
 
> Thanks for reminding me that the earliest UIs where flat! I'd forgotten.
 
And there's now an xaw3d, hailing from the days when people still
wanted the Athena widgets, but with that fancy 1990s 3D look.
 
I suppose either Motif or Windows 3.1 popularized the 3D thing.
AmigaDOS 1.x didn't have it; AmigaDOS 2.x did when it came in 1991 or
so. What the Mac did, I cannot quite remember.
 
/Jorgen
 
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
Tim Rentsch <txr@alumni.caltech.edu>: Jan 30 11:32PM -0800

>> to dividing the function appropriately than to making the long
>> function easier to live with.
 
> Yes, but refactoring a function is more work and more risk.
 
I am taking this to mean you are talking about decomposing a
function in two or more smaller ones, rather than shortening or
simplifing a function body "in place". (To be fair my word
"dividing" was overspecific - I could have used a more neutral
word like "revising". But no matter.)
 
In any case, yes, decomposing a function into several is more
work, but the payoff is a lot higher. Probably the ROI is higher
for decomposing than it is for adding 'const' in several places.
Adding const does have the advantage of being more incremental.
The benefit just doesn't go as far, that's all I'm saying.
 
I'm not convinced that de-/re-composing a function carries more
risk necessarily. That depends on how much effort it put in to
the revising, and what testing methodology is being used. I
suppose in some absolute sense the risk is smaller, since adding
a 'const' somewhere is very unlikely to cause a problem (assuming
the code still compiles, of course). But the risk/payoff ratio
may very well be higher. The question is more complicated in
C++, where IIANM the presence of 'const' can change things in
unobvious ways due to things like function overloading. It
probably won't, but it might.
 
> function is to add const, so I can be sure 'foo' set near the
> beginning of the function has the same value one screenful later.
> Then when I understand it better, it's easier to refactor.
 
As it turns out I have been doing a fair amount of refactoring
work recently. It's almost always good to start small, looking
for ways to get some local improvements, before moving up to
the scale of decomposing big functions. Adding 'const' can be
one way to help with that, depending on what the starting point
is.
 
>> of the reader. Overusing const is just as much of a negative as
>> underusing it.
 
> Different mindsets, then.
 
I think the word "mindsets" is not really apropos here. What I
think you're talking about is what 'const' conveys to you, or
what it does or should convey to others. (Or similarly its
absence, I don't mean to distinguish those two cases.) What I am
talking about is (empirically) how I use 'const', not about what
it conveys or is meant to convey. As a rule I try not to assume
when reading other people's code that they think the same way I
do, and conversely.
Cholo Lennon <chololennon@hotmail.com>: Jan 29 11:01AM -0300

On 28/11/17 03:03, Stefan Ram wrote:
 
> Maybe the second possibility is a good thing sometimes,
> when one wants to assign custom meanings to std::-names?
 
> ~~
 
I suppose here we all know the difference between ::std and std. IMHO
the usage of ::std it has no sense (with only a very few exceptions).
I've been programming in C++ since 1990. Also at my current work I have
to deal with a huge code base with million lines of C++ code and I've
never seen a namespace "std" other than the standard. To summ up: I've
never needed to use ::std! but C'mon Stefan, let's face it, in
'comp.lang.java.programmer' you use "java.lang.String" when "String" is
enough. Of course, in real code there are situations when full type name
is used (security reasons/classloaders for example), but for snippets...
no way.
 
 
 
--
Cholo Lennon
Bs.As.
ARG
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: