[sage-devel] Re: Julia
Hi! On 12 Apr., 16:41, rjf wrote: > OMG I put in an extra space and my indentation is wrong. Somewhere. I > wonder where? +1. One of my first Sage patches was about fixing a wrong indentation that resulted in some line of code not being executed. Cheers, Simon -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: Julia
On Apr 12, 2:47 am, Volker Braun wrote: > In other words, the reason why many programmers don't like lisp is > * OMG I forgot a closing parenthesis, where is it actually, a proper editor for lisp keeps the parentheses well in hand. Personally I find it quite convenient to see the automatically computed and displayed reinforcement of both parentheses and pretty-printed indentation that one gets automatically by using emacs or one of the lisp IDEs. I could say, of python programmers .. OMG I put in an extra space and my indentation is wrong. Somewhere. I wonder where? > * my parentheses keys have worn off Hardly an issue, though you could perhaps make a case that parentheses on a keyboard are in an inconvenient place. This used to be an issue when the IBM-selectric standard and the Teletype standard put parentheses in different locations relative to the "home row". But now the locations are pretty much standard in the keyboards I see. (Not sure about non-Western keyboards though.) Apologies for giving you a longer response than you warrant, straight-faced... > * can't time with sub-millisecond accuracy OK, I ran the program 100 times to get something detectable. 0.0014 sec, Faster than Julia or Cython, ignoring differences in computer speed etc. > * uncaught exceptions > Huh? Why can't lisp catch exceptions? Read about the error handler, as well as catch and throw. Programming language designers and implementors tend to screw up on things like exception handling, setting traps, and other flags. I don't know if Python allows you to, for example, set floating-point inexact to cause an exception, or to set rounding modes. It's not part of the ANSI lisp standard, but I can't speak for all the implementations. RJF -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: Julia
Julia is, at the moment, my favourite programming language. It uses LLVM as the back end for speed. It is a dynamic language like Python, but to make it really fast they use dynamic type inference behind the scenes. The compiler is insanely clever. Moreover, unlike Cython, Julia has an interactive prompt. Yes, it is as fast as C, but dynamic and interactive! It is trivial to call compiled C code from Julia too. It also has a very active community and has generated a lot of interest recently. If Julia had existed back when Sage started, I would contend that it would have been a reasonable choice for language to use for Sage. I can't think of any other language I would say that about. Bill. On Apr 11, 4:15 pm, kcrisman wrote: > Apparently a new scientific computing language... > > http://www.r-bloggers.com/julia-i-love-you/ -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: Julia
In other words, the reason why many programmers don't like lisp is * OMG I forgot a closing parenthesis, where is it * my parentheses keys have worn off * can't time with sub-millisecond accuracy * uncaught exceptions ;-) On Thursday, April 12, 2012 2:41:30 AM UTC+1, rjf wrote: > > I would tell you how much faster (fib 25) is in lisp but I got a > division by 0. > It seems to be 0.00 seconds. > > (defun fib(n) > (if (< n 2) > n > (+ (fib (- n 1))(fib(- n 2))) > > > The reason people compare speed is that it is quantitatively easy. > > However, people value expressiveness in a programming language. > > Otherwise we would all be programming in assembler. > > > RJF > -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: Julia
I would tell you how much faster (fib 25) is in lisp but I got a division by 0. It seems to be 0.00 seconds. (defun fib(n) (if (< n 2) n (+ (fib (- n 1))(fib(- n 2))) The reason people compare speed is that it is quantitatively easy. However, people value expressiveness in a programming language. Otherwise we would all be programming in assembler. RJF -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: Julia
On Wednesday, April 11, 2012 7:17:27 PM UTC+2, kcrisman wrote: > > > Yes, this is a very common complaint about R. Rcpp is nice, yes. But more importantly this shows that a good library and big support from a strong community overcomes limitations in the programming language. I guess, nobody actually bothers that function calls and stack handling is inferior in R. (what bothers them more is that there is no clear direction for OOP) H -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
[sage-devel] Re: Julia
On Apr 11, 11:30 am, William Stein wrote: > On Wed, Apr 11, 2012 at 8:15 AM, kcrisman wrote: > > Apparently a new scientific computing language... > > >http://www.r-bloggers.com/julia-i-love-you/ > > Wow, that article suggests that R is *hideously slow* for recursion. > I didn't know that. Yes, this is a very common complaint about R. So people do things like Rcpp [1]. People still love R, though, for its slowness and all. [1] http://dirk.eddelbuettel.com/code/rcpp.html -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org