Thursday, August 2, 2018

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

Sky89 <Sky89@sky68.com>: Aug 02 10:39PM -0400

Hello all...
 
Read this:
 
 
About my softwares..
 
As you have noticed i am a white arab who is a more serious computer
programmer, you have seen me doing political philosophy here, and as
you have noticed i have invented many scalable algorithms and
there implementations, and i will sell some of them to Google or to
Microsoft or to Embarcadero.. now you have seen me porting my
Parallel archiver to Linux, here it is:
 
https://sites.google.com/site/scalable68/parallel-archiver
 
Now it is working on both Windows and Linux and it works with file
streams and memory streams and all that is descendant from the class
TStream, i have implemented it in Delphi and FreePascal, it is
also compatible with the new Delphi Tokyo, and the Linux version
works with FreePascal, and i will port it to Delphi for Linux soon, my
Parallel archiver is a powerful library, because:
 
- It's NUMA-aware and NUMA efficient on windows (it parallelizes the
reads and writes on NUMA nodes)
 
- It minimizes efficiently the contention so that it scales well.
 
- Now it uses only two threads that do the IO (and they are not
contending) so that it reduces at best the contention, so that it scales
well.
 
- And now it supports processor groups on windows, so that it can use
more than 64 logical processors and it scales well.
 
 
You can read more about it here on my website:
 
https://sites.google.com/site/scalable68/parallel-archiver
 
 
So as you have noticed it is really powerful, and soon i will implement
with it my commandline program for Windows and Linux called PArc(for
parallel archiver) that will be more powerful than other tools such as
pigz or xz for compression etc. and it will permit you to compress and
decompress the tar archive for Linux or the 7z archiver for Windows
created from the commandline, and i will also implement soon a kind of
graphical tool for Windows and Linux that will permit to view or to
extract or to delete from the archive of my Parallel archiver.
 
I am thinking also to make better my Parallel archiver and to make
better my Parallel compression library and to sell them perhaps to
Embarcadero, because they are compatible with both Delphi and C++Builder
, and as you have noticed i have invented many scalable algorithms and
there implementations, and i will sell some of them to Google or to
Microsoft or to Embarcadero companies.
 
 
You can find some of my software projects for Delphi and FreePascal and
C++ here:
 
https://sites.google.com/site/scalable68/
 
 
So stay tunned !
 
 
 
Thank you,
Amine Moulay Ramdane.
James Kuyper <jameskuyper@alumni.caltech.edu>: Aug 01 07:44PM -0400

On 08/01/2018 11:00 AM, Stefan Ram wrote:
 
> IIRC that thing which is /not/ possible is to write a
> function whose type correctly reflects that the function
> returns a pointer to itself.
 
He's made it clear that what he was actually asking about was whether
the declaration of a function parameter can refer to the value of
previously declared parameters. It has nothing to do with the issue
you're referring to.
The answer to his actual question is "No" in C++, though it is permitted
in C.
 
Note: your description of the other problem is a bit more specific than
it should be. The return value of the function doesn't have to be a
pointer to itself; it could be a pointer to any other function of the
same type, and the problem would still come up.
When using function prototypes, the problem also comes up if any
argument of the function is a pointer to a function of the same type.
Lynn McGuire <lynnmcguire5@gmail.com>: Aug 02 05:18PM -0500

On 7/31/2018 9:41 PM, Lynn McGuire wrote:
 
> BTW, this is a Fortran 77 called function so everything is a pointer.
 
> Thanks,
> Lynn
 
I ended up just building the function as follows:
 
extern "C" void __pragma ("my_prag") spreadsheet
( int & nin, int & nout, int & nocomp, int & neqp, int & ndsp,
double sivpfr [], double sitemp [], double sienth [], double
sientr [],
double simole [], double sicomp [], double sikv [],
double sovpfr [], double sotemp [], double soenth [], double
soentr [],
double somole [], double socomp [], double sokv [],
type64 eqpar [], type64 despar [])
 
Thanks,
Lynn
Vir Campestris <vir.campestris@invalid.invalid>: Aug 02 09:50PM +0100

On 23/07/2018 23:17, Lynn McGuire wrote:
>> or aggregation are almost always a better solution.
 
> Yes, we use multiple inheritance to combine a modeless MFC dialog with
> our own private dialog class.  Worked well.
 
He said almost never. That's my experience. (I've used it once to model
a real world where there were base types a, b, c and derived ones that
were ab bc abc. That's the only time.)
 
Andy
Vir Campestris <vir.campestris@invalid.invalid>: Aug 02 09:45PM +0100


> The problem is that namespaces usually extend over 1 or more files so if you
> indent everything in a namespace you often indent almost every line in a file
> which IMO is rather pointless and leads to reduced readability.
 
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.
 
Andy
boltar@cylonHQ.com: Aug 02 08:46AM

On Wed, 1 Aug 2018 09:20:12 -0700 (PDT)
>> Use "this" or just a simple name. Why do some people just love to make things
 
>> more complicated than they need to be?
 
>The simple ints can be used as identity
 
So use a simple int then instead of a load of hex digits that IMO are simply
there to make the programmer look impressive but make the code look a mess.
There's nothing clever about using hexadecimal if the individual bits have
no meaning and base16 maths isn't required unless you always want make sure
you fill up every byte of the id variable (why?).
 
>but random strings are often
>more expensive to generate and store than uuids. Communicating about
 
So don't use random strings, use actual names which will be far more helpful
to maintenance coders int the future. Given your uuids were hard coded
anyway there's no reason you couldn't use a hard coded name string other than
it doesn't look as flash.
boltar@cylonHQ.com: Aug 02 08:48AM

On Wed, 1 Aug 2018 19:22:20 +0100
>> memory by faster containers where one typically wants to keep their
>> game entities and then the pointers will become wrong.
 
>+1. Also, my ECS won't just be used for games.
 
So what? If the hex values are hard coded it could simply be a human readable
hard coded string instead. Using hex digits in this way when its not
required is just showing off and I see it a lot in code and it just pisses
me off. If you want to show off go into show business, code is there to do
a job and should be as clear as possible.
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Aug 02 07:55PM +0100

> There's nothing clever about using hexadecimal if the individual bits have
> no meaning and base16 maths isn't required unless you always want make sure
> you fill up every byte of the id variable (why?).
 
If you care to educate yourself as to the nature of UUIDs by reading
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"
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
UUID generator .. I certainly didn't "make them up".
 
> to maintenance coders int the future. Given your uuids were hard coded
> 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
and such unique strings will be more expensive to compare against than
comparing two UUIDs. The UUIDs are indeed hard coded: a copy of the
result of using a UUID generator.
 
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.
 
/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."
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Aug 02 07:56PM +0100

> required is just showing off and I see it a lot in code and it just pisses
> me off. If you want to show off go into show business, code is there to do
> a job and should be as clear as possible.
 
You think I am using hex digits to "show off" because you are fucking
clueless as far as UUIDs are concerned. Educate yourself.
 
/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."
Paavo Helde <myfirstname@osa.pri.ee>: Aug 02 12:02AM +0300

On 1.08.2018 20:17, Andrey Karpov wrote:
> Development of large complex projects is impossible without the use of programming techniques and tools helping to monitor the quality of the code. First, it requires a literate coding standard, code reviews, unit tests, static and dynamic code analyzers. All this helps to detect defects in code at the earliest stages of development. This article demonstrates the abilities of a PVS-Studio static analyzer in detecting bugs and security weaknesses in code of the Android operating system. We hope that the article will attract readers' attention to the methodology of static code analysis, and they will be willing to embed it in the process of developing their own projects.
 
> Article: https://www.viva64.com/en/b/0579/
 
In the article I see you admit there are a lot of false positives, and
yet you claim there is nothing wrong with that and the software is OK.
In practice, the false positives are a huge deterrent for a user, if 99%
of diagnostics are false positives then the tool basically becomes
unusable (been there, done that, spending a full day analyzing
avalanches of diagnostics from a multithread-safety checker tool, only
to eventually figure out they were 100% false positives because the tool
didn't recognize boost::mutex as a mutex).
 
Quoting the article:
 
#if GENERIC_TARGET
const char alternative_config_path[] = "/data/nfc/";
#else
const char alternative_config_path[] = "";

No comments: