Saturday, November 15, 2014

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

comp.lang.c++@googlegroups.com Google Groups
Unsure why you received this message? You previously subscribed to digests from this group, but we haven't been sending them for a while. We fixed that, but if you don't want to get these messages, send an email to comp.lang.c+++unsubscribe@googlegroups.com.
Robert Hutchings <rm.hutchings@gmail.com>: Nov 15 09:02AM -0600

As I read the C++ 11 and C++ 14 changes, I was wondering if there are
any tools one could use to update older code to incorporate the 2011 and
2014 updates? Or is just a manual "do it yourself" thing?
Vincenzo Mercuri <invalid@world.net>: Nov 15 04:59PM +0100

Il 15/11/2014 16:02, Robert Hutchings ha scritto:
> As I read the C++ 11 and C++ 14 changes, I was wondering if there are
> any tools one could use to update older code to incorporate the 2011 and
> 2014 updates? Or is just a manual "do it yourself" thing?
 
I don't think such a tool exists or will ever exist. However,
in case you are concerned about performance, you could get
significant improvements just by recompiling your "old" code
with a compiler that supports at least C++11.
 
--
Vincenzo Mercuri
Robert Hutchings <rm.hutchings@gmail.com>: Nov 15 10:14AM -0600

On 11/15/2014 9:59 AM, Vincenzo Mercuri wrote:
> in case you are concerned about performance, you could get
> significant improvements just by recompiling your "old" code
> with a compiler that supports at least C++11.
 
I found this:
http://www.klocwork.com/products-services
Marcel Koeppen <usenet@marzelpan.de>: Nov 15 05:32PM +0100

Hi,
 
On 2014-11-15 15:02:29 +0000, Robert Hutchings said:
 
> As I read the C++ 11 and C++ 14 changes, I was wondering if there are
> any tools one could use to update older code to incorporate the 2011
> and 2014 updates? Or is just a manual "do it yourself" thing?
 
Clang C++ Modernizer can run some transformations on old code to make
it use range based for-loops, nullptr, auto, etc.
 
http://clang.llvm.org/extra/clang-modernize.html
 
Marcel
Jorgen Grahn <grahn+nntp@snipabacken.se>: Nov 15 08:39PM

On Sat, 2014-11-15, Robert Hutchings wrote:
> As I read the C++ 11 and C++ 14 changes, I was wondering if there are
> any tools one could use to update older code to incorporate the 2011 and
> 2014 updates? Or is just a manual "do it yourself" thing?
 
What would be the point of automating it? You don't learn anything
from that.
 
On the other hand, I'd welcome practical tips -- like "these are the
areas where your C++98 code is most likely to benefit from a touchup"
or "introduce C++11 features it in this order to make the most of them".
 
/Jorgen
 
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
Robert Hutchings <rm.hutchings@gmail.com>: Nov 15 03:00PM -0600

On 11/15/2014 2:39 PM, Jorgen Grahn wrote:
> areas where your C++98 code is most likely to benefit from a touchup"
> or "introduce C++11 features it in this order to make the most of them".
 
> /Jorgen
 
Good point! Automating it might not be very educational...
JiiPee <no@notvalid.com>: Nov 15 02:07AM

On 14/11/2014 08:00, Luca Risolia wrote:
 
> I get similar results. But on my machine the implementation of your
> super unuseful function that I provided in a previous post is still
> ~4x faster.
 
I just tested that, and I must take my hat off to you.... yes it was
much faster. I did improve my superFast even more (like 0.5 secs), but
yours is still 2.6 times faster. I also tested it converts all integers
correctly. So I guess I start using your version then :). Now I want to
understand also how it is done.... looks complicated though.
 
Funny that on that web site nobody found this kind of solution.
 
Its unbelieveble fast: on my PC it converts all unsigned integers in 22
seconds.
Jorgen Grahn <grahn+nntp@snipabacken.se>: Nov 15 09:26AM

On Fri, 2014-11-14, JiiPee wrote:
 
> Ok, can you make/show a simple program where this would happen? A
> program where using my conversion functions things get slow. I would
> like to test it on my computer.
 
Perhaps you can run a program in the background which wants all of the
cache, and also reports how well it performs.
 
There are also tools for looking at the cache performance, like perf
on Linux. But it's a difficult topic and I don't know it well enough.
 
> (I have attached the full code to test my new version which uses 40000
> look up table in the main message above.)
 
Side note: it's better in cases like this to put it on github or
something, and here just mention which version you're talking about --
since you're going to change the code, and others will too.
 
/Jorgen
 
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
JiiPee <no@notvalid.com>: Nov 15 12:31PM

On 15/11/2014 09:26, Jorgen Grahn wrote:
>> like to test it on my computer.
> Perhaps you can run a program in the background which wants all of the
> cache, and also reports how well it performs.
 
I dont really know how to do this.
 
> something, and here just mention which version you're talking about --
> since you're going to change the code, and others will too.
 
> /Jorgen
 
oh ok. never used it. maybe I need the check that.
 
JiiPee <no@notvalid.com>: Nov 15 12:44PM

On 15/11/2014 09:26, Jorgen Grahn wrote:
> something, and here just mention which version you're talking about --
> since you're going to change the code, and others will too.
 
> /Jorgen
 
That was a good practice for me to improve that intToString function,
although Luca has even faster version so best to use that (dont
understand that code though). But I did speed up the original version
almost two times faster, which am happy. Also learned couple of things
like for-loop makes things slower and so using switch better there.
Jorgen Grahn <grahn+nntp@snipabacken.se>: Nov 15 02:46PM

On Sat, 2014-11-15, JiiPee wrote:
>> something, and here just mention which version you're talking about --
>> since you're going to change the code, and others will too.
 
> oh ok. never used it. maybe I need the check that.
 
I suspect a lot of people haven't, but things like that are becoming
quite common. It's so convenient for everyone: I'm more likely to
clone a repo than download or cut & paste a file, because I know I can
leave the repo somewhere on my disk, and a year from now I can still
see where it came from, if I have modified it, if there are new
versions, and so on.
 
/Jorgen
 
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
Jorgen Grahn <grahn+nntp@snipabacken.se>: Nov 15 02:58PM

On Sat, 2014-11-15, JiiPee wrote:
 
>> Perhaps you can run a program in the background which wants all of the
>> cache, and also reports how well it performs.
 
> I dont really know how to do this.
 
I think it's enough to e.g. loop over a 1MB std::vector and sum up the
elements, over and over again. Or maybe update it? Anyway, something
which is hard on the data cache but nice to the instruction cache and
the CPU itself.
 
>> There are also tools for looking at the cache performance, like perf
>> on Linux.
>> But it's a difficult topic and I don't know it well enough.
 
That caveat still applies ...
 
/Jorgen
 
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Nov 15 12:55AM

On 14/11/2014 22:18, JiiPee wrote:
 
> I think books are still better for eyes. Maybe computers get better in
> the future, but the colors etc are better when reading a paper book. The
> "feeling" is thus better...
 
The Kindle has e-Ink; just as easy on the eyes as paper.
 
/Flibble
JiiPee <no@notvalid.com>: Nov 15 01:27AM

On 15/11/2014 00:55, Mr Flibble wrote:
>> "feeling" is thus better...
 
> The Kindle has e-Ink; just as easy on the eyes as paper.
 
> /Flibble
 
I know but I still think paper is better than Kindle... they surely are
not the same.... paper can be twisted for example. There is difference....
Dombo <dombo@disposable.invalid>: Nov 15 10:33AM +0100

Op 15-Nov-14 2:27, JiiPee schreef:
 
>> /Flibble
 
> I know but I still think paper is better than Kindle... they surely are
> not the same.... paper can be twisted for example. There is difference....
 
eReaders are fine for books that you read from back to back, but for
browsing, which I often do in technical books, I prefer the dead tree
version because ePaper is annoyingly slow when flipping pages. It is a
pitty that in this case you have to pay for both versions separately.
Some publishers, like Manning, add a coupon with a code to their paper
books that allows you to download the electronic version for free so you
get the best of both worlds.
JiiPee <no@notvalid.com>: Nov 15 12:28PM

On 15/11/2014 09:33, Dombo wrote:
> Some publishers, like Manning, add a coupon with a code to their paper
> books that allows you to download the electronic version for free so
> you get the best of both worlds.
 
yes exactly. If I ever make a book, the one who buys my paper back gets
pdf also for free. As I said, its definitely the same as somebody buying
a music CD record and then making a mp3 copy of it and listening it when
jogging. Why would they need to buy another mp3 for the same record as
they already bought one license?
Andrey Karpov <karpov2007@gmail.com>: Nov 14 11:31PM -0800

Annonce: http://www.viva64.com/en/b/0290/
 
Outline: CppCat is a static code analyzer integrating into the Visual Studio 2010-2013 environment. The analyzer is designed for regular use and allows detecting a large number of various errors and typos in programs written in C and C++. For the purpose of popularizing it, we've decided to launch a student-support program granting free licenses to every higher school student who will contact and ask us about that. You just need to send us a photo of your student card or transcript.
Wouter van Ooijen <wouter@voti.nl>: Nov 15 09:25AM +0100

Andrey Karpov schreef op 15-Nov-14 8:31 AM:
> Annonce: http://www.viva64.com/en/b/0290/
 
> Outline: CppCat is a static code analyzer integrating into the Visual Studio 2010-2013 environment. The analyzer is designed for regular use and allows detecting a large number of various errors and typos in programs written in C and C++. For the purpose of popularizing it, we've decided to launch a student-support program granting free licenses to every higher school student who will contact and ask us about that. You just need to send us a photo of your student card or transcript.
 
A few suggestions if you want to get used in academic circles:
 
- if you license for free to students, license to teachers too,
otherwise you will never be used in the curriculum.
 
- mention whether that free academic license is forever or just for 1
year (or x years, or whatever).
 
- mention a license price on the site. this gives some indication about
the 'size' of the product.
 
Wouter
"Öö Tiib" <ootiib@hot.ee>: Nov 14 07:26PM -0800

On Friday, 14 November 2014 11:58:53 UTC+2, Erdoeban Zsukloff zu Brecher Zhuang wrote:
> 0x80000000? What you think?
 
> Talking about the data, not the code. Why on earth would you infer code ? Or
> is he _writing_ a GPU assembler - not something I understood from OP ...
 
I have had impression (from this post and others) that Marcel is writing
GPU assembler.
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: