Julia packages that have no equivalents in other languages?

I’m going to give a talk to students with experience in Python and R about the advantages of Julia. I already have most of the talk but would like to have an argument related to existing Julia packages.

I know Julia is young and doesn’t have as many packages as Python. However, I think a good argument could be that there are things that are difficult to do in other languages, for instance because there is no suitable package. For example, Jupyter notebooks can be used in both Python and R, but only Julia has Pluto.

Are there more examples of Julia packages with no equivalent in other languages? Other ideas on the advantages of Julia packages are welcome. (:

10 Likes

Julia also has Jupyter (it’s the “Ju” in Jupyter).

6 Likes

Relative to Python:

  • Pluto
  • Julia’s threading model
  • ThreadsX, which makes it pretty trivial to point dozens of cores at a single data-parallel problem without needing tons of RAM
  • TimerOutputs and BenchmarkTools have no real equivalents in Python
8 Likes

@code_native , @turbo, tullio.jl

12 Likes

The largest part of DynamicalSystems.jl functionality, I’d say more than 80%, does not exist in any other language, to the best of my knowledge. DrWatson.jl has no equivalent in other languages. DynamicalBilliards.jl as well.

13 Likes

The obvious one: DifferentialEquations.jl

30 Likes

This question is probably hard to answer because most of us only know a limited number of languages in depth. Python has has several scientific template/workflow libraries, I’m not sure which is closest to DrWatson. Python’s equivalent of BenchmarkTools is pyperf.

I would expect that more than single packages, pairs of packages in Julia work together in ways that are probably not found in other languages, because of multiple dispatch.

4 Likes

That’s true, but none of them is close enough to DrWatson. We outline this in more detail in our paper if you are interested: Journal of Open Source Software: DrWatson: the perfect sidekick for your scientific inquiries (section “Comparison with other software”)

5 Likes

I agree, looking at groups of packages for a specific workflow also makes it easier to draw comparisons because there will be more overlap. For example, https://polynote.org/ predates Pluto, but has far poorer interop with the rest of the ecosystem because of its own internal architecture and how messed up Python packaging is.

I find ProfileView.jl to be awesome, for providing a macro for quickly generating flame graphs, which helps me optimize the code. Is there anything as user-friendly in the C/C++ world?

1 Like

JuMP, OnlineStats, Turing, Flux, IterativeSolvers, Transducers, Soss, InfiniteArrays, Octavian, LoopVectorization, KissABC, Yao, Yota, DifferentialEquations,… may have some equivalents in other languages but the Julia version is considered very good.

PD: But unfortunatelly we also miss many other important packages: Multiple Imputation, Metaanalysis, Advanced survival models…

7 Likes

I still think that the profile visualization provided by kcachegrind is better than flamegraphs:


Although it should be possible to adapt the Julia profiling output to the callgrind format (KCachegrind)…

On the Python side, I found the speedscope flamegraph visualization very convenient:

Finally, I found the RStudio profiling information integration (little bars next to source code lines) better than what is available in Julia-Vscode:

(screen copy from Profiling R code with the RStudio IDE – RStudio Support)

IMHO Julia’s profiling tools are good but still can improve borrowing neat ideas from outside :wink:

13 Likes

I wouldn’t say pyperf is equivalent to BenchmarkTools; one of the major points of Julia’s benchmarking is that you can use it with arbitrary expressions, without changing the syntax of your existing program. pyperf doesn’t really come close to that, you can benchmark functions, or you can pass code as a string.

I believe GitHub - GunnarFarneback/LongestPaths.jl: Julia package for finding the longest simple path in a graph. has no equivalent (and if there is something that can compete I’d very much love to know) but a) it’s extremely niche and b) it wouldn’t be that hard to replicate it in various other languages.

2 Likes

The syntax is a bit different in Python: in Julia we wrap the expression e like @btime e and in Python we wrap like timeit(stmt="e"). Or in IPython it’s %timeit e.

1 Like

Maybe Networkx’s dag_longest_path?

https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.dag.dag_longest_path.html

I agree that IPython can do it, but that’s a fairly narrow environment.

I would say that the version where you have to wrap it in a string is much worse (e.g., it doesn’t play nicely with statements that already include strings), and enough overhead that I’ve found myself using @btime constantly in Julia while almost never using an equivalent in Python. That’s a matter of opinion though, I can certainly see how you or others would disagree.

No, longest path in a directed acyclic graph has a way smaller complexity than when you allow cycles and is not a challenging problem at all.

2 Likes

@GunnarFarneback, sorry for the basic question, but what are the applications of LongestPath.jl?

1 Like

Seems to be an issue with Python not having metaprogramming. In R and Julia it’s kinda easy to pass code in.

Python decorators doesn’t do it.

That’s why Jupyter (or is it ipython) have this %timeit thing which is basically Julia’s macros, but less powerful and customizable.

1 Like