Hasty Briefsbeta

Correctness and composability bugs in the Julia ecosystem (2022)

5 hours ago
  • #Software Correctness
  • #Julia Programming
  • #Ecosystem Issues
  • The author used Julia for data analysis, statistics, and simulations, and contributed to its ecosystem with open-source packages and visual explanations.
  • Despite initial enthusiasm, the author no longer recommends Julia due to widespread correctness and composability bugs in its ecosystem.
  • Julia and its packages reportedly have a high rate of serious correctness bugs, more than any other programming system the author has used.
  • Examples of correctness issues include problems with package composability, unexpected feature combinations failing, and silent data corruption.
  • Specific issues mentioned include Euclidean distance not working with Unitful vectors, function failures with substrings, and missing values breaking matrix multiplication.
  • OffsetArrays were a significant source of bugs, leading to out-of-bounds memory accesses and segfaults or incorrect results.
  • The @inbounds macro was frequently misused, leading to silent data corruption and incorrect mathematical results, even in official examples.
  • Bugs were not confined to mathematical tasks but also affected JSON encoding, HTTP requests, Arrow files with DataFrames, and Pluto notebooks.
  • Other users shared similar experiences, including months-long debugging due to incorrect gradients in machine learning libraries like Zygote/Flux.
  • Systemic issues in Julia's design, such as lack of formal interfaces and unspecified semantics in edge cases, contribute to these problems.
  • The Julia community is talented and generous, but systemic correctness problems are not being addressed at a leadership level.
  • Despite claims of improvement, the author believes Julia is not reliable for most use cases and the risks outweigh the rewards.
  • The author hopes Julia can achieve its ambitious goals but stresses the need for revisiting and revising current patterns.