6 ms·
First impressions using Julia
- guelo 13y agoI was curious about the elseif complaint so I looked into how different languages do it. This is nowhere near a comprehensive list but elif seems to be the least popular. elif: sh, python elseif: PHP, Modula-2, Dylan, Eiffel, Oz, Matlab, Julia elsif: Perl, Ruby, Ada, Modula-3, Tcl, else if: Awk, B, C, C#, C++, Java, JavaScript, Pike, YCP, OCaml, Delphi, Pascal
- cgag 13y agoIt's surprising it's less popular than elsif. I'd think you'd either go full on with shortening it (kind of surprised there's no "ef" now that I think about it), or just spell it right.
- caioariede 13y agoNimrod (http://nimrod-code.org/ http://nimrod-code.org/) also uses elif
- andrewcooke 13y agohuh. thanks. i had no idea elseif was so common. so after seeing that i am pretty sure they have taken it from matlab.
- evincarofautumn 13y ago“elif” also appears in the C preprocessor.
- tomp 13y agoGo uses `else if` as well, but since it requires braces `{ }` for statements in the "then" or else clauses, it doesn't have the dangling else problem.
- dchest 13y ago+ elseif: Lua
- marshray 13y agoWow, I may have to try this Julia thing out. For some reason I had associated it with Lisp or the JVM. The documentation for the graph module (data structure, not charting) suggests that Julia is not a toy language at all. The interface was inspired by the Boost Graph Library! http://julialang.org/Graphs.jl/interface.html http://julialang.org/Graphs.jl/interface.html
- rspeer 13y agoMy impression of Julia is it's what happens when Lisp people decide Python got some things right, and vice versa.
- marshray 13y agoHas anyone tried a large-ish application? What's the startup time like? I'm a little concerned because it seems to be doing a fully optimizing recompile on every invocation.
- deleted 13y ago[deleted]
- andrewcooke 13y agoit's a JIT, so it's progressive compilation in some sense. BUT i certainly noticed that it seemed slower than python when starting a program. not java slow, but not instant.
- ihnorton 13y agoI think Julia is the largest application of itself at the moment - the majority of functionality is written in the language itself. The time-to-repl is 2-4s depending on your os and setup. Taking package loading time in to account, it can be an issue, but there is a plan (and code) to address this soon.
- marshray 13y agoIs the 2-4s for non-REPL ordinary scripts too?
- Xcelerate 13y agoI have just started learning Julia this past week. I do scientific research (molecular dynamics) and this language is exactly the sort of thing I've been looking for. So far I have been using C++ for high-performance, time-critical code and Coffeescript for quick prototyping or for code where performance isn't a bottleneck (out of all the languages I know, I never got around to learning Python for some reason...). Programming languages are a little bit of a hobby of mine, so I've messed around in Haskell, Lisp, and Clojure. I really like the design of Clojure, particularly all of the concurrency features, but I don't think it has the speed or the libraries for scientific work. Julia is the first "scientific" language I've seen that actually seems well-designed instead of ad-hoc (i.e., someone with graduate work in CS was actually involved in its creation). The fact that the authors know what a legit type system is already becomes an upgrade to anything Fortran or C++ could offer. I never thought the OO paradigm (subtype polymorphism) in Java or C++ worked well at all for scientific work. Maybe some people found it useful, but I always thought it was forced. Aspects of Julia I really like: * Libraries - The ones that are in Julia so far are fast (and use well-known numerical libraries like FFTW and BLAS) and easy to use. They're geared toward scientific work, so this is perfect for my research. * Syntax - I like the brevity. I don't necessarily like that blocks must be terminated with "end" but that's just a personal thing. * Speed - Wow. I'm still amazed this is as fast as it is since it feels so much like an interpreted language. All that work with the LLVM is paying off. I almost wonder if in the long run this could be faster than C since you can provide information about the program to itself while its running for on-the-fly optimizations. * Homoiconicity - I can't say that I've actually had a legit use for this yet, but I'm glad that it's there for some reason. I wouldn't say the language is 100% homoiconic (to the extent of Lisp), but it's pretty close. My main concerns with Julia at the moment are: * Will it continue development? I'd hate to write a whole suite of software in a new language that no one else will use because the language goes obsolete. * What's with this weird confusion with tuples and arrays? It seems like there's some situations where these things have overlapping purposes. * Documentation can be slightly confusing. Sometimes it's hard to tell exactly what a function does or what its arguments are supposed to be (without going into the REPL and using "methods"). Example function calls would go a very long way toward helping here.
- ihnorton 13y ago
- caioariede 13y agoIt's nice that the final code looks clean and very readable. I would suggest you to give Nimrod (http://nimrod-code.org/ http://nimrod-code.org/) a try too.
- wikkiwa 13y agoI have been using Julia extensively for about a year as a data analysis tool / R and Matlab replacement. I can say it is very good, especially well suited for exploring and processing large amounts of data. Often when you're trying to understand a set of data, you don't know what kinds of filters and transformations you're going to want to try. If those transformations end up not being easily vectorizable, then they will be dog slow to run in R or Matlab, and probably inconvenient and more difficult to create in C. For these situations, Julia is perfect.
- michaelgrosner2 13y agoI've been spoiled by the IPython Notebook. Once Julia has an equivalent/full support of the IPyNB and a Pandas equivalent, I'm all in on Julia.
- jamii 13y agohttps://github.com/JuliaLang/IJulia.jl https://github.com/JuliaLang/IJulia.jl
- wcbeard10 13y agoNot sure if you know about IJulia [0]--they've been working a lot with the IPython folks. I haven't tried it, but it looks promising. [0] https://github.com/JuliaLang/IJulia.jl https://github.com/JuliaLang/IJulia.jl
- ihnorton 13y agoAs mentioned by the others posts, Julia-IPython ("IJulia") support is available. While this is very new, the fundamentals are solid enough that several people are planning to use it for courses this fall. With regard to Pandas, there is a very nice and rapidly-maturing data frames package: https://github.com/JuliaStats/DataFrames.jl https://github.com/JuliaStats/DataFrames.jl