Re: A little story

2012-06-26 Thread bearophile
Don Clugston: Bearophile, haven't you ever read that paper on integer overflow, which you keep posting to the newsgroup??? I have read it time ago, but it seems not having run-time overflow tests is not an option for certain programming endeavors of mine. This is why I have partially switche

Re: A little story

2012-06-26 Thread Don Clugston
On 25/06/12 14:24, bearophile wrote: Dmitry Olshansky: Except for the fact, that someone has to implement it. I am not seeing one of the posts of this thread. So I'll answer here. The good thing regarding the run-time overflow integral tests is that they are already implemented and available

Re: A little story

2012-06-25 Thread David
Am 25.06.2012 14:56, schrieb Gour: On Sun, 24 Jun 2012 23:52:35 +0200 "bearophile" wrote: - Python language is not fit because it's too much slow and because in certain cases I prefer a little stronger static type safety, that's useful to not waste time debugging the usage of intricate data st

Re: A little story

2012-06-25 Thread Gour
On Sun, 24 Jun 2012 23:52:35 +0200 "bearophile" wrote: > - Python language is not fit because it's too much slow and > because in certain cases I prefer a little stronger static type > safety, that's useful to not waste time debugging the usage of > intricate data structures. Have you tried t

Re: A little story

2012-06-25 Thread bearophile
Dmitry Olshansky: Except for the fact, that someone has to implement it. I am not seeing one of the posts of this thread. So I'll answer here. The good thing regarding the run-time overflow integral tests is that they are already implemented and available as efficient compiler intrinsics

Re: A little story

2012-06-25 Thread Dmitry Olshansky
On 25-Jun-12 15:21, Tobias Pankrath wrote: On Monday, 25 June 2012 at 10:08:03 UTC, Dmitry Olshansky wrote: On 25-Jun-12 14:01, bearophile wrote: Tobias Pankrath: Maybe you should post this to the main newsgroup. I don't know if the main newsgroup is the right place. I would prefer a swi

Re: A little story

2012-06-25 Thread Tobias Pankrath
On Monday, 25 June 2012 at 10:08:03 UTC, Dmitry Olshansky wrote: On 25-Jun-12 14:01, bearophile wrote: Tobias Pankrath: Maybe you should post this to the main newsgroup. I don't know if the main newsgroup is the right place. I would prefer a switch that does this per scope, i.e: I think

Re: A little story

2012-06-25 Thread Dmitry Olshansky
On 25-Jun-12 14:01, bearophile wrote: Tobias Pankrath: Maybe you should post this to the main newsgroup. I don't know if the main newsgroup is the right place. I would prefer a switch that does this per scope, i.e: I think both a compiler switch for the compilation unit, and a scope prag

Re: A little story

2012-06-25 Thread bearophile
Tobias Pankrath: Maybe you should post this to the main newsgroup. I don't know if the main newsgroup is the right place. I would prefer a switch that does this per scope, i.e: I think both a compiler switch for the compilation unit, and a scope pragma to enable/disable locally, are usef

Re: A little story

2012-06-24 Thread Tobias Pankrath
On Sunday, 24 June 2012 at 21:52:36 UTC, bearophile wrote: Just a recent little coding story. Maybe you should post this to the main newsgroup. I would prefer a switch that does this per scope, i.e: void foo() { pragma(check, int_overflow); // check only in this function }

Re: A little story

2012-06-24 Thread Jerome BENOIT
Thanks a lot for the explanation. Jerome On 25/06/12 02:54, bearophile wrote: Jerome BENOIT: How come as ``integral numbers (will not be) overflow'' ? Multiprecision numbers allocate on the heap when they become large (or they always allocate on the heap). This has a significant performance

Re: A little story

2012-06-24 Thread bearophile
Jerome BENOIT: How come as ``integral numbers (will not be) overflow'' ? Multiprecision numbers allocate on the heap when they become large (or they always allocate on the heap). This has a significant performance impact. There are many situations where Multiprecision numbers are handy, but

Re: A little story

2012-06-24 Thread Jerome BENOIT
On 25/06/12 01:51, bearophile wrote: Jerome BENOIT: Is there any GMP port for D ? Jerome I don't know. (But GMP is NOT a solution to the problems shown in that story). How come as ``integral numbers (will not be) overflow'' ? Bye, bearophile

Re: A little story

2012-06-24 Thread bearophile
Jerome BENOIT: Is there any GMP port for D ? Jerome I don't know. (But GMP is NOT a solution to the problems shown in that story). Bye, bearophile

Re: A little story

2012-06-24 Thread Jerome BENOIT
On 24/06/12 23:52, bearophile wrote: And D is too much unsafe for such kind of programs, because integral numbers can silently overflow. Is there any GMP port for D ? Jerome

A little story

2012-06-24 Thread bearophile
Just a recent little coding story. Python is a good language for "exploratory programming", because the programs are succinct, it's flexible, its data structures are easy to use and good, there are already written modules to do most things, there are very easy to use libraries to plot results