Monday, April 2, 2018

Digest for comp.lang.c++@googlegroups.com - 19 updates in 5 topics

"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Apr 02 02:02PM -0700

On Saturday, March 31, 2018 at 2:51:08 PM UTC-4, Andrey Karpov wrote:
> A new version of the PVS-Studio analyzer 6.23 is working under macOS, which allows you to check the projects written in C and C++. Our team decided to perform a XNU Kernel check to coincide it with this event. https://www.viva64.com/en/b/0566/
 
I downloaded your tool and tried it in Visual Studio 2015. Installed
easily. Was intuitive. Easy to use.
 
I think it's an excellent tool and I would like to use it for my code,
but it is too expensive and license-restrictive for us small guys.
 
The code I write is all open source code. I don't make any money off
it. I would be tapping into my regular funds in my day job to pay for
this fee, and I could not justify $60/month or even $30/month for this,
especially if I had to pay a year at a time and never actually owned
the software, but only "rented" it so long as I kept paying.
 
--
Rick C. Hodgin
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Apr 02 10:50PM +0100

On 02/04/2018 22:02, Rick C. Hodgin wrote:
> this fee, and I could not justify $60/month or even $30/month for this,
> especially if I had to pay a year at a time and never actually owned
> the software, but only "rented" it so long as I kept paying.
 
The idea that software shouldn't cost anything is delusional.
Investment in effort requires some form of compensation or the effort is
wasted.
 
Nobody cares that your god bothering crazy toy software is free or that
you think it isn't free but requires some kind of demented theistic buy-in.
 
/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 02 04:13PM -0700

On Monday, April 2, 2018 at 5:50:33 PM UTC-4, Mr Flibble wrote:
 
> The idea that software shouldn't cost anything is delusional.
> Investment in effort requires some form of compensation or the effort is
> wasted.
 
I believe people should be paid for their labor. I think $240 for the
first year, and $120 for ongoing years is sufficient for PVS-Studio.
 
> Nobody cares that your god bothering crazy toy software is free or that
> you think it isn't free but requires some kind of demented theistic buy-in.
 
I want the best for you, Leigh. God wants the best for you. It's why
He reaches out to you and teaches you the way He does.
 
Christians look to the guidance of Jesus on how to do things. We seek
the necessities of life, and consider ourselves stewards of the things
God has blessed us with. And beyond our necessities, we seek to labor
not for meat that perishes, or Earthly treasure where moths destroy and
thieve steal, but rather to labor for treasure in Heaven where the re-
wards given us by God there are not consumed, even upon use.
 
The enemy (Satan) tries to get us to focus on money so that we receive
our reward here where it has no eternal value or longevity.
 
--
Rick C. Hodgin
Christiano <christiano@engineer.com>: Apr 02 04:46PM -0300

I was reading this page:
http://cpp-tip-of-the-day.blogspot.com.br/2013/11/how-is-stddeque-implemented.html
 
The problem is:
Ok, there is chunks of data which will be allocated according with the
necessity, for right or left.
However, How can the mapping of the chunks be implemented?
 
If the mapping is implemented as a vector of pointer to allocated data
(with fixed size), so there will be shifts when a new chunk is
push_front-created, for example.
 
Example:
 
[0x100, 0x200, 0x300] is the mapping (three chunks)
 
now a new chunk (pointer to 0x400 for example) is allocated and added to
beginning of chunks.
 
[0x400, 0x100, 0x200, 0x300]
 
You can notice that the three address were shifted when this behavior (I
think) is not the desired.
 
So, how could the mapping to chunks be implemented?
asetofsymbols@gmail.com: Apr 01 11:44PM -0700

why a little subset of C++ (sure without the massive use of exception handle, and using only the easier to understand and write, part of the language) is the best language?
Because allow freedom
Because allow strict type check
and the hack that type sys too
so one can to store in a matrix type one array and viceversa
Because one can debug and arrive to assembly instruction of CPU and memory of address N
 
It ha to need only a little bells advise the programmer possible error.
And has to be easy not complex (I think not understand at full the code of other but understand my subset of C++)
Thank You for C++ C and Assembly language.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Apr 02 02:16AM -0700

Could not agree more.
 
--
Rick C. Hodgin
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Apr 02 12:39PM +0100

On 02/04/2018 10:16, Rick C. Hodgin wrote:
> Could not agree more.
 
Could not agree less.
 
/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."
bitrex <bitrex@de.lete.earthlink.net>: Apr 02 09:20AM -0400

On 04/02/2018 07:39 AM, Mr Flibble wrote:
>> Could not agree more.
 
> Could not agree less.
 
> /Flibble
 
"C++" where it's just like a bunch of straight C code organized into
methods inside classes dispatched by the God Object is fuckin' trash
Paavo Helde <myfirstname@osa.pri.ee>: Apr 02 07:28PM +0300

> why a little subset of C++ (sure without the massive use of exception handle, and using only the easier to understand and write, part of the language) is the best language?
 
In my little subset of C++ there are RAII, exceptions and templates.
There are no C-style arrays, no C-style raw pointers and no C-style
strings. This makes it both easier to learn and safer to use.
 
There is no point to have just C with a bit stricter type check if one
can have a much powerful language without losing anything C can do.
Melzzzzz <Melzzzzz@zzzzz.com>: Apr 02 04:43PM


> In my little subset of C++ there are RAII, exceptions and templates.
> There are no C-style arrays, no C-style raw pointers and no C-style
> strings. This makes it both easier to learn and safer to use.
 
You are leaving in heaven then...
 
--
press any key to continue or any other to quit...
Paavo Helde <myfirstname@osa.pri.ee>: Apr 02 08:02PM +0300

On 2.04.2018 19:43, Melzzzzz wrote:
>> There are no C-style arrays, no C-style raw pointers and no C-style
>> strings. This makes it both easier to learn and safer to use.
 
> You are leaving in heaven then...
 
To be honest, this is an ideal I would like to achieve. In real life I
still need to resort to raw pointers when the profiler tells me so. And
of course C++ still provides many other possibilities to shoot my legs off.
woodbrian77@gmail.com: Apr 02 11:12AM -0700

On Monday, April 2, 2018 at 8:20:42 AM UTC-5, bitrex wrote:
 
> > Could not agree less.
 
> > /Flibble
 
> "C++" where it's just like a bunch of straight C code organized into
 
Boo for foul language.
woodbrian77@gmail.com: Apr 02 11:21AM -0700

On Monday, April 2, 2018 at 11:29:04 AM UTC-5, Paavo Helde wrote:
> > why a little subset of C++ (sure without the massive use of exception handle, and using only the easier to understand and write, part of the language) is the best language?
 
> In my little subset of C++ there are RAII, exceptions and templates.
> There are no C-style arrays, no C-style raw pointers
 
https://stackoverflow.com/questions/38780596/how-to-handle-constructors-that-must-acquire-multiple-resources-in-an-exception
 
I use what he describes there and have some code like this:
explicit BufferCompressed (int sz):BufferCompressed(sz,0){
compress=new ::qlz_state_compress();
compBuf=new char[compSize];
decomp=new ::qlz_state_decompress();
}
 
 
 
> and no C-style
> strings.
 
I use std::string, but don't abandon C-style strings completely.
 
 
Brian
Ebenezer Enterprises - In G-d we trust.
http://webEbenezer.net
scott@slp53.sl.home (Scott Lurndal): Apr 02 06:33PM


>> > /Flibble
 
>> "C++" where it's just like a bunch of straight C code organized into
 
>Boo for foul language.
 
Boo to the asshole language cop.
Jorgen Grahn <grahn+nntp@snipabacken.se>: Apr 02 06:59PM

On Mon, 2018-04-02, Paavo Helde wrote:
 
> In my little subset of C++ there are RAII, exceptions and templates.
> There are no C-style arrays, no C-style raw pointers and no C-style
> strings. This makes it both easier to learn and safer to use.
 
Right. But there are also plenty of pure C++ features there's no need
to use in a typical program. It's worth pointing out, since the
anti-C++ people like to think (or pretend) you need to understand and
use all of the language all the time.
 
> There is no point to have just C with a bit stricter type check if one
> can have a much powerful language without losing anything C can do.
 
/Jorgen
 
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
woodbrian77@gmail.com: Apr 02 07:54AM -0700

If anyone would like a demonstration of on-line code
generation, I'm happy to make that happen. It usually
takes less than 10 minutes if you have a compiler with
C++ 2017 support. The first step is to clone/download
the software here:
https://github.com/Ebenezer-group/onwards
.
 
I also have an offer to help someone who is willing
to use my software. I'll spend 16 hours a week for
six months on your project if we use my software as
part of the project. There are more details here:
http://webEbenezer.net/about.html
 
 
Brian
Ebenezer Enterprises - Enjoying programming again.
http://webEbenezer.net
Tim Rentsch <txr@alumni.caltech.edu>: Apr 02 09:02AM -0700

> C++ 2017 support. The first step is to clone/download
> the software here:
> https://github.com/Ebenezer-group/onwards
 
I downloaded the software, but I don't have the means to
compile it, because (apparently) it depends on g++-7, which
is not present on my most up-to-date system. I did some
searching with apt-cache to see if there was something I
could apt-get, but I didn't find anything. I confess I
spent very little time doing this, under 10 minutes, but
I thought you might appreciate the report.
woodbrian77@gmail.com: Apr 02 10:18AM -0700

On Monday, April 2, 2018 at 11:02:46 AM UTC-5, Tim Rentsch wrote:
 
> I downloaded the software, but I don't have the means to
> compile it, because (apparently) it depends on g++-7, which
> is not present on my most up-to-date system.
 
You can substitute your compiler in the makefile. But it
has to have support for 2017 ++C. It should work with
clang 5 or 6 and newer versions of MSVC.
 
> could apt-get, but I didn't find anything. I confess I
> spent very little time doing this, under 10 minutes, but
> I thought you might appreciate the report.
 
Thank you. The requirement of a 2017 ++C compile is just
for building the software in the repo. The output from the
on-line code generator only requires a 2011 ++C compile.
I hope this helps.
 
 
Brian
Tim Rentsch <txr@alumni.caltech.edu>: Apr 02 08:45AM -0700


>> Does that all make sense?
 
> Thanks for your comments and suggestions. I think all the comments
> agreed that the namespace name should be cbor (singular).
 
Yes, unless there is some context I'm missing, cbor seems like
the most natural name for this namespace, or at least one of the
most natural, in terms of what it conveys to readers.
 
> a little repetition as suggested in Richard's post and include
> "cbor" in the class name. I agree with your comments about value as
> a class name.
 
I don't know how important the repetition is but it strikes me as
a reasonable choice here.
 
> singular), hence cbor (subdirectory), cbors (namespace) and cbor
> (class name). But I'm not enthusiastic about it (partly from
> reflecting on comments on this thread)
 
I don't like the boost naming scheme. I understand it, and I
think I understand some of the motivations behind it, but it
grates on my low-level linguistic mental machinery, and that is
almost always a sign that somewhere a poor choice was made.
 
> and am thinking of changing it to cbor, cbor, and packed_cbor.
 
Depending on what "packed" is supposed to mean, "packed_cbor" is
either pointlessly redundant or self-contradictory. Also, using
"cbor" as the main noun is wrong: CBOR is a scheme for encoding
something, not the resulting encoding. For what I think you want
this class to represent, "cbor" should be used as an adjective,
not a noun. So either "cbor_encoded_item" or "cbor_packed_item"
would be a better choice for the class name. Yes, the name is a
little long, but it is nicely descriptive, and most likely will
be used relatively rarely.
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: