18 ms·
Static, Ahead of Time Compiled Julia
- pjmlp 11y agoJulia is really following Lisp and Dylan's footsteps! Congratulations to all involved in pushing the actual state of dynamic languages.
- jhoechtl 11y agoI personally find the syntax of the language and quality of the current implementation (speed!) excellent. However, it doesn't experience the marketing languages like Rust or Golang receive. What I personally also find worrisome is the perception (at least for me) that Julia is confined to scientific computing whereas I find it should really be a general purpose language.
- vmorgulis 11y ago> ... that Julia is confined to scientific computing whereas I find it should really be a general purpose language. It is intentional. Julia could be the new Fortran like Rust could be the new C++.
- z92 11y agoI am all for replacing Python with Julia.
- pjmlp 11y agoMe too, maybe this will pressure more adoption of PyPy.
- pwang 11y agoCan you elaborate on this?
- pjmlp 11y agoFor the majority of people without CS background Language == Implementation. So if the reference implementation is a bare bones interpreter, even though there are JIT and AOT compilers tp choose from, they will say language X is interpreted. Which in Python's case means many ignore the existence of PyPy, given that the language designers don't want to change the nature of CPython.
- tavert 11y agoPyPy's adoption problem is not that it isn't the reference implementation. It's that it is incompatible with a huge body of Python modules that rely on C extensions. If you're going to lose access to libraries, may as well not make the same exact semantic decisions for a JIT-oriented language implementation that you made for an interpreted implementation.
- renox 11y ago> What I personally also find worrisome is the perception (at least for me) that Julia is confined to scientific computing whereas I find it should really be a general purpose language. With 1-based array indexing? Very unlikely.
- plinkplonk 11y agoThere is no technical reason that Julia can't be used for general purpose computing. (Well personally, I'd like nested namespaces, but) it is an amazing language. Just a matter of someone putting in the time to build the required libraries and glue code. Which will happen in time.
- elcritch 11y agoThe lack of AOT has been the main thing holding me back from adopting it for more general purpose computing. Now with AOT I can "compile" the code and get some reasonable expectation of performance and ease of deployment. I'm probably going to start using Julia and (hopefully) extending the web server packages. Basically it feels similar enough to JavaScript for web development but with more expressiveness, so I'm pretty excited by the prospect. Now this turns up a terrible delima, do I try to use Julia or Rust for writing embedded controllers? Rust has macros and direct memory control, but the article mentions. :) I also think the more of us that recommend Julia for general compute, the more likely it'll get used that way.
- vmorgulis 11y ago> Julia Computing carried out this work under contract from the Johns Hopkins Applied Physics Laboratory (JHU APL) for the Federal Aviation Administration (FAA) to support its TCAS (Traffic Collision Avoidance System) program. It's great! Looks like a very interesting contract.
- chappi42 11y agoIn case you are interested, here are slides (http://juliacon.org/2015/images/juliacon2015_moss_v3.pdf http://juliacon.org/2015/images/juliacon2015_moss_v3.pdf) and a presentation (https://www.youtube.com/watch?v=19zm1Fn0S9M https://www.youtube.com/watch?v=19zm1Fn0S9M) about TCAS (and its successor, ACAS X)
- blt 11y agoJulia seems like an almost perfect MATLAB replacement. (for my personal preference, I would like a slightly more static/rigid language, but I understand why that's not the right choice for Julia's target users.) There is just one problem... I really, really wish they had dropped the 1-based indexing and <= upper bound on index ranges. It is so annoying.
- jfaucett 11y ago"I really, really wish they had dropped the 1-based indexing and <= upper bound on index ranges." really? There are quite a few things I don't like about julia, but using 1-indexing and "end" makes implementing algorithms much clearer IMHO. The main pain points for me in julia are the module/pkg system and that the runtime is not just batteries but more like 10 generators included i.e. it could be way more minimal. But I get that the goal is to have a powerful scientific computing language and not to build a multipurpose language that emphasizes modular construction of code units and production ready package and build management utilities. All in all, when judged by how well julia achieves its self-stated goals, I think it is excellent.
- halflings 11y agoThis is kind of bike-shedding (since that's such a small part of the language), but I also think there are arguments for using 0-indexing with open upper bounds. Guido explains his choice best: https://plus.google.com/115212051037621986145/posts/YTUxbXYZyfi https://plus.google.com/115212051037621986145/posts/YTUxbXYZ...
- rbehrends 11y agoWell, Julia is a language designed for mathematics, where indices starting at 1 is common (vectors, matrices). You can argue that polynomials have exponents starting at zero, but then you quickly get to Laurent polynomials, and what you really should be arguing is that the lower bound should be configurable, rather than being set at one specific value (which, of course, is still possible with custom types). Second, I don't find Guido's argument convincing. Yes, half-open ranges can be mathematically more elegant (and that's actually Dijkstra's argument), but that doesn't mean that the code necessarily becomes more readable. For example, to construct an array without the element at index i, you'd do the following with Python-style indexing: a[0:i] + a[i+1:n] and the following with closed intervals and indexing starting at 1: a[1:i-1] + a[i+1:n] While there is an element of subjectivity to it, I at least find the latter option more readable (possibly because of habituation to mathematical notation). While the notation for the specific example of i:i+k-1 might be less elegant with closed ranges, closed ranges are something that you find in every math textbook, because sums, products, unions, intersections from a to b (and other operators in that style) operate on closed ranges normally. Closed ranges are the norm in conventional mathematical notation and it makes sense to pick the option that minimizes the overhead when transcribing between mathematical texts and code.
- kgabis 11y agoI think this [0] is worth reading before starting a project in julia (it's quite shocking). Does anyone know if anything has changed in julia's development process over the last year? [0] http://danluu.com/julialang/ http://danluu.com/julialang/
- sveme 11y agoThough it would have been fair to point out that this rant was written about his experiences the last time he used Julia, in Oct. 2014, nearly 18 months ago.
- conjectures 11y agoThe language works well for what is effectively still a beta. Sure I'd like more documentation and tests, but I'm happy to get features first. The alternative for me is trying to do some non trivial cluster computing in C or in python, either of which would suck.
- lmm 11y agoWhat kind of cluster computing? I've had good experiences with Scala and Spark, though that might be for a different use case.
- conjectures 11y agoIt's an MCMC algorithm for a fancy kind of matrix factorisation. I had a look at Spark, but its linear algebra packages seemed too limited (I guess abstraction comes at a cost). I can see that Spark would be nice if it does what you need out of the box. Heard good things about Scala, is it straightforward to get a process on a remote machine to execute code?
- lmm 11y ago> I had a look at Spark, but its linear algebra packages seemed too limited (I guess abstraction comes at a cost). I can see that Spark would be nice if it does what you need out of the box. Did you look at MLlib and/or just using Breeze directly? There's a bit of awkwardness in the initial set up of the cluster (mainly just having LAPACK installed on all nodes, see https://spark.apache.org/docs/1.1.0/mllib-guide.html https://spark.apache.org/docs/1.1.0/mllib-guide.html ). Spark itself is essentially just sugar to let you write a map/reduce in natural scala style and have it distributed across a cluster - it'll only work if you can factor your algorithm in a way that fits into that paradigm. (I've heard arguments that it's possible to do that with any distributable algorithm if you're clever enough, but I'm not sure I believe them). > Heard good things about Scala, is it straightforward to get a process on a remote machine to execute code? Honestly, no. I love the language but Spark is very much what I think of (perhaps unfairly) as typical scientific software. Spark clusters are finicky - they're cobbled together from a few unrelated projects (especially for cases where you need LAPACK as well), and it shows, especially when it comes to updating them. There are a few organizations like Cloudera (I think there was an open-source effort under the Apache umbrella somewhere too) that try to provide a working package, and various efforts with Puppet/Chef/etc. to automate the process of putting a cluster together, and it's certainly a lot better than it was even a few years ago, but a cluster still need at least a little bit of dedicated sysadmin time (or, at a bare minimum, a programmer with a bit of *nix admin experience who's willing to get their hands dirty - that was me at times) to keep it running reliably. If you're part of an institution that already maintains a Spark cluster - or maintains an ordinary Hadoop cluster and you're friendly enough with the sysadmins to suggest they install it - it's wonderful. If you're having to do it all from scratch I won't lie, it's going to involve a lot of fiddling and may well not be worth it for your problem.
- illumen 11y agoIn the literature this is called Gradual Typing. Or optional typing. Python uses it in the last couple of versions.
- vanderZwan 11y ago> For example, the Julia community seems to have coined the term “type-stability” to describe a concept that static / compiled languages have historically enforced and dynamic / scripting languages have historically disregarded. I was not aware that this was a Julia neologism. It seems like such an appropriate term for discussing how to make code make the most out of JIT-compilation.
- jakub_h 11y agoI thought that type stability was actually a crucial notion in real-world dynamic language implementations? Witness inline caches and polymorphic inline caches, for example.
- StefanKarpinski 11y agoThe concept is certainly not new, but googling "type stability" seems to only turn up Julia-related pages or other, unrelated uses of the term, so it seems like this usage may have been coined in the Julia community. If you find prior uses with this meaning, please do let me know.
- ViralBShah 11y agoYeah seems so. Perhaps worth having a wikipedia page for it now!
- openasocket 11y agoThe closest concept I can think of is the concept of "strong typing," that a value does not change type based on its context, which is a fairly widely used term. It seems like Julia has some form of weak typing, at least between the different numeric primitives, and "type stability" refers to avoiding any usage of weak typing. I don't know a lot about Julia, though, so I could be way off here.
- StefanKarpinski 11y ago"Strong typing" and "weak typing" don't really mean anything: http://blogs.perl.org/users/ovid/2010/08/what-to-know-before-debating-type-systems.html http://blogs.perl.org/users/ovid/2010/08/what-to-know-before... You probably mean "static typing" versus "dynamic typing" which I wrote a bit about in the context of Julia here: http://stackoverflow.com/questions/28078089/is-julia-dynamically-typed http://stackoverflow.com/questions/28078089/is-julia-dynamic... Basically, I think "type stability" hasn't really been a thing in the past because in dynamic languages, people have traditionally not cared about ensuring that return types are predictable based on argument types, and in static languages, a program is incorrect if that's not the case. As people care more and more about being able to statically predict the behavior of programs in dynamic languages, the concept of type-stability in dynamic languages becomes increasingly important.
- tempodox 11y agoI come from AOT languages and have lost my patience by now. Julia is overrated.