Sunday, April 8, 2018

Digest for comp.lang.c++@googlegroups.com - 23 updates in 7 topics

"Rick C. Hodgin" <rickchodgin@gmail.com>: Apr 09 01:14AM +0800

I know some of you like to read my OS-related threads and replies, but
do not like my posts about Jesus Christ, and have therefore killfiled
me completely.
 
It was suggested recently that I prefix each thread that has a Christian
teaching with a tag like "[Jesus Loves You]".
 
I will do that from this time forward.
 
Every post I write that is something related to Christian teaching will
be prefixed and can be filtered out without filtering it out by my user
name.
 
I will only post things related to Jesus Christ with that tag in the
subject and you can ignore those posts by filtering on the phrase:
[Jesus Loves You]. By removing those messages, the rest of my tech-
nical content will come through and be readable.
 
I will also use the new signature below:
 
--
Thank you! | Indianapolis, Indiana | God is love -- 1 John 4:7-9
Rick C. Hodgin | http://www.libsf.org/ | http://tinyurl.com/yaogvqhj
-------------------------------------------------------------------------
Software: LSA, LSC, Debi, RDC/CAlive, ES/1, ES/2, VJr, VFrP, Logician
Hardware: Aroxda Desktop CPU, Arxita Embedded CPU, Arlina Compute FPGA
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Apr 08 07:15PM +0100

On 08/04/2018 18:14, Rick C. Hodgin wrote:
> [Jesus Loves You].  By removing those messages, the rest of my tech-
> nical content will come through and be readable.
 
> I will also use the new signature below:
 
You've just posted three times without that "filter tag"; is this just a
case of gross incompetence or another case of deliberate spamming?
 
/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>: Apr 08 11:33AM -0700

Peter Cheung is taking a cue from you, Leigh. He is posting impersonation
posts. The email address he uses is "rickchodgin@gmail.com" and he posts
from a Usenet provider other than Google Groups and Eternal September. He
also posts using a Mac, whereas I advise everyone to totally shun Apple.
 
Impersonation posts are evil and they only harm people, the impersonator
included. You know that, Leigh. You also know to look at the headers, so
I can only conclude you're in troll mode. A sad way to live, Leigh. That
path ends only in Hellfire.
 
--
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Apr 08 11:55AM -0700

On Sunday, April 8, 2018 at 1:14:57 PM UTC-4, Rick C. Hodgin wrote:
> -------------------------------------------------------------------------
> Software: LSA, LSC, Debi, RDC/CAlive, ES/1, ES/2, VJr, VFrP, Logician
> Hardware: Aroxda Desktop CPU, Arxita Embedded CPU, Arlina Compute FPGA
 
 
I, the real Rick C. Hodgin, did not write this post.
 
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, and using the full email address with periods
"rick.c.hodgin@gmail.com" only.
 
--
Rick C. Hodgin
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Apr 08 12:25PM -0700

On 4/8/2018 11:33 AM, Rick C. Hodgin wrote:
> posts. The email address he uses is "rickchodgin@gmail.com" and he posts
> from a Usenet provider other than Google Groups and Eternal September. He
> also posts using a Mac, whereas I advise everyone to totally shun Apple.
 
Why totally shun Apple?
 
Melzzzzz <Melzzzzz@zzzzz.com>: Apr 08 07:52PM

>> from a Usenet provider other than Google Groups and Eternal September. He
>> also posts using a Mac, whereas I advise everyone to totally shun Apple.
 
> Why totally shun Apple?
 
Because of apple ? ;)
It is sinfull to eat apple!
 
--
press any key to continue or any other to quit...
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Apr 08 01:02PM -0700

On 4/8/2018 12:52 PM, Melzzzzz wrote:
 
>> Why totally shun Apple?
 
> Because of apple ? ;)
> It is sinfull to eat apple!
 
Humm... Perhaps. If so, for some damn reason it makes think of the
following 80's song, Freak A Zoid:
 
https://youtu.be/5wJWuaPR0Lo
 
 
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Apr 08 02:07PM -0700

On Sunday, April 8, 2018 at 3:25:44 PM UTC-4, Chris M. Thomasson wrote:
> > He
> > also posts using a Mac, whereas I advise everyone to totally shun Apple.
> Why totally shun Apple?
 
There is a powerful anti-Christ spirit at work in Apple, along the
same lines as the one at work in Starbucks. They harm people greatly,
and people embrace them with open arms unaware of the influence.
 
--
Rick C. Hodgin
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Apr 08 10:13PM +0100

On 08/04/2018 20:25, Chris M. Thomasson wrote:
>> September.  He
>> also posts using a Mac, whereas I advise everyone to totally shun Apple.
 
> Why totally shun Apple?
 
Rick probably shuns Apple because the CEO is gay, like me.
 
/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" <rickchodgin@gmail.com>: Apr 09 01:15AM +0800

The Muslim is on the right path. He has rejected truth and is on
the path to Hell. It is the right path for one who rejects
truth, rejects Jesus Christ.
 
The Buddhist is on the right path. He has rejected truth and is on
the path to Hell. It is the right path for one who rejects
truth, rejects Jesus Christ.
 
The Hindu is on the right path. He has rejected truth and is on
the path to Hell. It is the right path for one who rejects
truth, rejects Jesus Christ.
 
The atheist is on the right path. He has rejected truth and is on
the path to Hell. It is the right path for one who rejects
truth, rejects Jesus Christ.
 
The agnostic is on the right path. He has rejected truth and is on
the path to Hell. It is the right path for one who rejects
truth, rejects Jesus Christ.
 
YOU TOO are on the right path if you have rejected truth, because
you are also on the the path to Hell. It is the right path
for one who rejects truth, rejects Jesus Christ.
 
-----
But for the one who receives Jesus Christ...
For the one who asks for and accepts forgiveness for their sin by
what Jesus Christ did for them at the cross, that blessed cross
where He took on our shame, where His blood poured out in our
place, where He transferred our sin onto Himself, and where He
then left this Earth to go and pay the true price of that sin
before God Almighty to the point where He was crushed ... yea,
that soul is on the right path because they embraced truth, they
grabbed hold of it with both hands and would not let go.
 
-----
Based on where you are, you ARE on the right path today. The only
question is ... is the path you're on the right one to be on?
 
IT IS the right one for where you are, but is it the right one for
where you want to be? Ask yourself that question, and ponder it
when you are alone, in silence, with only you and your thoughts.
Ask yourself if you are on the path you want to be on given the
eternal future ahead of you?
 
-----
The time is now, today, right now. Ask Jesus to forgive your sin
and leave your path of death behind, and walk the path of life
leading to be with God in the paradise of Heaven forever. It's
His domain, and it is splendid beyond imagination. It's what He
has in store for all who return to Him from their sin and sin-
loving ways. In fact, it's what He had in mind for all souls
before sin entered in and destroyed everything.
 
Jesus loves you. It's why He came here to this Earth ... to
save you. He came to make a way Home for you. He came because
He wants you to be with Him where He is in the paradise of Heaven,
seeing all things He has in store for you, in all their full glory.
 
Thank you,
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Apr 08 11:51AM -0700

I, the real Rick C. Hodgin, did not write this post.
 
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, and using the full email address with periods
"rick.c.hodgin@gmail.com" only.
 
--
Rick C. Hodgin
"Rick C. Hodgin" <rickchodgin@gmail.com>: Apr 09 01:15AM +0800

Christian:
 
You know judgment for sin looms over every human soul, yet you remain
silent? You do not actively warn the people of their ABSOLUTE NEED to
come to Jesus and ask forgiveness for sin?
 
How much do you hate people to leave them ignorantly on the road to Hell?
 
You should be ashamed of yourself!
 
--
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Apr 08 11:51AM -0700

I, the real Rick C. Hodgin, did not write this post.
 
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, and using the full email address with periods
"rick.c.hodgin@gmail.com" only.
 
--
Rick C. Hodgin
"Rick C. Hodgin" <rickchodgin@gmail.com>: Apr 09 01:15AM +0800

Jesus is love --
https://www.biblegateway.com/passage/?search=1%20John+4%3A10
 
Jesus came to the Earth to set us free from judgment.
Because of this, He is the way, truth, and the life --
https://www.biblegateway.com/passage/?search=John+14:6
 
-----
Love saves a sinful man from judgment before God.
Love takes a wretched man and transforms him into a servant of God.
Love take a sinful past and brings it forth as a witness unto others
of the saving grace in Christ, and that the transformation is real.
 
-----
 
https://www.biblegateway.com/passage/?search=1+Corinthians+13%3A4-8&version=NIV
 
 
Love is patient.
Love is kind.
Love does not envy.
Love does not boast.
Love is not [excessively] proud.
Love does not dishonor others.
Love is not self-seeking.
Love is not easily angered.
Love keeps no record of wrongs.
Love does not delight in evil.
Love rejoices in truth.
Love always protects.
Love always trusts.
Love always hopes.
Love always perseveres.
 
Love never fails.
 
-----
Love can do all things ... and did all things for us at the cross.
Love has a name.
Love's name is Jesus Christ.
 
Thank you,
Rick C. Hodgin
 
PS - Consider these words I write to you. Ponder them in your heart.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Apr 08 11:51AM -0700

I, the real Rick C. Hodgin, did not write this post.
 
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, and using the full email address with periods
"rick.c.hodgin@gmail.com" only.
 
--
Rick C. Hodgin
Tim Rentsch <txr@alumni.caltech.edu>: Apr 07 04:59PM -0700

> containing a 187-line lambda in the middle. The author was not happy
> at all when I told him this is no good. He said he cannot think up
> names for smaller functions
 
To help with that, find a small group of lines that looks like it
can be separated out, and ask him to tell you what those lines
are doing. Whatever he says to explain what's being done, BOOM!,
there's his function name.
 
> and anyway he finds it easier to follow
> the program logic if it is all nicely linear in a single function.
 
In most cases this means the code is crossing too many levels of
detail. Trying to cover many levels of detail is a large part of
why big functions are hard to understand. Writing a function so
that it crosses only one or two levels of detail is definitely an
acquired skill. You might try working through some examples with
him kind of side-by-side, so he can start to go up that skill
curve. Maybe suggest a pair programming experiment, with you in
the driver's seat and him in the second chair (at least to start).
 
> I am not hoping he will be making 10-line functions, our modest
> goal is 50 lines at the moment.
 
I suggest a different idea: set a goal of making a long function
shorter, which can be done by carving out a small piece and
putting that in a separate function. It's easier to carve out
little pieces than big ones, and also easier to see that a modest
revision won't change the function's behavior. After four or five
small-scale changes, the higher level structure will come into
sharper focus, which then makes it more feasible to contemplate
major changes. It rarely is the case that a 200-line function
breaks down nicely into four or five functions of roughly equal
size; more often it is one or two largish functions and a gaggle
of littler ones. And if he starts by carving off small pieces
then he will get more practice dealing with functions in the range
of 20 lines and under, which is where you want to be going anyway
in the long term.
Tim Rentsch <txr@alumni.caltech.edu>: Apr 07 06:10PM -0700

> function. I have a 114 line function here:
> https://github.com/Ebenezer-group/onwards/blob/master/tiers/cmwA.cc
 
> . It used to be longer so figure I'm making progress.
 
This file provides a good illustration of variation in function
sizes. There is a single long function, but the other functions
are all relatively short, giving an average length of just under
20 lines, a median length of 10 lines, and 90th percentile is 20
lines.[*] The long function is probably better if revised into
smaller pieces, but doing that would have not much effect on
the aggregate numbers.
 
[*] Line metrics differ slightly from the original source to
give a consistent basis for comparison.
Tim Rentsch <txr@alumni.caltech.edu>: Apr 07 06:58PM -0700

> line lambda? Leaving aside for a moment that any size goals for a
> lambda probably ought to be considerably shorter that the usually "50
> line" limit.
 
To my way of thinking lambdas count as part of the function that
contains them, although it might be reasonable to count them also
as separate functions. (So in that case the situation could be
described as a problematically long 239 line routine, /and/ a
problematically long 187 line lambda. :) I think lambdas should
count as part of their enclosing functions both because (a) their
being there makes it harder to view the whole function all at once,
and because (b) lambdas, if they are named at all (eg, as part of
an initializing declaration), typically do not have names as
descriptive as a regular function definition. Also I think there
is another key difference between lambdas and nested functions.
Historically nested functions have usually been defined only at the
start of a containing block or function body, not somewhere in the
middle, after some executable statements. Lambdas might pop up
anywhere, like what happened in this case.
 
What I find really surprising is that this case was ever written as
a lambda to begin with. It seems straightforward to take a long
lambda and turn it into a separate function, plus perhaps a small
local lambda if that is needed for captures. The only problem I
can think of (disclaimer: not a C++ lambda expert) is if there are
lots of implicit captures. But if the lambda is large it's almost
certainly better to have the captures be explicit rather than
implicit anyway.
woodbrian77@gmail.com: Apr 07 08:47PM -0700

On Saturday, April 7, 2018 at 8:10:30 PM UTC-5, Tim Rentsch wrote:
> the aggregate numbers.
 
> [*] Line metrics differ slightly from the original source to
> give a consistent basis for comparison.
 
If I understand your comment, you mean the number I gave didn't
match what you found. I gave the wrong number when I said 114
lines. It should have been 99. Either way though it's too long.
 
 
Brian
Ebenezer Enterprises
http://webEbenezer.net
Tim Rentsch <txr@alumni.caltech.edu>: Apr 08 10:31AM -0700

>> give a consistent basis for comparison.
 
> If I understand your comment, you mean the number I gave didn't
> match what you found.
 
I did not mean that. What I did mean is the numbers I got might not
match what other people would count if they looked at the original
source file. That happens because I routinely convert source to a
consistent style before running statistics on it, so the results
don't depend on, eg, bracing style (there is usually about 10%
difference between BSD-style bracing and K&R-style bracing, which
I think are the two most common styles of brace placement).
 
> I gave the wrong number when I said 114
> lines. It should have been 99. Either way though it's too long.
 
I agree that either number is larger than I would like to see.
On the other hand the code overall has good statistics, which
makes it easier to excuse the one overly long function.
Tim Rentsch <txr@alumni.caltech.edu>: Apr 08 09:37AM -0700


> Anecdotally, this is my experience as well. My first OOP language was
> C++ and it wasn't until I started practicing TDD that I felt the
> benefit of SOLID design principles.
 
Interesting comment. I don't think of SOLID as being the same as
having an OOP viewpoint, but it's still interesting that you got
to SOLID only after using TDD.
 
 
> It's common to refer to template genericity as static polymorphism in
> C++ and the typical virtual method style polymorphism as dynamic or
> run-time polymorphism.
 
The C++ community has a history of using non-standard terminology
or using established terminology in different ways, eg, derived
class and base class (I've heard this happened because Bjarne
found the subclass/superclass terminology confusing, but of couse
I don't know if that's true), functor, signature. A more recent
example is "concepts", which sounds like useful functionality, but
"concept" is an awful name for it. Another recent example is the
proposal for what are being called "metaclasses", which is related
to the notion of what other OOP languages call metaclasses, but
just different enough so it clearly isn't the same; it would be
nice if they could have found a more descriptive term rather than
confusing the issue with a similar-but-not-really-the-same usage
of "metaclass". So I guess we may add "static polymorphism" and
"dynamic polymorphism" to this list. (Doing a web search I see
these terms are also used in relation to Java. I know there's
a lot of overlap between the writings on the two languages, so
it's hard to say where the terms originated. But certainly they
are used in both.)
Tim Rentsch <txr@alumni.caltech.edu>: Apr 08 10:16AM -0700


> The Wikipedia article about polymorphism supports your view of
> the terminology, but seems to be at odds with most every article
> about it for programmers.
 
Some articles, but almost certainly not most articles. Doing a
google search for "static polymorphism" gives 16,000 hits; for
"dynamic polymorphism" gives 15,400 hits; and for "polymorphism"
(with "programming" as an additional term to filter out some chaff)
gives 12,500,000 hits. That's way under 1%.
 
> polymorphism" is almost exclusively used in academia. I believe
> that academia is by nature very conservative, often failing to
> adjust.
 
I propose a different explanation. People who have gone through a
process of higher education, especially in the sciences, generally
acquire a sense that it is important to be precise in their use of
language. People who have not gone through such a process are more
likely to be careless or sloppy in their use of language. A result
is that words and terms are used (by people in the second group) in
ways that get fuzzier over time, shown for example by the recent
discussion of the meaning of "idiomatic". People in the first
group resist such changes in meaning not because they are different
but because they are fuzzier and hence less meaningful. This
brings to mind a quote from Dijkstra:
 
Besides a mathematical inclination, an exceptionally good
mastery of one's native tongue is the most vital asset of a
competent programmer.
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Apr 07 09:32PM -0700

On 4/5/2018 12:50 PM, Chris M. Thomasson wrote:
> any concurrent writer threads. I can think of many situations where this
> is a desirable feature...
 
> Can anybody else think of one?
 
Think of frequent read-based database queries that you do not want to be
blocked up by other concurrent tasks that happen to have some writes...
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: