6 ms·
> Currently you cannot run Python 2 inside the Python 3 virtual machine. Since I cannot, that means Python 3 is not Turing Complete and should not be used by an
by ayrx 10y ago
> Currently you cannot run Python 2 inside the Python 3 virtual machine. Since I cannot, that means Python 3 is not Turing Complete and should not be used by anyone.
I stopped there.
- rosstex 10y agoI came here to post this. What?
- ramblenode 10y agoI did the same. I honestly wonder if there is a single other developer on earth who is troubled by the inability to write a Python 2 runtime in Python 3.
- dhatch387 10y agoA programming language "is said to be Turing complete or computationally universal if it can be used to simulate any single-taped Turing machine" [1]. This author doesn't seem to understand this concept properly. [1] https://en.wikipedia.org/wiki/Turing_completeness https://en.wikipedia.org/wiki/Turing_completeness
- ayrx 10y agoAnd if he doesn't understand that concept should he _really_ be teaching anyone programming?
- hsitz 10y agoI'm pretty sure that if you understand both Turing completeness and the practice of actual programming, then you know that in most cases the one has virtually nothing to do with the other. (Which is not meant at all to imply that the author of linked article understands Turing completeness, just that even though he doesn't seem to he could still be excellent at teaching programming.)
- Vendan 10y agoThen the question becomes "why is he talking about turing completeness, something that is either irrelevant, or that he knows nothing about?"
- JBReefer 10y agoI mean it sounds very nice and fancy - but loop semantics and conditional jumps have nearly nothing to do with what he's talking about.
- esaym 10y agoHeck no he shouldn't.
- emodendroket 10y agoI'm pretty sure this was a tongue-in-cheek way of stating the true criticism.
- noobermin 10y agoI'm wondering that here. The whole article feels over-the-top, perhaps it's a well crafted parody, an extreme sense of sarcasm? May be he is a Python 3 lover after all.
- emodendroket 10y agoIsn't over-the-top Zed Shaw's "thing"?
- brianwawok 10y agoDitto. Then I read more for laughs. I kind of feel like I could fix py2to3 if I have a sed and awk layer in there.. maybe a fun project.
- ayrx 10y agoIn my experience a lot of the problems with automatically converting existing Python 2 code to Python 3 code is that the Python 2 code usually makes fundamentally broken assumptions when it comes to unicode and bytes.
- haikuginger 10y agoThis is what the author doesn't get- the fact that Python 2 makes no distinction between bytes-like objects and string-like objects is a bug, not a feature. He finds his code so awful to migrate because he has built it on a contrary assumption.
- esaym 10y agolol, winning.
- aperetto 10y agoI was working on a side project and ended up upgrading because I could figure out how Python was encoding my data. I got so frustrated with the semantics I found it easier to jusy upgrade.
- aminorex 10y agoDefinitely disagree. I am a literal genius, wrote compilers, learned a dozen programming languages for fun, but prefer to do hard things. Yes p2 handling of coding is broken, but p3 is much worse. Making a theoretical argument about a pragmatic problem is a category mistake. And it's not even the core of Zed's expressed concern, which is the arrogant and abusive manipulation of the user community in service of the interests of self-obsessed project.
- 10y ago
- JustSomeNobody 10y ago> THERE IS A HIGH PROBABILITY THAT PYTHON 3 IS SUCH A FAILURE IT WILL KILL PYTHON. I stopped there.
- flukus 10y agoIsn't this what killed perl?
- petre 10y agoPerl is alive and well, thank you.
- whyenot 10y agoI think it would be more accurate to say that it is alive but largely forgotten. Perl6 is very cool, but has not gained much traction.
- flukus 10y agoSure, it's just resting.
- BerislavLopac 10y agoNo, that's Parrot.
- sampo 10y agoCorrect me if I'm wrong, but the idea of perl6 was announced in 2000, and perl6 was finally published in 2015. So there was a 15 year gap when perl5 was perceived on its way to become obsolete, but perl6 was not available. I am unsure when the idea of python3 (first as python 3000) came to general knowledge, but it must have been some time between 2000 and 2004. Then python3 was published in 2008. So the time between obsoleting the old version, before the new version was available, was notably shorter with python.
- 10y ago
- haikuginger 10y agoI also can't run Python 2 by passing it into a C compiler. Man, I should publish a paper on this- they thought C was Turing-complete, but I proved them wrong!
- agumonkey 10y agoStop, it hurts. Too much.
- geezerjay 10y agoConsidering how C has been targeted for all sorts of nonsense, I suspect that your argument would be somehow used as irrefutable proof that C is outdated and deprecated. At least that's the conclusion that is repeatedly forced upon C, no matter what the argument is.
- Tomte 10y agoYes, the author doesn't know what he's talking about. But people talking about Turing completeness in a real programming language (usually in the form of "x is Turing complete, therefore you couldn't ask for more") almost always haven't got a clue.
- hexane360 10y agoI just point them towards Unlambda. Turing completeness in three characters (plus one for output) http://www.madore.org/~david/programs/unlambda/#what_is http://www.madore.org/~david/programs/unlambda/#what_is
- lokedhs 10y agoUnlambda as a language may be a joke (the funny kind), but learning it is incredibly enlightening, and makes you understand some fundamental concepts of computer science. As such, I think it represents one of the most enlightening esoteric languages out there together with Brainfuck.
- ant6n 10y agoTrue. No programming language has infinite tape.
- elsen 10y agoActually some kinda does: "Garbage collection is simulating a computer with an infinite amount of memory". https://blogs.msdn.microsoft.com/oldnewthing/20100809-00/?p=13203 https://blogs.msdn.microsoft.com/oldnewthing/20100809-00/?p=... We both agree, I'm just using this as a pretext to share this intriguing piece of knowledge. I find the concept much more intuitive than "getting back unused memory". Especially when you look at the 90% memory usage on your OS, it still make sense with the "infinite memory simulation" definition.
- waterhouse 10y ago> But people talking about Turing completeness in a real programming language (usually in the form of "x is Turing complete, therefore you couldn't ask for more") almost always haven't got a clue. There is a fun quote about that... "There are those who tell us that any choice from among theoretically-equivalent alternatives is merely a question of taste. These are the people who bring up the Strong Church-Turing Thesis in discussions of programming languages meant for use by humans. They are malicious idiots. The only punishment which could stand a chance at reforming these miscreants into decent people would be a year or two at hard labor. And not just any kind of hard labor: specifically, carrying out long division using Roman numerals. A merciful tyrant would give these wretches the option of a firing squad. Those among these criminals against mathematics who prove unrepentant in their final hours would be asked to prove the Turing-equivalence of a spoon to a shovel as they dig their graves." -- Stanislav Datskovskiy
- esaym 10y agoYea I skimmed the rest. This makes me ashamed that I even bought the guys book (Learn Python the Hard Way). His attitude is what is going to kill python, not python 3. I moved from Perl 5 to Python 3 hoping to flee the internal dev fighting and attitudes, yet here I am again. I'll say this, at Pycon 2016 I attended some dev sprints/hackathons with the python 3 developers. Python 2 is no where on their radar, its dead. They have moved on. There will be no additional compatibility layers or any of that. All of the mainline libraries that everyone uses (django, sql alchemy, etc ) have moved on to python 3. If you haven't, you should to.
- ant6n 10y agoPypy hasn't
- viraptor 10y agohttp://pypy.org/download.html http://pypy.org/download.html py3.3 support is at alpha level. py3.5 support is in the pipeline and already available for testing. It's unlikely they'll do any effort that's targeting py2 specifically anymore.
- ant6n 10y agoBeing in alpha isn't exactly 'having moved on' ;-)
- mattip 10y agoBut there is a plan and the milestones are being achieved.
- rbanffy 10y ago> His attitude is what is going to kill python No. The rest of the community is much better. In fact, his behavior is an aberration.
- lern_too_spel 10y agoThen you missed his crazy notion of what static typing is and his failure to understand the difference between a string and a byte sequence. It's incredible that someone who knows so dangerously little about Unicode has written a web server that is so popular in the Ruby community. It says something about the quality of the language's ecosystem.
- wyldfire 10y agoFrom the article: > Python 3 has been purposefully crippled to prevent Python 2's execution alongside Python 3 for someone's professional or ideological gain. I can't tell if Zed's referring to python3 doing a fork()/exec() of a python2 not working correctly or if he wants/expects some kind of inter-language import or "linking" among files written for respective language versions. What's he getting at? Is there really something that prevents you from executing python2 at the same time as python3? (I tried a simple program "os.system('python3 -c \'print ("hello")\'')" and it worked just fine.
- emodendroket 10y agoI'm pretty sure what he wants to say is that it should let you use libraries written for an older version of Python than you are using, much like the CLR would do if you wanted to use a library written using an older version of C# than you're using (or a different language targeting the CLR, for that matter). I'm pretty sure the claim that Python 3 is "not Turing-complete" is just a hyperbolic mockery of the claim that that isn't possible to do. N.B.: I haven't worked with Python so if you can actually do this somehow let me just say that that's not the impression the article left me with.
- AstralStorm 10y agoThis is doubly wrong as PyPy which runs Python 2.7 works in CPython 3.
- felixschl 10y agoSame. That's when I came back for the comments on HN
- rootw0rm 10y agosame. i can't tell if he's serious or not and i don't really care.
- deleted 10y ago[deleted]
- Biganon 10y agoFirst I spit my coffee when I read that too, but let me play devil's advocate (because I pretty much disagree with the entirety of his rant) : he's pointing out that since it's technically feasible to write a Python 2 interpreter in Python 3, and since it should even be pretty easy since the two languages do not differ immensely, then the only reason why it hasn't been done and there's no -2 flag to python3 has to be an ideological reason, a manipulation by the core devs to impose their ideas by force. It's extremely badly conveyed but that's what I got out of it by keeping reading. I do disagree with him on all the rest though, especially strings. It didn't "just work" before, it failed silently and who knows how much disaster he or his readers have caused because of it. Now at least you can't be wrong anymore. For a language heavily used on the web, it's hugely important to understand where your strings are coming from and where they're going to, and how. Besides, Python is not a frigging "beginners language". Just because Python (and admittedly especially Python 2) is generally easy to grasp as a first language doesn't mean it's its purpose, nor should it constrain itself toward this goal. It's used in a million of different areas, including pretty sensitive ones. It's now become a more mature language, reaching for exactitude and consistency. Just because Zac no longer has an easy toy language to point script kiddies to so they can "learn to program" by reading one website doesn't mean Python is to blame.