Forgot your password?
typodupeerror
Math Programming Stats

Julia Language Seeks To Be the C For Numerical Computing 204

Posted by Unknown Lamer
from the two-parts-fortran-one-part-lisp dept.
concealment writes in with an interview with a creator of the (fairly) new language Julia designed for number crunching. Quoting Infoworld: "InfoWorld: When you say technical computing, to what type of applications are you specifically referring? Karpinski: It's a broad category, but it's pretty much anything that involves a lot of number-crunching. In my own background, I've done a lot of linear algebra but a fair amount of statistics as well. The tool of choice for linear algebra tends to be Matlab. The tool of choice for statistics tends to be R, and I've used both of those a great deal. But they're not really interchangeable. If you want to do statistics in Matlab, it's frustrating. If you want to do linear algebra in R, it's frustrating. InfoWorld: So you developed Julia with the intent to make it easier to build technical applications? Karpinski: Yes. The idea is that it should be extremely high productivity. To that end, it's a dynamic language, so it's relatively easy to program, and it's got a very simple programming model. But it has extremely high performance, which cuts out [the need for] a third language [C], which is often [used] to get performance in any of these other languages. I should also mention NumPy, which is a contender for these areas. For Matlab, R, and NumPy, for all of these options, you need to at some point drop down into C to get performance. One of our goals explicitly is to have sufficiently good performance in Julia that you'd never have to drop down into C." The language implementation is licensed under the GPL. Lambda the Ultimate has a bit of commentary on the language, and an R programmer gives his two cents on the language.
This discussion has been archived. No new comments can be posted.

Julia Language Seeks To Be the C For Numerical Computing

Comments Filter:
  • Sage (Score:5, Informative)

    by donaggie03 (769758) <d_osmeyer&hotmail,com> on Wednesday April 18, 2012 @10:55AM (#39722913)
    I use Sage quite a bit. It's basically a wrapper for almost all the mathematics software available. http://www.sagemath.org/ [sagemath.org] While you still need to drop down to C for great performance, it solves a lot of the interoperability issues discussed. In other words, take the example from the summary: from Sage, you can call Matlab commands and then immediately use the results with R commands. Sage works through a web browser, and it's based on Python, which is a plus.
  • Not This Again (Score:4, Informative)

    by eldavojohn (898314) * <eldavojohnNO@SPAMgmail.com> on Wednesday April 18, 2012 @10:57AM (#39722941) Journal
    You know, I bet that if you spent as much time learning new languages as you did bitching about duplication in Dart, Julia, $NEW_LANGUAGE then you'd have a pretty powerful array of tools to use in programming. From one of the authors of Machine Learning for Hackers' blog [r-bloggers.com]:

    In my opinion, the new code in Julia is easier to read than the R code because Julia has fewer syntactic quirks than R. More importantly, the Julia code runs much faster than the R code without any real effort put into speed optimization. For the sample text I tried to decipher, the Julia code completes 50,000 iterations of the sampler in 51 seconds, while the R code completes the same 50,000 iterations in 67 minutes — making the R code more than 75 slower than the Julia code.

    That certainly caught my attention!

    The XKCD comic you cite is correct for some standards but software languages are much more complex than standards and, in fact, many of them implement common sets of core standards. Once you get specific enough, you're not talking about a standard but rather a specific implementation of how to accomplish something.

  • Numerical Python (Score:5, Informative)

    by Dr. Tom (23206) <tomh@nih.gov> on Wednesday April 18, 2012 @11:09AM (#39723045) Homepage

    Robust, mature, fast, easy to use, side-by-side with .m it wins hands down, really no comparison, use Python.
    Cython if you need to make it faster for the %5 of code that is too slow.

    import numpy
    import pylab

  • Re:FORTRAN? (Score:4, Informative)

    by Bill_the_Engineer (772575) on Wednesday April 18, 2012 @11:33AM (#39723257)
    Yes and is used extensively. There are even C libraries that include FORTRAN code to numerical work quickly.
  • by arth1 (260657) on Wednesday April 18, 2012 @11:38AM (#39723317) Homepage Journal

    Never seen a successful language named after a person. Probably never will.

    There aren't that many, and the few there are seems to have been fairly successful. At the top of my head, I can think of Pascal, Ada Eiffel, Haskell and Ruby.

    At least Pascal had a huge impact. p-code was the frontrunner for bytecode. I'd say it dwindled because of Borland who played fast and loose with the standards, reducing its main strength of being incredibly strict and compatible for a visual IDE and proprietary extensions (Delphi). This gave it a short term flare, but probably helped kill it in the long run.

  • Re:Fortress (Score:5, Informative)

    by dougmc (70836) <dougmc+slashdot@frenzied.us> on Wednesday April 18, 2012 @11:55AM (#39723529) Homepage

    The weakness of FORTRAN is that it entirely misses out of 50+ years of research and innovation in programming languages.

    OK, maybe the original version of Fortran, the one made 50+ years ago, missed out on "50+ years of research and innovation in programming languages", but you are aware that Fortran has been updated since then, right?

    Fortran now includes a great number of the improvements to programming languages made since then. But don't take my word for it -- check out Wikipedia's page on it [wikipedia.org]. I picked Fortran 90 as a starting point, but there's been many versions of Fortran made since the first, with new features (often coming from other languages) being added all the time.

    And not only is Fortran still being actively developed, but the library of well tested and optimized numerical computing code already written it it is massive.

    I'm not saying that there's not room for a new language, and certainly, Fortran doesn't have all the features of some new languages, but your claim that Fortran "entirely misses out of 50+ years of research and innovation in programming languages" is completely and utterly wrong.

    I should also mention that they stopped calling it FORTRAN in all caps back in 1990 or so when Fortran 90 came out. Now it's just Fortran. But even the venerable FORTRAN 77 benefited greatly from programing language developments available at the time.

  • Re:FORTRAN? (Score:5, Informative)

    by gl4ss (559668) on Wednesday April 18, 2012 @12:38PM (#39724081) Homepage Journal

    well.. apparently this "language" has modern fortran built in.

    just open the link. there's some stats there. I don't envision huge popularity for this though.. unless he integrates/develops it into a fullblown mathlab competitor(that javascript does mandelbrot almost as fast is kind if peculiar though..). not as peculiar as "pi sum" bench being faster on javascript and julia than c++.

    "The library, mostly written in Julia itself, also integrates mature, best-of-breed C and Fortran libraries for linear algebra, random number generation, FFTs, and string processing. "

  • Re:FORTRAN? (Score:5, Informative)

    by plopez (54068) on Wednesday April 18, 2012 @12:39PM (#39724093) Journal

    Ummmm..... Fortran has supported free form format since ummmm..... 1993. All modern Fortran compilers I know of support both the old and the new formats. Cast off your old prejudices and learn what a modern programming language Fortran '08 really is.

    BTW, I believe using the "FORTRAN" has been deprecated since the 70's. It is now "Fortran".

  • Re:FORTRAN? (Score:4, Informative)

    by MeanGene (17515) on Wednesday April 18, 2012 @01:23PM (#39724615)

    Hey - at least Fortran does not rely on whitespace!

  • Not fast at all (Score:4, Informative)

    by loufoque (1400831) on Wednesday April 18, 2012 @03:21PM (#39726419)

    They want to design a language for speed, but they already made choices in the language that hamper speed dramatically, like dynamic typing. Dynamic typing adds overhead to every function call; it's fine if your functions do a lot of work, not so much if they do relatively little and are called very often.
    It looks like if you want to write fairly low-level code, you'll still need to write it in C there...

    It also looks like their approach to parallelization is very heavy-weight and, albeit usable in clusters, it will yield both poor scalability on large systems and poor performance on simple multi-core systems.

    There is already a high-level, dynamic and accessible language for numerical computing, it's MATLAB. It wraps a lot of high-performance libraries, using them without the user even noticing it. Code in MATLAB can easily be faster than in C for some constructs because C compilers, unlike MATLAB, do not recognize some patterns and replace them by optimized library calls. For this reason, MATLAB is great when you're coding with high-level constructs, but suffers from poor performance when using low-level constructs (such as accessing data element by element) for the same reasons as pointed out above.

    A new language for high-performance numerical computing should allow both the high-level programming of MATLAB and the possibilities of a low-level statically compiled language like C. The best contender for this is C++, which has tons of high-level and fast libraries for transcendental functions, linear algebra, statistics, image processing, signal processing, etc.

    As for FORTRAN, it's great for writing one thing well and fast, but it doesn't have any mechanisms for more high-level programming or code re-use, which means it is annoying to maintain, extend, or to even guarantee consistencies between the different subroutines of a large application. It also relies a lot more on what the compiler will do, while with C/C++ there is more control on what happens with regards to vectorization, parallelization or data transfers, which can be critical for heterogeneous systems.

Some people have a great ambition: to build something that will last, at least until they've finished building it.

Working...