Python 3 angst 2016 edition



  • I woke up to well known tech pundits yelling at each other over Python 3.

    Step 1: Zed Shaw (Learn Python The Hard Way) sticks it in with an updated list of reasons not to adopt Python 3

    IMO, most of his reasons are frankly terrible. And what's with the whole conspiracy angle? The guy seriously thinks Py3 designers are some kind of a nefarious cabal trying "trick" people into using their language. Ummm... that's... kind of what every language designer is trying to do, Zed.

    Step 2: Eevee of the PHP: Fractal of bad design fame shoots back with an excellent rebutal.

    IMO this addresses Zed's "concerns" pretty well.

    Step 3: Yehuda Katz, a big name in js and ruby (ember.js, yarn) pipes in. And he is on Zed's side.

    Step 4: Eevee and Katz are now snipping at each other on twitter.

    Just follow the previous two twitter threads, they converge.

    Zed hasn't jumped into the fray on twitter so far. Boy, I hope he does.

    🍿


  • Discourse touched me in a no-no place

    @cartman82 It seems to me like the really big problems relate to how hard it is to have both Python 2 and Python 3 installed on the same system. If you do, everything just gets very upset. (For the record, I've got about 4 or 5 different builds of Python on this system, and not one of them has all interesting libraries supported at once. 🤦) This means that you're forced into all sorts of weird stuff to try to keep old production applications going while supporting transitioning to newer versions, and that's annoying for ordinary users: they just want the basic stuff to Just Work™ so they can get on and write the code that they actually care about.

    Zed's perspective is useful precisely because it is from the perspective of a more ordinary user and from the perspective of someone who does training and education of ordinary users. Stop screwing people over, Python devs, and just provide a stable and consistent language interface that is well-taught and explained.



  • @dkf said in Python 3 angst 2016 edition:

    @cartman82 It seems to me like the really big problems relate to how hard it is to have both Python 2 and Python 3 installed on the same system. If you do, everything just gets very upset. (For the record, I've got about 4 or 5 different builds of Python on this system, and not one of them has all interesting libraries supported at once. ) This means that you're forced into all sorts of weird stuff to try to keep old production applications going while supporting transitioning to newer versions, and that's annoying for ordinary users: they just want the basic stuff to Just Work™ so they can get on and write the code that they actually care about.

    I don't have nearly as much experience, but isn't that solved with virtualenv setups?

    For example, my home project comes with its own python interpreter and an entire pip database of modules configured for its session (through PATH). Second project can have its own bundle, etc. And they all work side-by-side. The only potential issue are native linux libs, but so far, I haven't seen it in practice.

    What am I missing?


  • Discourse touched me in a no-no place

    @cartman82 said in Python 3 angst 2016 edition:

    I don't have nearly as much experience, but isn't that solved with virtualenv setups?

    No idea, but somehow several different pieces of package installation software have managed to make me have a machine where I cannot find a way to use both NumPy and SciPy at once.


  • Grade A Premium Asshole

    @dkf said in Python 3 angst 2016 edition:

    It seems to me like the really big problems relate to how hard it is to have both Python 2 and Python 3 installed on the same system.

    Gentoo Linux seems to handle it just fine.

    $ python --version
    Python 3.4.3
    $ python2 --version
    Python 2.7.11
    $ python3 --version
    Python 3.4.3
    $ eselect python list
    Available Python interpreters, in order of preference:
      [1]   python3.4
      [2]   python2.7 (fallback)
    

    You can also change whether Python2 or Python3 is the default when you just ask for "python".

    Now, Gentoo only supports having one version of Python from each minor release (2.7, 3.4, 3.5) simultaneously installed on the system, so your "four or five different builds" situation wouldn't be supported. But, I would bet that that's not a terribly big concern for most folks who're using Python. 😉



  • @dkf Not sure about the how, but the package manager seems to handle that on my machine. I can use things like numpy and matplotlib from both the python2 (2.7) and python3 (3.4) interpreters. 🤷



  • @cartman82

    The Python project's efforts to convince you to start with Python 3 are not in your best interest, but, rather, are only in the best interests of the Python project.

    Good start. It's in my best interest to use a programming language that the maintainers can actually maintain and improve.

    You Should Be Able to Run 2 and 3

    In the programming language theory there is this basic requirement that, given a "complete" programming language, I can run any other programming language. In the world of Java I'm able to run Ruby, Java, C++, C, and Lua all at the same time. In the world of Microsoft I can run F#, C#, C++, and Python all at the same time. This isn't just a theoretical thing. There is solid math behind it. Math that is truly the foundation of computer science.

    Oh lord this man is mixing things up. Yes, the Church–Turing thesis says that you can run Ruby inside Java, C inside Ruby, Lua inside C, and Python2 inside Python3, but that's completely unrelated to running different programs/interpreters directly on the machine that can talk to each other, which is what you actually do 99% of the time you run stuff.

    However I agree with his conclusion that you should be able to run Python2 and Python3, as I've said before interoperability is the key in successful migrations, asking people to migrate their entire codebase at once is crazy.

    Let me skip down the article a bit...

    0_1479985913289_upload-bc68fb9f-c000-4cfb-a8ba-fb518b96308d

    http://www.thedailycrate.com/wp-content/uploads/2014/01/Blog-Picard-Irritated-01.jpg

    http://www.thedailycrate.com/wp-content/uploads/2014/01/Blog-Picard-Irritated-04.jpg



  • @cartman82 said in Python 3 angst 2016 edition:

    Zed Shaw

    Haven't we already established before that this guy doesn't know what he's talking about?



  • @dkf said in Python 3 angst 2016 edition:

    @cartman82 It seems to me like the really big problems relate to how hard it is to have both Python 2 and Python 3 installed on the same system.

    Isn't this the issue with nearly all open source languages. Maintaining an environment of open source software is is like trying to fit together a box of broken glass shards back into a window pane.


  • SockDev

    @Helix said in Python 3 angst 2016 edition:

    Isn't this the issue with nearly all open source languages

    Not with NodeJS. Just install nvm, and you can have as many versions as you like side-by-side! Even point releases!


  • area_can

    That doesn't mean the game is over, but 1/

    I don't think his assertion that 1/ really makes sense without any support for it 😕

    Filed under: why the fuck are you people using Twitter



  • @bb36e Also, this. When you need to use 10 ">twitters to get your message across, maybe, just maybe, twitter isn't the medium you're supposed to use. Assuming that twitter is ever the medium you're supposed to use, which I guess is debatable.


  • Discourse touched me in a no-no place

    @Helix said in Python 3 angst 2016 edition:

    Isn't this the issue with nearly all open source languages.

    Nearly all ≠ all.


  • Notification Spam Recipient

    @RaceProUK said in Python 3 angst 2016 edition:

    @Helix said in Python 3 angst 2016 edition:

    Isn't this the issue with nearly all open source languages

    Not with NodeJS. Just install nvm, and you can have as many versions as you like side-by-side! Even point releases!

    I manage to have multiple versions of node installed side by side simply by getting the binary packages and unpacking them in my home directory, then having PATH include ~/nodejs/bin, where nodejs is a symlink to the version of node I want to use.

    I'm not sure how someone manages to write a 3000 line shell script with a dependency on a C++ compiler to do the same thing



  • @cark said in Python 3 angst 2016 edition:

    I manage to have multiple versions of node installed side by side simply by getting the binary packages and unpacking them in my home directory, then having PATH include ~/nodejs/bin, where nodejs is a symlink to the version of node I want to use.
    I'm not sure how someone manages to write a 3000 line shell script with a dependency on a C++ compiler to do the same thing

    I did exactly the same thing.

    Call a tiny bash script with version number and prefix, it downloads the gzip, unpacks it and links the binaries. Done in 15 seconds.

    nvm always had a stench about it that made me steer clear.


  • Notification Spam Recipient

    @dkf said in Python 3 angst 2016 edition:

    It seems to me like the really big problems relate to how hard it is to have both Python 2 and Python 3 installed on the same system. If you do, everything just gets very upset.

    I'm pretty sure every system I've managed in the last 3 or 5 years has had both python 2 and 3 installed, with no problems whatsoever. You're either using a really shitty distribution, or not using the distribution supplied packages, which is probably the wrong choice. There is no reason for this to be a problem



  • @Helix I think interoperability is a problem with languages in general. Calling a function written in language X from language Y is generally a chore, when 90% of the time it should be relatively straightforward.

    Someone ought to invent some sort of Common Language Infrastructure to fix it.



  • @anonymous234 said in Python 3 angst 2016 edition:

    Someone ought to invent some sort of Common Language Infrastructure to fix it.

    yeah, we could use xml to define the interfaces



  • @cark said in Python 3 angst 2016 edition:

    I'm not sure how someone manages to write a 3000 line shell script with a dependency on a C++ compiler to do the same thing

    I'm probably misunderstanding, but isn't using different versions of gcc (or g++) trivial? Using the same symlink solution that you're describing or any other way, it works like a charm.

    (OK, if you want to use different versions of the libc it's slightly more tricky as you may have to tweak the LD_LIBRARY_PATH as well, but that's all)



  • @Helix said in Python 3 angst 2016 edition:

    @dkf said in Python 3 angst 2016 edition:

    @cartman82 It seems to me like the really big problems relate to how hard it is to have both Python 2 and Python 3 installed on the same system.

    Isn't this the issue with nearly all open source languages. Maintaining an environment of open source software is is like trying to fit together a box of broken glass shards back into a window pane.

    'nearly all' is basically my experience with ruby and python, both of which makes me want to smash every window in sight.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.