Live data from Hacker News

Correctness and composability bugs in the Julia ecosystem

yuri.is

111–120 of 419 posts

Re: Correctness and composability bugs in the Julia ecosystem

#111

I mean this looks like good potential targets to improve the language moving forward, it's healthy to not be in awe of your tools and push to make them better. I don't see this as "bad" honestly.

I think the real test will be whether or not Julia's custodians / developers start putting a greater focus on semantics and correctness. When a language's raison d'être is to try out certain ideas, it probably makes sense for a while to ignore corner cases and rigor. But as the author points out, they eventually become gating factors for wider adoption.

The question here is are these merely just bugs or is there something about the language that makes Julia error prone?

There is potential in using Julia's type inference engine to check for correctness. For example see JET.jl. "JET.jl employs Julia's type inference to detect potential bugs."

https://github.com/aviatesk/JET.jl https://www.youtube.com/watch?v=7eOiGc8wfE0

The video brings up some potential difficulties with Julia's metaprogramming facilities for static or lexical analysis, but also shows that these issues are also addressable.

The type inference system could be exploited for further effect. For example, the type system could be extended to check for shape information within the type as demonstrated in this prototype: https://twitter.com/KenoFischer/status/1407810981338796035

Julia has guard rails (e.g. default bounds checking), but also also provides facilities to work outside them (`@inbounds`, `unsafe_*` methods, `ccall`, in-place methods with a `!` suffix). Typically these provide features that trade safety for performance or access to features. Used judiciously one can achieve a balance between performance and safety. Julia is not a language that restricts its users to a sandbox in the name of safety, but it does provide bounds of where the sandbox is and is not.

Another take away from the original blog post is that much Julia development is happening in the open on Github. These issues and their fixes just require a Github account to contribute to. Is this a feature?

Re: Correctness and composability bugs in the Julia ecosystem

#112
post #87

Earlier quoted context omitted.

All bugs mentioned had been quickly fixed: https://news.ycombinator.com/item?id=31397425

That comment doesn't say all bugs have been fixed, or even quickly fixed. When I check on the posted links, many are in fact still open, e.g. https://github.com/JuliaStats/Distributions.jl/issues/1253 https://github.com/JuliaStats/StatsBase.jl/issues/642 https://github.com/JuliaStats/StatsBase.jl/issues/616 https://github.com/JuliaLang/julia/issues/39385

I don't get these complaints about `sum!(a, a)`. Sure it's a bit of a footgun that you can overwrite the array you are working with. This doesn't rise to a "major problem" of composability.

The histogram errors seem annoying though. Hopefully they can get fixed.

Re: Correctness and composability bugs in the Julia ecosystem

#113

I've been a part of many language communities, and that the Julia team is the very best in terms of the professionalism of the language and the key modules. Maybe the best response to this is to view it as a call to action for us Julia fanboys/girls to stop cheering and fix some bugs ;-).

I've had a couple of conversations on twitter with Viral B Shah (co creator of Julia) which I found unprofessional, so I stopped learning Julia. Unless he was just having a very bad day, in my opinion he takes badly to minor criticism of Julia (although others might disagree).

Edit, here is one thread I could find quickly:

The comments aren't particularly bad, but they do feel to me like making a bad faith interpretation of someone's comment, then digging in. I don't feel that's a good way to talk to users, and ethos comes from the top.

Re: Correctness and composability bugs in the Julia ecosystem

#114
post #43

Earlier quoted context omitted.

Genuinely curious (I don’t work with low level systems day-to-day), but why would C/C++ be better for safety? I would imagine that the risk of bugs related to memory access and data racing would be pretty high, compared to a higher-level language or something like Rust that focuses on safety.

AFAIK (and I am not an expert) when they use C/C++ in automotive systems (in the automotive part, not elsewhere) they might tend to use deterministic programming (f.e. fixed-length arrays, no allocations, etc.) which eliminate most of the bugs. But, again, I am not an expert and Toyota's sudden acceleration problem was said to be caused by bad C programming (said by some, not by others).

I thought it was caused by loose floormats.

Re: Correctness and composability bugs in the Julia ecosystem

#115
A more appropriate title for the OP would have been:

"A new language that makes it easy to write and use generic algorithms on a growing number of custom types developed by others is bound to experience growing pains as difficult-to-foresee correctness bugs have to be discovered and fixed over time."

In my humble opinion, this kind of universal composability, which Julia makes easy via multiple dispatch and naming conventions, is the underlying root cause of all the correctness bugs that have surfaced as the language has evolved. But the bugs are being fixed, one at a time, and ultimately the result should be both beautiful and powerful. We will be all be thankful for it!

Re: Correctness and composability bugs in the Julia ecosystem

#116
post #61

Earlier quoted context omitted.

> Array indexing is such a core thing and I don't understand why anything mathematical or scientific would start with 1. Because that's how maths work? Literally everywhere in maths you count from 1, except in software engineering. That's why. I hope that clarified your confusion.

Starting with 0 is quite common in series, e.g. Taylor, Fourier, Chebyshev expansions, etc.

No... in those cases you're starting with 0 because that's the lowest exponent of a polynomial.

Re: Correctness and composability bugs in the Julia ecosystem

#117

I've been a part of many language communities, and that the Julia team is the very best in terms of the professionalism of the language and the key modules. Maybe the best response to this is to view it as a call to action for us Julia fanboys/girls to stop cheering and fix some bugs ;-).

I've had a couple of conversations on twitter with Viral B Shah (co creator of Julia) which I found unprofessional, so I stopped learning Julia. Unless he was just having a very bad day, in my opinion he takes badly to minor criticism of Julia (although others might disagree). Edit, here is one thread I could find quickly: The comments aren't particularly bad, but they do feel to me like making a bad faith interpreta…

Do you have an example? I'd like to know more about this - it must have been quite egregious if it makes you stop learning a language.

Re: Correctness and composability bugs in the Julia ecosystem

#118
post #115

A more appropriate title for the OP would have been: "A new language that makes it easy to write and use generic algorithms on a growing number of custom types developed by others is bound to experience growing pains as difficult-to-foresee correctness bugs have to be discovered and fixed over time." In my humble opinion, this kind of universal composability , which Julia makes easy via multiple dispatch and naming c…

The most tragic thing here to me is that we're losing Yuri — who has been an invaluable contributor and bug-reporter for issues like these — and that Yuri got burned out instead of feeling empowered.

Re: Correctness and composability bugs in the Julia ecosystem

#119

Earlier quoted context omitted.

I was wondering if the 1-based arrays (and option to change index base) would factor into this. > OffsetArrays in particular proved to be a strong source of correctness bugs. The package provides an array type that leverages Julia’s flexible custom indices feature to create arrays whose indices don’t have to start at zero or one. Array indexing is such a core thing and I don't understand why anything mathematical or…

I'll start by saying that I greatly prefer 0-based, and have used but 0- and 1-based indexing, but the choice is largely arbitrary. 0 makes sense as the '0-th offset' when thinking from a pointer perspective, but I often find when teaching, that 1-based comes more naturally for many students (the 'first' item). You mention mathematical or scientific work...but I often/mainly see enumerations (such as weights x_1, x_2…

My experience is that 0-based offsets (and use of I came to 0-based offsets later in my career, having started with Matlab. So I have some real experience with 1-based offsets. Experience that was 'untainted' by being used to a different option. I much prefer 0-based.

Especially because I now sort-off have a linter rule in my head 'if I am writing i - 1 then I am making a mistake or doing something the wrong way'. Which has been quite successful.

Re: Correctness and composability bugs in the Julia ecosystem

#120
post #117

Earlier quoted context omitted.

I've had a couple of conversations on twitter with Viral B Shah (co creator of Julia) which I found unprofessional, so I stopped learning Julia. Unless he was just having a very bad day, in my opinion he takes badly to minor criticism of Julia (although others might disagree). Edit, here is one thread I could find quickly: The comments aren't particularly bad, but they do feel to me like making a bad faith interpreta…

Do you have an example? I'd like to know more about this - it must have been quite egregious if it makes you stop learning a language.

I posted one in. It isn't that bad, but to be honest nowadays I believe the community of a language is as important, if not more important, than the language itself. I don't want to get into a community whose leaders just start jumping on random minor Twitter users.
Post reply on HN