The Julia Programming Language
161–170 of 211 posts
Re: The Julia Programming Language
#162Earlier quoted context omitted.
The problem with this is that it limits the options of library writers. For example, I can't replace some function with a macro that does something smart, such as check format strings for printf at compile time, because that breaks all callers. It also fundamentally limits what you can build with macros, because you can't build language features that are basic -- they always appear tacked-on.
That is very true — and it's precisely why we have considered making macros callable with function syntax. But I feel like having something that looks like a function and is actually a macro is a bit of a dangerous lie, no matter how handy it sometimes is. One of our design goals is not to be too tricky — if something looks like a function call, it should be a function call. The @foo syntax for macro calls means that…
So I'm wondering does a programming language which marks macro expansions different to function calls (as Julia does with the @ prefix) really need to distinguish functions from macros in the definition (as Julia does with the 'function' and 'macro' keywords) ?
Re: The Julia Programming Language
#163Earlier quoted context omitted.
Does 1-based indexing have any advantage, beyond familiarity to scientists?
With 1-based indexing, length == last index. Does 0-based indexing have any advantage, beyond ability to do pointer arithmetic with indexes?
Re: The Julia Programming Language
#164Pardon the possible naïveté, but I'm so old I remember Ada. Seems that language was designed to address a very similar problem space. What does Julia offer that Ada doesn't? Or perhaps: why is ada so deficient that spending 2+ years inventing a new language was a better proposition than taking the time to improve Ada?
While there's a resurgence of interest in ADA recently, the general sense is that it's WAY overdesigned and heavy. I came across this bit of humor a while back that communicates the general feeling well: http://bit.csc.lsu.edu/~gb/csc4101/Reading/gigo-1997-04.html If the problem IS that it's huge and inelegant, then the solution isn't to try to improve it, but to start from a clean slate. Julia looks like a reasonabl…
Re: The Julia Programming Language
#165Earlier quoted context omitted.
I think they are aiming for smooth transition for MATLAB users. They also have 1-index based arrays as opposed to 0-index .
It would certainly be nice if there was an option to use 0 based indices in blocks of code. It's understandable in that they are pitching at the technical community, and many mathematical papers and books are written with 1 based indices. But I am a mathematician who prefers 0 based indices.
Re: The Julia Programming Language
#166Earlier quoted context omitted.
Python+numpy+scipy does work only if you actually don't write much python or at least not run much python. Otherwise it sucks
> Otherwise it sucks Seriously? I mean, I know you are very excited about your work on PyPy, but why do you have to go around saying baseless stuff like this? There are many, many thousands of people who write lots of Python code every day that rely on Numpy, Scipy, and Matplotlib to get their work done, and who seem to be quite pleased with it. There is a lot of work left to do on all parts of that stack, but that's…
Re: The Julia Programming Language
#167Much praise!! These guys have incredibly good taste. Almost every single thing I can think of that I want in a programming language, they have it. All in the one language! The fact that it has parametric types, parametric polymorphism, macros, performance almost as good as C, good C/Fortran interop, 64 bit integers and an interactive REPL all in the one language just blows my mind. I wasn't able to tell if it is poss…
When reading through the manual, I was struck at how similar the language seems to be to Lua, at least superficially. Lua also has 1-based arrays. Heh.
I don't think lua has integers ie. like Javascript everything is a double, that can be changed by redefining a macro and recompiling AFAIK but it's still one global numeric type (and you can't change it for luajit).
Re: The Julia Programming Language
#168Earlier quoted context omitted.
When reading through the manual, I was struck at how similar the language seems to be to Lua, at least superficially. Lua also has 1-based arrays. Heh.
>64 bit integers I don't think lua has integers ie. like Javascript everything is a double, that can be changed by redefining a macro and recompiling AFAIK but it's still one global numeric type (and you can't change it for luajit).
Re: The Julia Programming Language
#169Earlier quoted context omitted.
> Otherwise it sucks Seriously? I mean, I know you are very excited about your work on PyPy, but why do you have to go around saying baseless stuff like this? There are many, many thousands of people who write lots of Python code every day that rely on Numpy, Scipy, and Matplotlib to get their work done, and who seem to be quite pleased with it. There is a lot of work left to do on all parts of that stack, but that's…
I guess I should clarify that - performance sucks. There are obviously various ways around it, but you just can't write a lot of performance critical python that way and I guess this is one of the reasons why julia exists in the first place.
The general consensus, if you look at languages like Chapel and Fortress and X10, seems to be that most scientific codes shouldn't be written using for-loops. That is the low-level control flow construct dating from the age of assembler. Instead, what scientists generally want to say is, "Apply this kernel across this domain, with these windowing conditions", or "Reduce values from this computation along these keys in my dataset". As software developers, our job is to provide the language runtime to allow them to do that; such a runtime will be the most robust, correct, maintainable, and performant.
Re: The Julia Programming Language
#170Earlier quoted context omitted.
I guess I should clarify that - performance sucks. There are obviously various ways around it, but you just can't write a lot of performance critical python that way and I guess this is one of the reasons why julia exists in the first place.
But if you look at the actual cutting edge research work in the HPC and scientific space, they are working on languages that allow domain experts to express computation using higher level primitives, not on fancy compiler techniques to make general purpose imperative languages like C or Python "automagically" run faster on single cores. The general consensus, if you look at languages like Chapel and Fortress and X10,…
The problem with numpy's performance is twofold:
* Numpy expressions might not be fast enough. I believe you guys at continuum are trying to address that one way or another. In general the kernel expressed using high-level constructs in python should not be slower than an equivalent loop in C.
* Sometimes you actually want to write a for loop, because you don't care, because it's faster, because it's a single run, because the data is manageable etc. You should not be punished for doing that with 100x performance drop. You can still be punished for that with 2x performance drop.