Live data from Hacker News

Python Is Eating the World

zdnet.com

381–390 of 993 posts

Re: Python Is Eating the World

#382

Earlier quoted context omitted.

I'm not really sure what your point is in criticizing "farming" to C. > This is that culture thing I'm talking about. You made a false claim. You referred to Python iteration as not generic, when what you really meant is that Python lacks first class monad support. If you want a monadic programming model, you're not going to be a happy camper in the Python world. But I doubt that comes as a surprise.

> I'm not really sure what your point is in criticizing "farming" to C. If Python is so great how come it can't even express a decent data structure that it needs? I'll happily level the same criticism at Ruby if you like. > You made a false claim. Firstly: This is not High School Debate Club. There isn't some kind of point system. Language and expectations like this are not only counterproductive (in that they essen…

> Language and expectations like this are not only counterproductive ... they're also tedious and unwelcome.

Who gets to be the language police? I'm fine with "High School Debate" but "verbal ripostes in which the goal is to be most right rather than learn the most" is not an accurate description of that.

Re: Python Is Eating the World

#383

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…

Absolutely agree. maybe its just cos I am coming from languages with braces (java) but yeah I find the lack of braces + whitespace having meaning (tabs versus spaces for example) _incredibly_ frustrating

I also don't like the fact it is dynamically typed. It makes reading soure code so much harder. E.g What is the type of this thing that is being passed as a function arg?

Re: Python Is Eating the World

#384
post #257

Earlier quoted context omitted.

Or something that works with PyPI directly https://news.ycombinator.com/item?id=20672329

> Or something that works with PyPI directly Poetry is python specific and does not solve the problems that pip/pypi has with native C/C++/Rust/etc modules. Nix/guix solves all of that

Indeed. We have some Python modules written in Rust. It needs Rust nightly, because pyo3 requires Rust nightly. The Rust crate relies on libtensorflow. Unit tests for the Python module use Python and pytest. And we use our own build of libtensorflow (optimizations for AVX and FMA).

The dependencies of such projects are easy to specify in Nix. Moreover, it's easy to reproduce the environment across machines by pinning nixpkgs to a specific version.

Re: Python Is Eating the World

#385

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…

> Ends not means, almost entirely, for most people who aren’t full-time programmers. And for many who are. Maybe not on our main projects, but at least for helper tools, side projects etc.

That's my case. I use python mostly for smaller scripts and 'leetcode' based coding katas.

Re: Python Is Eating the World

#386

Earlier quoted context omitted.

> I don’t understand why there’s so much use of much more complicated platform/languages (eg java, .net)? What language is Python implemented in? Is it Python, or something else? This tells you that even the implementors of Python don't think Python is suited for everything.

No it doesn't. As someone else mentioned, RPython exists, and in general, bootstrapping is nice, but there are a variety of compelling reasons to not rewrite CPython in python, that have nothing to do with it being "suited" or not. History, reliability, simplicity, lack-of-value, etc. At this point there's not much to gain by rewriting cpython in python (pleasing some guy on the internet), and quite a lot to lose (si…

It wouldn't have been years of work if they started right after Python was first implemented instead of a big-bang now. For 25 years each time they've implemented a new feature they've chosen C over Python to do it, for reasons of it being better suited, some of which you've listed yourself! Like simple C-interop!

I don't think it's a criticism of Python! I've worked on meta-circular implementations of languages and I don't do it for the sake of it. Not every language is suited for every task.

Re: Python Is Eating the World

#387
post #122
post #54

Earlier quoted context omitted.

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

> Pip freeze does not resolve transitive dependencies I don't think this is correct: $ python3 -m venv /tmp/v $ /tmp/v/bin/pip install flask [...] Collecting MarkupSafe>=0.23 (from Jinja2>=2.10.1->flask) [...] $ /tmp/v/bin/pip freeze | grep MarkupSafe MarkupSafe==1.1.1 > nor does pip know what to do if your transitive dependencies conflict with each another This is true, but because Python exposes all libraries in a…

> There's no way in an import statement to say which one you want.

This would be fixable with a sys path hook, were pip so inclined

Re: Python Is Eating the World

#388

Remember NOT to jump into Python for your new product if don't know Python. If you are developing for a young startup, have time crunch, then stick to what you know. IF you do not have a language, or know Python a bit, then pick Python. Here are some of the reasons why I stick to Python (young startup/web APIs): - OOPs is not too strict (might give a headache to some folks) - Mixins, lambda, decorators, comprehension…

The main point I am trying to make is that not all of us are language experts. I absolutely know the vital role that language experts play and that we need to solve the issues. But companies need to build in the meanwhile. Python is easier to learn, this is why it is such a popular language in Universities.

I am not a high IQ person to even grip some of the nitty-gritty underpinnings of a language. But should that stop me from building a product?

In the end, I need a language that is easy to pick-up, be productive, has its heart in the right place. A young Python programmer can web scrap easily or plug into Ansible or so many other things. If you know of another language that would make more practical sense and still be easy to pick-up, I would switch.

Re: Python Is Eating the World

#389
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…

You're enormously overstating the influence of JS on things outside of the JS ecosystem.

Re: Python Is Eating the World

#390

Earlier quoted context omitted.

Yeah, I'm a bit sick of Python. We have some internal utilities written in it and while developers could manage all the dependencies and everything, we kept having problems with getting everything working on the machines of our electronics techs. Gradually pretty much everything has been rewritten in C++ (with Qt GUI framework). Way easier to be able to have a setup program (using free InnoSetup) that just extracts t…

> Way easier to be able to have a setup program (using free InnoSetup) that just extracts the eight or so DLLs required in the same folder as the EXE and that's it. You can do the same with Python.

Yeah, we tried all sorts of ways to do it. Couldn’t get it to work satisfactorily with the particular libraries we were using.
Post reply on HN