Would be interesting to see how Julia perf compares to C++ compiled or JITed with LLVM via G++ 4.6+Dragonegg or Clang 3.0/svn. Would be more apples-to-apples, since both would use the same middle- and back-end. G++ 4.2.1 is a bit obsolete at this point, but as it probably came by default on the MBP they tested on, it's understandable.
The Julia Programming Language
141–150 of 211 posts
Re: The Julia Programming Language
#142Re: The Julia Programming Language
#143Earlier quoted context omitted.
What else would you suggest? I find that the @ syntax is amazing, since the reader (programmer) knows exactly which form is a macro (and can look it up), as opposed to introducing arbitrary, often very confusing syntax.
Thanks. We've considered doing other things — like function call syntax for macros (which is essentially what Lisp/Scheme have), but decided against it. It just causes confusion. Can you pass a macro around like you can a function? Can functions shadow macros and vice versa? What happens if a macro introduces a local variable that shadows the macro itself? Basically it comes down to fact that macros are syntactic and…
Re: The Julia Programming Language
#144Earlier quoted context omitted.
Thanks. We've considered doing other things — like function call syntax for macros (which is essentially what Lisp/Scheme have), but decided against it. It just causes confusion. Can you pass a macro around like you can a function? Can functions shadow macros and vice versa? What happens if a macro introduces a local variable that shadows the macro itself? Basically it comes down to fact that macros are syntactic and…
Just a comment/suggestion: could someone with GitHub write access go over your wiki and fix code samples where multiple lines have been concatenated into a single line? E.g. https://github.com/JuliaLang/julia/wiki/Types-and-their-repr... , heading `Built-in types`.
Re: The Julia Programming Language
#145Earlier quoted context omitted.
Thanks. We've considered doing other things — like function call syntax for macros (which is essentially what Lisp/Scheme have), but decided against it. It just causes confusion. Can you pass a macro around like you can a function? Can functions shadow macros and vice versa? What happens if a macro introduces a local variable that shadows the macro itself? Basically it comes down to fact that macros are syntactic and…
Just a comment/suggestion: could someone with GitHub write access go over your wiki and fix code samples where multiple lines have been concatenated into a single line? E.g. https://github.com/JuliaLang/julia/wiki/Types-and-their-repr... , heading `Built-in types`.
Re: The Julia Programming Language
#146Earlier quoted context omitted.
Thanks. We've considered doing other things — like function call syntax for macros (which is essentially what Lisp/Scheme have), but decided against it. It just causes confusion. Can you pass a macro around like you can a function? Can functions shadow macros and vice versa? What happens if a macro introduces a local variable that shadows the macro itself? Basically it comes down to fact that macros are syntactic and…
Seems like there have been a variety of attempts to introduce lisp-style macros into non-lisp languages that use traditional syntax rather than s-expressions. I can see how this can succeed for simple macros without sacrificing much. However, complex macros done this way tend to be much more complicated than the equivalent lisp code. Do you believe that Julia solves this problem, or is it also subject to some of the…
Re: The Julia Programming Language
#147Earlier quoted context omitted.
What else would you suggest? I find that the @ syntax is amazing, since the reader (programmer) knows exactly which form is a macro (and can look it up), as opposed to introducing arbitrary, often very confusing syntax.
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.
Re: The Julia Programming Language
#148When you try to install julia on MacOS X 10.7.3, you may see the make fail because wget is not installed. Easy to fix with: brew install wget [Edit] git page says gfortran (and wget) are downloaded and compiled, but if they're not already installed make fails. So... brew install gfortran The need to do this separately may have to do with licensing? [Edit] And if you're not root, install to /usr/share/julia will fail.…
Stepping back a bit, this is one of the reasons why having an entirely web-based experience is appealing — then you can let people use a known-good setup without needing to mess around with installing a fairly extensive amount of software just to get basic things to work. Then there's also the general appeal of doing big data work a la Google docs or Gmail. The trick is getting the user experience to be good enough on the web.
Re: The Julia Programming Language
#149Earlier quoted context omitted.
Yes, I pretty much had the same thought, but then I started thinking about multiple dispatch, calling C/Fortran libraries, polyhedral optimizations, and I realized that V8 developers may not have the same design targets in mind.
... and the JVM (HotSpot) is even better than V8.
Re: The Julia Programming Language
#150Earlier quoted context omitted.
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 w…
So far we haven't actually felt a "pressing need" for multiple inheritance or interfaces, and we tend to take a pressing-need approach to language features. If you can live without a feature for a while, then maybe you really didn't need it in the first place. But we'll have to see what happens when other people are starting to try to use if for things.
Aren't compound types inherently concrete? The compoundness describes the implementation of the type, implying that it must have an implementation, hence must be concrete.