Explorer – A library to bring dataframes to Elixir
cigrainger.com
cigrainger.com
Julia has been <designed> to unsettle Python in the data space but to no avail.
¯\_(ツ)_/¯
e.g. to this day starting a small library requires learning supervisors, genservers, etc. Unless you’re doing a one off .exs, you’re going to be really confused by what “mix new” does.
Saying this as a passionate Elixirist — there’s nothing wrong with the leaky abstraction part, it’s what makes it powerful — but dethroning Python isn’t happening anytime soon.
We often tend to compare having to learn OTP with “not having to learn OTP” but the reality is that we need to compare OTP with concurrency tools in other languages (e.g. threads, locks, mutexes).
Of course, one can say: “I wouldn’t use threads in other languages” but that’s potentially a bigger problem, as you end up with software which can’t easily exploit concurrency (which is especially important in the data domain).
I still think what you said has some truth to it, but I think the frame of reference is a bit off. I would rather learn a bit of OTP to get concurrency and fault tolerance rather than learn nothing and get none of it. :)
PS: “mix new” does not generate supervision trees by default.
That’s a very fair point, but is the average data scientist going to be learning this or offloading that task to a software engineer?
> I would rather learn a bit of OTP to get concurrency and fault tolerance rather than learn nothing and get none of it. :)
Agreed —- I’ve been using Elixir for a bit and am only now learning about supervision trees and genservers. It’s such an exciting part of the language.
> PS: “mix new” does not generate supervision trees by default.
Yup and that was confusing for me as a beginner — I recall being confused over where the entrypoint of the app was. Coming from a language like Python.
Hi José, huge fan. Thanks for dropping by this thread!
What does "switched to LiveView" mean? I thought LiveView was some collaborative, live documentation / interactive tutorial tool. Or does it provide a whole programming environment and/or development process?
I'm not enamoured with how DataFrame.filter/2 reads compared to the dplyr example. I've written very little R but read code by others and find dpylr excellent for that; and I use a JS 'port' of dplyr [1] for projects. I'm in the "hate pandas" camp and find it painful to both read and write - and these callback functions are coming too close to Pandas for my liking. I hope an alternative can be found
There's precedent in Ecto for a "magic" operator (`^` if I'm not mistaken), so it wouldn't be a stretch to implement it here as well.
Rustler precompiled[1] is exactly what I was looking for to start writing NIFs in Rust.
Having to bring in the entire Rust toolchain stopped me every time I thought about it - not mentioning that at my current day job I'm not completely at liberty of deciding what tools I can/cannot use.
Combined with Livebook[2] this is the perfect combo to lure into the Elixir ecosystem my fellow data scientists colleagues.
I relate to the general sentiment, mind you, but Rust is brainlessly easy to install.
But even if you seriously don't want to even do that (two shell commands) you can still pull a Docker image and work inside it -- but that's a bit more involved, granted.
I applaud the Rustler Precompiled effort because apparently it lowers the barrier to entry for many -- yourself included -- but at least for me installing Rust was never an actual problem.
As for Explorer, I have a few friends that curse at Python and Pandas every week, I might be able to "sell" them this project instead!
True, my issue is with releasing libraries that need Rust.
It forces the users of the library to install Rust, adding friction, and possibly deal with issues/errors that they are not used to.
Especially on heterogeneous systems: library developed on Linux, user is on Mac/Windows.
One example is my day job where the CI platform is controlled by another department and you can't create your own custom Dockerfile(s), because "security".
On the developers' side Rust is completely fine, in fact IMO Python is much more problematic, despite being an order of magnitude more popular.
I don't see how elixir can replace python any time soon because it's DS ecosystem is lacking rn sadly
And yeah, Elixir's scene in this area is just now starting. The NX project opened a lot of possible doors but the community just started stepping up. It's going to be a while, granted, but I am optimistic because Elixir's overall community values quality and centralization (with all the sometimes problematic collaboration efforts that entails) over rushing to have 10 competing implementations.
Time will tell. I have no horse in the race either way, just sharing various observations really.
So far I've never regretted using Elixir for ETL, but I do confess that for two projects I was mighty tempted to try a rewrite in Rust because ingesting several dozens of billions of records in a dynamic language isn't exactly fast.
But, again, the ergonomics trump everything else 99% of the time for me. Plus for one-off ingestion tasks nobody cares if it takes 30 minutes or the whole night.