Live data from Hacker News

Python Is Eating the World

zdnet.com

131–140 of 993 posts

Re: Python Is Eating the World

#131

Reading this got me thinking and I wonder if other people feel like me about this, so I'm going to share it. This is not serious, but not entirely unserious... I try to be a good sport about it, but every time I write python I want to quit software engineering. It makes me angry how little it values my time. It does little for my soured disposition that folks then vehemently lecture me about the hours saved by future…

Well in my world, the other language is Java, not Haskell. Alone in this?

Re: Python Is Eating the World

#132
This makes feel a bit sad/somber, because a lot of people are missing out on the exhilarating power of using advanced powerful type systems. I wish the ML community had picked up a few notes from Python, and built an Ocaml-like language with beginner-friendly Pythonic syntax (Reason comes close). I wrote about this here in the past (https://news.ycombinator.com/item?id=15549101); quoting myself below:

I'm a big fan of strong static type systems. I believe type-safety increases code quality significantly. I used to think several years ago, that the main benefit of strong static typing was code safety / eliminating a whole class of bugs. But I've changed my opinion. I now think the biggest benefit is that it makes the code a lot easier for other people to read and understand.

I mean I have multiple personal projects where I've used Python (which is a dynamically typed language), but these are small one-off projects. But I think when working in a team, especially a large team, having types becomes a huge thing. Having types for objects is especially useful. Having types forces you to think more clearly about the structure of your data.

It's really sad when I see `foo(bar)`, and I have no idea what the type of `bar` is, and if it's an object, I have no idea what fields `bar` has. I have to simply guess the structure of the various implicit types by looking at the code (sigh). It makes the code difficult to read, and rather unpleasant to work on. Not to mention, all the multitude of bugs that come from duck/dynamic typing.

I don't think good statically typed languages are hard to use at all. Type inference has spread everywhere that the old argument of having to repeat your types doesn't hold anymore. TypeScript, Flow (JavaScrpt), Haskell, languages from the ML family are really good at type inference. Even the `auto` type inference in C++17 was better than I'd expected.

If dynamic typing continues to grow in popularity, I don't want to even begin to fathom the number of large projects that are going to built, which will suffer from a avalanche of TypeError-class bugs that could have easily been avoided with static typing. One encouraging sign I've seen in the Python world is that optional static typing is reluctantly being adopted in many circles. There was mypy for a while, and now, there's a new type checker called Pyre (written in Ocaml). I find hope in these little things.

Re: Python Is Eating the World

#133

Earlier quoted context omitted.

I write python professionally and honestly, who cares about the 80 character limit? Just ignore it! :)

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. :/

Then may I respectfully submit you or your employer should buy an appropriate monitor or you chould use two.

I'm not asking for 300 character lines. A 25% increase would be a rational and sufficient nod to the fact that monitors are bigger.

Re: Python Is Eating the World

#134
post #88
post #20

Earlier quoted context omitted.

It’s unfortunate that it’s third party, but conda has the unquestionable advantage of being the only Python-centric packaging system that has a reasonable shared binary library story

I'm curious, do you not find wheels + manylinux reasonable? I agree that until recently, Conda definitely had that advantage, but now that you can `pip install scipy` and have that get you a working library and not try to compile things on your machine what does Conda offer beyond that? I guess one thing Conda has that the pip ecosystem doesn't is that it supports installing non-Python shared libraries like libcurl o…

Does pip allow version number dependencies? Conda is able to upgrade/downgrade packages to resolve conflicts, whereas pip just seems to check if a package exists and shrugs when there's a version conflict.

Re: Python Is Eating the World

#135
post #67

In general JavaScript is eating the world. Python still dominates in numerical computing and JavaScript hasn't been able to make a single dent. Because nobody wants to write a.mul(k).add(b) rather than k * a + b or a.set([i,j], b) rather than a[i,j] = b JavaScript's lack of operator overloading is keeping Python alive. Python also has integers that feel part of the language, rather than being segregated from normal n…

> JavaScript's lack of operator overloading is keeping Python alive.

right...

- https://www.scipy.org/

- https://news.ycombinator.com/item?id=20661311

Re: Python Is Eating the World

#136
post #67

In general JavaScript is eating the world. Python still dominates in numerical computing and JavaScript hasn't been able to make a single dent. Because nobody wants to write a.mul(k).add(b) rather than k * a + b or a.set([i,j], b) rather than a[i,j] = b JavaScript's lack of operator overloading is keeping Python alive. Python also has integers that feel part of the language, rather than being segregated from normal n…

TensorFlow.js is actually very nice to work with: it seems to be well supported and comes with many quality examples.

Re: Python Is Eating the World

#137

Reading this got me thinking and I wonder if other people feel like me about this, so I'm going to share it. This is not serious, but not entirely unserious... I try to be a good sport about it, but every time I write python I want to quit software engineering. It makes me angry how little it values my time. It does little for my soured disposition that folks then vehemently lecture me about the hours saved by future…

Well in my world, the other language is Java, not Haskell. Alone in this?

For what it's worth, Java tortures me a lot less since J8. I don't dread it the way I do python because I can use Clojure or Kotlin.

Re: Python Is Eating the World

#138
post #27
post #12

Considering Python can power the largest web sites (Netflix, Instagram), I don’t understand why there’s so much use of much more complicated platform/languages (eg java, .net)? Note: I am an amateur which is likely the reason for my ignorance.

Difficult problems remain difficult no matter what language you use. Also, there's a real cost to everything being dynamically typed in large systems. Humans can't keep all the program types in their brain, and having the compiler help you out is kind of a big deal.

I would say 90% of software is glorified CRUD. Very little is that complicated. Over-complicated, for sure.

Re: Python Is Eating the World

#139
post #114

Reading this got me thinking and I wonder if other people feel like me about this, so I'm going to share it. This is not serious, but not entirely unserious... I try to be a good sport about it, but every time I write python I want to quit software engineering. It makes me angry how little it values my time. It does little for my soured disposition that folks then vehemently lecture me about the hours saved by future…

Re. linting, I'd highly recommend Black with whatever line length you want - it'll reliably reformat your code, and once you lose the urge to reformat while typing it's fantastic. It's like deleting a bunch of useless mental code. And the code reviews are even better: include a linting step (ideally with isort) in CI and you can avoid 95% of formatting comments.

100% this. I just switched to using Black recently and not having to ever fix a lint issue again has been life-changing. Use Black with pre-commit (https://pre-commit.com) and never look back.

Re: Python Is Eating the World

#140
post #43

Are there any good cloud solutions for developing in Python? I’ve been using Pythonista on the iPad but it doesn’t support numpy.

Some good news for you: Pythonista absolutely supports numpy, I followed advice on the web a few months ago to install it, and I just tried it to make sure it still works.
Post reply on HN