4 ms·
[Re-posting as a top level comment as I don't want to give the comment I'm replying to any more attention.] >> Currently you cannot run Python 2 inside the Pyt
by nailer 10y ago
[Re-posting as a top level comment as I don't want to give the comment I'm replying to any more attention.]
>> 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.
The author is - quite obviously - staying the Python 3 VM should run Python 2 code, in the same way the JVM and CLR run other languages. That the Python 3 VM doesn't run Python 2 code - and that the Python maintainers apparently say it can't - means the Python 3 VM isn't Turing complete.
This is nonsense obviously, but it's a way of pointing out that the claim that the Python 3 VM can't be made to run Python 2 code is also nonsense.
This is very, very obvious. Yet HN have gone nuts and rather than discussing the points brought up - why doesn't the Python 3 VM run Python 2 code? - you instead make the laughable claim that the author doesn't know what Turing completeness is.
The author even explicitly states they've already created a Python 3 version of their work and HN accuses the author of ulterior motives: "having an out of date work".
It's like HN have gone out of their way to cut out quotes from the article and not actually bother to read it.
The author is a better programmer I am and also than most in the thread. They're also over the programming mob mentality that sometimes appears on HN and I can very much see why in the responses to this articles.
- MereInterest 10y agoI would say that the incompatibility is exactly what makes python 3 be python 3. If it could run python 2 bytecode, then it would allow the same ambiguity between strings and binary data as is allowed in Python 2. One of the main goals of Python 3 was to remove this ambiguity, by introducing "str" and "bytes" as separate classes.
- threatofrain 10y agoI took the time to read what Zed Shaw had to say, and I think that Zed is a bad journalist or public communicator, and the reaction on Hacker News is symptomatic of this. Zed Shaw had a straightforward (but probably wrong) case to make about Python 2to3, but instead he lacked the restraint from shooting himself in the face. To be clear, Turing completeness is Zed Shaw's baseless launching point for discussing the incompetence or political nefariousness of the Python language devs. Turing completeness does not mean a perfect translation between all languages exists. Genuine ambiguity can exist. If your language goes from 1 to 2 types, a perfect solution may be <permanently> out of the question.
- talideon 10y ago> The author is - quite obviously - staying the Python 3 VM should run Python 2 code, in the same way the JVM and CLR run other languages. There is no "CPython VM": no version of Python guarantees bytecode compatibility between versions. The bytecode is just an optimisation. For a Python interpreter to support both Python 2 and Python 3, it would need to have have some source level way of telling the two apart. Bytecode doesn't even come into this. > That the Python 3 VM doesn't run Python 2 code - and that the Python maintainers apparently say it can't - means the Python 3 VM isn't Turing complete. No it doesn't. That's not what Turing Complete means. Here's a pretty trivial way to demonstrate both Python 2 and Python 3 are Turing Complete: implement a Brainfuck interpreter in both. Brainfuck is Turing Complete (memory limits aside), and thus because you can implement a Turing Complete language in both Python 2 and Python 3, both are trivially proven as Turing Complete. Zed's argument is like this: ARM processors can't run AMD64 code, thus ARM processors are not Turing Complete. That argument is nonsense.
- nailer 10y ago> > That the Python 3 VM doesn't run Python 2 code - and that the Python maintainers apparently say it can't - means the Python 3 VM isn't Turing complete. > No it doesn't. You do realise the next four words in the post you're replying to is: > > This is nonsense obviously ? And then a reason why the claim is being made? To continue your CPU analogy (I actually read your post), it's like Intel saying x64 can't run x86 binaries, then someone else saying "why not, isn't it turing complete?" as a joke way of pointing out that it should. It perfectly reasonable to read Zed's post and argue that Python 3 VM should not be able to run Python 2 binaries. But not even bothering to read or comprehend the post (or this thread) and claiming he doesn't understand Turing machines is a waste of everyone's time. * We know AMD invented x64, and x64 does run x86 binaries, and the IA64/Itanium story, but anyway.
- talideon 10y agoThis is the bit I have a problem with: > but it's a way of pointing out that the claim that the Python 3 VM can't be made to run Python 2 code is also nonsense. And that's why I wrote: > For a Python interpreter to support both Python 2 and Python 3, it would need to have have some source level way of telling the two apart. [And now I have no way to double check what you wrote originally because you overwrote your original comment.]
- barbs 10y ago> This is nonsense obviously, but it's a way of pointing out that the claim that the Python 3 VM can't be made to run Python 2 code is also nonsense. > This is very, very obvious. Um...what? That in itself is nonsense. The reason he brought up Turing completeness is to make it seem like Python 3 breaks some fundamental programming 'law' that all programming languages should adhere to, in order to further his point. Sure, maybe the Python 3 VM should run Python 2 code, but he doesn't need to puff up his argument like this. It just makes him look uneducated.