Live data from Hacker News

Python Is Eating the World

zdnet.com

451–460 of 993 posts

Re: Python Is Eating the World

#451

Earlier quoted context omitted.

It is funny - half of the real desire/need for containers comes back to these sorts of issue with both node and Python. And then they bring in their own different challenges.

I have been programming with node for the last 3 years and I never had any dependency issues with node (at least for 3rd party dependencies). I cannot say that with python that requires using some tool be it docker or virtualenv to isolate them from the already installed ones. Node's dependency managers npm/yarn just copy the versioned dependencies from their cache folder into the local node_modules folder and remove…

Lucky! I wrote a small internal app in node for my company that relied on an IMAP library. 3 months after launch, someone upgraded the library and my app stopped working. Stack traces were incomprehensible. No “how to upgrade” documentation in sight.

So I spent 2 hours and rewrote it in Java 8 with Maven.

Issues all gone. Node has some work to do before I’ll consider touching it again.

Re: Python Is Eating the World

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

I've always seen it like this: Not everyone builds reproducible software with Python (or in general) and how you handle dependencies can vary. Python leaves it open how you do it: globally installed packages, local packages, or a mix of both.

In the end, it needs to find the import in the PYTHONPATH, so there's no magic involved, and there are multiple robust options to choose from.

So instead of bashing Python for not shoveling down an opinion on you, it's up to the developers to choose which tools they want to use.

If they don't choose one and are unable to freeze their dependencies, it's not a Python problem, but IMO lack of skill and seniority.

Re: Python Is Eating the World

#453
post #362
post #110

Earlier quoted context omitted.

Tell that to accounting that is paying for AWS instance usage. Facebook has an interesting talk about how much electricity 1% performance improvement saves.

> Tell that to accounting Are you suggesting that accounting only cares about the AWS bill but not at all about the salary of developers?

A developer using an AOT compiled language can still earn the same salary.

Re: Python Is Eating the World

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

The solution to this is Poetry. https://poetry.eustace.io It's good. Projects should use it.

Poetry is definitely an improvement.

Anyone considering it for production usage should note that package installs in the current versions are much slower than pip or Pipenv. This might affect your CI/CD.

Re: Python Is Eating the World

#455

Earlier quoted context omitted.

Yes, pls, go on and tell us how it's a default package management tool for C/C++... It is a step forward, sure, but it's a far cry from Python's pip or Rust's Cargo or even Dlang's dub.

Python's PIP? Or do you mean Anaconda? Or VirtualEnv? Or Poetry, which someone here has pointed to? Also - you're moving the rhetorical goalpost. First you claimed there was no package management system, no you're complaining about the lack of default.

Given that OP was talking about getting C/C++ packages "off a usenet archive", I think it's clear that they were talking about what coding C and C++ was like two or more decades ago.

Re: Python Is Eating the World

#456
post #411

Earlier quoted context omitted.

The Ocaml exception implementation is comparatively very performant, and so its exceptions are routinely used for control flow.

I'd be interested to learn about how exceptions are typically using in Ocaml for non-local control flow. Exceptions have two core properties: (1) non-local jump (carrying a value) and (2) dynamic binding of place to jump to. Contrast this with e.g. break / continue in loops where (2) does not hold. If most use cases of performant OCaml exceptions were not making use of (2) that would be an interesting insight for pro…

No data as such. But here's the first example in the "batteries included" list library:

   let modify_opt a f l =
     let rec aux p = function
       | [] ->
         (match f None with
          | None   -> raise Exit
          | Some v -> rev ((a,v)::p))
       | (a',b)::t when a' = a ->
         (match f (Some b) with
          | None    -> rev_append p t
          | Some b' -> rev_append ((a,b')::p) t)
       | p'::t ->
         aux (p'::p) t
     in
     try aux [] l with Exit -> l
Here, the Exit exception is being raised as an optimisation: if no modification happens, then we return the original list, saving an unnecessary reverse. The try is the only place that the Exit exception is caught, so the jump location is static, much like a break.

Re: Python Is Eating the World

#457

Holy Crap! What a lot of irrational, hyperbolic hate for Python. I think everybody should spend their first couple of years working in Fortran IV on IBM TSO/ISPF. No dependency management because you had to write everything yourself. Or maybe [edit: early 90's] C or C++ development where dependency management meant getting packages off a Usenet archive, uudecoding and compiling them yourself after tweaking the config…

I don't think its hyperbolic. If so many people are complaining then we have a issue. I have tried to learn Python but every time I did, some things kept turning me off. - First indentation was a issue for me but I looked past it and went ahead to give another go at Python. - Even the best in class IDE suffer to give any kind of insight into python code. - Two versions: At my workplace we use Python 2. I prefer to le…

> At my workplace we use Python 2.

You’re probably aware of this, but at the odd chance you aren’t, Python 2 end of life is 2020. You really should be moving to Python 3.

> Go does this.

There is a lot of love for Go and Rust on HN, but unless your region of the world is significantly different than mine, then chances are that there won’t be a Go or Rust job in your lifetime. I’ve only ever seen one of them mentioned in a job opening for my entire country, and that was as “nice to know” for a c++ job at Google.

I’m sure Rust and Go are truly excellent languages, but that doesn’t really matter for most people, if they never manage to see any adoption outside of Silicon Valley.

Re: Python Is Eating the World

#458

Holy Crap! What a lot of irrational, hyperbolic hate for Python. I think everybody should spend their first couple of years working in Fortran IV on IBM TSO/ISPF. No dependency management because you had to write everything yourself. Or maybe [edit: early 90's] C or C++ development where dependency management meant getting packages off a Usenet archive, uudecoding and compiling them yourself after tweaking the config…

Agreed. I really don't understand all these buckets filth being poured on Python in this thread.

It's a first language I worked with in my life that just clicked with my brain and doesn't just drain me.

I would take a Python job over a Java/C/C++/Go/Rust any day. There's some languages that could pull me away from Python (Nim, Crystal) but they're nowhere popular enough to move wholesale to them.

Re: Python Is Eating the World

#459

Holy Crap! What a lot of irrational, hyperbolic hate for Python. I think everybody should spend their first couple of years working in Fortran IV on IBM TSO/ISPF. No dependency management because you had to write everything yourself. Or maybe [edit: early 90's] C or C++ development where dependency management meant getting packages off a Usenet archive, uudecoding and compiling them yourself after tweaking the config…

https://conan.io/ https://vcpkg.readthedocs.io/en/latest/ You were saying about C/C++ package management?

I'm pretty sure this didn't exist in the 80's and 90's ...

Re: Python Is Eating the World

#460

Earlier quoted context omitted.

Go's new system addresses them all too. This is the other frustrating thing: there is this stockholm syndrome effect, because people are so used to dependency management being horrible, they think there are just no good dependency management systems, and they give up.

What system is this? Isn't the built in package system still just pulling from github URL's?

No, there's a module system now: https://blog.golang.org/using-go-modules
Post reply on HN