Gravitational attraction of stars and cows - <AUTHOR> https://www.johndcook.com/blog/2018/03/28/cow-astrology/ <comment><USER2> Next question, what is the smallest object whose gravitational field could reliably be measured by the accelerometer in your phone? We know that it can measure the field of the Earth at more or less sea level, how much less heavy/further away could something get for your phone to feel it?

my attempt:

      diameter of earth = 12742 km
      sea level = distance from earth = 12742/2
      weight of empire state building = 331000000 kg
      resolution of BMA280 in the iPhone 6: 1/4096 g
      mass of earth = 5.972e+24 kg
      gravity of earth = 1 g
      km to m = 1000x

      (12742/2. * sqrt(331000000 / (5.972e+24 / 4096.))) * 1000

      = 3 meters

So your phone should be able to register 1 bit of resolution when the empire state building is 3 meters away or less, otherwise it would be too far away to detect. Of course the empire state building would need to be compressed into a single point but that's a minor practical concern.

<comment><USER3> But wouldn't all of the mass need to be <3 meters away from you?

<comment><USER2> I called this out as a minor practical concern

</comment></comment></comment><comment><USER4> What I find more interesting is the gravitational pull of ice sheets on the sea, e.g. [1].

[1] [http://sealevelstudy.org/sea-change-science/whats-in-a- numbe...](http://sealevelstudy.org/sea-change-science/whats-in-a- number/attractive-ice-sheets)

<comment><USER5> That is an amazing effect, which I'd never considered, before seeing it on HN some months ago. It's a nontrivial contribution to sea level rise after ice sheets melt.

</comment></comment><comment><USER6> I wondered whether "17 miles" is a good estimate for how far I am from a cow, and now I'm trying to do a sort of Fermi problem in my head and realizing I'm out of practice for bad job interviews.

</comment><comment><USER7> Actually we are in free fall relative to these astronomical bodies. Meaning that the Earth and you are both pulled together and so in your local reference frame it is not detectable.

The locally detectable force is tidal. Which follows a cube law.

It turns out that every cow on Earth creates larger tidal forces on you than any star except the Sun. :-)

<comment><USER8> Wonder what the effects of the great plastic islands in the oceans are.

<comment> ben-schaaf Since they're not really islands, more like a heap of suspended particles in the upper layer of water, they should have the same density as the water. So they should have the same gravitational effect as water.

</comment></comment></comment><comment><USER9> Calculation only holds for spherical cows. :D

<comment><USER10> It actually is :)

Under General Relativity what is commonly called gravity is a fictitious force or pseudo force and is purely an artifact of being in a non-inertial frame of reference.

While a very useful in most use cases, and accurate for most needs even Newton was bothered that under his model gravity acts Instanously. This superluminal communication makes the math work but is a spherical cow :)

As a direct comparison under Newtonian mechanics, the centrifugal force is a "inertial" or "fictitious" or "pseudo" force. Due to Einstein's equivalence principle, and under General Relativity gravity is also a "inertial" or "fictitious" or "pseudo" force.

To quote John Wheeler. "Mass tells space-time how to curve, and space-time tells mass how to move."

<comment><USER11> I think we should dump the "fictitious force" and "pseduo force" nonsense and say what we mean: "frame-dependent force", as in this force depends on the observer being in a specific, non-inertial frame of reference. These forces are real, and observable, and their existence distinguishes inertial from non- inertial frames, which is a useful thing to do.

</comment></comment></comment><comment><USER12> Gravity is the most romantic force in all of nature.

The idea that everything in the universe is connected and pulling is mind blowing.

<comment><USER13> I know gravity has a speed limit, but does it have a upper distance limit or lower magnitude limit?

As in, are we really feeling gravitational effects of mass that is 14 light years away, even if they are insignificantly tiny and we probably can't measure it, or is there a point where a force is so miniscule that the universe truncates the force to 0?

<comment><USER14> If one arbitrarily defines "zero force" as less than the force sufficient to accelerate one proton at one planck length per age-of-universe^2, I come up with a distance of 10^12 meters between two protons (+/\- an order of magnitude).

However, (and if I didn't screw up the math) since gravity scales linearly with mass, and the size of the visible universe is about 10^27 meters, then anything with mass greater than 10^15 protons -- or about the mass of a human cell -- has a "non zero" gravitational effect on you.

<comment><USER14> Ah, one little slip of the pen and everything changes. It's more like 3.6 * 10^16 meters.

</comment></comment></comment></comment><comment><USER15> This is the first calculation of the gravitational forces for small objects that I can actually understand intuitively. Much better than trying to specify in newtons the actual force of gravity between me and said cow.

</comment><comment><USER16> It reminds me of this page I created a few years ago [https://connettiva.eu/newton/](https://connettiva.eu/newton/)

Select a planet, then touch the objects below. Eventually read the text at the end for the implementation details.

</comment><comment><USER17> Randall Munroe's done an edition of "What If" on a similar question:

 _" Which has a greater gravitational pull on me: the Sun, or spiders?"_

[https://what-if.xkcd.com/136/](https://what-if.xkcd.com/136/)

The main conclusion is sadly not that exciting, but the digressions are fun as always.

</comment><comment><USER18> I somehow feel you're not going to divest an astrologer of their belief in the power of Jupiter by comparing it with standing within touching distance of a massive cow.

</comment><comment><USER19> The only somewhat reasonable hypothesis I've ever heard about how astrology might work (if it did) is the clock hypothesis. The idea is that the stars have nothing to do with it in a causal sense. Ancient people just noticed certain patterns and correlated them with the stars because stars were what they used to keep time. The real causal mechanism could be some kind of biological cycle or something else.

<comment><USER20> Certain old but powerful gangs like to flash their signs by doing things in sidereal time, so the same stars are overhead.

</comment></comment><comment><USER21> What this article overlooks is the indirect effect of this gravitation. Yes, the moon's effect on only my body is tiny, but the moon's cumulative effect on every particle on Earth adds up to substantial cycles which we observe as tides. If it affects the whole, then it also affects the parts.

<comment><USER22> Also, being in free-fall relative to the earth isn't locally distinguishable from being in free-fall relative to both the earth and the moon.

Tidal effects are caused by the _gradient_ of the gravitational field across significant distances. And the gradient drops off in proportion to the inverse cube of the distance, not the inverse square. Which is why tidal effects are only observable from the moon and sun, not from other celestial bodies. (Jupiter's gravitational influence on the Earth is about 1% that of the moon, but it's so far away that the tidal effects are infinitesimal.)

</comment></comment><comment><USER23> Whoa, leading with astrology in a physics article, strong choice.

</comment><comment><USER24> I wonder what the implications are for cow-based astrology.

</comment><comment><USER25> I think that if I was standing 0.57m from a cow all day, that might have some significant impact - just not in a gravitational sense.

</comment><comment><USER26> something related [https://xorshammer.com/2016/05/18/gravity-is-stronger- than-i...](https://xorshammer.com/2016/05/18/gravity-is-stronger-than-i- thought/)

</comment><comment><USER5> In my experience, astrologers aren't readily tempted into physical explanations.

</comment><comment><USER27> The entire universe is having measurable("infinite" but countable) gravitational effect. You need to prove that "cumulative" effect is negligible.

</comment><comment><USER28> I don't get it

<comment><USER29> The gravitational pull of nearby, mundane objects is just as strong, if not stronger, than the pull of the stars and planets. If the gravitational pull of the stars and planets impacts human behavior, as astrology posists, then so should a cow several miles away.

<comment><USER30> Does astrology actually posit a mechanism? I thought that part was left unspecified.

<comment><USER31> According to the first sentence of the article, gravity is one suggested mechanism.

<comment><USER30> Sure, but there's potentially a large gulf between "some people attempt to rationalize astrology by saying" and "astrology says."

<comment><USER32> He is just addressing the people who rationalize it by gravity, then.

<comment><USER33> Exactly. Side question: If you really believe something, do you feel the need to rationalize it?</comment></comment></comment></comment></comment></comment></comment>


The Caves of Clojure: Part 6 - <AUTHOR> http://stevelosh.com/blog/2012/07/caves-of-clojure-06/

<comment><USER2> The syntax coloring makes me feel warm and fuzzy on the inside. I want all my code to look like that!</comment>


6 Reasons why Encryption isn't working. - <AUTHOR> http://www.guardtime.com/2014/05/25/6-reasons-encryption-isnt-working/

<comment><USER2> Encryption is not widely used because people are more afraid of losing/forgetting their encryption_secret_keys/passwords than others accessing their data. Plus almost all users trust large cloud companies like Google, Amazon, MSFT. Catering to the small minority that are worried about encryption with a usable key management product (which is what is lacking today) is not financially viable since they expect a open source solution.

I expect the situation to get qualitatively better when software obfuscation hits mainstream.</comment>


Show HN: Js-geolocation, a free client-side geoip service - <AUTHOR> https://gpanther.github.io/js-geolocation/ <comment><USER2> I have a tool here that could help you test your service.

[https://www.geoscreenshot.com/](https://www.geoscreenshot.com/)

</comment><comment><USER3> Very cool project!</comment>


Intel's New 6Gps 510 series SATA SSD, Tested and It's Fast - <AUTHOR> http://hothardware.com/articles/Intel-SSD-510-Series-SATA-6Gbps-Solid-State-Drive-Review/

<comment><USER2> Developers do a lot of 4KB operations. Source files tend to be small as do database updates.

The current market leader in this is the OCZ Vertex 3, a considerably faster drive than the Intel 510. Indeed intel's X25-M is better at 4KB operations than the new drive.

The 510 is a disappointment, get an OCZ Vertex instead, its cheaper and faster for the sorts of operations that matter. See anandtech for more details:

<http://www.anandtech.com/show/4202/the-intel-ssd-510-review>

<comment><USER3> Avoid OCZ. I had a Vertex 2 SSD fail after about two weeks. What's really a big gotcha is that it fails 100% immediately; there are no warning signs as there often are with a hard disk.

I looked into it: I believe that there's actually an assertion that got hit in the OCZ firmware, and then it goes into a lock-down mode. However, there's no way for an end-user to exit this mode and recover any data (it simply won't respond to SATA commands), nor are OCZ willing to unlock it for you.

<comment><USER4> _I had a Vertex 2 SSD fail after about two weeks._

Anecdote != data. We have 8 of them in database-server for over 6 months without problems. Yes, we abuse them for a server workload.

<comment><USER3> Sure, just sharing my personal experience. The pathological failure behaviour due to a software bug is not something I'd previously considered when choosing a drive.

I hope you've got good backups.

<comment><USER4> _The pathological failure behaviour_

This is not specific to SSDs. Drives fail. Usually very early (infant death) or very late, google for 'bathtub curve'.

Spreading FUD about a specific vendor isn't fair unless you can back it up with data. The failure rate that is commonly cited for sandforce drives is around 2% - regardless of vendor. If you have different data then I'm curious to read about it.

<comment><USER3> I think there's a bigger problem here - this isn't just normal bathub-curve component failure. What seems to be happening is that the firmware panics due to an assertion being hit, and what could be a hiccup that requires a reboot becomes a total data loss event.

"gamble" suggested above that this is related to power-saving modes. That fits with our different experiences (laptop vs server). Think about how you would feel if you rebooted your server, it went through a different power mode as part of shutdown, and when it came back all eight of your presumably nicely RAIDed drives were dead. Of course a lightning strike could do the same thing, but you have a surge protector that guards against that. How are you protecting against your SSD's firmware? That's my real concern.

As to whether it's SandForce or OCZ, I'm just going to go Intel next time. You're free to go with OCZ or a non-battery-backed ramdisk - it's all the same to me :-)

<comment><USER4> _this isn't just normal bathub-curve component failure_

What part of "unless you can back it up with data" didn't you understand?

 _How are you protecting against your SSD's firmware?_

Just like against any other hardware fault: By having backups and redundancy. Bugs happen. You're making it sound as if this was somehow specific to OCZ - which remains bullshit until you provide data beyond anecdotical evidence.

And FWIW I'm neither affiliated with OCZ, nor emotionally tied to the brand. We also run X-25s in production, my Mac Mini has an X-25 and my Macbook has an OCZ.

<comment><USER3> Straight from the horse's mouth, here's OCZ's patch log for v129, which describes a fix for a software-induced data-loss issue: "Fixed rare corner case that could cause the drive to reset and clear user data" [http://www.ocztechnology.com/files/ssd_tools/OCZ_SSD_v129_Fi...](http://www.ocztechnology.com/files/ssd_tools/OCZ_SSD_v129_Firmware_Release_Notes.pdf)

That was less than a month ago. Maybe this was the last bug; I'd guess not. I'm sure all the SSD vendors have firmware bugs, but my personal choice is not to go with OCZ in future. As you point out, it seems likely that other Sandforce vendors will share similar issues, so my understanding is that basically leaves Intel (?)

In future, before aggressively going on the attack, I think you should consider the possibility that you may not be as correct as you believe everyone else to be wrong. Let's keep things civilized around here.

<comment><USER4> _In future, before aggressively going on the attack, I think you should consider the possibility that you may not be as correct as you believe everyone else to be wrong. Let's keep things civilized around here._

I don't see where I went "aggressive". On the contrary I consider it agressive to spread FUD about a vendor based solely on anecdotical evidence.

 _I'm sure all the SSD vendors have firmware bugs, but my personal choice is not to go with OCZ in future._

Exactly. All vendors hit these bugs from time to time. That's why you should refrain from writing posts "Avoid $FOO" when all you have to contribute is a single datapoint.

"I had bad luck with OCZ" would have been more appropriate.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER5> "Intel's SSD 510 costs more and it can serve up better sequential numbers than Vertex 3. However, it's actually slower than its predecessor in situations where you're working with lots of small files. The applications where this 250 GB drive makes sense are fairly clear cut. But again, it looks like you'd get a better all-around experience from OCZ's Vertex 3 when it becomes available." [1]

"My biggest complaints about the 510 actually aren't about Intel's use of a 3rd party controller, instead they are about the drive's lackluster random read performance. In a horrible bout of irony Intel fixed its sequential performance and moved backwards in the random department. Random read performance, as it turns out, has a pretty major impact in the real world.

Random write performance is also pretty low by today's standards, however the impact on most of our real world performance tests is minimal. It looks like we may have hit the upper limit of what we need from 4KB random write performance (at least given current workloads)." [2]

[1] [http://www.tomshardware.com/reviews/ssd-510-solid- state-6gbp...](http://www.tomshardware.com/reviews/ssd-510-solid- state-6gbps,2881.html) [2] <http://www.anandtech.com/show/4202/the-intel- ssd-510-review>

From what I can tell, it's worth waiting for the OCZ Vertex 3, which will be faster, and quite possibly cheaper too.

<comment><USER6> The reliability problems with the Vertex 2 make me wary of anything from OCZ. There are many, many reports of OCZ drives failing within a few days of use, some within minutes of booting up. Plus there are well-documented problems with power-saving modes.

Frankly, SSD failure rates from _most_ manufacturers are so high it should be a scandal. Intel is the only company I'm remotely comfortable buying an SSD from right now.

<comment><USER7> That explains why my server OCZ Vertex SSD died yesterday after 1 year of use... I'm eyeing a Corsair now but still kind of weary of SSDs now.

</comment></comment></comment><comment><USER8> This 510 series is not considered a successor to the X-25. If you're wanting a true improvement, hold out for the upcoming 320 series around April.

<comment><USER9> I thouht 510 is Intel's temporary solution for high-end, needed because the delays with newer X-25 (G3); and the true X-25 successor will be the new X-25 whenever that comes out. Now where will the new X-25 fit in this picture?

</comment></comment><comment><USER10> Hopefully this will drive X-25 prices into the $1/GB range for those of us that think reliable 350/100 MB/s read/write is already blazing fast

</comment><comment><USER11> I just got the X25 less than a week ago. Now that I've seen the testing on this 510 and the Vertex 3, I'm debating returning the X25 and going for one of these models.

I can preorder the 510 from Amazon for 295, still looking for someone selling the Vertex 3.

</comment><comment><USER12> It's Fast? It seems barely keep up with previous generations Vertex 2 in real- world tests (PCMark), and new Vertex 3 and other SandForces are even faster, and cheaper.

I really wonder why Intel released a drive that's both more expensive and slower than competition. Of course they have strong brand, as X-25 were really successful.

</comment><comment><USER13> Temperature, non-operating: -550C.

There are some theoretical physicists who would dearly love to see that test lab. :-)

</comment><comment><USER14> I would wait for a comparison between the Intel 320 and Micron C400 (which are both imminent) before making any decisions.</comment>


Our Avatars, Ourselves - <AUTHOR> http://www.pbs.org/mediashift/2011/09/our-avatars-ourselves249.html

<comment> loup-vaillant Now, many places on the web, like, right here, don't let you have an avatar. I wonder, what would be the effects of _imagining_ you have a particular avatar?</comment>


Burr/Feinstein Anti-Encryption Bill – It's More Ridiculous Than Expected - <AUTHOR> https://www.techdirt.com/articles/20160408/08381934131/burr-feinstein-release-their-anti-encryption-bill-more-ridiculous-than-expected.shtml <comment><USER2> I'm tired of all this "war on encryption" bullshit. Every week it's another attempt. How much longer must I cower in fear of these ignorant lawmakers trying to undermine the entire basis of security? Are they just going to keep trying until something makes it through?

Will this ever fucking end?

<comment><USER3> That tiredness is why it's called a War.

It's a fight few want to be involved in, and without mass involvement it will be lost. The repercussions of losing are a huge step backwards for privacy and security.

The lawmakers are failing to ideate properly.

They seem to be requesting what they need from an investigatorial perspective, but combining that need with another request for how that need should be fulfilled.

We technologists need to help bridge the gap of their need and how they can accomplish it. That would be: to set expectations of the im-/possibility of meeting their need.

Do that. Generate statements on what reality is for encryption. Don't get distracted by the frustration of seeing "ignorant lawmakers" do their thing. Help them ideate, shape the conversation, and win the war.

</comment></comment><comment><USER4> The funniest part is feinstein is California senator.

Know who San Francisco congress rep is?, pelosi another champion of freedom...

Voting doesn't work, it's a waste of time, our corrupt illegitimate government will continue to violate every ethic and change every law which increases their power.

Anyone who defends such monsters are no better than monsters themselves.

Again, the US government kills with impunity, tortures with impunity, commits war crimes like the recent hospital bombi ng, has the highest incarceration rate in the world... The list of goes on and on and yet people plug their ears and bury their heads in the sand. We live in a police state, just accept the truth.

<comment><USER5> There was 15% voter turnout for the 2012 primary in which Feinstein (49.5%) and Emken (12.7%) were nominated. In other words Emken got on the ballot to challenge Feinstein with only 1.9% of voter support.

California allows two members of the same party to win the nomination and challenge each other in the general election.

To run a successful campaign to challenge incumbent Democrats with pro-liberty Democrats in the general, you possibly only need to get ~ 2% voter turnout for your candidates.

This is pretty feasible to do if California residents actually cared.

[https://en.wikipedia.org/wiki/United_States_Senate_election_...](https://en.wikipedia.org/wiki/United_States_Senate_election_in_California,_2012)</comment></comment>


Steganography done with JavaScript - <AUTHOR> http://www.peter-eigenschink.at/projects/steganographyjs/

<comment><USER2> Unfortunately alpha-channel steganography is one of the simplest and most trivially detected of image steganography algorithms, making it not very useful. For an example of what goes into a serious and secure steganographic algorithm see perturbed quantization:

[http://dde.binghamton.edu/download/pq/Fri05pq.pdf](http://dde.binghamton.edu/download/pq/Fri05pq.pdf)

[http://dde.binghamton.edu/download/pq/](http://dde.binghamton.edu/download/pq/)

</comment><comment><USER3> "Hiding" your data in the alpha channel of most images doesn't really seem at all secure to me. That's like hiding your valuables by placing them in your basement.

Steganography that I'm used to seeing intertwined ones data with the actual image data. Which is much more difficult to detect (though certainly not undetectable).

</comment><comment><USER4> There is a joke here somewhere about pictures and specific number of words. I just can't work it out.

<comment><USER5> A picture is worth a thousand DWORDS.

</comment></comment><comment><USER6> I had issues with precomputed alpha when I played with storing data in the alpha channel of images in the browser. In the end, since I didn't really need to 'hide' the data, I just wrote a few pixels at the top of the image, but even then, I found some services (i.e. gravatar) was modifying the pixel values slightly. I had to just use a bunch of the most significant bits from each pixel.

If you're interested why I was playing with all this, it was for storing public keys in gravatar images: [http://kybernetikos.github.io/VisualSecrecy/](http://kybernetikos.github.io/VisualSecrecy/)

</comment><comment><USER7> I didn't see a useful answer on "Why use steganography.js?" block, it just explains "How?".

I wonder answers about "When and why?" questions. Can you guys answer it?

</comment><comment><USER8> This doesn't really attempt to hide the fact of communication from computers - only from humans casually viewing the image.

steghide has a far superior approach:

[http://steghide.sourceforge.net/](http://steghide.sourceforge.net/)

But that can be broken too:

[http://dl.acm.org/citation.cfm?id=1578445](http://dl.acm.org/citation.cfm?id=1578445)

</comment><comment><USER9> @eigenschinkpete come by the next viennajs meetup (www.viennajs.org) next wednesday there will be a talk about a similar topic</comment>


The Case Against Python 3 - kot-behemoth https://learnpythonthehardway.org/book/nopython3.html <comment><USER3> This has to be the ne plus ultra of Python scaremongering. It describes some sort of bizzaro world of a doomed language which it populates with Machiavellian Python maintainers, brainwashed developers, and a small group of heroic holdouts who see resisting Python 3 as a moral imperative. Apparently having too many string formatting options is a moral issue (three, to be specific).

As someone who writes a _lot_ of Python code (mostly in 3 but with occasional switches to 2), who maintains several libraries which work in both 2 and 3, and as someone who uses a wide range of libraries in stats, machine learning, networking, web development, etc. in my python 3 work...this piece seems totally disconnected from reality. The problems it describes are relentlessly overblown when they're not simply manufactured from whole cloth.

Put another way: the differences between 2 and 3 are not great, the vast majority of libraries you'd want to use (i.e. are actively maintained or of at least good quality) work in 3, and while I don't doubt there's great piles of Python 2 code moldering away big "enterprise" apps and those sorts of places, it's ever been thus in that space, no matter what the language, and doesn't pose any sort of existential threat to Python.

(edit: I used to recommend "Learn Python The Hard Way" to newcomers, and have just kept reflexively doing that over the years because I wasn't aware of a better resource. But if this article has accomplished one thing, it's that it's spurred me to look for a replacement)

<comment><USER4> I feel like I'm the only one who learned Python from the official site's tutorial page:

[https://docs.python.org/3/tutorial/index.html](https://docs.python.org/3/tutorial/index.html)

I found it really helpful.

<comment><USER5> _" I feel like I'm the only one who learned Python from the official site's tutorial page"_

From Py1.52 I've done the same.

I wish every language was as well documented (Perl6 is pretty good) [0] as Py, especially the changes b/w versions. Rough order of reading: What's new, Tutorial, PEPs, Library references. Why is it good? It is canonical, pushed out as a release is done, comes with the install (cf: $ pydoc foo) and is free.

[0] [https://news.ycombinator.com/item?id=12889082](https://news.ycombinator.com/item?id=12889082)

<comment><USER6> Same here.

Python is also rather outstanding in the sense that there are tons of good recordings of PyCon talks that explain almost every language feature in very approachable ways.

The quality of those talks is usually great too, it seems that PyCon consistently hosts very good speakers.

</comment></comment></comment></comment><comment><USER7> > 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.

<comment><USER8> A 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)

<comment><USER7> And if he doesn't understand that concept should he _really_ be teaching anyone programming?

<comment><USER9> I'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.)

<comment><USER10> Then the question becomes "why is he talking about turing completeness, something that is either irrelevant, or that he knows nothing about?"

<comment><USER11> I mean it sounds very nice and fancy - but loop semantics and conditional jumps have nearly nothing to do with what he's talking about.

</comment></comment></comment></comment></comment></comment><comment> awinter-py The argument is bad but the headline has a point: the value of a language is the quality of its libraries and the community that maintains it. Python 3 seems like a mistake; it fractured the community and sent people away. (to golang, to scala, probably even to ruby).

If I were a library maintainer on py2 I would have felt betrayed by py3. Suddenly print is a function? 'yield from' won't be available on the py2 branch? Yikes.

C++ is an example of the serious negative consequences of language change. The language has been in flux for decades and the 3rd-party code shows it. Some fraction of good libraries rely on c++14 features. Many others duplicate in library code features that have been available in the language since c++11 or earlier. Boost, the 'missing standard library' for cpp, is something you either love or hate.

The end result for c++ in 2016 is that large shops either (a) don't use it or (b) don't use the new features and have a slow acceptance process for 3rd- party libs.

You can argue that the C community is healthier than C++ -- a ton of important system libraries are written in C and have bindings to tons of languages. Yes, they have problems (openssl cough), yes nobody understands unspecified behavior across compilers, but C has done a good job of supporting lots of platforms and staying relatively stable.

Betraying the community can kill a language. Perl learned this lesson the hard way. Let's hope python can be saved.

<comment><USER12> >C++ is an example of the serious negative consequences of language change.

From the outside looking in (as a non-C++ developer), for me the bigger problem is honestly that they left in the warts rather than just paving around them. Those who have followed C++ for its entire life cycle have probably been able to mostly keep up with what language features were mistakes and what the best way to do things is, but I can't imagine myself ever picking up C++ now and hoping to have any clue at all what to avoid without spending years learning the hard way (no pun intended).

As a very basic example from C# (which I do use professionally), the fact that untyped collections still exist (and things like IEnumerable with explicit casts instead of IEnumerable<T>) is just pointless cruft that we'd be better off without. As far as I'm concerned, no code should ever depend on them, and any code that does should be forcibly broken to force people to fix it. We treat security flaws seriously by forcing people to fix things, why should we not do the same with features that are essentially bug-magnets?

<comment><USER13> > As a very basic example from C# (which I do use professionally), the fact > that untyped collections still exist (and things like IEnumerable with > explicit casts instead of IEnumerable<T>) is just pointless cruft that we'd > be better off without. As far as I'm concerned, no code should ever depend > on them, and any code that does should be forcibly broken to force people to > fix it. We treat security flaws seriously by forcing people to fix things, > why should we not do the same with features that are essentially bug- > magnets?

I mean this is an age-old argument but MS comes down very strongly on the other side because, like... what if nobody is working on that C# 3.0 code anymore but you need it for whatever reason? Well, I guess you're out of luck in the world where they just break ArrayList.

</comment></comment></comment><comment><USER14> "Python 3 Is Not Turing Complete"

... Not only is this blatantly false, but the author acknowledges it as such and seems to think that it is still OK to write this sort of sentence. Backing a pure falsehood with anecdotal support from "actual Python project developers" does nothing to change its veracity. I can't respect anything else in this article after seeing this kind of sensationalism.

Perhaps the author doesn't understand Turing-completion (I'll give the author the benefit of the doubt), but even if so it's inexcusable to throw around this sort of technical language this casually.

<comment><USER15> Why the hell even bring that up. Not a very good tutorial in any way when the writer starts throwing around unrelated terms they don't grok.

<comment><USER16> It is also wrong, as PyPy interpreting Python 2.7 runs well in Python 3.

</comment></comment></comment><comment><USER17> > The strings in Python 3 are very difficult to use for beginners. In an > attempt to make their strings more "international" they turned them into > difficult to use types with poor error messages. Every time you attempt to > deal with characters in your programs you'll have to understand the > difference between byte sequences and Unicode strings.

The author has this exactly backwards. It is Python2 that makes the weird distinction between the string and the unicode type. Strings (and bytes) in Python3 are done (almost) right. (I say "almost" because Python bytes are constrained to be 8-bits wide, but that is not a serious problem.)

He also clearly doesn't understand Turing-completeness.

<comment> joatmon-snoo As someone who's used Python 2 for the past half decade and started using Python 3 only recently, 100% with you on this.

The first time I was working on a project which required me to be able to work with characters beyond ASCII, I was _so_ confused. To this date, I'm still not sure if I can actually explain what str.encode and str.decode do in Python 2.

Admittedly I've never used Python 3 for a project where I had to deal with international charsets - and his point about the concatenation of unicode and bytearrays certainly seems a valid point - but it still seems infinitely better than what Python 2 did.

<comment><USER18> > _his point about the concatenation of unicode and bytearrays certainly seems > a valid point_

This is one of those subjects where I feel like being a non-English programmer has given me surprisingly valuable experience.

The operation of concatenating a text value (string) and binary data (byte array) simply does not make sense, for two reasons. What do you expect the result to be?

1\. Binary data with the text appended. Then you need to specify which encoding you want the text to have. Once you do (a.encode('utf-8')), all will be fine. You could argue that a conversion to utf-8 should be implicit since that's almost always the correct choice, but you'd be surprised how fast you run into trouble with other systems.

2\. Text with the binary data appended after interpreting it as text. Again, which encoding? You'll get very confusing and terrible results if you do not specify this. If you specify this (b.decode('utf-8')) everything will be fine.

The only other alternative I accept is a type error. I'm guessing zed would be even angrier if that was the case. I'm not quite sure what Python 3 does, but at least it somewhat communicates that whatever interpretation it does is internal and arbitrary. The Python 2 result is ridiculous.

<comment> joatmon-snoo That's a pretty fair point, and I completely agree that the Python 2 result is pretty ridiculous.

In zed's defense, it still does seem like a rather daunting error for a beginner programmer - although like you, I have no good viable alternative to suggest.

<comment><USER18> Encoding and decoding binary data is hard for a beginner in general, and I'd argue it's good to avoid it for the first few lessons. Unless the beginner has a CS education in which case by all means explain how encoding is taking text and translating it to bits.

</comment></comment></comment></comment></comment><comment><USER19> [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? - <AUTHOR> 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.

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

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

<comment><USER20> This 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.]

</comment></comment></comment></comment><comment><USER21> This is an excellent treatise on both the value of a computer science education and the importance of being sure that things you say in public aren't verifiably false.

</comment><comment><USER22> As someone who has been extremely critical of the Python 3 debacle, even I think this is overdone. Yes, the transition was totally botched, and 8 years in, Python 3 still has less production usage than Python 3. But by now, at least, enough libraries have been ported or replaced that you can actually use Python 3. This was not true three years ago. Porting remains painful. I ported a medium-sized web backend system about two years ago. I found lots of bugs which should have been found and fixed long before, indicating that some standard packages were not being used much.

As for "Machiavellian Python maintainers", that's real. There have been explicit attempts to apply pain to Python 2.7 users. This has decreased since von Rossum got stuck maintaining Python 2.7 code at Dropbox as his day job.

<comment><USER23> Could you share any links that show "There have been explicit attempts to apply pain to Python 2.7 users"?

I don't think you are lying, but it seems extraordinary to me, so I'm interested in seeing some context and I'm not sure how to find it.

</comment></comment><comment><USER24> After careful statistical analysis I concluded that there is a 9.56% chance Zed is trolling experienced programmers.

Disregarding the trolling about "Turing Completeness", there are some points he raises that are interesting.

On some (most thing) items there, the train has left the station. But some are good to listen to:

Better error messages. Rust has been making progress there so maybe a good place for inspiration. Error codes and links to additional info online has been done (maybe overdone) but I think there is room for more variable names, more info about the context ("looks like you're trying to do X, maybe Y might be better here..." kinda thing).

On the lack of typing and such, MyPy might be a good project to focus on.

Standard library updates would be good, but they are tricky. Wouldn't be nice to have requests in the main library? Yes, but changes are still made to it, it might not be updated for a long time then. As they say modules go to the standard library to die.

Things I'd like to see: better performance (close working with Pyston or PyPy) and better packaging. On packaging there was talk of Pipfile just today. That was a good start. I've been using Python for many years, and I still don't know off the top of my head the basic pip flags and options, or how to start the venv, what goes into setup.py vs goes in requirements.txt vs goes in setup.cfg. The story got better in recent few years, but there is more room for improvement there I think. I often end up with a build.sh script or run.sh which just does the building and venv-ing and such. Can that be done by default? For usability sake? Even if it is not super-consistent and doesn't work for 1% of use cases... Probably.

<comment><USER23> > Wouldn't be nice to have requests in the main library? Yes, but changes are > still made to it, it might not be updated for a long time then. As they say > modules go to the standard library to die.

In fact, the plan is for there to be no further new features to requests: [http://docs.python- requests.org/en/master/dev/todo/#feature-...](http://docs.python- requests.org/en/master/dev/todo/#feature-freeze)

<comment><USER24> Oh interesting! Thanks for pointing that out.

I think requests module is one of the nice assets in Python, having it in the standard library would be a good move.

</comment></comment></comment><comment><USER25> Anyone here remember "Rails is a Ghetto"? [http://web.archive.org/web/20080103072111/http://www.zedshaw...](http://web.archive.org/web/20080103072111/http://www.zedshaw.com/rants/rails_is_a_ghetto.html)

Zed's Rails article did lead to some improvements in the Ruby community (eg: The 'pickaxe' had meta-programming added to the next version). Zed likes to stir things up, but rather than dismiss him completely over some nit picky issues, eat the meat and spit out the bones.

To the "I stopped there" folks in this thread: why do you think Python 3 is still seeing such poor adoption?

<comment><USER26> Python3 is seeing poor adoption because for 5 years it was _extremely hard_ to port existing code to Python 3. But there's been a lot of effort to fix this, and now the tools are in place to make porting easier.

Since those tools are in place, pretty much every major Python lib has Python3 support. Many minor libs as well, though it's easy to have one or two dependencies missing it if your project is big enough.

Application developers (overwhelming majority of Python users) had to wait for the libraries to get over to Python 3. This has basically happened, so a lot of application developers are now porting.

Python 3's rollout was awfully managed, but the community has learned its lesson, and is working hard to fix things.

\----

Another issue with this article is that its recommendations simply won't work.

\- If you try to make "text + bytes" work, you are letting people write code that will fail. You can't implicitly convert bytes to text. You have to know the encoding! Python 2's mechanism (system locale-implicit conversion) guarantees bugs in situations with multiple encodings floating about.

\- Running Python 2 libs in Python 3 would mean that "text + bytes" style failures in the Python 2 code would bubble into Python 3, destroying all assurances you're supposed to have in Python 3.

<comment><USER27> > Application developers (overwhelming majority of Python users) had to wait > for the libraries to get over to Python 3.

And, in the mean time, they were stuck with a language ecosystem which entirely stagnated; while there are some benefits to working with a "stale" language, this was even worse: it isn't like "the C language is no longer going to change, but gcc gets better every year, with better error messages and faster compilation and improved code generation", but "the developers of Python have decided to spend years working on something which you can't port to yet because you are blocked on libraries and libraries are blocked on tooling and language fixes, and in the mean time have gotten pretty damned hostile towards users of Python 2 and constantly claim that whatever the most recent release of 2.7 is is going to be the last one ever so people had better start moving"... and a lot of the people I knew who had been using Python have thereby moved alright, but they moved to Go, Rust, Clojure, or Elixir, and they _aren 't coming back to Python_ given that the language is really only slightly better than it was five years ago while these other languages have been going in really interesting places. And yes: there are some people using Python 3 now, but interestingly it seems to be an entirely different group of people, such as data scientists, than the people who were using Python 2: when was the last time you heard about a big website being developed using Python? You don't: that era ended when Python 3000 was announced.

<comment><USER26> There are loads of websites that get developed in Python. Django has gotten more and more popular every release. I work in a Python shop, and getting to Python 3 was something we've always wanted to do (and did! Recently)

Language communities evolve. Guido is working on a static type checker.

Python 3k transition was bad, but I haven't really met many people who are against the current state of the language. Re litigating the transition over and over doesn't accomplish much. Everyone knows how bad it was now

</comment></comment></comment></comment><comment><USER28> As part of a data science/machine learning course, I have taught many, many beginning students how to use Python 2 and (starting a year ago) Python 3.

The reality is that given what beginning programmers learn, they hardly notice the difference between them. Adding parentheses to print() and some explicit conversions to lists are all that is necessary to convert most code that beginners see. The last I looked at Zed's book, the same is true for his coding examples.

Overall, I believe for newcomers it is more useful to learn Python 3. Given this background, no employer would reasonably believe you cannot learn Python 2 quickly. They will likely even be impressed you are future-proofed.

</comment><comment><USER29> I honestly don't get how this is still even an issue, if you're stuck with libraries that haven't been migrated to Python 3.x you have my sympathy - <USER2> I have had 0 need to touch any Python 2.x code in over 3 years - in fact, all of the Python code I have deployed at work is Python 3.x only.

Python 3 is a non-issue in my eyes, the only reason I don't use it more is because there's only one other developer on my team that knows Python well enough to maintain anything if I get hit by a bus - Python is "weird" for everyone else because we're mostly a .Net shop, so unless I'm writing an ansible module I use Kotlin and Spring-Boot or ASP.NET so my team can easily pick it up in the "snuxoll gets hit by a bus" scenario.

<comment><USER30> Agree. A few months ago I stopped supporting py2 in anything I'm writing. Maybe it happens to work. It shouldn't be hard to port if there's a need for it. But nobody complained yet.

</comment></comment><comment><USER31> "It's sad to watch Python destroy itself because it's such a great language, but that seems to be where things are headed."

The author has a point here. I've been programming Python for about 10 years now. Really concerned about the future of the language. Languages like Node and Go are progressing rapidly, but what's happening to Python? I used to complain about Node, but with the latest ES6/ES7 improvements it's actually pretty decent. The difference in usability between npm and pip is also huge.

Python is still my favorite language, but they really need to fix this part of the ecosystem. Maybe it's time to release Python 4 that has a clean upgrade path from 2 and enough language improvements to encourage users to adopt it?

<comment><USER32> Node is an interpreter for the v8 JavaScript engine and it uses a language named JavaScript. There isn't a language named node :)

I've done Python about as long as you but also like Golang for things Python is awful at.

<comment><USER33> Javascript is a colloquial name for what is formally known as ECMAScript. There isn't a language named JavaScript :)

<comment><USER34> I would argue the technicality you pointed out is a lot more minor than the OPs.

The OP was basically talking about the JVM as if it was a language.

*edit typo

<comment><USER18> Well, there is a Jim language, it's just not something you'd want to write by hand...

</comment></comment></comment></comment></comment><comment><USER35> > Also, it's been over a decade, maybe even multiple decades, and Python 3 > still isn't above about 30% in adoption.

Python 3 was released in 2008. Eight years ago.

<comment><USER36> That's also about the time Zed switched to Python.

[https://web.archive.org/web/20080305002455/http://www.zedsha...](https://web.archive.org/web/20080305002455/http://www.zedshaw.com/blog/2008-03-02.html)

</comment></comment><comment><USER37> The author completely misunderstands the following:

\- The concept of Turing completeness

\- What static typing is

\- Why strings are not the same thing as byte arrays

\- That the distinction between strings/bytes is a _fix_ for a problem exists with Python 2, not something that's "broken" in Python 3.

I understand why people might still use Python 2 if they have a legacy codebase to maintain, or need certain libraries that for whatever reason have not yet been ported to Python 3. However, if you're just beginning Python programming, or starting a completely new project in the language then none of that matters - you might as well just start with latest version.

The one point he gets right is that they should have maintained backwards compatibility by allowing Python 2 modules to run on the Python 3 VM. That was a major fuckup, the implications of which should be a lesson to every language designer of what to _never_ do. It's sad to see the developers of Angular make essentially the same mistake.

<comment><USER16> This kind of compatibility is what stifles Java and C# to virtually death.

Plus native code depends on particulars of CPython VM quite often.

</comment></comment><comment><USER38> I run Repl.it ([https://repl.it](https://repl.it)) and I have an interesting stat. Python3 has been loaded 3.6x more times than Python2 (500k vs 140k) just in November, and it's been used in 5x more classrooms ([https://repl.it/classroom](https://repl.it/classroom)).

* two caveats:

\- we have Python3 listed on the languages page whereas you'd have to click around or search to get to Python2.

\- we have slightly more features on Python3 like live pylint and ability to use modules

<comment> joatmon-snoo Definitely the listing thing. I remember trying to demo something for a friend and went looking for Python 2 on your site and it took a good few seconds to find it.

</comment></comment><comment><USER39> There's good criticism here, but I can't help but feel the rest is mostly Zed flipping out.

Regarding 2to3 not being flawless: agree, could be better.

Regarding core libraries: agree, but the same problem exists on Python 2 (different core libraries have different levels of compatibility for taking string or unicode as arguments), so I don't see how this can be a recommendation against 3 specifically.

Regarding new string types and handling, this has been discussed over and over again everywhere on the web, and boils down to people freaking out at unicode by default. This one does a good job explaining everything: [http://www.diveintopython3.net/strings.html](http://www.diveintopython3.net/strings.html) and this one does a good job at showing what you get w/ Py3 (not limited to new string types): [https://speakerdeck.com/pyconslides/python-3-dot-3-trust- me-...](https://speakerdeck.com/pyconslides/python-3-dot-3-trust-me-its- better-than-python-2-dot-7-by-dr-brett-cannon)

Regarding complaints about how many string interpolation methods there are: the `f` method relies on local scope (which is prone to introducing bugs), so it's actually pretty gimmicky compared to `.format` (which takes an explicit data structure as parameter). I would do the opposite and only teach `.format` to beginners since it leads to better code.

Regarding Turing completeness: fun.

<comment><USER30> > Regarding 2to3 not being flawless: agree, could be better.

The thing to remember though is that 2to3 will never be flawless. Since the underlying representation of some things has been split into different types, it simply impossible to automatically fix some code.

For example a function returning the first letter read from a file object is going to be completely different and more explicit in py3 than it was in py2. And the end result it better. You have to fix some code now - tough.

</comment></comment><comment><USER40> On the other hand, I never suggest Learn Python The Hard Way or Codecademy to any new programmer, because I don't want them to ask me down the line "why you directed me to an obsolete Python course?". I think I'm not the only one. So I'm not sure what's the net result of those decisions made by the two sites, do they really help in keeping Python 2 alive?

<comment><USER41> I attended a few newbie classes at pycon2016. A few of them suggested Learn Python The Hard Way, to which I pointed out how the author states to never try installing python 3 on the first page.

<comment><USER16> The author should essentially be banned from community and his book no longer recommended after that lest someone believes him.

You're essentially giving up great features like async keyword and proper encoding handling getting nothing in return. The few libraries that are still Python 2 only should be ignored.

<comment><USER42> You should essentially be banned from the python 2.7 community for saying these things.

</comment></comment></comment></comment><comment><USER43> > 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.

What does this even mean?

<comment><USER44> I think he's trying to suggest that the Python VM should be separate, and have both Python2 and Python3 target it (and potentially other languages)

But who knows, his actual argument is absolute mess

</comment></comment><comment><USER45> One feature of Python 3 that I found really pleasantly useful recently (thank you SO :) ) was passing generators to the zip() function in a for loop, like:

for a, b in zip(generatorA(), generatorB()):

In Python 2 you have to import itertools to do this. I bring this up because I find examples like this all the time in Python 3 where core, modern language features like generators are more tightly integrated and easier to use. It's really a better version of the language and if you're starting fresh on a Python project you should do yourself a favor and use it.

<comment><USER46> Naw, `zip` is a builtin in py2. You might be thinking of `itertools.izip`?

[https://repl.it/E5v6/2](https://repl.it/E5v6/2)

<comment><USER47> zip in py2 returns a tuple type (i.e tries to consumes the iterator through a StopIteration) in py3 it returns a iterator (consumes it on demand).

Try this in py2: [https://repl.it/E5vd/0](https://repl.it/E5vd/0)

<comment><USER46> I'm not near a real REPL, what's the diff? Eager vs. lazy? I think I remember reading something about that change awhile ago.

<comment><USER48> Exactly. Py3 zip is lazy like py2 izip.

</comment></comment></comment></comment></comment><comment><USER49> Wow, this guy seems really pissed off.

But I must admit, it is nice having all those python developers distracted by working on another language and leaving 2.7 in its current state of perfection. I wonder if this has actually helped _increased_ the use of 2.7, not having endless "improvements" tacked on. It sounds like this could be one of those weird laws of the computer age. I dub thee "Shaw's Law".

</comment><comment><USER50> Python was one of the first languages I've tried I actually enjoyed programming in.

I hope to continue leveraging my investment in learning python by using it for a long time. So far I haven't been forced to use Python 3. I've tried a few times but always found it easier to just go back to python (2.7).

I figure eventually I have to use Python 3 but at this point, my life has been fine without upgrading to python3.

<comment><USER51> As a writer of "quick n' dirty" webapps for internal use, I use python3 because philosophically, I want to help the world move forward, and the standard library has more stuff in it.

<comment><USER52> Ditto. I have submitted at least 10 PRs to fix Python3 bugs in OSS projects directly because of this. So perhaps I have made the world .000001% better.

<comment><USER53> Thank you!

</comment></comment></comment></comment><comment><USER54> Remember the author is talking about helping _beginners_ learn programming. Not you, HN user with 10,000 karma, and maintainer of five python projects.

There's a case study in the Christensen's _Innovator 's Dilemma_ where a company tries to improve its milk shake by making it more chocolaty, by putting whipped cream on top, etc but for some reason this doesn't increase sales. Then some guy goes into the restaurant to figure out "What job do people hire a milkshake to do for them?" and it turns out its not the job the people making the milk shake thought[0].

I wish the core python developers would do the same and ask themselves not how to make the best milkshake, but why do people buy their milkshake in the first place?

[0]: [http://www.itsma.com/a-better-way-to- segment/](http://www.itsma.com/a-better-way-to-segment/)

</comment><comment><USER55> I would guess that he just doesn't want to update his courses.

EDIT: [https://learnpythonthehardway.org/book/ex0.html](https://learnpythonthehardway.org/book/ex0.html)

Wow - python 2.5.1. He even does not update to 2.7.

      Last login: Sat Apr 24 00:56:54 on ttys001
      ~ $ python
      Python 2.5.1 (r251:54863, Feb  6 2009, 19:02:12)

</comment><comment><USER56> > The fact that you can't run Python 2 and Python 3 at the same time

I'm confused by this statement. I can start a python2 interpreter, background it, then start a python3 interpreter. Is there some other area that they inhibit each other in?

<comment><USER57> I _think_ the author means that there's no single interpreter that supports both languages (a la DrRacket's #lang directive, perhaps?).

</comment></comment><comment><USER58> The "Don't use it because people don't use it" argument bugs me. That's a valid argument when you're a CTO or Employee 0 picking a language that a thousand people will be using for fifteen years. Putting it on a tutorial site with good google juice, on the other hand, is a sad self-fulfilling prophecy.

</comment><comment><USER59> This must be a serious attempt to troll the interwebs. [https://meta.wikimedia.org/wiki/Cunningham's_Law](https://meta.wikimedia.org/wiki/Cunningham's_Law) "the best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer."

This REEKS of wrong answers. Turing completeness? Py3 in Py2? The argument that bytes are to confusing?

</comment><comment><USER60> There was an amusing discussion last week in a Facebook group about this exact topic:

"So there were 7 applicants and I rejected 7 because they sent in their demo assigments in Python 2.7.

Come on people, its nearly 2017!"

[https://www.facebook.com/groups/hackathonhackers/permalink/1...](https://www.facebook.com/groups/hackathonhackers/permalink/1399902436731904/)

</comment><comment><USER61> Now that was a 5 minutes of my life I'll never get back. The author commits all the crimes of "propaganda" and "FUD" he accuses others of.

The primary and possibly only reason Python 3 has not taken off as much as some would like is because 2.7 is that good.

</comment><comment><USER62> This article was written in the mental state of hate. The author may well reread it, and remove all the hate. He can have the opinion that Python3 is not suited for teaching where Python2 is, but his arguments are in fact just opinions.

Another problem in the tone: no respect for his readers.

        "if *I* struggle to use Python's strings then you don't have a chance."

<comment><USER13> If you're at the level where you want to use "the hard way" stuff to learn to program he might have a point.

</comment></comment><comment><USER63> Zed just needs to be at war with something.

<comment><USER64> The thing about Zed is that his shtick was originally a joke: a parody of overconfident asshole programmers. But... well, like Orwell said, "He wears a mask, and his face grows to fit it."

<comment><USER65> I mean, his original unhinged rant[0] was 9 years ago now.

[0] [http://harmful.cat-v.org/software/ruby/rails/is-a- ghetto](http://harmful.cat-v.org/software/ruby/rails/is-a-ghetto)

"I'll add one more thing to the people reading this: I mean business when I say I'll take anyone on who wants to fight me. You think you can take me, I'll pay to rent a boxing ring and beat your fucking ass legally."

</comment></comment></comment><comment><USER66> Apart from his argument that Python 3 is not turing complete, which has been torn apart in the comments, can someone evaluate the other arguments. Are the other criticisms valid? If not, why?

<comment><USER30> I think some are valid criticisms, but not valid enough to throw your toys out of the pram.

> Not In Your Best Interests

I say what's in my best interest and py3 fixed a lot of issues for me. I'm happy with the upgrade and dropped py2 for new projects this year.

> No Working Translator

A flawless translator is simply not possible. 2to3 is the best effort idea. At some point you'll run into `def f(x): return x[0]` and without doing a full program static analysis you won't be able to say what's the right translation. You have to do it manually where needed.

> Difficult To Use Strings

I understand that the py2's "just works" strings are easier. But at the same time, having a non-ascii name I know that most applications "just work" simply because nobody actually tested them outside of ascii set. Py3 doesn't explode on encoding for fun - it basically says: you made an assumption that kind of worked so far by accident, but now you need to say explicitly what you want to do. I think it's a good thing, even if it takes people time to adjust.

> Core Libraries Not Updated

I don't even know what he means. This really needs an example, or it's just a meaningless rant.

> Purposefully Crippled 2to3 Translator

As above. Some things are just not possible to translate without knowing what the programmer meant. Some things in py2 strings happened to work a bit "by accident" and simply won't work in py3 for good reasons. For example py2 code:

        In [1]: "abc".encode('ascii').encode('ascii')
        Out[1]: 'abc'

It may look silly on one line, but there's lots of applications that relied on py2's "it just works" strings - and this what was effectively run at some point in the code logic.

</comment></comment><comment><USER67> So many inaccuracies and exaggerations that it feels sarcastic.

<comment><USER68> I'm getting the sense it is, but he doesn't make it obvious at all (hence it's funnier to him?)

</comment></comment><comment><USER69> > a more stable language like Go, Rust, Clojure, or Elixir

Uhhh..? A more trendy language? Are we really saying that Elixir is more stable than Python?

</comment><comment><USER70> A lot of people seem to be confused by his Turing completeness argument. I think it's misleading and the phrase 'Turing complete' is a red herring. My guess is that what he was getting at was that other languages use 'compiler- mode' switches for compatibility-breaking upgrades so that you can use older code with newer code.

For example, you can write a program in the latest dialect of Free Pascal that includes a unit written in a 30 year old Turbo Pascal dialect and another unit written in a late-90s Delphi dialect. Even Javascript has `"use strict";` and PHP has `declare(strict_types=1);`. Python's solution was instead to say "Just go rewrite all the code you've ever written."

That said, claiming that the language isn't Turing complete because it doesn't include switches for compatibility is a bit of a stretch.

<comment><USER16> There was no way to keep the compatibility given the string change anyway, as the literal is changed.

Port to Python 3 is almost never a rewrite.

<comment><USER71>
        from __future__ import unicode_literals, print_function, division, absolute_import

</comment></comment></comment><comment><USER72> Pretty sure Zed's playing a joke on experienced programmes. He's clearly mentioned that the book is for complete beginners and that's why the entire section for experienced programmers is crap.

Funny how many haven't seen it and are arguing pointlessly.

<comment><USER73> Is this actually a joke? I'm still kind of reeling. The typos, the technical inaccuracies, the logical fallacies, all bundled together... Is it trying to satirize something? If not, what is the blog post trying to do?

<comment><USER72> He definitely is...

I just checked his twitter to make sure I'm right. He's clearly joking.

[https://mobile.twitter.com/zedshaw](https://mobile.twitter.com/zedshaw)

<comment><USER16> Should be clearly stated on the page. Because Poe's law.

<comment><USER72> Ah but where's the fun in that? Just look at the number of people who've jumped the gun. Makes me wonder about the media and how we consume information in general...

</comment></comment></comment></comment></comment><comment><USER74> and most importantly the book Learn Python the Hard Way only supports python 2.

<comment><USER75> A lot of the basics work in both, or with some minor tweaks.

</comment></comment><comment><USER76> The "unicode" string changes in python 3 is enough for me to avoid it, as they somehow managed to go from broken to brain dead.

Mandatory utf-8 strings would had been a reasonably nice solution I think.

</comment><comment><USER77> Interesting how this unicode string thing in py3 seems so similar to php6. Which was canned because it turned out to be a flawed design, and php7 continued where php5 left off (fortunately!)

<comment><USER78> It wasn't canned because it was a flawed design. It was canned because they couldn't make it work well enough technically. Encodings are still a total mess in PHP unless you are very careful (no runtime errors, you just run with it and maybe you'll see correct output or mojibake in the end).

</comment></comment><comment><USER79> FUD, really:

> This document serves as a collection of reasons why beginners should avoid > Python 3

> The Most Important Reason Aledged 30% adoption. No sources for this really, > just a number out of the blue. In me experience, most companies have > migrated their internal software to python3, or are doing so. A great deal > of desktop apps are already there too.

> You Should Be Able to Run 2 and 3 Like so many other languages/libraries, a > major breaks compatibility. But hey, guess what? Python actually allows you > to install and run python2 and python3 at the same time - most distros > actually do this!

> No Working Translator Newbies have no legacy codebase no migrate. This is > really off-topic. New devs can use code that is compatible with both, or > just plain python3

> Difficult To Use Strings Only if you're coming from python2, but definitely > not for new users, who have no background as to "how it was before".

I got bored of refuting the invalid points by this, but none of them have any validity, especially for beginners.

Also, I work at a university where we teach python to new students. They've generally had a much easier time learning algorithms and THEM migrating to C in the second semester (and actually tend to understand everything clearer) than using C as a starter. I've also never seen any of the above mentioned items being an issue.

</comment><comment><USER80> This is so filled with #fakenews it's perhaps easier to pick out the one useful criticism, which is having to learn 3 string formatting styles, which is indeed a pain. For commercial work it seems wise to stdize on one in a given project/organization.

As for the rest, I'll pile on: \- python3 is eight years old, not decades, and this matters: Perl4 => 5 was a similarly long transition and for similar reasons. \- python3 is obviously Turing complete. Moreover, I'm not sure its lack of whatever the author thinks TC means, actually matters in the question of whether python3 is worth choosing to learn or build systems. \- very few languages can be used "side by side" with each other, and I want aware that this was a common use case. If you have python2 code, there are various ways to invoke it without porting, eg subprocess, web service, etc. Obviously, there's various costs eg performance, system mgmt, debugging, etc. \- high probability of failure? Strange but I see the exact opposite, with more and more projects more supporting ONLY python3 ie the tide is turning. Anyway, this is scaremongering and #fakenews so YMMV.

</comment><comment><USER81> I've helped a few people learn Python. Nobody has ever gotten hung up on Unicode strings. We've even done string-y stuff such as talking to hardware via pySerial.

We've modified a couple of libraries ourselves, typically stuff that was written a long time ago and abandoned. Other than that, we've never really run into a problem where the choice of one version of Python over the other was an obstacle.

</comment><comment><USER82> If it was so easy to do some of these things that the author wants, why hasn't someone already done it?

</comment><comment><USER83> Treehouse has the opposite view for beginners:

[http://blog.teamtreehouse.com/python-2-vs- python-3](http://blog.teamtreehouse.com/python-2-vs-python-3)

Go figure. It's an enduring debate with strong opinions on opposing sides.

The whole topic feels a little flame-baity to me.

</comment><comment><USER84> I hope we can just call Python 2.8 -> Python 4 and do a bridge to import the good things about Python 3. Agreeing or not agreeing with the author points is irrelevant, Python is slowly and unfortunately dying because of this schism.

<comment><USER16> Never. Python 4 would be another breaking change that is not a step back. Not over BDFL's dead body will this happen.

<comment><USER85> He works at Dropbox, who use Python 2. Having experienced the pains of transition himself, he might yet see the light.

</comment></comment></comment><comment><USER68> Am I the only one who thinks it's possible this is a parody?

<comment><USER16> A good enough parody is indistinguishable from extremism. Poe's law.

</comment></comment><comment><USER86> >There is a high probability that Python 3 is such a failure it will kill Python.

This seems unlikely. Python 2 is a very popular language. There is currently more than one implementation. So no matter how weird the Python 3 thing gets, Python 2 should be available in some form.

Python 3 is actually helping Python 2 here. It attracts those who want to do cool new language things, leaving Python 2 as a stable target.

</comment><comment><USER87> Much unjustified criticism from a ruby developer! I must say I'm surprised there aren't any swear words in the essay, well done Zed.

</comment><comment><USER88> Aw c'mon, Zed. Python 3 is what I've prefer to put into production, it's also going to get the most love from the community.

</comment><comment><USER89> Frankly the article is whiney and doesn't provide much of a case except, "I don't like it, and strings are bad."

</comment><comment><USER90> Except of course Python 3 isn't killing Python at all.

Just taking a look at the TIOBE, in July 2016 it hit #4, it's highest spot ever.

</comment><comment><USER91> I remember having predicted something like this when he started cozying up with the Python community...

Python 3 is a ghetto...

</comment><comment><USER92> With all the talk about how the Python group is promoting 3 for its own benefit, I'm curious if in the next few weeks we will see the author's agenda change to "Learn !python the hard way"...

</comment><comment><USER93> "Currently you cannot run Python 2 inside the Python 3 virtual machine."

does this mean he tried to run python 2 using the python 3 interpreter? no shit it doesn't work ._. that's not how turing machines work

</comment><comment><USER94> I think we should instate a fake news policy in HN just like Facebook. Deceiving articles like this should be banned.

I mean, what's up with the Turing completeness? Someone needs to give this guy a wake up call.

</comment><comment><USER41> I was procrastinating this evening on some python 3 coding. This article is just what I needed to get motivated.

</comment><comment><USER95> Howdy Zed, there's a small typo in your printf statement. As written,

        x = 'Zed'
        print f"Howdy {x}"

Should read,

        x = 'Zed'
        printf "Howdy {x}"

I was under the suspicion that, "f" was some sort of operator or something, much like q is for Perl,

       print q{Howdy Zend};

<comment><USER96> nope it should be

print(f"Howdy {x}")

It's a new python 3.6 feature called f-strings/string interpolation

[https://docs.python.org/3.6/reference/lexical_analysis.html#...](https://docs.python.org/3.6/reference/lexical_analysis.html#f-strings)

That said in python3 print is a function not a statement and requires parenthesis so he still has a typo.

<comment><USER97> I know f-strings but I still can't believe them.

There are parts of Python that look like it wants programmers do low level compiler job and I can't understand why. This is one of them. Python can do %s string interpolation without some s'' s-strings so I wonder why it needs this f-string thing. Many languages can do string interpolation without having developers babysitting the interpreter. In 2016 we have the CPUs to make it happen the other way around.

<comment><USER96> It has to do with backwards compatibility in syntax if they had been smart enough to introduce in python3 they could have done it without the f.

</comment></comment></comment></comment><comment><USER98> The difference between a programmer and a computer scientist.

</comment><comment><USER99> > Python 3 Is Not Turing Complete

This is very funny.

</comment><comment><USER100> simple solution: there are two different languages that are pretty similar so let's just call them different names. suggestions? maybe python for v2 and some other snake name or python relative for v3?

</comment><comment><USER101> Is this satire?

</comment><comment><USER102> This perhaps indicates a new level of maturity on the part of the author? I'm almost sad that this essay lacks words such as "f __k " and "s __t ". The title would have been more interesting if it had been "Python 3 is a ghetto". I was waiting for the part where he wrote "Ever since then Guido Van Rossum's been a mouthy little shit with nothing to back it up." And I very much wanted to read the part where he challenges Rossum to a fight. And yet, this essay is much more solid than some of the older essays. Less entertaining, but much more solid. And I found myself agreeing with this one.

</comment><comment><USER103> I didn't know Zed Shaw was that stupid. Or is he just trolling?

<comment><USER31> After 8 years the man has a point, most of his arguments are not correct though. Conclusion stands, python is shooting itself in the foot.

<comment><USER104> Can the conclusion stand if the arguments are not correct? I'm sure there are other, better arguments out there, but after reading this from top to bottom I'm getting the idea that the resistance to Python 3 is mostly irrational.

<comment><USER105> > Can the conclusion stand if the arguments are not correct?

It can; arguing it can't would be an 'argument from fallacy', itself a fallacy.

Put another way, I can make up a totally absurd, incorrect argument that the sky is blue, but the sky is still blue. I can also make up a totally absurd, incorrect argument that the sky is green, but it isn't. An argument that doesn't hold water doesn't say anything useful about the conclusion either way.

<comment><USER16> That said, the conclusion is still false, given how many projects have since converted to or supported Python 3. And a bunch are Python 3 only.</comment></comment></comment></comment></comment>


We're Building a Dystopia Just to Make People Click on Ads - <AUTHOR> https://www.ted.com/talks/zeynep_tufekci_we_re_building_a_dystopia_just_to_make_people_click_on_ads <comment> Whil- Isn't this just a natural evolution following the fact that we're optimizing how to make money instead of optimizing how to make ... "good"? As long as we fight over the resources we want and need we're going to have technology applied by people in ways to optimize their own share. In a global market with little regulation, ethics very quickly gets thrown aside unless that said ethics is important to the consumers. Since in this case it's even difficult to see the ethical problem, how can it be improved without changing the first principle of operation (I.e. that we optimize making money I.e. our own share of resources.)?

<comment> Whil- Btw, speaking of algorithms, this post was at top 40 on [https://news.ycombinator.com](https://news.ycombinator.com) when my comment was added. Is that a global state or a personal state configured just for me? :-) (hoping for the former)

<comment><USER2> It's global. Hacker News doesn't personalise.

<comment><USER3> Not algorically. It is possible, individually, to hide specific stories.

But otherwise, the front page is the front page.

<comment><USER3> s/algorically/algorithmically/

</comment></comment></comment></comment></comment><comment><USER4> Open your Facebook. Go to Settings > Account Settings > Ads to see what Facebook knows about you.

<comment><USER5> _to see what Facebook knows about you_

To see some of what Facebook knows about you. They know a lot more than that - all the stuff they collect implicitly. Entered a search term but never clicked go? They know it. Looked at a page without clicking Like? They know that too. If you have the app they know when you walked past a billboard of someone they showed you and ad for... None of that you can see there</comment></comment>


A Separate Kind of Intelligence - <AUTHOR> https://www.edge.org/conversation/alison_gopnik-a-separate-kind-of-intelligence <comment><USER2> > So, you start out with a system that's very plastic but not very efficient, > and that turns into a system that's very efficient and not very plastic and > flexible.

> It's interesting that that isn't an architecture that's typically been used > in AI.

No? That sounds exactly like training a model, then applying the trained model.

<comment><USER3> Not really. A model (after training) continues to be as plastic as it was before. Correspondingly, it can be made to "forget" what it has "learned" and learn something else. [At least architecture-wise. Whether the learned parameter values reduces plasticity is a non-trivial statement that needs to be demonstrated]

If contemporary AI/ML models behaved like what Alison Gopnik says, then their tendency to overfit would be even more of a problem -- you couldn't even transfer them from simulation domain to reality -- since they would lose all their plasticity overfitting to simulation!

Also, this article contains lots of other interesting ideas to think about. Highly recommend reading all of it.

<comment><USER4> The learning coefficient decreases over time making the model less plastic.

<comment><USER5> Only because you have chosen for the learning rate to decrease over time so the model converges. You could reset it.

I would even argue the LR is not relevant to plasticity, it's a meta-variable for training the model and not to do with the model itself.

A plastic model would be one that could accomplish a given task after being trained on it, and then trained on a second task while maintaining the ability to accomplish the first task.

</comment></comment></comment></comment><comment><USER6> Elman proposed (and I think built) a model in the mid 1990s (see his book: Rethinking Innateness) that works in exactly this manner: A "wave of growth" moves across an initially highly connected "cortical" network, where parts learn (parcel out), and then become fixated, as other, nearby parts learn. You end up with what amounts to the end-result of what would happen if you built a stack of deep-learned transducers with higher order concepts built in top of lower order ones.

</comment><comment><USER7> [https://en.wikipedia.org/wiki/Theory_of_multiple_intelligenc...](https://en.wikipedia.org/wiki/Theory_of_multiple_intelligences)</comment>