Re: Fortran (Was: The does Python have variables? debate)

2014-05-29 Thread Albert van der Horst
In article lkoi5v$vfj$1...@speranza.aioe.org, Mark H Harris harrismh...@gmail.com wrote: On 5/11/14 1:59 PM, Chris Angelico wrote: julia prec=524288 524288 julia with_bigfloat_precision(prec) do println(atan(BigFloat(1)/5)*16 - atan(BigFloat(1)/239)*4) end Would it be

Re: Fortran (Was: The does Python have variables? debate)

2014-05-29 Thread Peter Pearson
On 29 May 2014 14:06:47 GMT, Albert van der Horst wrote: In article lkoi5v$vfj$1...@speranza.aioe.org, Mark H Harris harrismh...@gmail.com wrote: On 5/11/14 1:59 PM, Chris Angelico wrote: julia prec=524288 524288 julia with_bigfloat_precision(prec) do

Re: Fortran (Was: The does Python have variables? debate)

2014-05-13 Thread Mark H Harris
On 5/13/14 12:48 AM, Steven D'Aprano wrote: On Tue, 13 May 2014 00:33:47 -0500, Mark H Harris wrote: there has to be a value add for scientists to move away from R or Matlab, or from FORTRAN. Why go to the trouble? FORTRAN works well (its fast too), and there are zillions of lines of code

Re: Fortran (Was: The does Python have variables? debate)

2014-05-13 Thread Gene Heskett
On Tuesday 13 May 2014 01:48:43 Steven D'Aprano did opine And Gene did reply: On Tue, 13 May 2014 00:33:47 -0500, Mark H Harris wrote: there has to be a value add for scientists to move away from R or Matlab, or from FORTRAN. Why go to the trouble? FORTRAN works well (its fast too), and

Re: Fortran (Was: The does Python have variables? debate)

2014-05-13 Thread Steven D'Aprano
On Tue, 13 May 2014 02:31:14 -0400, Gene Heskett wrote: People who write buggy self-modifying code aren't paying attention. [...] IMO, people who bad-mouth self-modifying code are folks who don't have the patience to do it right, because stable self-modifying code CAN most certainly be done.

Re: Fortran (Was: The does Python have variables? debate)

2014-05-13 Thread Steven D'Aprano
On Tue, 13 May 2014 15:56:50 +1000, Chris Angelico wrote: On Tue, May 13, 2014 at 3:48 PM, Steven D'Aprano st...@pearwood.info wrote: Self-modifying code is a nightmare inside the head of a Lovecraftian horror. There's a reason why almost the only people still using self- modifying code are

Re: Fortran (Was: The does Python have variables? debate)

2014-05-13 Thread Chris Angelico
On Tue, May 13, 2014 at 7:34 PM, Steven D'Aprano st...@pearwood.info wrote: On Tue, 13 May 2014 15:56:50 +1000, Chris Angelico wrote: On Tue, May 13, 2014 at 3:48 PM, Steven D'Aprano st...@pearwood.info wrote: Self-modifying code is a nightmare inside the head of a Lovecraftian horror.

Re: Fortran (Was: The does Python have variables? debate)

2014-05-13 Thread Rustom Mody
On Tuesday, May 13, 2014 3:30:36 PM UTC+5:30, Chris Angelico wrote: Actually, even the file system can do some of this to you. I was checking lsof on one of my Linux systems a little while ago, and found that I had half a dozen old versions of a program, all with the same file name, all

Re: Fortran (Was: The does Python have variables? debate)

2014-05-13 Thread Chris Angelico
On Tue, May 13, 2014 at 8:44 PM, Rustom Mody rustompm...@gmail.com wrote: On Tuesday, May 13, 2014 3:30:36 PM UTC+5:30, Chris Angelico wrote: Actually, even the file system can do some of this to you. I was checking lsof on one of my Linux systems a little while ago, and found that I had half

Re: Fortran (Was: The does Python have variables? debate)

2014-05-13 Thread Roy Smith
In article 5371c834$0$11109$c3e8...@news.astraweb.com, Steven D'Aprano st...@pearwood.info wrote: And after 15 years, I daresay that includes you. Sometimes code is still running for 15 years because it's so wonderful nobody has been able to come up with anything better. Sometimes it's

Re: Fortran (Was: The does Python have variables? debate)

2014-05-13 Thread Chris Angelico
On Tue, May 13, 2014 at 9:16 PM, Roy Smith r...@panix.com wrote: Sometimes code is still running for 15 years because it's so wonderful nobody has been able to come up with anything better. Sometimes it's because nobody knows how it works anymore and everybody is afraid to touch it :-) And

Re: Fortran (Was: The does Python have variables? debate)

2014-05-13 Thread Gene Heskett
On Tuesday 13 May 2014 03:22:28 Steven D'Aprano did opine And Gene did reply: On Tue, 13 May 2014 02:31:14 -0400, Gene Heskett wrote: People who write buggy self-modifying code aren't paying attention. [...] IMO, people who bad-mouth self-modifying code are folks who don't have the

Re: Fortran (Was: The does Python have variables? debate)

2014-05-13 Thread Mark Lawrence
On 13/05/2014 12:21, Chris Angelico wrote: On Tue, May 13, 2014 at 9:16 PM, Roy Smith r...@panix.com wrote: Sometimes code is still running for 15 years because it's so wonderful nobody has been able to come up with anything better. Sometimes it's because nobody knows how it works anymore and

Re: Fortran (Was: The does Python have variables? debate)

2014-05-12 Thread Alain Ketterlin
Mark H Harris harrismh...@gmail.com writes: On 5/11/14 12:05 PM, Alain Ketterlin wrote: Julia is Matlab and R, Python, Lisp, Scheme; all rolled together on steroids. Its amazing as a dynamic language, and its fast, like lightning fast as well as multiprocessing (parallel processing) at its

Re: Fortran (Was: The does Python have variables? debate)

2014-05-12 Thread Mark H Harris
On 5/12/14 3:44 AM, Alain Ketterlin wrote: multiple-dispatch (i.e., dynamically testing types, converting to a common type, and selecting the version of sqrt to use). That's probably more than the time it takes to actually perform the computation, a bit like what happens with x+y on integers

Re: Fortran (Was: The does Python have variables? debate)

2014-05-12 Thread Steven D'Aprano
On Tue, 13 May 2014 00:33:47 -0500, Mark H Harris wrote: there has to be a value add for scientists to move away from R or Matlab, or from FORTRAN. Why go to the trouble? FORTRAN works well (its fast too), and there are zillions of lines of code cranking away on huge linear arrays. Enter

Re: Fortran (Was: The does Python have variables? debate)

2014-05-12 Thread Chris Angelico
On Tue, May 13, 2014 at 3:48 PM, Steven D'Aprano st...@pearwood.info wrote: Self-modifying code is a nightmare inside the head of a Lovecraftian horror. There's a reason why almost the only people still using self- modifying code are virus writers, and the viruses they create are notorious for

Re: Fortran (Was: The does Python have variables? debate)

2014-05-11 Thread Mark H Harris
On 5/10/14 8:42 AM, Roy Smith wrote: Ars Technica article a couple of days ago, about Fortran, and what is likely to replace it: http://tinyurl.com/mr54p96 uhm, yeeah! 'Julia' is going to give everyone a not so small run for competition; justifiably so, not just against FORTRAN. Julia

Re: Fortran (Was: The does Python have variables? debate)

2014-05-11 Thread Rustom Mody
On Sunday, May 11, 2014 11:47:55 AM UTC+5:30, Mark H. Harris wrote: 'Julia' is going to give everyone a not so small run for competition; justifiably so, not just against FORTRAN. Julia is Matlab and R, Python, Lisp, Scheme; all rolled together on steroids. Its amazing as a dynamic

Re: Fortran (Was: The does Python have variables? debate)

2014-05-11 Thread Steven D'Aprano
On Sun, 11 May 2014 01:17:55 -0500, Mark H Harris wrote: On 5/10/14 8:42 AM, Roy Smith wrote: Ars Technica article a couple of days ago, about Fortran, and what is likely to replace it: http://tinyurl.com/mr54p96 uhm, yeeah! 'Julia' is going to give everyone a not so small run for

Re: Fortran (Was: The does Python have variables? debate)

2014-05-11 Thread Tomasz Rola
On Sun, May 11, 2014 at 07:09:27AM +, Steven D'Aprano wrote: On Sun, 11 May 2014 01:17:55 -0500, Mark H Harris wrote: On 5/10/14 8:42 AM, Roy Smith wrote: Ars Technica article a couple of days ago, about Fortran, and what is likely to replace it: http://tinyurl.com/mr54p96

Re: Fortran (Was: The does Python have variables? debate)

2014-05-11 Thread Chris Angelico
On Mon, May 12, 2014 at 2:09 AM, Tomasz Rola rto...@ceti.pl wrote: Given that Fortran is here for almost 60 years and lot of effort has been spent to keep it backwards compatible (AFAIK), I wouldn't hold my breath. Something may look like cool and great, but wait ten years and see if after

Re: Fortran (Was: The does Python have variables? debate)

2014-05-11 Thread Alain Ketterlin
Mark H Harris harrismh...@gmail.com writes: On 5/10/14 8:42 AM, Roy Smith wrote: http://tinyurl.com/mr54p96 'Julia' is going to give everyone a not so small run for competition; justifiably so, not just against FORTRAN. Julia is Matlab and R, Python, Lisp, Scheme; all rolled together on

Re: Fortran (Was: The does Python have variables? debate)

2014-05-11 Thread Mark H Harris
On 5/11/14 12:05 PM, Alain Ketterlin wrote: Julia is Matlab and R, Python, Lisp, Scheme; all rolled together on steroids. Its amazing as a dynamic language, and its fast, like lightning fast as well as multiprocessing (parallel processing) at its core. Its astounding, really. Hmmm... Its

Re: Fortran (Was: The does Python have variables? debate)

2014-05-11 Thread Chris Angelico
On Mon, May 12, 2014 at 4:54 AM, Mark H Harris harrismh...@gmail.com wrote: The following code will produce over 100,000 digits of π (pi) in less than 2 seconds on a low-end processor, like my mac mini dual core 2Ghz: julia prec=524288 524288 julia with_bigfloat_precision(prec) do

Re: Fortran (Was: The does Python have variables? debate)

2014-05-11 Thread Mark H Harris
On 5/11/14 1:59 PM, Chris Angelico wrote: julia prec=524288 524288 julia with_bigfloat_precision(prec) do println(atan(BigFloat(1)/5)*16 - atan(BigFloat(1)/239)*4) end Would it be quicker (and no less accurate) to represent pi as atan(BigFloat(1))*4 instead? That's how I

Re: Fortran (Was: The does Python have variables? debate)

2014-05-11 Thread Dave Angel
On 05/11/2014 02:54 PM, Mark H Harris wrote: julia sin(BigFloat(π/4)) 7.0710678118654750275194295621751674626154323953749278952436611913748 20215180412e-01 with 256 bits of precision That answer doesn't seem to come anywhere near 256 bits of precision. Using Python 3.2,

Re: Fortran (Was: The does Python have variables? debate)

2014-05-11 Thread Mark H Harris
On 5/11/14 10:10 PM, Dave Angel wrote: On 05/11/2014 02:54 PM, Mark H Harris wrote: julia sin(BigFloat(π/4)) 7.0710678118654750275194295621751674626154323953749278952436611913748 20215180412e-01 with 256 bits of precision That answer doesn't seem to come anywhere near 256 bits of

Re: Fortran (Was: The does Python have variables? debate)

2014-05-11 Thread Mark H Harris
On 5/11/14 11:10 PM, Mark H Harris wrote: On 5/11/14 10:10 PM, Dave Angel wrote: On 05/11/2014 02:54 PM, Mark H Harris wrote: julia sin(BigFloat(π/4)) 7.0710678118654750275194295621751674626154323953749278952436611913748 20215180412e-01 with 256 bits of precision That answer doesn't

Re: Fortran (Was: The does Python have variables? debate)

2014-05-11 Thread Chris Angelico
On Mon, May 12, 2014 at 2:26 PM, Mark H Harris harrismh...@gmail.com wrote: Having said that, the accuracy was not my point; in the first place. My point is that the sin() function is built-in... So what? Built-in just means that there's no namespacing of mathematical functions. ChrisA --

Fortran (Was: The does Python have variables? debate)

2014-05-10 Thread Roy Smith
In article mailman.9805.1399597367.18130.python-l...@python.org, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On 08 May 2014 16:04:51 GMT, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info declaimed the following: Personally, I think that trying to be general and talk about many other

Re: Fortran (Was: The does Python have variables? debate)

2014-05-10 Thread Terry Reedy
On 5/10/2014 9:42 AM, Roy Smith wrote: In article mailman.9805.1399597367.18130.python-l...@python.org, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: Obsolete and Legacy? Fortran still receives regular standards updates (currently 2008, with the next revision due in 2015). Ars