3 ms·
The examples provided feel more like bugs in various libraries than an actual problem intrinsic to Julia the language.
by ur-whale 4y ago
The examples provided feel more like bugs in various libraries than an actual problem intrinsic to Julia the language.
- exyi 4y agoYea, all are just bugs, not some intrinsic flaws in the language. Given Julia's goals (performance, abstractions, accessible to science people), it's understandable if they had slightly higher bug concentration than other (similarly sized) ecosystems.
- kllrnohj 4y agoThe author's argument is that the bugs all share a pattern, and thus there is an intrinsic flaw. That doesn't necessarily mean the community wants to fix the intrinsic flaw, just like nobody is really interested in fixing the intrinsic memory safety flaws of C. But they shouldn't be denied as real risks, either, or a tradeoff of some kind.
- Q6T46nT668w6i3m 4y ago@inbounds is a Base feature.
- arksingrad 4y ago@inbounds isn't the problem, it's incorrect usage of it. The poor docstring is absolutely a problem though, you should be iterating over eachindex(A), not 1:length(A).
- markkitti 4y agoYes, and it is a perfectly fine feature when applied correctly. It would be incorrect to assume that an `AbstractArray` starts at `1` or `0` which is why the updated example now correctly uses `eachindex`: https://docs.julialang.org/en/v1/devdocs/boundscheck/#Eliding-bounds-checks https://docs.julialang.org/en/v1/devdocs/boundscheck/#Elidin... If you want to assume that an array starts at `1` one needs to require an `Array` rather than an `AbstractArray`.
- wodenokoto 4y agoAccording to the article the problem is in the ecosystem, and partly the standard lib. Basically it doesn't matter if Julia the language is fine, if all the stats packages make wrong calculations. Then what is the point of Julia, if you have to rewrite all things? might as well use another language where you trust the result of the ecosystem, since it is the ecosystem you need in order to produce results.
- trenchgun 4y agoAll bugs mentioned had been quickly fixed: https://news.ycombinator.com/item?id=31397425 https://news.ycombinator.com/item?id=31397425
- wnoise 4y agoThat 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/Distributions.jl/issues/1253 https://github.com/JuliaStats/StatsBase.jl/issues/642 https://github.com/JuliaStats/StatsBase.jl/issues/642 https://github.com/JuliaStats/StatsBase.jl/issues/616 https://github.com/JuliaStats/StatsBase.jl/issues/616 https://github.com/JuliaLang/julia/issues/39385 https://github.com/JuliaLang/julia/issues/39385
- pdeffebach 4y agoI 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.
- wnoise 4y agoSure, it's unsurprising that it produces unexpected results, but there are actually semantics that should be expected. The problem is that implementing those semantics correctly for all cases is hard, because aliasing. Same issue that e.g. memcpy() vs memmove() have.