Friday, August 3, 2018

Digest for comp.lang.c++@googlegroups.com - 20 updates in 8 topics

boltar@cylonHQ.com: Aug 03 08:34AM

On Thu, 2 Aug 2018 21:45:31 +0100
 
>IMHO _not_ indenting impairs readability. That indent tells you it's not
>a global scope, it's somewhere else. Just the same as you do with local
>variable inside a function.
 
I suppose at the end of the day its all subjective. Personally I don't see
the point in indenting almost every line in a file but if it works for you
then fair enough.
Vir Campestris <vir.campestris@invalid.invalid>: Aug 03 10:55PM +0100

> I suppose at the end of the day its all subjective. Personally I don't see
> the point in indenting almost every line in a file but if it works for you
> then fair enough.
 
IMHO consistency matters more than the exact standard.
 
I like my curly brackets there... but there are other ways.
 
Andy
Sky89 <Sky89@sky68.com>: Aug 03 09:30PM -0400

Hello...
 
Read this:
 
 
Hope you have read my previous post..
 
About my scalable Parallel ForEach and Parallel For with priorities
that scale very well
 
But i am more smart than that, and i say that Parallel ForEach
and Parallel For are not efficient, because the "indexes" of Parallel
ForEach or Parallel For will not be "visible" to the local functions
that are called by Parallel ForEach or Parallel For, so the "solution"
is that i will enhance my Threadpool with priorities that scales very
well to support calling procedures of Delphi or FreePascal, because my
current Threadpool with priorities that scales very well do support
calling "method' of objects, and since Delphi and FreePascal in the
Delphi mode are powerful since they support local procedures or
functions to global procedures or functions, so supporting calling
"procedures" is "sufficient" to write easily a Parallel ForEach or
Parallel For with priorities that scale very well.
 
Here is my current hreadpool with priorities that scales very well, read
about it and download it from here:
 
https://sites.google.com/site/scalable68/an-efficient-threadpool-engine-with-priorities-that-scales-very-well
 
 
 
Thank you,
Amine Moulay Ramdane.
Andrey Karpov <karpov2007@gmail.com>: Aug 03 01:41AM -0700

> few others. Pure command-line "make" is also vital, and the compilation
> could be running on Windows desktops, Linux desktops, or (in the future)
> Linux-based build servers.

Yes, starting from the version 6.22, the PVS-Stidio analyzer supports a number of compilers for embedded systems. For example, here is the article about a check of the embedded operating system RT-Thread: https://www.viva64.com/en/b/0561/ by PVS-Studio.
 
Try to check your embedded projects. In any case, if something goes wrong, contact us and we will help you.
 
Now a few words about environments and running modes. The analyzer can be used very differently. That's why I suggest to get acquainted with the documentation: https://www.viva64.com/en/m/ . I hope you will find in it the answers to many questions. For example, perhaps you the format full html report will be of interest for you: https://www.viva64.com/en/b/0539/
 
As for more specific and detailed questions, again you can contact our support: https://www.viva64.com/en/about-feedback/
Andrey Karpov <karpov2007@gmail.com>: Aug 03 01:42AM -0700

Hello Rick,
Great! I'm glad we came to mutual understanding :).
David Brown <david.brown@hesbynett.no>: Aug 03 11:31AM +0200

On 03/08/18 10:41, Andrey Karpov wrote:
> a number of compilers for embedded systems. For example, here is the
> article about a check of the embedded operating system RT-Thread:
> https://www.viva64.com/en/b/0561/ by PVS-Studio.
 
Thank you for that link. I haven't read it yet, but I will certainly do
so. While IAR and Keil are popular compilers, far and away the most
popular embedded compiler is gcc. Of course you will have plenty of
support for normal native gcc, but embedded gcc versions may have extra
challenges. (I have not yet tried your software, so I can't say if this
is an issue or not.)
 
On a related note, does your tool support MISRA rule checking? I hate
MISRA - it is full of pointless and sometimes directly harmful rules -
but occasionally clients insist on it. Open source compilers can't give
MISRA warnings because the MISRA standards must be bought and licensed,
but closed-source compilers such as IAR and Keil handle them. If your
tool supports MISRA (and perhaps other common coding standards, such as
JSF), it might be an additional selling point.
 
 
 
> https://www.viva64.com/en/b/0539/
 
> As for more specific and detailed questions, again you can contact
> our support: https://www.viva64.com/en/about-feedback/
 
Thank you for your suggestions and information.
"Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Aug 03 01:51PM -0700

On 8/1/2018 10:24 AM, Rick C. Hodgin wrote:
> product.  However, since that time I've downloaded the trial version
> and tried it out on my own software and was pleased beyond words with
> how effective it is.
 
Still have not tried it, but will now. Thanks Rick.
 
Sky89 <Sky89@sky68.com>: Aug 03 08:41PM -0400

Hello....
 
Read this:
 
 
About my Threadpool with priorities that scales very well..
 
I think i will enhanced my following Threadpool with priorities that
scales very well, here it is:
 
https://sites.google.com/site/scalable68/an-efficient-threadpool-engine-with-priorities-that-scales-very-well
 
 
It is a very powerful Threadpool, because:
 
More precision about my efficient Threadpool that scales very well, my
Threadpool is much more scalable than the one of Microsoft, in the
workers side i am using scalable counting networks to distribute on the
many queues or stacks, so it is scalable on the workers side, on the
consumers side i am also using lock striping to be able to scale very
well, so it is scalable on those parts, on the other part that is work
stealing, i am using scalable counting networks, so globally it scales
very well, and since work stealing is "rare" so i think that my
efficient Threadpool that scales very well is really powerful, and it is
much more optimized and the scalable counting networks eliminate false
sharing, and it works with Windows and Linux.
 
So i will enhance my Threadpool to support Parallel ForEach with
"priorities", and you will notice soon that i will implement it smartly
and it will be as it is "scalable" because by the configuration of my
Threadpool work stealing is rare.
 
And i will also add support for "Futures",
 
 
So stay tunned !
 
Thank you,
Amine Moulay Ramdane.
boltar@cylonHQ.com: Aug 03 08:32AM

On Thu, 2 Aug 2018 19:55:58 +0100
>https://en.wikipedia.org/wiki/Universally_unique_identifier you will see
>that groups of hexadecimal numbers are THE canonical way of representing a
>UUID. I am certainly not using hexadecimal numbers to "look impressive"
 
And you need something as long as a uuid for some simple game - why? Just
how many game objects does it have? 2^64?
 
>or make the code "look a mess"; I am simply using the correct common form
>for a UUID. All 128-bits need to be used and it needs to be relatively
>random to help avoid collisions. This UUID has been generated using a
 
So you're not capable of thinking up numbers that don't collide yourself?
 
>> anyway there's no reason you couldn't use a hard coded name string other than
 
>> it doesn't look as flash.
 
>Actual names require the use of a unique namespace to unsure uniqueness
 
No, really? And thats hard to do it is without a generator?
 
>and such unique strings will be more expensive to compare against than
>comparing two UUIDs.
 
Howso? Its a stream of bytes. Last time I looked memcmp doesn't care whether
its ascii or not.
 
>Your reply to my post is typical of someone replying who is totally
>fucking ignorant and doesn't have a fucking clue as to what they are
>talking about.
 
I not exactly what I'm talking about , but you're clearly just another dumb
sheep who follows the herd instead of thinking for himself.
 
>You think I am using hex digits to "show off" because you are fucking
>clueless as far as UUIDs are concerned. Educate yourself.
 
Of course you are. Hex always makes code look more complex and the coder gets
the reflected glory. There is zero reason to use hard coded uuids to be used
within the same small system. Uuids are meant to be auto generated to uniquely
distinguish disparate objects or hardware when there may be thousands or
millions of them. I very doubt you have that number of classes or master
objects in your game. If you were using an auto generated on the fly uuid for
each object that would make sense, but a hard coded uuid for each class is just
grade A asshattery. Now I suggest YOU go get a clue you fucking tool.
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Aug 03 05:44PM +0100

>> UUID. I am certainly not using hexadecimal numbers to "look impressive"
 
> And you need something as long as a uuid for some simple game - why? Just
> how many game objects does it have? 2^64?
 
I am not making "some simple game"; I am making an app/game library and
framework. The UUIDs are not for identifying object instances; they are
used for uniquely identifying object archetypes, components and systems.
As I am making a library it has to support all possible applications with
the least constraints.
 
>> for a UUID. All 128-bits need to be used and it needs to be relatively
>> random to help avoid collisions. This UUID has been generated using a
 
> So you're not capable of thinking up numbers that don't collide yourself?
 
What a fucktarded thing to say. Obviously I would use a UUID generator to
randomly generate the UUID bytes. The whole point of UUIDs is that they
don't collide.
 
>> comparing two UUIDs.
 
> Howso? Its a stream of bytes. Last time I looked memcmp doesn't care whether
> its ascii or not.
 
"Names" tend to be human readable strings and if we restrict ourselves to
Latin character set with mixed case the bulk of the possible values for a
byte will go unused. "Names" to be unique would require a unique
namespace prefix which would lead to a lot more bytes to compare than for
a UUID.
 
>> talking about.
 
> I not exactly what I'm talking about , but you're clearly just another dumb
> sheep who follows the herd instead of thinking for himself.
 
Project much? https://en.wikipedia.org/wiki/Psychological_projection
 
>> clueless as far as UUIDs are concerned. Educate yourself.
 
> Of course you are. Hex always makes code look more complex and the coder gets
> the reflected glory. There is zero reason to use hard coded uuids to be used
 
As I said in my previous reply hex is the canonical way to define a UUID.
In general hex certainly does NOT make code look more complex and only a
fucktard with no clue would say such a thing.
 
> distinguish disparate objects or hardware when there may be thousands or
> millions of them. I very doubt you have that number of classes or master
> objects in your game. If you were using an auto generated on the fly uuid for
 
As I said previously I am not making a game I am making an app/game
library and framework so I have no idea how many object types etc a user
of my library would want.
 
> each object that would make sense, but a hard coded uuid for each class is just
> grade A asshattery. Now I suggest YOU go get a clue you fucking tool.
 
A hard coded UUID for internal reserved type identification makes perfect
sense as does using UUIDs for user created types that can be serialized to
file; used in scripts etc.
 
So I repeat what I said earlier: get a fucking clue you fucktarded cockwomble.
 
/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."
Josef Moellers <josef.moellers@invalid.invalid>: Aug 03 09:07AM +0200

'morning,
 
I have some problems with a qt application that needs to receive data
from an MQTT broker and display it on a KDE desktop.
Whenever I quit the application, it crashes the desktop.
 
Anyone have a hint as to where this problem might be more appropriate?
 
netscape.public.mozilla.qt is rather quiet ;-)
and I was unable to find anything else.
 
Josef
Jorgen Grahn <grahn+nntp@snipabacken.se>: Aug 03 07:44AM

On Fri, 2018-08-03, Josef Moellers wrote:
> 'morning,
 
> I have some problems with a qt application that needs to receive data
> from an MQTT broker and display it on a KDE desktop.
 
Does "display it on a KDE desktop" mean something special? I.e. if
you open an xterm or a web browser, is that the same thing?
 
> Whenever I quit the application, it crashes the desktop.
 
> Anyone have a hint as to where this problem might be more appropriate?
 
> netscape.public.mozilla.qt is rather quiet ;-)
 
Yeah, things like Qt are probably not discussed on Usenet these days.
I'm not sure where that happens.
 
> and I was unable to find anything else.
 
If "crashes the KDE desktop" means some important KDE process crashes,
then it sounds like something the KDE developers should be feel very
responsible for. I assume there's information about how to contact
them.
 
Although chances are your code is buggy, and does something which
triggers a bug in KDE, in which case getting the KDE people to fix
/their/ part isn't enough still won't make you happy.
 
/Jorgen
 
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
Josef Moellers <josef.moellers@invalid.invalid>: Aug 03 09:59AM +0200

On 03.08.2018 09:44, Jorgen Grahn wrote:
>> from an MQTT broker and display it on a KDE desktop.
 
> Does "display it on a KDE desktop" mean something special? I.e. if
> you open an xterm or a web browser, is that the same thing?
 
No, the application receives some MQTT messages (mainly referring to
temperatures and humidities in various locations) and displays them in
its own window.
 
 
> Although chances are your code is buggy, and does something which
> triggers a bug in KDE, in which case getting the KDE people to fix
> /their/ part isn't enough still won't make you happy.
 
I assume the latter, eg leaving the MQTT subscription active such that
messages keep coming in, confusing KDE or some background process keeps
running.
 
The C++ MQTT interface blocks until a message arrives. For each topic, I
open a pipe and spawn a child process which blocks until a message is
received which will then be put into the pipe. The main application
registers a notify on the pipe fds and updates the values in the window.
 
Josef
Josef Moellers <josef.moellers@invalid.invalid>: Aug 03 11:46AM +0200

F'up to self:
 
On 03.08.2018 09:59, Josef Moellers wrote:
> open a pipe and spawn a child process which blocks until a message is
> received which will then be put into the pipe. The main application
> registers a notify on the pipe fds and updates the values in the window.
 
I did away with the forking as the mosquitto class implements
multi-threading, so a loop_start() at the end of the constructor was all
that is required.
 
Josef
James Kuyper <jameskuyper@alumni.caltech.edu>: Aug 03 07:05AM -0400

On 08/03/2018 03:07 AM, Josef Moellers wrote:
 
> Anyone have a hint as to where this problem might be more appropriate?
 
> netscape.public.mozilla.qt is rather quiet ;-)
> and I was unable to find anything else.
 
 
https://forum.qt.io/
Jorgen Grahn <grahn+nntp@snipabacken.se>: Aug 03 11:13AM

On Fri, 2018-08-03, Josef Moellers wrote:
 
> I assume the latter, eg leaving the MQTT subscription active such that
> messages keep coming in, confusing KDE or some background process keeps
> running.
 
Yeah, but how can you confuse KDE? I don't use KDE: my desktop is an
X11 display, a simple window manager and various programs having
windows open. It's impossible for these programs to break the desktop
environment, or should be.
 
> open a pipe and spawn a child process which blocks until a message is
> received which will then be put into the pipe. The main application
> registers a notify on the pipe fds and updates the values in the window.
 
Sounds like my prejudice against such APIs: designed to be the only
I/O the program does, so in practice everyone has to run them in
threads which tunnel the data into a more realistic event loop.
 
But I suggest we stop here. Everything so far has been offtopic for
comp.lang.c++. The only group I frequent where it's partly ontopic
is comp.unix.programmer, and there mostly for troubleshooting tips.
 
/Jorgen
 
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
Josef Moellers <josef.moellers@invalid.invalid>: Aug 03 01:46PM +0200

On 03.08.2018 13:05, James Kuyper wrote:
 
>> netscape.public.mozilla.qt is rather quiet ;-)
>> and I was unable to find anything else.
 
> https://forum.qt.io/
 
Thanks!
As I have already solved my problem, I'll just keep that in mind, if you
don't mind ;-)
 
Josef
Reinhardt Behm <rbehm@hushmail.com>: Aug 03 09:53PM +0800

AT Friday 03 August 2018 19:46, Josef Moellers wrote:
 
 
> Thanks!
> As I have already solved my problem, I'll just keep that in mind, if you
> don't mind ;-)
 
There is also a mailing list for Qt.
 
--
Reinhardt
Sky89 <Sky89@sky68.com>: Aug 02 11:09PM -0400

Hello,
 
I correct, read again:
 
About my poems:
 
As you have noticed i am a white arab and also a more serious
programmer, and i have just posted some of my poems to the following
newsgroup forum of poetry, you can read them from the following web
link, my newsgroup name is Sky89:
 
 
https://groups.google.com/forum/#!forum/rec.arts.poems
 
 
 
Thank you,
Amine Moulay Ramdane.
Sky89 <Sky89@sky68.com>: Aug 02 11:08PM -0400

Hello,
 
 
About my poems:
 
As you have noticed i am a white arab and also a more serious
programmer, and i have just posted some of my poems to the following
newsgroup forum of poetry, you can read them from the following web
link, my newsgroup name is Sky68:
 
 
https://groups.google.com/forum/#!forum/rec.arts.poems
 
 
 
Thank you,
Amine Moulay Ramdane.
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: