Live data from Hacker News

The Julia Programming Language

julialang.org

111–120 of 211 posts

Re: The Julia Programming Language

#111

this is surprisingly complete for a relatively new(?) project. one notable restriction is that inheritance is only for interface, not implementation. also, can anyone find a sequence abstraction (like lists)? arrays seem to be fixed size and i don't see anything else apart from coroutines. am i missing something?! [perhaps not, if it's intended for numerical work. on reflection i am moving more and more towards gener…

pron is right: you can inherit behavior from abstract types and abstract types, unlike interfaces, can have code written to them. (In single-dispatch OO languages, you are in the strange situation that you can write code to interfaces if they are arguments but not if they are the receiver of a method; thus, you're in a situation where you can either dispatch on an interface or you can write code for it, but never bot…

I don't know if I'd call it duck-typing when methods are not grouped into interfaces. I think you could say that in Julia, each method is an interface. I find it much cleaner than actual "duck-typing" (the way it's done in , say, Scala with structural types) because then you have both an interface, which specifies a contract, as well as the method name, which also specifies a contract when duck-typing is used, even when it's found in different interfaces.

Must compound types in Julia be concrete? I don't think I saw it in the documentation.

Re: The Julia Programming Language

#112
post #26

I wonder what they think about or have learned from http://en.wikipedia.org/wiki/Fortress_(programming_language) , another recent-ish attempt to deliver a modern and powerful scientific programming language. Personally I'm a little wary of being ghettoised into something overly domain-specific for scientific/numerical computing. Really good interop may mitigate that -- something which can navigate the unholy mix of C…

I huge part of the goal here is to reduce the need for the "unholy mix of C, C++, fortran, matlab, octave, R and python routines" in both academic research work and machine learning / data science code in industrial settings. The whole project kicked off with me ranting about how I was sick of cobbling things together in six or seven different languages. So interop is a very, very high priority. We have pretty good C…

in any language where objects are boxed, it becomes very tricky. We're working on it, however

Naive question (and I'll hold my tongue on my naive guesses): I understand why it is necessary to box user-defined types on the JVM, but why build this restriction into a new language that doesn't run on a restricted platform? Especially when performance and C interop are high priorities?

Or perhaps I misunderstood, and your statement should be read as sparsevector suggested.

Re: The Julia Programming Language

#113
post #51
post #11

Earlier quoted context omitted.

Matlab, Octave, Mathematica, and other mathematical programming environments use 1-based indexing, it's a well-established norm for the domain.

Does 1-based indexing have any advantage, beyond familiarity to scientists?

Dijkstra to the rescue: http://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EW...

Re: The Julia Programming Language

#115

Earlier quoted context omitted.

> he begin/end is due to Matlab Octave has solved this by allowing both matlab-style "end", as well as block-specific endings, like "endif", "endfunction", "endfor", etc. Having several end end end endings without any hint of what they are closing is one of the ugliest parts of matlab. Even though you are reimplementing this for compatibility reasons, it is rather sad that you chose to make this the default behaviour…

The language is still quite young and is certainly going to mature. Also, it is open source. So, please do not lose heart, not just yet. :-)

> So, please do not lose heart, not just yet.

If I weren't excited about it, I wouldnt even be commenting on it. ;)

Re: The Julia Programming Language

#116
It's not yet another language that we need. It's more high level functions.

C or fortran can be as fast as they want, but in mathematica I can do MorphologicalComponents[] and get the components. having these functions available to me speeds up my time to discovery by 1000x or more.

Re: The Julia Programming Language

#117
post #39

Earlier 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

I wouldn't say that it sucks - that's way too strong. I am one of the authors of Circuitscape ( http://www.circuitscape.org ), which uses python+numpy+scipy. The community loves it, the fact that its python, open source, embeddable in other tools, etc. However, much of the code is written in a vectorized style for performance reasons, as is the case with many high level scientific computing languages. This leads to u…

What do you think of cython+python+numpy? I've used it successfully to do NLP work.

Re: The Julia Programming Language

#118
post #95

Earlier quoted context omitted.

I huge part of the goal here is to reduce the need for the "unholy mix of C, C++, fortran, matlab, octave, R and python routines" in both academic research work and machine learning / data science code in industrial settings. The whole project kicked off with me ranting about how I was sick of cobbling things together in six or seven different languages. So interop is a very, very high priority. We have pretty good C…

> Another major interop issue is support for arrays of inline structs Oh, so arrays of complex numbers are implemented as arrays of pointers to objects? That would give really bad CPU cache performance.

No, currently it's an inline array of immutable 128-bit numeric values and we use bit-twiddling to pull the real and imaginary parts out. However, that's a temporary hack. (It's also why the mandel benchmark is relatively slow — all the bit-twiddling is not very efficient.)

The longer-term approach is still up in the air and that's what I was talking about above. My favorite approach at this point is to allow fields to be declared as const — which in Julia means write-once. Then if all fields are const the object is immutable and can automatically be stored in arrays inline.

Re: The Julia Programming Language

#119
post #112

Earlier quoted context omitted.

I huge part of the goal here is to reduce the need for the "unholy mix of C, C++, fortran, matlab, octave, R and python routines" in both academic research work and machine learning / data science code in industrial settings. The whole project kicked off with me ranting about how I was sick of cobbling things together in six or seven different languages. So interop is a very, very high priority. We have pretty good C…

in any language where objects are boxed, it becomes very tricky. We're working on it, however Naive question (and I'll hold my tongue on my naive guesses): I understand why it is necessary to box user-defined types on the JVM, but why build this restriction into a new language that doesn't run on a restricted platform? Especially when performance and C interop are high priorities? Or perhaps I misunderstood, and your…

Boxed values are pretty much necessary for dynamic languages — that's where the information about what kind of value something is gets stored. It is a pain for this kind of thing, however. In a fully statically compiled language like C, however, you can eliminate the need for a box entirely. If you want dynamic typing, that's the price we've gotta pay.

Re: The Julia Programming Language

#120
post #40

Earlier quoted context omitted.

It seems like both 0 and 1 based arrays is asking for trouble :) I would prefer 0-based, but still prefer 1-based to mixed or optional.

We are scientists and so willing to compromise, yes? So how about 0.5-based arrays? :)

Only if it is in base .5
Post reply on HN