49 ms·
Try Julia
- sdegutis 13y agoNot seeing a prompt. It might be because of the internal "POST http://forio.com/julia/repl/sessions http://forio.com/julia/repl/sessions 503 (Service Unavailable)" error?
- boyers 13y agoProbably got "slashdotted".
- tbarbugli 13y agoa big white page is not really the best introduction ever (or am i missing the point/humor?)
- bsg75 13y agoIt was working, until I submitted it here. Maybe too many people Trying Julia.
- jonhmchan 13y agoDoesn't seem to work - would love to find a great resource on Julia
- sdegutis 13y agoI've found the docs[1] to be extremely easy to follow, as a nice blend between a tutorial and a spec. [1]: http://docs.julialang.org/en/latest/manual/ http://docs.julialang.org/en/latest/manual/
- stuinzuri 13y agoTry again, please. We spun up more and larger instances to handle the interest from HN.
- mlubin 13y agokoding.com is another way to get an interactive REPL online: https://koding.com/Julia https://koding.com/Julia
- jnazario 13y agooh awesome resource, thanks for the link! (looks down from overuse right now but still, cool!) julia++, i started playing with it this weekend and i'm super pleased. i concur with another comment in this discussion that this is what i wish python had been evolving into. it gets me wondering if python is maybe being left behind compared to other dynamic languages or if it's just fad-ism at work (or me just learning more about languages and features).
- Blahah 13y agoIt's really easy to try Julia by just downloading it: http://julialang.org/downloads/ http://julialang.org/downloads/. I'm becoming increasingly convinced that Julia is the future of technical computing. We've just started pulling together a BioJulia team - if anyone is interested drop an email (in profile).
- vezzy-fnord 13y agoAny reasoning behind such a generically bold statement?
- TheTurd 13y ago> Any reasoning behind such a generically bold statement? If and when they're right, they can smugly point out how forward thinking they were.
- RivieraKid 13y ago- Good performance - Lisp-like macros and other metaprogramming facilities - It's a general purpose language - Multiple dispatch - Designed for parallelism and distributed computation
- sdegutis 13y agoHonestly 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.
- orangecat 13y agoSame here. In my so-far limited experience, it feels like the upgrade to Python 2 that I wish Python 3 had been.
- RivieraKid 13y ago+1 Besides libs and ecosystem in general, I don't see any advantage Python / Ruby / Clojure have over Julia.
- forkandwait 13y agoCan julia yet do the equivalent of the following Octave code: proportion_value = x ./ sum(x) The blocker for me with julia is translating my vectorized way of thinking into loops. I know the loops are optimized, but yuck.
- RivieraKid 13y agoYes, this works in Julia without any changes.
- LinaLauneBaer 13y agoAdblock on Chrome is blocking the command prompt by default. At least on my system...
- williamstein 13y agoYou can also try Julia in your browser here: https://cloud.sagemath.com https://cloud.sagemath.com However, you have to (1) make a free account, (2) create a project, (3) open project, click on "+New", click Terminal, (4) type "julia". If you create a .jl file instead of a Terminal (at +New), you'll have proper Julia syntax highlighting and indentation; you can then run that file from the terminal... (Disclaimer: I'm the founder of SageMathCloud.)
- NicoJuicy 13y agoYou could have had more users if your url was: https://cloud.sagemath.com/new/jl https://cloud.sagemath.com/new/jl ;-)
- kartikkumar 13y agoI've been struggling with building a C++ library for astrodynamics simulations (anything involving the motion of objects in space) within my research group for the last four year. The biggest problem is that for our applications, performance-wise a lot of high-level languages just don't cut it (particularly MATLAB, which is pushed down our throat from freshman year onwards). After some deliberation (and before Python really caught my eye) I opted for C++. That unfortunately brings with it an incredibly steep learning curve for new students who typically aren't interested in programming, but just want to get to the fun space mission analysis stuff. As a result, the project has grown a lot, but interest is waning. Julia seems like the ideal blend between high-level and high-performance. As a general question, is Julia Studio the best way to go about setting up a workflow? Or should I go with something like a Julia plugin for Sublime Text (which I believe exists). Or are there any other tools out there that make Julia dev straightforward?
- ihnorton 13y agoRegarding workflow, the best option is IJulia (https://github.com/JuliaLang/IJulia.jl https://github.com/JuliaLang/IJulia.jl) which has nice integration with plotting and useful things like LaTeX. Vi and Emacs are well-supported, and I know the Sublime tools have gotten a lot of attention from several people. Not directly related to performance, but you might be interested in this: https://github.com/helgee/JPLEphemeris.jl https://github.com/helgee/JPLEphemeris.jl
- kartikkumar 13y agoVery cool, thanks for the tips! That JPL Ephemeris library has given me an idea. I think I might try porting over the NAIF Spice [1] toolkit to Julia. It has MATLAB, IDL, C and FORTRAN ports so I think Julia would fit right in there. [1] http://naif.jpl.nasa.gov/naif/ http://naif.jpl.nasa.gov/naif/
- RivieraKid 13y agoI just use Sublime Text and often copy/paste or include("code.jl") to REPL. I use Eclipse for Java development, but I just don't see a lot of added value for a Julia IDE.
- rebo 13y agoIs round(x) broken? Julia's standard library includes a host of mathematical functions, in addition to the standard operators. Complex numbers are also supported, using the built-in im unit: round(pi) lcm(54, 392, 232) # least common multiple sqrt(square(100)) e^(pi * im) log(e ^ 2) + log10(100) When you're ready, type "next" to continue julia> round(pi) no method round(MathConst{:π},)
- Debilski 13y agoround(x) only works for a few specialised types of x. help(round) tells you that it will return the same type then. Of course for a type of MathConst{:π}, that won’t work. For generic types, you need to at least specify the number of digits (round(pi, 3)). (See also: methods(round))
- KenoFischer 13y agoTo give some context, several common math constants are use the MathConst type to provide multi-precision constants. This allows e.g. a*pi to be extremely accurate if a is, e.g. a BigInt. This issue was also reported at https://github.com/JuliaLang/julia/issues/5561 https://github.com/JuliaLang/julia/issues/5561
- nelmaven 13y agoEverything returns: Undefined 500 Is this broken?
- stuinzuri 13y agoOur Julia REPL servers been slammed. We are shrinking the timeout and bring up more servers. But our capacity is not unlimited. Folks might have to come back later. Sorry about that.
- stuinzuri 13y agoFixed now. We have added more servers of larger instance types. It should work great now.
- sillonleon 13y agoThe Server version of Ubuntu or the 12.04 version does not have the add-apt-repository command. How can i add a PPA to the server without this command? Answer in http://askubuntu.com/questions/38021/how-to-add-a-ppa-on-a-server http://askubuntu.com/questions/38021/how-to-add-a-ppa-on-a-s... There are several options, I chose the one with sudo gedit /etc/apt/sources.list and 1514 sudo gedit /etc/apt/sources.list 1515 sudo apt-get update #not needed 1516 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3D3D3ACC 1517 sudo apt-get update 1518 sudo apt-get install julia (there are broken dependencies) 1519 sudo apt-get install libopenblas-base 1520 sudo apt-get update 1521 sudo apt-get install libopenblas-base 1522 sudo apt-get install libatlas-base-dev 1523 sudo apt-get install libopenblas-base 1524 sudo apt-get install julia 1525 julia 1526 history | tail 1527 history | tail -n 20
- programminggeek 13y agoAm I crazy for feeling like Julia is the new HN darling like clojure, go, ruby, lisp, and scala before it? It seems like in the last week it just started popping up on HN every couple days.
- pcmonk 13y agoHN goes through phases, which I rather like. This way, we get semi-in-depth coverage of topics serially instead of always uniformly dividing our attention among all interesting projects at the same time.
- RivieraKid 13y agoI hope you're right.
- sdegutis 13y agoIt makes sense. We hear about a language, take an initially skeptical approach to it, research it, try it out, and report our findings to others we think might be interested (i.e. HN).
- idProQuo 13y agoI don't really see the problem with this. A lot of the languages you mention have been slowly and sustainably building support, even when they aren't on the front page of HN.
- charlieflowers 13y agoNimrod's turn is coming soon. And it is well-deserving. It has already had some pre-HN-darling attention here, which is what brought it to my attention. I'm very intrigued by it. http://nimrod-lang.org/ http://nimrod-lang.org/
- deleted 13y ago[deleted]
- acangiano 13y agoFun 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 to do calculations and manipulate data, I'd expect to be able to natively handle large numbers without overflowing.
- ihnorton 13y agoJulia 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-are-machines/ http://www.johnmyleswhite.com/notebook/2013/01/03/computers-...
- acangiano 13y agoMy 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.
- ihnorton 13y agoDo you have an example of a language with arbitrary-precision overflow by default and comparable performance?
- rdtsc 13y ago> Do you have an example of a language with arbitrary-precision overflow by default and comparable performance? No, but that also means Julia isn't much special then either right? Maybe it is just me but Julia positions itself as a better Python not just a better C, in that position, can you really blame people if they misunderstand and expect same "high level" behavior from it?
- sillonleon 13y agoJulia is very fast, 0.12 second, 0.60 second for sbcl (lisp) julia>function haz(n) s = 0 for i in 1:n if i % 2 == 0 s = s+1 else s = s-1 end end s end haz (generic function with 1 method) julia> @elapsed haz(10^8) 0.12459633 Compare with lisp sbcl on the same machine: (defun haz(n) (let ((s 0)) (declare (optimize (speed 3) (safety 0)) (fixnum n s)) (loop for i fixnum from 1 upto n do (if (zerop (mod n 2)) (incf n) (decf n)) finally (return s))))
- Stubb 13y agoJulia appears to be a perfect fit for much of what I do at work. I tried it, got very excited, and then facepalmed earlier today. Let's define two functions in the REPL: function foo() return 42 end function bar() return foo() end Evaluating bar() gives 42, just as one would expect. Now let's redefine foo(): function foo() return 69 end Evaluating bar() still gives 42! Not getting something so basic correct tells me to avoid the whole thing for fear of getting subtly screwed by some other oversight. Actually, oversight isn't the right word, since broken automatic compilation has been a known problem for two years: https://github.com/JuliaLang/julia/issues/265 https://github.com/JuliaLang/julia/issues/265.
- RivieraKid 13y agoThat annoys me too but it isn't a big deal, it'll probably get fixed in the future.
- Stubb 13y agoYou change a function, and that change doesn't get reflected in upstream calls—this isn't a big deal? Are you kidding me?
- RivieraKid 13y agoI don't see it as a big deal. You do, so my advice is to wait for 1.0.
- Stubb 13y agoExcept that the linked thread on Github mentions that supporting the redefinition of functions isn't a v1.0 issue.
- RivieraKid 13y agoIt's assigned to the 1.0 mileston.
- plg 13y agoA lot of the comments I see about Julia (and other trendy high level languages) are of the following form: "I can do things I needed C to do before, and almost as fast" which leads me personally to ask, If you could do this in C before, and faster, then why are you switching? Most people will say "because C is bad/difficult/clumsy for doing X" which leads me to say, why are you using C to do X? I sincerely believe (as a computational scientist) that a combination of a high-level language for real-time interactive exploration and prototyping with a fast language like C for doing the actual gruntwork, is the best. Attempts to combine the best of C (speed) with the best of scripting languages (easy to do things fast without having to pay attention to what you are doing) in my opinion end up merely joining the worst of both worlds rather than the best of both worlds. Besides isn't programming about being specific? Do you really want to code stuff without having to worry about the details?
- catinsocks 13y agoYou can see it as an alternative to Matlab/R (sorta)/numpy not C. People only ever used C when speed was crucial and depending on what you were comfortable in or what you had learned maybe Fortran for speed instead of C. Julia is meant for scientific computing with some nice features. As I see it it is similar enought to Matlab to be easily learned by those who use Matlab but has enough goodies that it can be a viable alternative. Programming isn't about being specific it is about accomplishing a task and many times yes you don't want to have to worry about the details as long as it works the way it should.
- plg 13y agoI agree with what you say. More and more though as I get on in my career as a scientist I realize though that the details turn out to matter, sometimes a great deal. Anyway I'm all in favour of an open, fast MATLAB alternative
- RivieraKid 13y ago> I sincerely believe (as a computational scientist) that a combination of a high-level language for real-time interactive exploration and prototyping with a fast language like C for doing the actual gruntwork, is the best. Converting to C can take a LOT of time, and is an order of magnitude less enjoyable than Julia. What about maintaining the code, making improvements, integrating with other code? And what if the prototyping needs too be fast too? It can become a massive pain in the ass. Why should I undergo that if I can just use Julia? > Attempts to combine the best of C (speed) with the best of scripting languages (easy to do things fast without having to pay attention to what you are doing) in my opinion end up merely joining the worst of both worlds rather than the best of both worlds. I've used both Julia and C and I think it's the exact opposite, it combines the best of both worlds.
- elwell 13y agono method round(MathConst{:π},)
- eskimo87 13y ago+1
- joshfraser 13y agoThe pi constant didn't work for me
- axilmar 13y agoAfter typing next about 20 times without seeing anything interesting, I quit.