Live data from Hacker News

Try Julia

forio.com

41–50 of 105 posts

Re: Try Julia

#41

Fun with Julia: julia> 3 ** 60 syntax: use ^ instead of ** julia> 3 ^ 60 -3535985420588157519 julia> factorial(45) -8797348664486920192 julia> factorial(75) 0 julia> 5 * 5555555555555555555 -9115710369641325457 julia> 5 * 55555555555555555555 syntax: invalid numeric constant 55555555555555555555 This isn't C. The expectations have changed thanks to scripting languages. If I'm supposed to use this promising language t…

Julia uses machine arithmetic for integer computations. The alternatives have serious drawbacks in technical computing, see

http://docs.julialang.org/en/latest/manual/faq/#why-does-jul...

Re: Try Julia

#42

Earlier quoted context omitted.

Honestly I'm convinced it's a lot more generally applicable than scientific computing. Much of heavy lifting I had to do in C, I can now do in Julia with nearly the same speed and efficiency. Plus, for a lot of the problems I would have chosen Python, Ruby, or even Clojure for, I could really see myself using Julia now.

+1 Besides libs and ecosystem in general, I don't see any advantage Python / Ruby / Clojure have over Julia.

Eh, in the case of Closure pervasive immutability, I don't want to write imperative code anymore. I am sure you could write in a functional style in Julia but all the code I have seen seems to rely pretty heavily on explicit stateful loops. At that seems to be a design choice not just for speed but, from what I have read elsewhere, to be familiar to Fortran and Matlab people, seems like a bad trade off to me.

Re: Try Julia

#43

Fun with Julia: julia> 3 ** 60 syntax: use ^ instead of ** julia> 3 ^ 60 -3535985420588157519 julia> factorial(45) -8797348664486920192 julia> factorial(75) 0 julia> 5 * 5555555555555555555 -9115710369641325457 julia> 5 * 55555555555555555555 syntax: invalid numeric constant 55555555555555555555 This isn't C. The expectations have changed thanks to scripting languages. If I'm supposed to use this promising language t…

Julia supports arbitrary precision arithmetic just fine, but you need to explicitly use it. Overflow checks don't matter in Python or Ruby where everything is relatively slow. See also: http://www.johnmyleswhite.com/notebook/2013/01/03/computers-...

My point wasn't that it can't be done. My point was about usability and what programmers have come to expect from a modern language. I understand that things get trickier when trying to implement arbitrary-precision arithmetic while keeping performance high.

Re: Try Julia

#44
post #3
post #2

Not seeing a prompt. It might be because of the internal "POST http://forio.com/julia/repl/sessions 503 (Service Unavailable)" error?

Probably got "slashdotted".

OK, we've added more servers of larger instance types! You should be good now.

Re: Try Julia

#45

Fun with Julia: julia> 3 ** 60 syntax: use ^ instead of ** julia> 3 ^ 60 -3535985420588157519 julia> factorial(45) -8797348664486920192 julia> factorial(75) 0 julia> 5 * 5555555555555555555 -9115710369641325457 julia> 5 * 55555555555555555555 syntax: invalid numeric constant 55555555555555555555 This isn't C. The expectations have changed thanks to scripting languages. If I'm supposed to use this promising language t…

Try wrapping each of these in BigInt. Example: factorial(BigInt(1000))

Julia defaults to what is fast on your machine. If you want to use BigInt you can do so but it doesn't do so by default.

You can also use 128bit integers in Julia. Example: rand(Int128, 10)

Re: Try Julia

#47
post #42

Earlier quoted context omitted.

+1 Besides libs and ecosystem in general, I don't see any advantage Python / Ruby / Clojure have over Julia.

Eh, in the case of Closure pervasive immutability, I don't want to write imperative code anymore. I am sure you could write in a functional style in Julia but all the code I have seen seems to rely pretty heavily on explicit stateful loops. At that seems to be a design choice not just for speed but, from what I have read elsewhere, to be familiar to Fortran and Matlab people, seems like a bad trade off to me.

Removing loops or mutability from Julia would be a terrible decision. There's nothing inherently wrong with mutability or imperative programming.

Re: Try Julia

#48
post #5

a big white page is not really the best introduction ever (or am i missing the point/humor?)

It was working, until I submitted it here. Maybe too many people Trying Julia.

All fixed now. We have added more servers of larger instance types to support the Julia RELP.

Re: Try Julia

#49

Earlier quoted context omitted.

+1 Besides libs and ecosystem in general, I don't see any advantage Python / Ruby / Clojure have over Julia.

And libs/tooling naturally come along with active use, which I think Julia is going to start seeing real soon. At least from me!

I agree, the libs ecosystem is growing at an amazing pace (partly because macros make it easy to create wrappers around C, Python or Java libs).

Re: Try Julia

#50

Earlier quoted context omitted.

Julia supports arbitrary precision arithmetic just fine, but you need to explicitly use it. Overflow checks don't matter in Python or Ruby where everything is relatively slow. See also: http://www.johnmyleswhite.com/notebook/2013/01/03/computers-...

My point wasn't that it can't be done. My point was about usability and what programmers have come to expect from a modern language. I understand that things get trickier when trying to implement arbitrary-precision arithmetic while keeping performance high.

Do you have an example of a language with arbitrary-precision overflow by default and comparable performance?
Post reply on HN