28 ms·
Why I'm Betting On Julia
- mateuszb 13y agoIt's been done 55 years ago: http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_disassemble.html http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec...
- justinhj 13y agoYeah it's funny that the author has a dig at lisp and then is amazed by something Common Lisp has had for eons
- Homunculiheaded 13y agoI'm pretty confident that in 55 more years we'll be at the point where the state of the art in programming language will be to simply rediscover Common Lisp.
- tieTYT 13y ago> my two concerns are 1) making it work and 2) making it fast. What about maintainability? "Code as if the next guy to maintain your code is a homicidal maniac who knows where you live." -Kathy Sierra and Bert Bates In my experience, making something work and making it (relatively) faster is easy. Making it easy to read is hard.
- Mikeb85 13y agoOften, especially with languages in the statistics, maths and scientific computing fields, you're only writing code for yourself and maybe 1 or 2 others. Everything you write is throwaway, or just functions that can be called and maintainability takes a second seat to ease of use for non-programmers writing code.
- untog 13y agoSeems like that's exactly what he doesn't care about. If you're prototyping or writing a lot of one off operations (for data analysis, maybe) then maintainability is less important.
- tieTYT 13y agoIME, you only know that with hindsight. I have made one off programs I never needed to look at again. I've also made what I thought were one off programs that I needed to maintain for a while. Even in a prototype, you may need to rework a particular piece of code multiple times before it works correctly. Even with a prototype, you may need to use it as a reference for your official version. Even with a prototype, you may end up having to use that as the official version (usually not by my choice). Also, caring about speed 2nd is shocking to me (but maybe I just come from a different world). What if it isn't fast enough on your first attempt? Won't you wish your code was maintainable so you could change it to be faster?
- lightcatcher 13y ago> What if it isn't fast enough on your first attempt? Won't you wish your code was maintainable so you could change it to be faster? From my experience, this isn't the case at all. A lot of the time my first attempt is in Python. The first attempt is really more of a prototype or a proof of concept. If the code works and I want to productize it, the code needs to be sped up. I have (at least) 2 choices: (1) make the Python code as fast as possible or (2) rewrite the whole thing in C/CUDA. If I take option 1, performance gains will be marginal and I still probably won't be happy with the performance of the software. Option 2 might take a bit longer, but at least I'll get something performant out. As I'm just throwing out and rewriting the first attempt, I don't actually care at all if it was maintainable code. I don't even care if the ideas in it were well explained/commented, because they're all my ideas and they're still fresh in my mind and I'm just going to rewrite the code and then document/clean up the fast version. The appeal of Julia is that I no longer have to do this rewrite to make my code fast. Furthermore, if I don't have to do this rewrite, it is actually in my interest to make my first version of the code be maintainable and well documented.
- gfodor 13y agoI think the idea is you can hack together your prototype in Julia, and then instead of re-writing it in C, you can either rewrite or hopefully just refactor your existing code into something presentable.
- jaegerpicker 13y agoSome people build software as a product, for example SaaS companies, software vendors, or enterprise systems programmers. Then some build software to automate difficult tasks or to interact with data. I think the first group cares deeply (or at least should) about maintainability, the second group just wants it to work and work fast. If it's easy to update and fix later that's a bonus but not the main point. I fall into the first class of developer but I can understand the seconds point of view.
- gfodor 13y agoAlso a lot of scientific computing things are very much it works or it doesn't, and once it does it is a reification of some fundamental mathematical algorithm: a black box that should never need to be opened again.
- rodgerd 13y agoWhich is terrible science. Job #1 of good science is reproducability. Crapping out black boxes and claiming "I've proven my theory" in a way no-one else can analyse or reproduce undermines the fundamentals of the scientific method.
- rprospero 13y agoI would argue that having two people independently crap out black boxes and comparing them is far more scientific than having one, open box that's never reproduced. A former co-worker of mine was having trouble understanding the results of her experiment. The simulation software she was using had been the gold-standard implementation for over a decade. The code was clear, well documented, and well engineered. However, my co-worker decided to re-invent the wheel and write her own. The results of her code exactly matched the results of her experiment. Thus, she designed a new experiment and predicted the results with the standard code and her own. After performing that experiment, her simulation was vindicated. It eventually came out that the standard code made assumptions that were invalid in a huge portion of the phase space. It's important, as a scientist, to be able to perform the same experiment twice and get the same result. However, it's far more important to perform to different experiments and get the same result. If measuring my body temperature a hundred times with the same thermometer isn't nearly as useful as measuring it twice with two different thermometers. Having one piece of code that runs on on a hundred different computers, giving the same result every time, isn't as useful as having two different, independent code bases. I do my best to make my code maintainable. I have everything up on github. I'm constantly trying to improve the documentation. However, if my code is still being used ten years from now, we have failed as scientists. What should happen is that a new code base should be written that does the same things that my code claims to do. If we get the same results, then great. If we don't, then we find out why. But that's not happening. There's no plans for an independent re-interpretation. Everyone keeps using my code, because it's clear and it "works". If my code was less maintainable, then that re-implementation would eventually occur and they would be able to check my results. Only then would we truly know if my code works or if it just "works". I'm not going to do that, but I'd understand the reasoning behind it.
- sdegutis 13y agoThis sounds like premature-optimization to me. Maybe it's just me, but in the apps I write in dynamic languages, the bottleneck is rarely in the language. It's usually in some IO. EDIT: some sentence in the article gave me the impression he was using this for non-math-heavy stuff which is why I said this
- thinkpad20 13y agoJulia's primary purpose is as a scientific language, which means lots of number-crunching on large data sets, complex computations, etc. IO is unlikely to be the bottleneck in these situations.
- mjn 13y agoI'm not sure I agree with the second sentence. Any kind of crunching on large data sets has I/O bottlenecks as one of its main issues. When you're crunching on a terabyte of data, pretty much the most important thing is your precise strategy for handling that terabyte of data. I'll agree the asm can be interesting still there in some cases, though, if you think of memory-bandwidth-and-latency issues as part of I/O. There are definitely scientific simulations where compute throughput is the only real issue, but I think of them as a bit different kind of setting than big-data processing (stuff like solving complex sets of equations, which has low I/O but high computational requirements).
- maaku 13y ago> There are definitely scientific simulations where compute throughput is the only real issue, but I think of them as a bit different kind of setting than big-data processing (stuff like solving complex sets of equations, which has low I/O but high computational requirements). ^^ This is the use case for Julia.
- thinkpad20 13y agoYeah, I shouldn't have conflated big-data issues with numerical computing. Good catch. Mostly I was responding to the idea that there is a relationship between dynamic languages and IO bottlenecks. This is certainly often the case in things like web development, where dynamic languages dominate, but under the hood, Julia has relatively little in common with Python/Ruby/JS/PHP/etc, in terms of how it's implemented or, especially, what it's intended to do.
- thinkpad20 13y agoI've tried Julia out a few times and been very impressed. From what I've seen it really does a great job of bridging the gap between easy-to-use and high-performance. It kind of seems like D in that way. I can definitely see lots of situations where a language like this is desirable. I'm in Chicago (and a U of C grad!). I might come to the meetup if I can.
- loganfrederick 13y agoI'm also in Chicago and probably going to the meetup. I haven't tried Julia, but I'd be interested in trying it with the help of experts.
- cjfont 13y ago> The problem with most programming languages is they're designed by language geeks, who tend to worry about things that I don't much care for. Safety, type systems, homoiconicity, and so forth. I'm sure these things are great, but when I'm messing around with a new project for fun, my two concerns are 1) making it work and 2) making it fast. For me, code is like a car. It's a means to an end. The "expressiveness" of a piece of code is about as important to me as the "expressiveness" of a catalytic converter. You want a fast car, but don't care much for having an aerodynamic design, hmmm.. EDIT: In retrospect I now think he means he wants to be able to create the project fast, and this is not about performance.
- tptacek 13y agoThis is a confusing rebuttal, because cars have an aerodynamic design primarily for performance reasons, and Evan is very clear in this article that his primary concern is performance. I think you've misread him.
- cjfont 13y agoAnd yet he doesn't care about type systems, which are largely implemented to help with optimization, you see.
- vanderZwan 13y agoThat's arguable - I hear more people talking about how types reduce bugs in code than how it improves performance. Besides, that's one of the three examples he mentioned, and the the other two are not features involved with said optimisation.
- rodgerd 13y agoWell, it certainly optimises my ability to get shit done if I don't waste it on subtle type-conversion debugging.
- 13y ago
- tesmar2 13y ago> but it's poised to do for technical computing what Node.js is doing for web development I stopped right there. Node.js has only a few great use cases where it shines and in the real world, the vast majority of shops have not switched to using it.
- Mikeb85 13y ago> Node.js has only a few great use cases where it shines and in the real world, the vast majority of shops have not switched to using it. Of course not. 'Switching' is usually more pain than it's worth, especially if your previous solution works. New start-ups are likely the ones who will be using it, just as Rails took off in the start-up world. Likewise, R and Python are going to continue to be in use in existing projects, and Julia is the potential future...
- tesmar2 13y agoIn my experience, most people are turned off by using Javascript on the backend of web-development. Your experience may be different, but I just don't think the analogy made in the original article is a very good one.
- Mikeb85 13y agoThey may be turned off, but in my experience setting up a Nodejs backed site is incredibly easy with the way the frameworks, libraries, and everything are written. That alone will appeal to a lot of people. Front-end only people could easily put together a Nodejs backed up in no time at all. Or you could use something like Coffee-script from front-to back. It's a very easy eco-system to get into.
- collyw 13y agoI was about to say, they ought to be turned off by JavaScript on the back end when there are so many other options. Then I remebered that people use PHP more often than not for back end work.
- volaski 13y ago
- elteto 13y agoTo each its own I guess, but I wanted to say that I don't see "safety, type systems and homoiconicity" and other theoretical "geek" stuff as orthogonal to a programming language's ease of use, productivity and expressiveness. If anything they complement each other. The theory behind it provides a consistent framework so that you minimize the mixing of different paradigms and you can express ideas in a more consistent way. I very much doubt that a language where you just throw stuff in would be easy to use. If Julia is a great language is precisely because of all the thought that went into it, the ideas behind it didn't just materialize in someone's brain.
- collyw 13y agoWas Perl not a language that just had stuff thrown in? It wasn't difficult to use, but difficult to master I would say.
- ahuth 13y agoI don't think his point is that "safety, type systems and homoiconicity" don't matter. His point is that those things don't interest him as much as getting things done do. Those things may help him get things done, but they're for other people to worry about while he works on his own stuff. Also, am I the only one that doesn't know what 'orthogonal' means? I assume from the context it means that these things aren't mutually exclusive. Not really sure about 'homoiconicity,' either.
- benaiah 13y agoOrthogonal literally means "perpendiular" - it refers to two things that aren't related at all. So, non-mutually-exclusive is part of it, but not the whole picture. FYI
- deleted 13y ago[deleted]
- gfodor 13y agoI too agree he makes for a poor Scotsman.
- deleted 13y ago[deleted]
- kibwen 13y agoI'm excited by Julia, but I don't think this article makes a very good sell. It's neat that you can dump the generated assembly, but I'd rather see a demonstration of a robust profiler so that I know which functions I need to dump in the first place. I also disagree that the popularity of Node stems from "getting disparate groups of programmers to code in the same language". From what I've observed, it's not that back-end programmers are suddenly giddy at the prospect of getting to use Javascript on the server, it's that front-end programmers get to apply their existing knowledge of Javascript to back-end development.
- obblekk 13y agoBut Node.js does glue together things written in C (by backend engineers maybe) and then used in node with javascript (by frontend engineers like you said).
- SonicSoul 13y agonot to mention the node package manager, ability to host web servers in couple lines of code, and nice implementation of single threaded pump pattern making it a very scalable platform. seems quite ingenious to me.
- bryanlarsen 13y agoThe main reason we at clara.io use Node is so that front-end code can run in the back end. Imports, Exports and Renders are done by workers that are essentially headless clients that happen to have access to first and third party binary libraries.
- SonicSoul 13y agowhat's the benefit of this? performance?
- bryanlarsen 13y agonot having to write the same code twice.
- 13y ago
- shele 13y ago"Julia was not designed by language geeks — it came from math, science, and engineering MIT students" This statement is built on a false dichotomy. And it is not really true for Julia, take the type system for example, sophisticated AND unintrusive.
- StefanKarpinski 13y agoJeff and I were slightly miffed at being called "not language nerds" ;-)
- carljv 13y agoLanguage nerds (or geeks), definitely! Maybe he meant something like "language dweebs" or "language snobs." Julia's great strength, I think, is that it was designed by folks with very good grounding in language design, but who prioritized practicality.
- Glide 13y agoI cringed when I read that in the blog. I came across the benchmarks on the home page and I was thinking there was no way that it was possible to write a language that looks that good and performs that well without being a "language nerd."
- exDM69 13y ago> "Julia was not designed by language geeks — it came from math, science, and engineering MIT students" This makes me a bit cautious about the language. Scientific computing people are often very smart but they are not programmers or computer scientists and may do funny things that a computer scientist would not. Like one based indexing of arrays in Julia. This is not a big deal but I'm a bit wary that there may be some nasty surprises for a language geek computer scientist like me :) Another example is the byte addressing of UTF-8 strings, which may give an error if you try to index strings in the middle of a UTF-8 sequence [1]. s = "\u2200 x \u2203 y"; s[2] is an error, instead of returning the second character of the string. I find this a little awkward. There's a flip side to this too, if you're dealing with scientific computing there seems to be a wide variety of scientific computing libraries available in Julia [2]. Overall I find this language very interesting and it is on my shortlist of new languages to take a look at when time permits. [1] http://docs.julialang.org/en/latest/manual/strings/#unicode-and-utf-8 http://docs.julialang.org/en/latest/manual/strings/#unicode-... [2] http://docs.julialang.org/en/release-0.2/packages/packagelist/ http://docs.julialang.org/en/release-0.2/packages/packagelis...
- sdegutis 13y agoWait a minute! Can you embed Julia into a C program like Lua? Can it interface with complex C types cleanly?? This might be the scripting language I'v been looking for in my side project!
- sdegutis 13y agoWow. Okay, yes. It can be embedded[1]. It can call C code[2]. Julia may have just saved my project (which was dying because it needed a good scripting language that was fast)! [1]: http://docs.julialang.org/en/latest/manual/embedding/ http://docs.julialang.org/en/latest/manual/embedding/ [2]: http://docs.julialang.org/en/latest/manual/calling-c-and-fortran-code/ http://docs.julialang.org/en/latest/manual/calling-c-and-for...
- 3JPLW 13y agoAnd embedding (and its documentation) will likely get much better very soon. https://github.com/JuliaLang/julia/pull/4997 https://github.com/JuliaLang/julia/pull/4997
- sdegutis 13y agoOne big pain point so far is that it won't be easy to actually embed Julia into my app. So users of my app will have to install Julia (probably via homebrew) before they can script the app with it.
- sdegutis 13y agoI foresee Julia overtaking PyObjC, RubyCocoa, Nu, and MacRuby as the scripting language of Mac apps. This looks incredibly perfect. You don't lose performance, so you can even do the hard stuff in Julia. Which makes bridging much less painful. Hoorah!
- evanspa 13y agoWhen I read the opening paragraph, I immediately thought of the author as a Blub programmer [1]. "The problem with most programming languages is they're designed by language geeks, who tend to worry about things that I don't much care for. Safety, type systems, homoiconicity, and so forth. I'm sure these things are great..." Yes, those things are great. They ultimately aid in helping the programmer tackle the inevitable complexity that arises when building systems in a maintainable way. [1]http://www.paulgraham.com/avg.html http://www.paulgraham.com/avg.html
- john_b 13y agoYou're assuming the author wants to use Julia to build complex systems. Much of scientific computing has no need to do so, but is more concerned with discovering new knowledge and testing new ideas. Once the knowledge is gained, products may be built around that knowledge or new inquirires may be launched from it, but scientific computing usually uses programming languages as research tools rather than development tools.
- Fomite 13y agoThis. The amount of code I write that never gets touched again after a paper goes to press is staggering.
- weichi 13y agoHow good is the interactive plotting experience?
- astrieanna 13y agoI haven't had the smoothest experiences getting plotting in general to work (it's getting progressively better). The plotting in IJulia using PyPlot (matplotlib wrapper) has been good for me. The Julia plotting packages are Winston, Gadfly, and Gaston. You can find detailed discussions of which one to use on the julia-users mailing list.
- weichi 13y agoThank you. I can appreciate that it's difficult to implement good interactive plotting, especially across platforms. It's also very very important!
- kevinalexbrown 13y agoWhen out with friends recently, one of them mentioned how awesome Julia is. I was surprised to hear someone talk about it, even from another person in science. She turned and gushed about how awesome it was, how supportive the community was, even though she was "not really someone who likes programming." And she liked it so much she was telling her friends about it at a bar! If you make a programming language that people who don't like programming love enough to spread by word of mouth when not near a computer, which technically-oriented people also love, that's a lot like the OSX terminal + nice GUI blend. That's a pretty rare thing. And for collaborative science it's pretty important. Often, you'll have people in a bio lab who are very proficient in their area of biological expertise, but who would be solving the wrong problem by spending 2 years trying to become C++ hackers. On the other hand, there are a lot of people who write computational libraries, but know they have to translate them to matlab, or write a matlab wrapper and pray that their users can get it to compile which might sound simple to folks here, but is really frustrating for less computationally oriented people when something goes wrong.
- Pxtl 13y agoTo be fair, there's also Python+NumPy and R in that space, not just Matlab. Besides the "tinker with LLVM" thing, what does Julia offer that Python (or Cython for speed)+NumPy does not?
- smellelderberry 13y agoJulia has a community that doesn't feel threatened that their language is waning in popularity in some fields, and therefore doesn't feel the need to defend it every chance they get.
- wirrbel 13y agoNo need to make this personal. It was the original blog article that concentrated on the negative things and did not do a whole lot at explaining Julia's benefits. I really love Scipy and friends and I also think Julia is a promising system.
- 13y ago
- astrieanna 13y agoThe author and I like Julia for nearly opposite reasons. (I write Julia for the language geek reasons. The power of homoiconicity is amazing for writing static analysis in the language you're analyzing.) It's really cool that Julia can appeal to people with nearly opposing priorities tho. :) I'm looking forward to giving the workshop at UChicago. It'll be my third time presenting an Intro to Julia workshop.
- tomrod 13y agoWill you be webcasting?
- astrieanna 13y agoNo, unfortunately not. We are hoping to record it, tho.
- deleted 13y ago[deleted]
- degenerate 13y agoWould love to see it put online :>
- niix 13y agoNo.
- Blahah 13y agoJust yesterday I decided to start seriously developing in Julia. High-level languages are a bottleneck for computational biology. We need to be able to write things fast, and have them run fast. So far no language really does this. But Julia looks like the one. I'm going to put together a BioJulia team is anyone is interested in playing.
- collyw 13y agoPython is very popular. I need to explore Pandas / Numpy more, but I was under the impression that they are closely linked to the underlying C arrays to provide high performance. In my opinion the problem with computational biology is that most biologists are not keen to improve beyond a basic level of programming.
- Blahah 13y agoThat is a problem for a large number of biologists who are working with bioinformatics, not for computational biologists, who tend to be computer scientists working in biology. I'll admit there are a good number of crap computational biologists as well, but that's not a reason to stop the rest of us from having good tools. In fact we should be trying to propagate tools that help them do what they are trying to do with minimal friction. Like Julia. Numpy/pandas are good. But as evidenced by the Julia benchmarks, Numpy is relatively very slow. Also, most things that slow down computational bio are to do with much broader aspects of the language than linear algebra libs. Most successful standalone sequence analysis software is written in C or C++ for this reason.
- howeman 13y agoYou might also look at biogo for inspiration https://code.google.com/p/biogo/ https://code.google.com/p/biogo/
- Blahah 13y agoI had BioPython, BioRuby, BioPerl and BioJava on the list - hadn't thought of BioGo! Thanks.
- weatherlight 13y agoI love Julia, Coming from the Ruby world it was very easy to get into. It was easy to see how useful and expressive the language was by just doing a few Project Eulers.
- blueblob 13y agoHow does Julia interface with C? Is it easy to interface Julia with C because all it does is compile the C with Clang/LLVM?
- astrieanna 13y agoJulia does not compile the C code; it links against shared libraries. It helps that Julia types can model C structs easily. Manual entry on calling C: http://docs.julialang.org/en/latest/manual/calling-c-and-fortran-code/ http://docs.julialang.org/en/latest/manual/calling-c-and-for... Blog post on passing Juila callback functions to C code: http://julialang.org/blog/2013/05/callback/ http://julialang.org/blog/2013/05/callback/
- candybar 13y agoI really don't like the anti-intellectual tone of the beginning. "The problem with most programming languages is they're designed by language geeks, who tend to worry about things that I don't much care for. Safety, type systems, homoiconicity, and so forth." can be rewritten as: "The problem with most software is that they are designed by computer geeks, who tend to worry about things that I don't much care for. Information security, thread safety, modularity, hardware acceleration, system design, and so forth."
- nbouscal 13y agoI'm glad I'm not the only one. I couldn't make it past the first paragraph. He says he doesn't care for safety and type systems, and then says what he cares about is making it work and making it fast, both of which are significantly aided by safety and type systems.
- dantiberian 13y agoAll he's saying is he doesn't care about the features, just what they let him do with them. Type safety in and of itself isn't interesting to the author but he appreciates it's benefits.
- nbouscal 13y agoIf that's the case, the author would be well-served by rewriting the first paragraph to make that clear. The way it's currently written does not communicate that to me at all.
- ahuth 13y agoSafety/type systems may significantly aid making it work/fast, but the end result is more important to him than more abstract concepts. Some people are really interested in making compilers, right? While others (such as me) just want to do cool things with them.
- _random_ 13y agoThe problem with most cars is they're designed by professionals, who tend to worry about things some people don't much care for. Safety, security, reliability, and so forth.
- foundart 13y agoI see the Julia home page lists multiple dispatch as one of its benefits. Since my only real exposure to multiple dispatch was when I inherited some CLOS code where it was used to create a nightmare of spaghetti, I'm wondering if any Julia fans here would care to elaborate on how they've used multiple dispatch for Good™ instead of Evil™
- astrieanna 13y agoMultiple dispatch lets you make math operators work like they do in path. That means that you can use `+` the same way on ints, floats, matrices, and your own self-defined numeric type. If `x` is a variable of your new numeric type, OO languages make making `x + 5` work easy, but `5 + x` super hard. Multiple dispatch makes both cases (equally) easy. This was, as I understand it, the major reason that Julia uses multiple dispatch. Multiple dispatch can make interfaces simpler: you can easily offer several "versions" of a function by changing which arguments they take, and you can define those functions where it makes sense, even if those places are spread across multiple modules or packages. Julia provides great tools (functions) that make methods discoverable, help you understand which method you're calling, and help you find the definition of methods. Looking at some Julia code (the base library or major packages) might give you a better idea of how Julia uses multiple dispatch.
- foundart 13y agoTotally makes sense. Thanks for the info. Will also dig around in the code.
- rrggrr 13y agoI'm betting on Scratch. The benefits of automation are mostly denied to me because I haven't the time to learn Julia or properly use the Python skills I already possess. I do however have the time to link and configure objects ala Scratch and Apple's Automator, or the first generation of what was once Allaire's Cold Fusion. Its not just me, either. The demand for automation tools is pervasive in business and education, but the time and innate skills needed to program effectively belong to a subset of the needy. Bring me a language that is truly a means to an end and take my money.
- rubyn00bie 13y agoNot to be a an asshole, something I have to preface a lot on here... but, uhh, "Safety, type systems, homoiconicity, and so forth. I'm sure these things are great, but when I'm messing around with a new project for fun, my two concerns are 1) making it work and 2) making it fast." Uhhh... Call me crazy, but wouldn't the "so forth" be what you care about if #2 is that important to you?
- eonil 13y agoDoes Julia have AOT compiler which produces a binary which can be linked to a C program? I am asking this because I have to consider availability on iOS - which is a platform prohibits JIT.
- kazagistar 13y agoAlas, last time I checked this was still on the todo list. With sufficient annotations and type inference, there is no reason this would not be possible, but they way it sounded it would take rewriting or creating large chunks of core code and algorithms.
- smortaz 13y agomini ASK HN: would there be any interest in supporting Julia in Visual Studio? (as a free/oss plugin). i lead the Python Tools for Visual Studio project at msft and would be curious if there is interest. as a side note, if you do you use Python & require Python/C++ debugging, PTVS now supports it: http://www.youtube.com/watch?v=wvJaKQ94lBY#t=10 http://www.youtube.com/watch?v=wvJaKQ94lBY#t=10
- KenoFischer 13y agoAre you using the IPython protocol for communication with python? If so, extending it to julia should be fairly straight forward.
- smortaz 13y agowe are for the integrated IPython REPL. but my question was more in terms of intellisense, debugging, profiling, mixed julia/C++ debugging, etc. ie, a fully integrated experience in VS.
- iamed2 13y agoThe fully integrated experience you mention would do a lot for the Julia community in terms of gaining users tied to the GUI elements of MATLAB and VS for other languages. Integrated debugging and inspection in particular is a long-requested feature that has yet to see much attention. Integrating with Pkg as Julia Studio does would be another important feature, as well as providing some sort of integrated plotting/graphics widget (a backend canvas along with plot navigation and image export, ideally supporting more than one of Julia's plotting backends). I would certainly contribute to an alpha- or beta-testing effort :)
- Fede_V 13y agoThat would be fantastic, and I'd love to see that.
- xixi77 13y agoThat would be actually quite awesome.
- wirrbel 13y agoI don't really see the need for the author to make himself into a "cowboy" coder and point out how they ignore all those valuable insights and enlightenments of programmers. Julia is a kind-of-fine language that is designed to appeal Matlab users first of all by its syntactical looks. Just like Javascript was designed to appeal to C and Java users by imitating their look. Under the hood, Julia is quite a smart development, not only in terms of code generation, but also in terms of datatypes and object models. Multiple dispatch is something that more or less only Lisps typically offer natively (and Dylan). When working with types (especially in dynamically strongly typed languages) this is often something what I am missing in other languages. Consider Python: if isinstance(x, Y): ... elif isinstance(x, Z): ... This feature alone shows that the authors of Julia are rather the thoughtful language-loving authors. So I would like to leave the small scope of the article but look at the greater picture: Julia and its competitors. There are actually quite a few on the market. A few domain-specific numerical libraries exist for C/C++/Fortran for scientific purposes (ROOT at Cern, etc.). They are more or less falling out of fashion. For a long time, Matlab has been dominant in some faculties for evaluation and working with data, process signals and images. It is not by accident that Matlab was created as a convenient Wrapper to Fortran libraries at the time. From a software developer's perspective, Matlab is for Cowboys. Next to its high price (and the vendor lock in forced upon college and university students who are trained for matlab when there exist suitable open source alternatives), the most appalling thing about Matlab is its poor performance as a programming language. While its easy to write small scripts, solve linear algebra problems and plot a few things, I have hardly seen well organized Matlab code and I just think that it is impossible. While Matlab licenses cost heaps of money, support is not good and upon a version change you have to spend considerable amounts of work getting around API changes. The Matlab clones available (Octave) are generally unimpressive. I think this has to do with the big effort of copying Matlab and the need to develop the whole tool stack (parser, interpreter, libraries). Contributors are hard to find because octave hardly offers any benefit over the original, like ReactOS with Windows, Octave can only react. I still value the effort of the octave folks, they have done some great work! Scientific Python has chosen a slightly different path. Taking the fairly uncontroversial programming language Python, the authors created an infrastructure of thematically separated modules. While eliminating the need to design and implement an own programming language, a lot of work could be spent on building useful libraries. Also, existing libraries were reusable (databases, XML, etc.) and Python is a really convenient programming languages for both Newbies and professional software developers. So with this pragmatic approach, the contributers have created one of the best environments for scientific software development and would be my suggestion for anyone at the moment who just wants to use one system. What still amazes me: While working in an ipython notebook (http://ipython.org/notebook.html http://ipython.org/notebook.html) on some numerical calculations, I can just pull up Sympy (http://sympy.org http://sympy.org) and perform some symbolic computations (Fourier transforming some function analytically or taking the derivative of some other, etc.). Oh, and have I told you about how Scipy can replace R for really cool statistical analyses? The part where Julia kicks in now is the point that Matlab has a lot of market ground, especially with engineers who are not extraordinarily passionate about programing. For some people the burden of learning another syntax is just too big, they are not full time programmers but spend their time more with acquiring data and using the results. I really hope that some of them who are not willing to switch to scientific python can agree on switching to Julia. Full Disclosure: I have occasionally been forced to work with Matlab (so I do have some experience with it without being an expert) and it was not fun. This is one of the reasons I would like all Scientists to have the chance of choosing a good environment that is suitable for them. If its Matlab for some, so be it ;-) I have never looked back.
- avodonosov 13y agoThe reason to bet on Julia is disassembling a function? This is a standard feature in Common Lisp (ANSI standardized in 1994) CL-USER> (defun f(x) (* x x)) F CL-USER> (disassemble 'f) L0 (leaq (@ (:^ L0) (% rip)) (% fn)) ; [0] (cmpl ($ 8) (% nargs)) ; [7] (jne L33) ; [10] (pushq (% rbp)) ; [12] (movq (% rsp) (% rbp)) ; [13] (pushq (% arg_z)) ; [16] (movq (% arg_z) (% arg_y)) ; [17] (leaveq) ; [20] (jmpq (@ .SPBUILTIN-TIMES)) ; [21] L33 (uuo-error-wrong-number-of-args) ; [33]
- kisielk 13y agoThis is also possible to a degree in Python, though you only get the bytecode: >>> def f(x): ... return x * x ... >>> import dis >>> print dis.dis(f) 2 0 LOAD_FAST 0 (x) 3 LOAD_FAST 0 (x) 6 BINARY_MULTIPLY 7 RETURN_VALUE
- sitkack 13y agoAnd the bytecode is just calling polymorphic methods. All the real work is done in the object implementations of type(x). I was very bummed years ago to realize how shallow the bytecode representation in Python is. There is no sub-terpreter, just C.
- steveklabnik 13y agoYou can get the bytecode in Ruby too: http://www.ruby-doc.org/core-2.1.0/RubyVM/InstructionSequence.html http://www.ruby-doc.org/core-2.1.0/RubyVM/InstructionSequenc...
- blt 13y ago(jmpq (@ .SPBUILTIN-TIMES)) So, this is going to be really slow inside a loop. Would the compiler be able to optimize it into a single multiply instruction if it could prove that the input had to contain integers?
- haberman 13y agoCan Julia be a competitor to R? I love R in concept (interactive environment for statistical analysis) but the language just drives me crazy in its multitude of types and the loosey-goosey ways it converts between them. A friend of mine is really proficient with R; when I walked him through some of the R patterns that are very confusing/irregular to me, he sort of laughed: he could see what I was saying but he said "with R you can't worry about things too much, you kind of just have to just go with it." If Julia can serve some of the same use cases but in a better-designed way, sign me up!
- xixi77 13y agoI believe it has been one of the intentions for a while. How far it has advanced, I'm not sure, I haven't looked at it for almost a year, now time for a refresher. But R may be a bit tricky to compete with directly at this point: it has been designed as a statistical language from the ground up, and it would be a while for any language to catch up to R's library. But, I still see many people doing statistical computations in Matlab, and that can not be very hard to beat, especially how similar the syntax is, and how ugly Matlab is at statistics (from what I am reading in the comments here, vectorization still carries a performance penalty though, which is a real pity). Just curious -- what patterns bothered you the most with R btw?
- haberman 13y ago> Just curious -- what patterns bothered you the most with R btw? It's mostly around the multitude of subtly different types and the ways you convert between them. I think I also remember strange things like lists having named attributes in addition to list members that just seemed totally wrong and confusing to me. I wish I could give you better specifics but it's been several years since I've done anything with R.
- Homunculiheaded 13y agoThe biggest thing that R has is just an incredible amount of really well documented packages, that are quite frequently cutting edge (unless you want to do any deep learning work). Not to mention that the base R has just a tremendous amount of useful stuff baked in. I've kept an eye on Julia and would love to use it in my everyday work, but also know that for now that's just not possible because of how many built-in functions and packages I rely on. However solving this is just a function of time and community (Julia just needs their Hadley Wickham). I remember when people scoffed at Python because it has nowhere near the ecosystem that Perl did.
- lafar6502 13y agoLooks strangely similar to Lua
- zhemao 13y agoWell, most of the syntax he shows here is just calling functions. A lot of dynamic languages have similar syntax for functions calls. But you're right that Julia's syntax is superficially similar, with function definitions like function foo(bar, baz) end and 1-based indexing of arrays (although Julia's use of that was to be similar to MATLAB).
- farslan 13y agoWe have a Julia and iJulia app on https://koding.com https://koding.com. It's going to be used by Harvard & MIT students soon. It's public and everyone can try it by simple login to Koding. The best part is you can easily try it online, without installing anything. Here is an screenshot of how it's look like (iJulia and Julia inside Terminal): http://d.pr/i/MsZt http://d.pr/i/MsZt The source of this app can be found here: https://github.com/gokmen/julia.kdapp https://github.com/gokmen/julia.kdapp I'm happy to answer any questions :)
- astrieanna 13y agoYou can also use Julia on the Sage Math Cloud. https://cloud.sagemath.com/ https://cloud.sagemath.com/ They don't have IJulia (yet) though.
- axman6 13y agoI find the fact that I can't even find out what koding.com is when using IE 9 pretty obnoxious. Love it or not, many people are forced to use older browsers. Sending them to https://koding.com/unsupported.html https://koding.com/unsupported.html without any explanation at all a great way to make people not want to bother finding out what you're offering.
- whatevsbro 13y agoBut you do know and understand why they're not interested in supporting IE, right? And you'd feel the same way in their shoes, yes?
- zem 13y agothe interesting thing is that what excites me about julia is that it is clearly a scientific computing language designed by people who are language geeks. the feature set seems very clean and well-thought-out to me.
- ggchappell 13y agoFiglet sighting. Font: big. :-)
- mpchlets 13y agoBased on your comments of Cowboys, you have obviously never rode hard put up wet.
- georgewfraser 13y agoIs there reason to believe Julia is actually fast outside of microbenchmarks? Their strategy of aggressive specialization will always look good in microbenchmarks, where there's only one code path, but could blow up in a large codebase where you actually have to dispatch across multiple options. I've never seen a Julia benchmark on a big piece of code.
- sixbrx 13y agoI've had some problems with Julia performance for a finite element method implementation (https://github.com/scharris/WGFEA https://github.com/scharris/WGFEA), mostly I believe because of (1) garbage generated in loops causing big slowdowns and (2) slow calls of function closures. Functions defined at the top-level which don't close over environment values are fast, closures however are quite slow, which is really painful for situations where closures are so useful, e.g. to pass as integrands to integration functions. There is an github-issue about the closure slowdown, but I don't have it handy. Both can be worked around, by writing in a lower level style, e.g. by using explicit loops acting on pre-allocated buffers, avoiding higher-order functions, etc. The pre-allocated buffers can be a lurking hazard though (Rust avoids the danger in the same strategy with its safe immutable "borrow" idea). I felt like these workarounds were giving up too much of the advantages of a high level approach for my own tastes. I have converted to Rust to avoid the garbage collection for sure, and I'm extremely pleased with the performance. It would be nice having a REPL though, I do miss that. And I do intend to stay involved with Julia. I'm sure the situation will improve. Good high performance garbage collectors aren't easy (and they are easy to take for granted after being on the JVM for a while) - that's probably the biggest challenge for Julia as a high performance language, IMO.
- enupten 13y agoAll they're missing is a cool interaction mode like SLIME.
- Malarkey73 13y agoThis is odd as a much better post on Julia v R v MATLAB v Python etc has got little attention: http://slendermeans.org/language-wars.html http://slendermeans.org/language-wars.html
- RivieraKid 13y agoI've used Julia for couple of projects and it's amazing, I seriously believe that Julia is better - in several ways - than all of the widely used dynamic languages like Python, Ruby, Clojure, Octave or Lua. It's a brilliantly designed language. There are so many things to like about this language.
- bayesianhorse 13y agoI agree that Julia is great. But it's not there yet, either.
- juleska 13y agoOk, good to see, but, what i can do with it that i can't with another language? -.-
- carnaval 13y agonothing. http://en.wikipedia.org/wiki/Turing_completeness http://en.wikipedia.org/wiki/Turing_completeness
- DonGateley 13y agoI want to write audio VST plugins in this language! Somebody please make that easy. :-)
- DonGateley 13y agoIs there a Julia forum anywhere. Like with a hierarchy of topics and subtopics and with hierarchical threads at the bottom level like HN? Optimally something that remembers what you've read.
- ihnorton 13y agoNot a forum exactly, but julia-users and julia-dev are hosted on Google Groups which does threading and remembers what you've read. See the homepage for signup (julialang.org)
- DonGateley 13y agoThanks. A good variety of things there but I'm hoping someone puts together a phpBB (or similar) site such as Oculus Rift uses here: http://oculusrift.com/ http://oculusrift.com/ Such an organized site where you could drill down to topics of interest through broader categories would really be helpful. It would be best, of course, if it was set up and accessed through julialang.org as something official. I don't know how to do that or I would. It isn't reputed to be very difficult to set up a phpBB site and I'm sorta hoping some enthusiast who does know how picks up on it.
- otikik 13y ago> the real benefit is being able to go from the first prototype all the way to balls-to-the-wall multi-core SIMD performance optimizations without ever leaving the Julia environment. That sounds like someone who has not had to maintain any kind of software for more than 2 days.
- deleted 13y ago[deleted]
- digitalzombie 13y agoI'm betting on Julia and Rust really. Julia for Scientific programming and Rust for system.
- tenfingers 13y agoThere's a lot to love in Julia, but my biggest nitpick is the 1-based array index. I can see where it comes from, but it's not something I can praise. I use R on a daily basis, where the aim is mostly interactive analysis, and still I cannot see any reason to use 1-based indexes. For a language that is instead mostly oriented to programming, I would have not went for the "familiarity" argument.
- thinkpad20 13y agoI'm guessing whoever was responsible for that decision was either a hardcore FORTRAN or MATLAB user, since both of those have 1-based indices. Or by a similar token, they could have chosen that because they expect that many of their users might be coming from either of those languages. I guess you'd get used to it, but I agree it's a big drawback.
- allochthon 13y agoI like what I see so far at this page [1] and will watch closely to see whether Julia catches on. One thing -- can we call agree that dictionary literals begin and end with '{}', that arrays are zero-indexed and that an index into a unicode string is properly a character and not a byte? Or are we doomed to permute endlessly on details such as these? I wish any new languages would set aside a large set of tempting innovations and just go with the flow on the smaller points. [1] http://learnxinyminutes.com/docs/julia/ http://learnxinyminutes.com/docs/julia/
- 3JPLW 13y agoWell, in many ways, they are going with the flow. They're targeting mathematicians, and R/Matlab users… all of whom use 1-indexed arrays. And, really, the kinds of dictionaries you're used to are constructed with {} braces. The square braces hold more specifically-typed keys and objects. It's a very clever analogy to their typed/untyped arrays. And wonderful for performance. ["one"=> 1, "two"=> 2, "three"=> 3] # -> Dict{ASCIIString,Int64} {"one"=> 1, "two"=> 2, "three"=> 3} # -> Dict{Any,Any}