Live data from Hacker News

Ask HN:Why is Perl so dwarfed in data science by Python?

news.ycombinator.com

21–30 of 120 posts

Re: Ask HN:Why is Perl so dwarfed in data science by Python?

#22

Perl is expressive but the code can be hard to read. In general, Python is readable because it enforces the indentation and other language design choices. Python also got heavyweight libraries such as Numpy and Pandas which put it in the front. Perl do not have have such well known libraries as far as I know.

Add great visualization (Seaborn) and ML (Scikit and numerous frameworks like Pytorch) and you have a pretty complete analytic package.

Re: Ask HN:Why is Perl so dwarfed in data science by Python?

#23
I'm not a programmer but I did get my start in tech because I installed Mandrake on my computer for fun in the 90s and couldn't figure out how to format the drive back so I could reinstall windows. I was accidentally forced to learn linux, and with that things like bash and Perl. I feel like people who customize their bashrcs and tweaking their IP tables and generally are comfortable scripting, are people who gravitate towards Perl, but for developers and data science folks, Python is much more accessible in terms of finding out how to learn that application of the language to those types of problem? When I thought about learning some more data science a few years ago, the vast majority of the tutorials on youtube etc are for people shifting from apps like excel to things like sql and python, I didn't see anything about Perl.

Re: Ask HN:Why is Perl so dwarfed in data science by Python?

#27
post #19

I love perl for regex scripts, where I need to quickly filter or transform a text file. I never liked it for other kinds of programming projects, for some reason to me it doesn’t feel as well suited to, say, numeric simulations. > Naturally far more efficient What does this mean exactly? One big reason for Python’s success in data science is numpy, which is far more efficient (especially on large data) than vanilla P…

Also data science requires a lot of intermediate/mockup data visualization and python puts matplotlib and scikit-learn right at your fingertips. Hard to find a match Perl side, but I might be wrong.

Re: Ask HN:Why is Perl so dwarfed in data science by Python?

#30
Python got numpy fairly early on. It is fast and powerful.

Then a whole ecosystem was built on top of numpy, with scipy, pandas, PIL, et cetera. Everything that uses n-dimensional arrays used numpy as their base and as a result all those things can be combined trivially. That's very powerful.

Then later came ipython, a much improved interactive shell, and Web based notebooks that are very useful for data science work.

That the language involved is Python isn't even important, imo. Numpy + ecosystem replaced Matlab. All Python has to be is be a better language than Matlab, and it is.

Post reply on HN