--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
# julia allows Unicode names (in UTF-8 encoding) # so either "pi" or the symbol π can be used return 4/3*pi*r^3 end
object Julia { def sphere_vol(r : Int) { return ( 4/3*pi*r^3 )
} }
I need to talk about the real motivation for ScalaJulia language. There are many mathematical functions in Julialibrary that are much faster
and can be integrated in machine learning techniques. Users can write new functions in Juliaand it is possible to generate wrappers.
Please see our discussion topics in an upcoming meetup:We like to have all good features, simplicity and performance in Julia (for Calculus, Statistics, Linear Algebra and other functions) and alsowe like to have parallel, memory based big data computations in Spark (written in Scala).
On Wed, Oct 28, 2015 at 12:16 PM, <ssarkaray...@gmail.com> wrote:I need to talk about the real motivation for ScalaJulia language. There are many mathematical functions in Julialibrary that are much fasterMuch faster than _what_? It's not terribly hard to write Julia that is slower than Scala--just be a little careless with type stability (or be careful, but do it in a way that the compiler doesn't understand is safe).
and can be integrated in machine learning techniques. Users can write new functions in Juliaand it is possible to generate wrappers.Users can also write new functions in Scala.
Please see our discussion topics in an upcoming meetup:We like to have all good features, simplicity and performance in Julia (for Calculus, Statistics, Linear Algebra and other functions) and alsowe like to have parallel, memory based big data computations in Spark (written in Scala).You haven't made a good enough case that it is worth the frankly enormous time and effort of creating a new language. Don't fool yourself into thinking that "ScalaJulia" isn't a new language. You wrote, for your toy example,4/3*pi*r^3Well, in Scala 4 and 3 are integers, so 4/3 is 1. ^ is not defined on Double so you could add it, but ^ is already defined on integers as bitwise xor (like C), so 2^7 is not 128 but 5. That'd be confusing! So you can't even write simple arithmetic in this hybrid language and be able to use existing code.
It's a new language with its own syntax.
You haven't even said whether this language is going to run on the JVM or not. If it's going to run on the JVM, come up with a Julia-JVM compatibility layer first before you think about trying to squash two languages together! Then, once you have a good interop story, think about whether it's worth all the extra complexity of a new language.
If it's not supposed to run on the JVM, you're not going to be able to compile Spark for "ScalaJulia" anyway. So "just" port Spark to Julia and see if the expected performance benefits materialize.--Rex
Please see the links for some interesting performance comparisons:
If you are not careful about optimization, Scala performance can be really bad.
Julia has some latest compiler optimization techniques: http://julialang.org/and can be integrated in machine learning techniques. Users can write new functions in Juliaand it is possible to generate wrappers.Users can also write new functions in Scala.Julia has a large set of library functions for scientific computing.
Julia replaced MATLAB in scientific computing.
I saw several articles from scientists.
You haven't made a good enough case that it is worth the frankly enormous time and effort of creating a new language. Don't fool yourself into thinking that "ScalaJulia" isn't a new language. You wrote, for your toy example,4/3*pi*r^3Well, in Scala 4 and 3 are integers, so 4/3 is 1. ^ is not defined on Double so you could add it, but ^ is already defined on integers as bitwise xor (like C), so 2^7 is not 128 but 5. That'd be confusing! So you can't even write simple arithmetic in this hybrid language and be able to use existing code.This was just an example. In Scala, traits can be defined with implementations in Julia.
It's a new language with its own syntax.
You haven't even said whether this language is going to run on the JVM or not. If it's going to run on the JVM, come up with a Julia-JVM compatibility layer first before you think about trying to squash two languages together! Then, once you have a good interop story, think about whether it's worth all the extra complexity of a new language.This is where we need to brainstorm.C (and Java) programs can embed Julia through APIs : http://docs.julialang.org/en/release-0.4/manual/embedding/