Live data from Hacker News

Python Is Eating the World

zdnet.com

421–430 of 993 posts

Re: Python Is Eating the World

#421

Earlier quoted context omitted.

I don't know what parallel reality you live in but there are few languages with as many packages for getting productive things done than Python. In web dev andam data science I have yet to see a language with as many libraries for useful stuff. Now, if what you're looking for is high performance and precise memory management, sure, the language will never give you that. What language has as many easily available libr…

Well, that's what I said, there are plenty of packages for data science. For building APIs and web stuff usually there aren't. Python is nowhere near NodeJS for instance. But whatever suits, if you only know one language, it will seem like the best language out there.

This comment is so strangely off the mark I almost wonder if you're basing this off of some secondhand hearsay. Until recently, Python's largest arena of usage was web development and API scaffolding by far. A simple search would have revealed literally thousands of web development focused libraries, most centered around the Django ecosystem [1].

As another commenter mentioned: Django, DRF, Flask

But unmentioned... The old titans of Pyramid, Pylons, CherryPy, Bottle, Tornado, wheezy, web2py, and more.

A _gigantic_ portion of the community is centered around web development, and the fact that almost all web packages have centralized around Django, DRF, and Flask is a function of dozens upon dozens of popular frameworks merging in a "survival of the fittest" fashion into the best possible union of ideas. You seem to perceive "many packages" that all perform a similar function to be a good thing, but speaking from the perspective of someone who writes 70% Javascript and 30% Python I'll tell you that almost every other sane group of developers considers the highly duplicitous JS ecosystem to be a massive weakness.

The NPM ecosystem has an _ocean_ of shallow, highly similar, and one-off frameworks because Javascript developers tend to "divide and conquer" rather than bring good ideas together. Python developers deprecate their packages in favor of better ideas, or just open a pull request to alter the project rather than creating a 99th competing framework in the first place.

[1] https://pypi.org/search/?q=&o=&c=Environment+%3A%3A+Web+Envi...

Re: Python Is Eating the World

#422

Earlier quoted context omitted.

Rust's cargo, JS's yarn and the grand daddy of them all Ruby's bundler address all these issues. Even newer versions of Gradle support a workflow where you specify the versions you know you want and just on everything else, including transitive dependencies, down.

Yeah.. not sure why the love for Ruby faded in startup-world

I think ruby is alive and well for a lot of startups. I do think it is being squeezed on three sides though.

* From javascript. If you have a app like front end, you are going to use js. Why not have the whole stack be js and have your developers use only one language.

* From python for anything web + data science. Again, why not have your whole stack be in one language?

* From lack of hype. Rails is still evolving, but a lot of packages are not seeing releases (I have used packages 3-4 years old). This indicates to me that the energy isn't there in the community the way it used to be. I have seen the consultants who are always on the bleeding edge move on to elixir.

That said I have seen plenty of startups using ruby (really rails) and staffing when I hired for ruby wasn't an issue.

I do help run a local ruby meetup and attendance is good but not exceptional (15-40 people every month). So that may skew my viewpoint.

Re: Python Is Eating the World

#423
post #54

Earlier quoted context omitted.

Yes, those are caught when using pip freeze.

> Yes, those are caught when using pip freeze. No they are not. Pip freeze does not resolve transitive dependencies, nor does pip know what to do if your transitive dependencies conflict with each another.

They are, but pip doesn't know if they are transitive dependencies or not or if they conflicted at install time. Pip-tools helps with this.

Re: Python Is Eating the World

#424
post #310

Earlier quoted context omitted.

I do. This is 2019, and I like being able to see at least three files side-by-side without squinting my eyes, thank you very much. Yes, I know I'm in the minority these days. :/

what if the overly restrictive character limit causes a decrease in naming clarity?

What naming clarity? Isn't every Python variable called "spam" or "eggs" anyway? ;-)

Re: Python Is Eating the World

#425

According to people who work with a lot of programmes teaching coding, the reason python is so appealing to new coders is the syntax. Particularly the lack of braces, the indents, the nice keywords, that make reading code much easier to a newcomer. Having taught both python and JavaScript, I can tell you that the former is far far less confusing to newcomers than the latter. Imagine explaining the problem with equali…

> Particularly the lack of braces Since most of my professional experience is with C like syntax languages, I don't get how the lack of braces is an advantages, quite the opposite in my limited experience with Python. Braces define scope unequivocally, they are easy to visually parse and don't care whether you are using tabs or spaces or even if you, loud gasp, mix them. Furthermore, you can copy and paste, say for l…

Two things: 1. For people not used to do programming, braces in text are usually significant - having them everywhere, and even start and end on different lines, are confusing. 2. For people not using standard US keyboard braces are often an SHIFT or ALT command, that makes it wildly different to program uninterrupted.

Re: Python Is Eating the World

#426

In my opinion, the biggest problem facing Python is still concurrency. The mitigation efforts still look to me like Perl's 'bolted on' implementation of object orientation. Python should have gotten rid of the GIL during the 2 to 3 transition. It may have also been an opportune moment to introduce optional typing and maybe even optional manual memory management, making it useful to develop almost all kinds of softwar…

There have been attempts to replace the GIL with locks on individual lists, dictionaries etc but they came out a wash performance wise. Perhaps this can change with gc.freeze and the new dictionary structure.

Re: Python Is Eating the World

#427
post #102

Earlier quoted context omitted.

It seems to value my time quite highly, as I can achieve most things more quickly and easily in Python than any other language I know. Can you be more specific about how it increases your burnout? Is it the language, or someone forcing you to use that linter and settings?

I'm not the person you're responding to but what they say resonates with me as a Python developer. I believe Python is quite possibly the best language for a few things * Exploratory programming - such as what data scientists do * Writing programs that will never grow beyond 150LOC, or roughly what fits on a screen + one page down When I have those two constraints met I am almost always choosing Python. Here are some…

Can you explain the use case for your unsound type system? Is it unsound just because mypy types are inexpressive?

Re: Python Is Eating the World

#428

Earlier quoted context omitted.

Yeah.. not sure why the love for Ruby faded in startup-world

I think ruby is alive and well for a lot of startups. I do think it is being squeezed on three sides though. * From javascript. If you have a app like front end, you are going to use js. Why not have the whole stack be js and have your developers use only one language. * From python for anything web + data science. Again, why not have your whole stack be in one language? * From lack of hype. Rails is still evolving,…

"From JavaScript" also includes another side: When your frontend is in JS, your backend can be a simple REST API. And building a REST API requires much less framework than building a server-side-rendering webapp does, so it's tempting to use Go or Rust or whatever you like.

Re: Python Is Eating the World

#429
post #42

Earlier quoted context omitted.

>Most people just cross their fingers and hope dependencies don't change Is there anything wrong with pip freeze > requirements.txt and then pip install -r requirements.txt ? This would install the exact versions

The only problem with that is it's hard to keep the dependencies up to date. Pip-tools solves this problem.

Why do you want to update your dependencies if they work? Isn't the whole point of dependency management to avoid using different versions of dependencies than the ones they have been tested on?

Re: Python Is Eating the World

#430
post #33

Python has a lot of problems that really slow down development, but they are all fixable. The biggest issue, in my opinion, is in dependency management. Python has a horrible dependency management system, from top-to-bottom. Why do I need to make a "virtual environment" to have separate dependencies, and then source it my shell? Why do I need to manually add version numbers to a file? Why isn't there any builtin way…

It's not that bad if you use the right tools. The two main options are an all-in-one solution like poetry or pipenv, and an ensemble of tools like pyenv, virtualenvwrapper, versioneer and pip-tools. I prefer the latter because it feels more like the Unix way. Why should Python have some "official" method to do this? Flexibility is a strength, not a weakness. Nobody ever suggests that C should have some official packa…

> Flexibility is a strength, not a weakness.

"There should be one-- and preferably only one --obvious way to do it.": https://www.python.org/dev/peps/pep-0020/

Post reply on HN