Live data from Hacker News

Why Julia

ucidatascienceinitiative.github.io

141–150 of 257 posts

Re: Why Julia

#141

Earlier quoted context omitted.

You have to use it inside a REPL, like R or Matlab. Julia using LLVM and compiling on-the-fly is not sloppy design, it's a design tradeoff (and a great one, if you really need speed). Julia is not a scripting language, it's a language for mathematical analysis. Also going back to your example the solution would be to use ImageMagick.jl from Julia, and extend the library (4 extra lines with ccall) if it's not availabl…

> Julia is not a scripting language, it's a language for mathematical analysis. Ok, this clarifies the matter a lot. So julia is not intended to be a general-purpose programming language. Are you involved in julia development? (Besides, I strongly dislike the design tradeoff of not being a good unix citizen.)

Julia is a general-purpose programming language. The language itself is actually really good as a scripting language, including integrating well with shell, C, Fortran, R and Python, for example:

https://docs.julialang.org/en/latest/manual/running-external...

The only trade-off here is the restricted resources the Julia devs can afford. Focusing on the scientific computation niche, the Julia compiler was built to compile code just ahead of time, since this way it can create code as fast as compiled languages while still being dynamic like any interpreted language (such as Matlab and Python). But there is nothing in the language that prevents it from being fully interpreted (and therefore having minimal compile time overhead, but generating poorly optimized code for long running processes), or alternatively pre-compiling and caching to have both (which is being worked on: https://github.com/JuliaLang/PackageCompiler.jl )

Re: Why Julia

#142

Earlier quoted context omitted.

It's not bikeshedding because: 1) it is pervasive and fairly importsnt 2) it's kind of a deep indication that something is amiss. It's like a language written in 2019 that has default dynamic not lexical binding, not in terms of importance but in terms of it's an argument that was had and decided 20 years ago. If this is wrong then you can probably assume that lots of other things which are important, decisions which…

I'm not convinced. I've written a great deal of software in C++ and MATLAB. I don't see what the big deal is either way. You say this thing has been "decided 20 years ago" (by whom?) but that's clearly not the case, as myriad languages that use 1-based indexing are in existence, continue to come into existence, and are used to great effect. You cite Djikstra's argument (well, you didn't actually cite it [1]) but his…

Much like turing completeness, you can build systems with any choice that "work", so an argument always has to be from aesthetics, which can include simplicity and "uglyness", but these aren't totally individual (you can get 99/100 people to agree on which of two schemes is "simpler"). Simplicity and beauty aren't something that even mathematicians dismiss as they can be trying to tell you something.

There's another argument, I can't remember if I originated it or read it but it's the one I find most convincing.

Consider that you have finite units of equal length 1 stretching away from you in a line. How would you specify to someone (using real-number measurements) to retrieve the first N=6, or describe the vector they occupy? You would say, take everything between [0.0, 6.0). If you use zero-based indexing, the numbering scheme specifying the interval is identical across both systems: [0.0, 6.0) => (python)[0: 6]== 0So there's another mathematical argument that I either came up with or read elsewhere that feels deeply convincing to me. If there's 2 there's probably more, and here's the list of languages on wikipedia, you tell me which you'd rather work in. https://en.wikipedia.org/wiki/Comparison_of_programming_lang...

Sorry for the irate tone but I really think that on reflection and fair consideration this is an obvious one.

Re: Why Julia

#143

Earlier quoted context omitted.

As notation for array based algorithms, Octave/Matlab is vastly better than anything else I've found. Some guy did PRML in Matlab, others have done it in Python. The Matlab version is like reading a book; clear, concise, correct. https://github.com/locklin/PRMLT IMO for most people, for array based algos, Matlab hits the "notation as thought" Iverson saying in a way that APL didn't quite make it.

For such things, Julia is often very close to Matlab indeed, or at least it can be used that way. You could translate most of those files line-for-line, with quite a few lines identical or trivially changed (bracket shape, or max -> maximum). This is often a useful thing to do, get a transliterated version running, and then re-write bits of it more idiomatically, while checking that the output is identical.

I'd be happy to look at the output of such an exercise. If I were transcribing it, it would either be to J or C. Julia doesn't solve any problems for me.

Re: Why Julia

#144
post #123

Earlier quoted context omitted.

> OOP tried to solve the problem of how to get tons of devs working on huge projects at the same time I am skeptical of that history. Simula and smalltalk were academic endeavors long before lots of devs were working on projects, Java became popular because it was a portable C++ which had no pointers and garbage collection.

Smalltalk was being adopted across the industry when Java came around, the big difference was that JDK was free beer and one of the big Smalltakers (IBM) rebooted their environment into Eclipse, while jumping into Java bandwagon.

Was it Visual Age for SmallTalk which became Visual Age for Java which later became Eclipse? Vaguely remember reading something like that earlier.

Re: Why Julia

#145

Earlier quoted context omitted.

I'm not convinced. I've written a great deal of software in C++ and MATLAB. I don't see what the big deal is either way. You say this thing has been "decided 20 years ago" (by whom?) but that's clearly not the case, as myriad languages that use 1-based indexing are in existence, continue to come into existence, and are used to great effect. You cite Djikstra's argument (well, you didn't actually cite it [1]) but his…

Much like turing completeness, you can build systems with any choice that "work", so an argument always has to be from aesthetics, which can include simplicity and "uglyness", but these aren't totally individual (you can get 99/100 people to agree on which of two schemes is "simpler"). Simplicity and beauty aren't something that even mathematicians dismiss as they can be trying to tell you something. There's another…

It sounds like you haven't considered any of the multiple reasons or situations where 1-based indexing works out better.

Re: Why Julia

#146
post #21

The main issue I encountered as a Julia user is that multiple dispatch doesn't scale very well. When you start building out a project, it's easy to keep track and debug if multiple dispatch starts failing (i.e. type starts spreading everywhere and Julia slows to Python like speeds). In medium-to-large projects, it becomes extremely cumbersome to manage this. It's doable, but adds a layer of complexity management to p…

> In a nutshell: Julia is great when you're a grad student working mostly by yourself on small scale projects! But not so great in prod. Some people would disagree with that https://juliacomputing.com/case-studies/celeste.html

This was published on their own website, it is therefore biased toward a good perception of them. It doesn't seem to be a fair and independent review to help build an opinion.

Re: Why Julia

#147

Earlier quoted context omitted.

Much like turing completeness, you can build systems with any choice that "work", so an argument always has to be from aesthetics, which can include simplicity and "uglyness", but these aren't totally individual (you can get 99/100 people to agree on which of two schemes is "simpler"). Simplicity and beauty aren't something that even mathematicians dismiss as they can be trying to tell you something. There's another…

It sounds like you haven't considered any of the multiple reasons or situations where 1-based indexing works out better.

If you're going to give a counterexample, please give it.

I thought about my post after I read it and came to this- given Djikstra's (only system which can describe an empty interval and interval with first element without "unnaturals" ) and (?)'s argument that it creates a nice homomorphism between real-number intervals and integer slices then it's inarguable to me that 0-based is more mathematically elegant.

Where I guess there's space to disagree is this, I believe (to almost a point of faith I guess) that mathematical/logical elegance is important, and moving away from it is normally a mistake which leads to more pain in the long run.

Re: Why Julia

#148
post #144
post #123

Earlier quoted context omitted.

Smalltalk was being adopted across the industry when Java came around, the big difference was that JDK was free beer and one of the big Smalltakers (IBM) rebooted their environment into Eclipse, while jumping into Java bandwagon.

Was it Visual Age for SmallTalk which became Visual Age for Java which later became Eclipse? Vaguely remember reading something like that earlier.

Yes. With Gamma, one of the pattern book authors, as architect on Eclipse team.

Re: Why Julia

#149

Earlier quoted context omitted.

Wise words here. In my humble opinion, applying S's syntactic sugar on top of Scheme-forged core did more bad than good to R. Most of R's quirks stem from the authors' desire to keep it as compatible with S as possible. As for the two approaches to solving problems (TIMTOWTDI vs Python's "one true way") I think that's a matter of personal preference; I, personally, appreciate the freedom that R gives me. Also, it mig…

Your very last point should be heavily against R, not in favour. Having multiple ways to do the same thing is fine when you work by yourself, but in a large team it makes the style of the codebase vary a lot based on who wrote each block of code and makes reviewing others' code more difficult. If you want to get anything done, reading code really shouldn't be your daily challenge of how "outside the box" you can thin…

That's true if we're talking about the overall architecture of the project. And, since R permits so many different coding styles (and paradigms: native functional and several OO), the team should have someone (usually the most senior software engineer) play the role of an architect and design the structure of the code, data structures, API, and so on.

Perhaps having a fixed (and commonly agreed on) set of design patterns - like in Java - makes development easier and smoother, but most of the projects I've worked on have proven successful, so maybe it's not that bad either... :-)

Re: Why Julia

#150

Earlier quoted context omitted.

It sounds like you haven't considered any of the multiple reasons or situations where 1-based indexing works out better.

If you're going to give a counterexample, please give it. I thought about my post after I read it and came to this- given Djikstra's (only system which can describe an empty interval and interval with first element without "unnaturals" ) and (?)'s argument that it creates a nice homomorphism between real-number intervals and integer slices then it's inarguable to me that 0-based is more mathematically elegant. Where…

Why? You've already come to the conclusion that anybody that disagrees with you is an idiot, and you think your argument is fully reasoned and covers all bases. Why should I believe that you would change your mind given new information?
Post reply on HN