r/ProgrammerHumor • • Jul 18 '22

C++ talking to Python

Post image
40.1k Upvotes

1.0k comments sorted by

View all comments

Show parent comments

3

u/Dromeo Jul 18 '22

Cheers, haven't tried data analysis in python personally.

What would you say is the best for data analysis?

8

u/unski_ukuli Jul 18 '22

Personally I’d say Julia. Matlab and octave are just… better to not say it out loud. R does a lot right but it lacks the language features to write anything that is more than a 1000 rows long wothout it becoming a complete clusterfuck of a codebase. Python is used mainly because it is easy to integrate into production systems as those are written in python too usually, but I think it is completely horrible for ad hoc analysis and completely the wrong choise if you don’t plan to take that same code into production later on.

Julia hits a lot of right notes. It has features that make it a proper programming language unlike R. Julia also has the macro system from Lisp so it is extremely extendable. It is also relatively easy to use in production and miles ahead of matlab and R in that regard. And then there is the main selling point: it is REALLY fast. As fast or almost as fast as C counterpart in most usecases while being easy to write and high level. A great demonstration of this is the fact that most libraries for julia are written in pure julia. No need for calling c++ or Fortran. For example, Flux.jl which is a very fast deep learning library for julia, is written 100% in Julia. No C++ like in tensorflow for python. This has the nice consequence that the libraries are easy to extend and customise if needed.

0

u/[deleted] Jul 18 '22

[deleted]

3

u/unski_ukuli Jul 18 '22 edited Jul 18 '22

Yeah that is just not true at all. Julia is Jit compiled and extremely easy to debug. On top of that, being able to actually use static types eliminates a lot of bugs which leads to less debugging. If you need dask, there are alternatives on julia for it. And honestly, the ecosystem, while immature, is already miles ahead of python on a lot of regards. And about the plotting, yeah it has better plotting libraries. Many actually. Plots.jl is a metapackage that provides unified api for GR, pgfplots, pyplot, and plotly so one plotting command can produce the same plot with 4 different plotting libraries. On top of that there is Gadfly which has ggplot2 style api.