News for hackers. Stuff that matters.
Re:Julia 1.5 Highlights by LolWolf on Monday August 03, 2020 @01:02PM (#24040316)
Honestly, this is truly amazing. I will take a quick moment to thank the Julia developers (and all the contributors) for such an awesome language—honestly, if you do any kind of scientific computing (at all) I really and truly recommend trying out Julia. The REPL and development loop are each a little different than the usual Python/R/etc., but it's such a cool language and it's so fast that it will feel like an incredible breath of fresh air. It's amazing to realize that writing down the first thing that comes to your head is usually like 80% as fast as a good, performant implementation. (As someone who has done a decent amount of work in performance engineering for embedded platforms, I really enjoy squeezing out the last drop of performance from most programs, but doing this for every single first-pass at a program, like in Python, is rather annoying if this is what is needed to get a usable implementation.)

Anyways, big props to the developers and contributors, even if this is just a "minor" release. I'm extraordinarily excited for the future of Julia and hope it continues to grow and be as awesome of a community as it is! :)

Re:Julia 1.5 Highlights by mfsch on Monday August 03, 2020 @02:58PM (#24041871)
One thing to note is that it’s worth learning a little bit about how to write performant code in Julia and how to correctly measure its performance when evaluating the language. It’s common for people to underestimate the performance benefits in their first experiments.

There are a few common issues: 1) You measure compilation plus execution instead of just execution. 2) Your code relies on global values that limit optimizations. 3) Your code doesn’t allow the compiler to determine all the types. 4) Your code forces allocations for intermediate values.

Especially 4) makes a big difference when you’re coming from NumPy or MATLAB. If you have a chain of vectorized operations (e.g. “X = α * A + β * B + γ * C”), the performance is quite similar between the languages, but in Julia you can enforce that these happen in-place with a single fused loop and zero allocations (e.g. adding “@.” in front). This can often give you another ~2x–10x speedup and make the difference between “similar to NumPy/MATLAB” and “similar to C/Fortran”.

Re:Julia 1.5 Highlights by fermienrico on Monday August 03, 2020 @03:20PM (#24042127)
Personally, every time I try to delve into Julia, I am reminded by the massive ecosystem that exists around Python. Speed takes a backseat, instead enormous ecosystem makes Python indispensable and Julia a fringe language despite of its growing popularity.

Say you have a database, and need pull data, do some heavy math computation, then present this data in a pdf report with a QR code, pulling images and processing them in the report.

In Python, it is without bells and whistles: psycopg2, numpy/pandas, reportlab and may be use PIL. Wanna stick this on S3? boto3.

In Julia, it's all very fragmented. LibPQ is immature, DataFrames.jl is nice, ??? (what pdf conversion tool?), images.jl (300 stars), qr code generator?

The problem is not the speed with most tasks. The problem is availability of tools. I am sure that will come with it, but why not just use Python at that point? I am not a fan of Julia and that's nothing to do with its features. It has immature ecosystem, with terrible IDE support (Atom/Juno raises my blood pressure), debugging is painful if non existent, error messages are all over the place, everything falls apart as the immature dependencies change and error messages don't help at all.

Julia is fun in your jupyter notebook. If you try to build apps in production environment in my team, expect push back if not straight up refusal to initiate such a project in the first place.

Syntax was amazing around 0.4v and it went downhill from there.

I am sure someone is going to nitpick my comment and provide a way to do it in Julia, but that's missing the point. The point is Python is miles ahead of what it does. In production systems, robustness + maturity matters.

Also, don't forget ancillary aspects of a programming language. When we put a python repo together, I am rewarded by an endless supply of developers that I can hire and immediately work on it. With Julia, the supply of engineers is limited and it is such a pain to train people to use it, learn its quirks, spend nights and weekends fighting with it and the business doesn't give a fuck about it.

Re:Julia 1.5 Highlights by pdeffebach on Monday August 03, 2020 @03:49PM (#24042487)
Sure, Julia doesn't have an industry-tested QR code maker (though if you google you will find some options).

But it's worth noting that CSV.jl is a file that was entirely re-written in the past 6 months and has probably the fastest performance of any CSV parser currently used. It was written using pure julia and takes advantage of tons of Base-julia features as well as multi-purpose packages.

Julia's design makes it incredible easy to write the kinds of tools you want in a flexible way.

Re:Julia 1.5 Highlights by LolWolf on Monday August 03, 2020 @03:50PM (#24042499)
That's fine; I don't think this is the general point. If you're trying to run a production system, need incredible robustness guarantees that somehow Julia cannot meet (which would be surprising to me), and require some specific things that Julia doesn't have, then sure, use Python. I'm just saying that, if you're a numerical scientist or engineer, go take a look at Julia and for most of these people it'll do everything and more than what they need. There will always be the pains of switching from one language/ecosystem to another and I'm not saying the tradeoff is worth it for everyone, but, if you can get development and performance speed up for a small tradeoff in learning curve, then I think it's worth at least trying it out, no?

EDIT: The parent post was edited somewhat (which means this comment and some siblings appear slightly out of place) and I heavily disagree with a lot of the issues raised. I will keep the current comment as is for the sake of completeness, but I think the parent's approach to criticizing Julia is somewhat disappointing.

Re:Julia 1.5 Highlights by tjwhitaker on Monday August 03, 2020 @03:57PM (#24042594)
I mean yea you're not wrong. Python is a much more general language and has a large ecosystem. But also, not everyone is an enterprise programmer and values the same things you do. This kind of complaint comes up every time there's a new julia release and it's kind of akin to posting in a C++ thread and asking why anyone uses it because the python ecosystem is so much better for your use case.
Re:Julia 1.5 Highlights by EricForgy on Monday August 03, 2020 @03:29PM (#24042231)
I am not going to try to change your mind, but I'll just point out that one of the highlights, in my mind, of the recent JuliaCon was the merging of the Juno and VS Code teams. All IDE development for these teams going forward will be focused VS Code. Have a look at the VS Code presentations available on YouTube. It is pretty amazing to see where they are now and the future is even brighter.
Re:Julia 1.5 Highlights by bananaquant on Monday August 03, 2020 @04:52PM (#24043253)
Do they have a usable debugger now? My last experience was 2 years ago, and launching it even on some trivial code took over 10 seconds.
Re:Julia 1.5 Highlights by eigenspace on Monday August 03, 2020 @05:03PM (#24043389)
The Debugger has come a long way, here's it running in 1.5.0 on my machine:

    julia> @time using Debugger
      0.115907 seconds (202.08 k allocations: 13.215 MiB)
    
    julia> @time @run sin(1)
      1.438537 seconds (1.85 M allocations: 90.376 MiB, 0.80% gc time)
    0.8414709848078965

    julia> @time @run sin(1)
      0.003900 seconds (23.39 k allocations: 1.057 MiB)
    0.8414709848078965
Re:Julia 1.5 Highlights by bananaquant on Monday August 03, 2020 @05:16PM (#24043544)
Whoa. This looks really promising now.
Re:Julia 1.5 Highlights by FridgeSeal on Monday August 03, 2020 @10:38PM (#24045974)
All of these complaints can be levelled at literally any programming language that isn't as entrenched as its competition, and indeed would have been levelled at Python when it was young as well.

> In Julia, it's all very fragmented. LibPQ is immature, DataFrames.jl is nice, ??? (what pdf conversion tool?), images.jl (300 stars), qr code generator?

A quick google search yielded this [0], [1] which seems like they'd do the job..

Personally I think judging the quality of the ecosystem on the number of stars a package has is short-sighted and gives only a skin-deep view.

> error messages are all over the place, everything falls apart as the immature dependencies change and error messages don't help at all.

When was the last time you used Julia? Because I've found the error messages personally far superior to Pythons errors, even in deep stack traces I find it easy to pinpoint the exact bit of functionality that has failed, why and understand what to do to fix it.

> I am sure someone is going to nitpick my comment and provide a way to do it in Julia, but that's missing the point. The point is Python is miles ahead of what it does. In production systems, robustness + maturity matters.

Python is mature _for now_, but this gap is gradually closing, and I've come across more than my fair-share of python packages that are abandoned, heavily reliant on magic, poorly written etc. The size of the ecosystem is not necessarily representative of it's value or worth.

> When we put a python repo together, I am rewarded by an endless supply of developers that I can hire and immediately work on it

This feels to me like the equivalent of "I'm looking for _React_ JS devs" - the knowledge and competency you have as a programmer should be able to be applied to new frameworks and languages, and I'd personally gladly hire someone who says "I'll learn the languages and tools I need to in order to apply my skills" instead of someone who says "oh it's not language + framework I won't/can't apply my skills", because the former is almost certainly going to be a much better programmer.

[0] https://stackoverflow.com/questions/53074626/how-to-generate... [1] https://github.com/jverzani/Mustache.jl

Re:Julia 1.5 Highlights by marmaduke on Tuesday August 04, 2020 @01:47AM (#24047026)
I don’t think the comment merited point by point refutation. One can just point to language age and past popularity to account for ecosystem differences.

One area Julia could pull ahead in is

Re:Julia 1.5 Highlights by dunefox on Tuesday August 04, 2020 @05:13AM (#24048131)
... is what?
Re:Julia 1.5 Highlights by marmaduke on Tuesday August 04, 2020 @05:40PM (#24054779)
Ah i forgot to finish the thought here: I meant to say that since Julia avoids the two language problem, for which there are many incompatible solutions in Python, it should be possible to pull ahead in building out the ecosystem even with a smaller community.
Re:Julia 1.5 Highlights by xiaodai on Monday August 03, 2020 @07:21PM (#24044672)
When python was an upstart. Same thing was said about perl and c++
Re:Julia 1.5 Highlights by tastyminerals on Monday August 03, 2020 @03:32PM (#24042275)
Julia is fast but not faster and very memory hungry. If you care about squeezing every bit of performance you generally go to C++. If you too lazy for C++ you go D. Hence to me, Julia is an odd tool. Interesting but more as a language with some cool scientific libs that Python might not yet have.
Re:Julia 1.5 Highlights by LolWolf on Monday August 03, 2020 @03:46PM (#24042450)
This is what I meant when I stated

> It's amazing to realize that writing down the first thing that comes to your head is usually like 80% as fast as a good, performant implementation. (As someone who has done a decent amount of work in performance engineering for embedded platforms, I really enjoy squeezing out the last drop of performance from most programs, but doing this for every single first-pass at a program, like in Python, is rather annoying if this is what is needed to get a usable implementation.)

Yes, Julia is not necessarily faster than a good C implementation (that doesn't leak, etc), but, like Python, what would be a 300-line C implementation, where one has to somewhat carefully manage typing and the abstraction is really rather complicated for something that is mathematically simple, we can usually write 20 lines of very performant Julia that is 95% as fast.

Attempting to do something relatively similar in Python is often slow enough that giving a practical implementation essentially needs to be coded in C and interfaced with Python, where we return (again!) back to the same problem we had before: writing a 300+ line C file for something that should be rather simple, mathematically speaking.

Re:Julia 1.5 Highlights by miles7 on Monday August 03, 2020 @04:27PM (#24042952)
Another important consideration is library development. As someone developing a large library, when we were previously developing in C++ we would encounter large barriers where some design goal we had either couldn't be done in the language in a practical sense or would require hours of tweaking things like template constraints to work correctly. Our users also had such a hard time extending our library's features they usually gave up and just waited for us to add features for them.

Now that we're developing in Julia we can realize our designs as we envisioned them with very little code. Features like multiple dispatch have been a lifesaver for us. And we are getting performance that is quite close to C++. Now we're looking forward to using features like composable multithreading.

One could wonder "why not use python?" but for performance reasons one ends up with the 'two-language problem' which we wanted to avoid.

Re:Julia 1.5 Highlights by pjmlp on Tuesday August 04, 2020 @01:50AM (#24047043)
I don't see D get the eco-system that Julia has managed to gather so far, many renowned institutions are already publishing papers using Julia.

Other than Mir, there is very little to choose from.

Re:Julia 1.5 Highlights by tastyminerals2 on Tuesday August 04, 2020 @04:20AM (#24047811)
True, the D numeric ecosystem cannot be compared to Julia's and I would pick Julia if I was a scientist of course. Notice, I was talking about performance though.
Re:Julia 1.5 Highlights by pjmlp on Tuesday August 04, 2020 @04:22AM (#24047816)
Performance is meaningless if there isn't a library ecosystem to use it.
Re:Julia 1.5 Highlights by tastyminerals2 on Tuesday August 04, 2020 @07:52AM (#24049009)
It is but it speaks a lot about the quality of language design, language defaults and the algorithms in standard library.
Re:Julia 1.5 Highlights by pjmlp on Tuesday August 04, 2020 @09:14AM (#24049601)
Which is also meaningless if the eco-system doesn't grow as much as the competition.

D users put the language into a pedestal of language design, but that isn't what grows an eco-system, getting new users and libraries does.

I used to love the language, but so many mistakes have been made during the last 10 years, that it will hardly recover unless some company champions it, Swift/Kotlin style.

Re:Julia 1.5 Highlights by tastyminerals2 on Tuesday August 04, 2020 @11:40AM (#24051060)
I agree. However, I wish more people valued solid foundations over tooling because no tooling is worth building on "good-enough" basis. If that ever was true we would have never had the situation when we desperately seek for alternatives and create numerous solutions each coming with its baggage of gotchas like "yeah, but you need to use this PackageCompiler library to make it faster".

So after reading the release notes about 6 sec. of start-up times and people keep complaining about warm-ups, I am smirking about how Julia is a dynamic language when compiling & executing a script written in a static language other than let's say Scala/Rust/C++ can be comparable or even faster in some situations.

Re:Julia 1.5 Highlights by ddragon on Tuesday August 04, 2020 @12:11PM (#24051369)
Being a dynamic language is not about start-up time, interpretation or compilation, but about types being a part of the value instead of the container (the variable definition). Julia is definitely dynamic.

The warm-up period is definitely an annoyance, but a surprisingly small one. Even if it takes one minute to compile all the libraries and code I'm working on, my programming session is usually much longer than a few minutes, so that warm-up becomes insignificant as I keep the program alive during all the development process and any new addition are pretty much instantaneously compiled (unlike static languages that have to be frequently recompiled, and it's faster even compared to incremental compilation in languages like Scala) and at the same time running faster after warm-up saves time over the session compared to interpreted language as well. Never bothered with PackageCompiler.

It's a matter of different workflows, and since Julia isn't the same as the usual dynamic languages or the usual compiled languages, it's easy to end up with suboptimal ones especially at the start (which I assume does hurt the image of the language as first impressions are key). That said I'd definitely want the ability of creating small static binaries for deployment or end users (even if they don't help during development, which I'm already more than satisfied).