Become a fan of Slashdot on Facebook


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

Comment Re:Open set it is! (Score 1, Insightful) 248

So you don't have the set of all primes after all... that's the point. The proof goes like this:
1) suppose you have a set of all primes, and the set is finite.
2) show that there's another prime not in your set - that contradicts (1).
3) therefore, there is no finite set that contains all primes.

All you've done is demonstrate one example of step 2. The original proof given by phantomfive gives a different example of a prime not in the set. Either works - the proof is valid.

Comment Re:Why? (Score 1) 204

This is fantastic. I think Julia has the right focus to be better for many purposes than MATLAB and C++, and if a compiler is coming it's even better. I'm familiar with MATLAB, Mathematica, Octave, C and C++, and the Julia language looks very easy to learn and use. I also applaud your choice of the MIT license - I hope this permissive license encourages widespread use and innovation - both for free and commercial software. Thank you!

Comment Re:Not fast at all (Score 3, Insightful) 204

Dynamic typing doesn't add any overhead when you can determine which specific method you need when generating code — which, in a dynamic language with a JIT, is very late, meaning that you can most of the time. Julia uses tons of small method definitions that call other small methods and so on, even for basic things like adding two integers, but the compiler is smart enough to compile addition into a single machine instruction. The notion that dynamic languages are slow because of their dynamism is very outdated in light of modern compiler techniques.

Comment Re:I "C" what they did there... (Score 1) 204

The C/C++ benchmarks are intentionally written in C; the only reason that's it's a C++ files instead of C is so that we can use C++'s complex template in the Mandelbrot benchmark. Otherwise the whole thing would just be done in C. The clock_now function is only used to time other code, so its performance is irrelevant.

Stefan Karpinski

Comment Re:Existing Codebase (Score 1) 204

You can't do this just yet, but we're working on it. Should be possible in the near future. At some point further into the future, you'll be able to compile Julia code into a .so file, load it from C code and just call it as though it were written in C —except that the person writing the code gets the benefits of a high-level numerical language.

Stefan Karpinski

Comment Re:Yet another language (Score 1) 204

That's a fair question, and one I asked myself after writing the benchmark code for JavaScript and seeing just how incredibly fast the V8 engine is. Should we be doing numerical computing in JavaScript? The biggest problem that I can see is that JavaScript doesn't have a good story for calling external C/Fortran libraries. Some sort of FFI could be implemented, but there are deeper issues —especially the paucity if numerical types in JavaScript. JavaScript doesn't even have integers —every number is a double. So how can you distinguish between an array of integers versus an array of doubles that happen to have integer values? Can the compiler be smart enough to know that it can store those numerical arrays inline in a format that can be passed to LAPACK? To do numerical computing, you really need more control over memory layout, at the very least for the sake of calling external libraries.

Stefan Karpinski

Comment Re:Why? (Score 1) 204

As I mentioned in the interview, we're working on a compiler, at which point you would even be able to use compiled Julia code in embedded systems. So you get a nice productive, interactive development environment, then you invoke the static compiler and presto! you have a compiled .so files that you can just call from C. That eliminates the need to prototype in one language and then re-write everything in another language when you want to actually deploy it. I've done that before and it's deeply annoying, time-consuming, and hard to get right (it's generally harder to write correct C code than correct Matlab code). I've also deployed Matlab using their compiler. That's workable if you want to avoid re-writing your prototype, but it's also pretty annoying.

Stefan Karpinski

Comment Re:Tangentially (Score 1) 204

There's a few points:

1. Julia is entirely dynamic, so there's no need to think about compile time versus run time, simplifying the mental model (but the performance is like that of compiled languages). It's as easy as Python or Matlab in that respect, but much faster.
2. There are just a few powerful language features (e.g. ubiquitous, fast multiple dispatch, supported with an expressive type system), rather than a lot of features that interact in complicated ways.
3. Good for general programming stuff: working with strings, calling external programs and other things that are generally pretty awkward in R and Matlab (one of the reasons why NumPy is gaining popularity).

In general, the motivation (expressed in a previous Julia blog post) is to have something that's easy to use and learn, but fast and powerful (you *can* go deep if you want to), and designed expressly for numerical work —which means, among other things, that it has to be able to store large arrays of numeric values in-line and call libraries like LAPACK on them.

Stefan Karpinski

Slashdot Top Deals

I just need enough to tide me over until I need more. -- Bill Hoest