Thursday, May 28, 2020

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

Heitber Andres Montilla Ramirez <montillaramirezh@gmail.com>: May 27 09:41PM -0700

hey friends, i have a problem i´m making a wxWidgets app but when i compile there are five errors that appear:
 
ld.exe____cannot find -lwxmswd_core
ld.exe____cannot find -lwxbased
ld.exe____cannot find -lwxpngd
ld.exe____cannot find -lwxzlibd
 
i tried to add those in the linker settings but don't work.
how i may solve this problem i'm using codeblocks 17.12 and wxwidgets 3.0.4
red floyd <myob@its.invalid>: May 28 10:48AM -0700

On 5/27/2020 9:41 PM, Heitber Andres Montilla Ramirez wrote:
> ld.exe____cannot find -lwxzlibd
 
> i tried to add those in the linker settings but don't work.
> how i may solve this problem i'm using codeblocks 17.12 and wxwidgets 3.0.4
 
What is your question about C++?
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: May 28 06:51PM +0100

On 28/05/2020 18:48, red floyd wrote:
 
>> i tried to add those in the linker settings but don't work.
>> how i may solve this problem i'm using codeblocks 17.12 and wxwidgets 3.0.4
 
> What is your question about C++?
 
Indeed. wxWidgets is MFC and MFC isn't C++; MFC is a "bag of shite".
 
/Flibble
 
--
"Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin
 
"You won't burn in hell. But be nice anyway." – Ricky Gervais
 
"I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais
 
"Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne 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."
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: May 28 09:37PM +0200

On 28.05.2020 06:41, Heitber Andres Montilla Ramirez wrote:
> ld.exe____cannot find -lwxzlibd
 
> i tried to add those in the linker settings but don't work.
> how i may solve this problem i'm using codeblocks 17.12 and wxwidgets 3.0.4
 
Find those libraries.
 
Possibly you may have to build them.
 
Then make sure that the the binaries are in folders that the linker
searches for libraries. One easy way is to place them together with
other library binaries that you know are found. One feels-more-right way
is to check the documentation (or output from `g++ -v --help`) to find
the option and/or environment variable that specifies those folders.
 
- Alf
Paavo Helde <eesnimi@osa.pri.ee>: May 28 11:31PM +0300

28.05.2020 20:51 Mr Flibble kirjutas:
 
> Indeed. wxWidgets is MFC and MFC isn't C++;
 
Curiously, this reminds me something about apples and fruits. But
anyway, you are wrong here; wxWidgets is not MFC, it is only inspired by
MFC. Should we say it's an abstraction of MFC?
 
You are right in that MFC is not C++. It is a C++ library.
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: May 28 11:25PM +0100

On 28/05/2020 21:31, Paavo Helde wrote:
> 28.05.2020 20:51 Mr Flibble kirjutas:
 
>> Indeed. wxWidgets is MFC and MFC isn't C++;
 
> Curiously, this reminds me something about apples and fruits. But anyway, you are wrong here; wxWidgets is not MFC, it is only inspired by MFC. Should we say it's an abstraction of MFC?
 
Anything inspired by a "bag of shite" is a "bag of shite".
 
> You are right in that MFC is not C++. It is a C++ library.
 
I am sure it wouldn't be too hard to find some C++ non-conformance in the MFC "bag of shite" given how crap the M$ C++ compiler is.
 
/Flibble
 
--
"Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin
 
"You won't burn in hell. But be nice anyway." – Ricky Gervais
 
"I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais
 
"Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne 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."
Cholo Lennon <chololennon@hotmail.com>: May 28 08:01PM -0300

On 28/5/20 14:51, Mr Flibble wrote:
>>> 3.0.4
 
>> What is your question about C++?
 
> Indeed. wxWidgets is MFC and MFC isn't C++; MFC is a "bag of shite".
 
Well, maybe MFC is awful for today standards, but remember that the
library dates from Win 3.x epoch. In those ancient times OOP and
specially inheritance were a trendy boom... and of course C++ (and VC++
compiler) was not what it's today. The good thing about MFC was that it
was very easy to migrate applications from Win 3.x to Win 95/98 and
later to Win XP/2000 (at least in my experience).
 
Of course, when other lightweight and modern GUI libraries appeared like
WTL, I left MFC behind... well, due to MS winding ideas about GUI
programming (hello new WinUI, OMG another framework again!) I left
Windows GUI programming, but this is another story.
 
Regards
 
 
--
Cholo Lennon
Bs.As.
ARG
James Kuyper <jameskuyper@alumni.caltech.edu>: May 27 11:37PM -0400

On 5/27/20 5:15 PM, Daniel P wrote:
 
> In type theory, any type is trivially a subtype of itself.
 
> In mathematics, a group may be regarded as an abstraction of the set of integers, and the set of integers _is_ a group.
 
> The considerations here are analogous.
 
When the standard says "Iterators are a generalization of pointers ...",
"... iterators are an abstraction of pointers, ...", and "... pointers
are iterators.", what it means by all three of those statements is that
the relationship between pointer types and iterator type is exactly the
same as the relationship between apples and fruits. All pointer types
are iterator types, but not all iterator types are pointer type, just as
all apples are fruits, but not all fruits are apples. In other words,
pointer types are a proper subset of iterator types.
 
If Mr. Fibble interprets any of those three statements as conveying a
meaning other than "pointer types are a proper subset of iterator
types", it might be because the standard is misusing the terms
"generalization" or "abstraction" (or even the verb "are"), though
personally I think it reflects a misunderstanding on his part of what
those words mean. Regardless of whether those are appropriate words to
convey that meaning, I am quite certain that this is the intended
meaning of all three of those statements. There is nothing more circular
about believing that to be the case, than there is in believing that the
set of apples is a proper subset of the set of fruits. It might be an
incorrect belief, but it's incorrectness has nothing to do with circular
logic.
Manfred <noname@add.invalid>: May 28 02:05PM +0200

On 5/28/2020 5:37 AM, James Kuyper wrote:
> meaning other than "pointer types are a proper subset of iterator
> types", it might be because the standard is misusing the terms
> "generalization" or "abstraction" (or even the verb "are"),
 
There is definitely no room for doubt in a statement like "Iterators are
a generalization of pointers", and the other two sentences do not
contradict that statement either, so there is no misuse of the terms in
the standard.
In fact this is a very basic example of hierarchical type relationship
that we all are (or should be) very much used to.
 
Flibble's problem is that he can't see that when he says "A thing cannot
be an abstraction of itself" the term "itself" assumes that iterators
and pointers are the same thing.
 
Clearly that is not true, but he is trapped inside his loop, and he
can't get out of it by now.
 
[By the way, Daniel is right in his comment about type theory, but I
find this somewhat tangent to the issue at hand]
 
though
Daniel P <danielaparker@gmail.com>: May 28 08:16AM -0700

On Thursday, May 28, 2020 at 8:05:44 AM UTC-4, Manfred wrote:
> be an abstraction of itself" the term "itself" assumes that iterators
> and pointers are the same thing.
 
> Clearly that is not true
 
Flibble appears to ascribe a meaning to the word "abstraction" that I don't
think is there.
 
In mathematics, if a text book states "a group is an abstraction of the set
of integers", the word "abstraction" has no formal meaning, it is merely
suggestive, it conveys to the student something about the motivation for how
we came to have groups. Once that's established, we no longer care, the word
"abstraction" plays no part in our reasoning. We say that the set of integers
is a group, because it satisfies all the axioms of a group, so results
obtained from studying groups also apply to the set of integers.
 
I would suggest that the same applies to the use of the words
"generalization" and "abstraction" in the sentences "Iterators are a
generalization of pointers ..." and "... iterators are an abstraction of
pointers". They serve only to motivate the construction of the iterator
categories. Once we have the iterator categories, we can ask whether a
pointer satisfies the requirements of those categories, and if yes, we can
say it is an iterator.
 
Daniel
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: May 28 05:38PM +0100

On 28/05/2020 16:16, Daniel P wrote:
> categories. Once we have the iterator categories, we can ask whether a
> pointer satisfies the requirements of those categories, and if yes, we can
> say it is an iterator.
 
So you are saying that iterators are an abstraction of iterators. Have a word, mate.
 
/Flibble
 
--
"Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin
 
"You won't burn in hell. But be nice anyway." – Ricky Gervais
 
"I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais
 
"Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne 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."
Daniel P <danielaparker@gmail.com>: May 28 10:07AM -0700

On Thursday, May 28, 2020 at 12:39:02 PM UTC-4, Mr Flibble wrote:
 
> So you are saying that iterators are an abstraction of iterators. Have a word, mate.
 
I would say that a pointer is an iterator if it satisfies the requirements for
being an iterator. It is the same as in logic and mathematics. That is all.
 
Best regards,
Daniel
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: May 28 06:26PM +0100

On 28/05/2020 18:07, Daniel P wrote:
 
>> So you are saying that iterators are an abstraction of iterators. Have a word, mate.
 
> I would say that a pointer is an iterator if it satisfies the requirements for
> being an iterator. It is the same as in logic and mathematics. That is all.
 
So you are saying that iterators are an abstraction of iterators. Have a word, mate.
 
/Flibble
 
--
"Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin
 
"You won't burn in hell. But be nice anyway." – Ricky Gervais
 
"I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais
 
"Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne 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."
Juha Nieminen <nospam@thanks.invalid>: May 28 06:14AM

> I care about your eternal soul.
 
No, you don't. You only care about virtue-signaling and gaining favoritism
points in the eyes of your god, and to become a virtual martyr by being
deliberately provocative, breaking the rules of forums and receiving
negative backlash. The verbal attacks you get surely make you feel
like a virtuous victim.
 
You are nothing but a hypocrite and a liar. Even if your god existed he
wouldn't like what you are doing. He would consider you a hypocrite and
to have false virtue.
Sam <sam@email-scan.com>: May 27 10:21PM -0400

Manfred writes:
 
>> go away, and it doesn't have to exist until the end of the scope.
 
> Right, but then if you want available_hours to be a self standing object,
> why do you declare it with auto& ?
 
If `building` ensures that whatever its `penthouse()` tells me its
available_hours exists as long as the `building` exists, then
get_available_hours() may itself return a reference that I'll stash away
here, without making a copy of it. In other words, the `available_hours` may
be something that's owned by the building, and `penthouse()` is just a means
to access it. Or, alternatively, in the current use case, `penthouse()`
itself has the ownership on the `available_hours`. It doesn't matter. If its
a temporary object this allows the same syntax to work by having the rvalue
overload for get_available_hours() return a prvalue, whose lifetime gets
extended by assigning it to a const reference.
 
By assigning the result to a const reference it makes it possible to make
small adjustments in the design of who owns what (within certain
boundaries), with minimal, if any, code changes.
 
It's something that's not very apparent, how ref qualifiers can work
together with temporaries' lifetime extension to result in quite flexible
code that can survive an otherwise major design change without really having
to change anything.
 
> Also: I notice some possible overuse of auto for my taste here.
 
Not the first time that aversion to the use of auto was vocalized, around
here. To each their own. I find auto to be a useful tool, that saved me a
lot of time.
Juha Nieminen <nospam@thanks.invalid>: May 28 06:10AM

>> > The original question, that was axed
 
>> Indeed, it was axed. Conversation over.
 
> I wasn't conversing with you in the first place.
 
Woosh.
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: