Quantum Entanglement Drives the Arrow of Time - <AUTHOR> https://www.simonsfoundation.org/quanta/20140416-times-arrow-traced-to-quantum-source/ <comment><USER2> The reasoning sounds a bit iffy as in:

"Finally, we can understand why a cup of coffee equilibrates in a room," said Tony Short, a quantum physicist at Bristol. "Entanglement builds up between the state of the coffee cup and the state of the room."

I think you can understand coffee cooling quite well without any quantum stuff - the atoms in the coffee are moving faster than those in the room. There will be a tendency when one impacts with an atom of the air in the room for that to speed up and the coffee atom to be slowed.

Actual quantum entanglement is a strange and interesting thing. It's a shame people tag the term on things it is not really relevant to try to sound impressive for the most part.

<comment><USER3> I think the author pretty clearly explained the connection:

        the arrow of time does not seem to follow from the underlying
        laws of physics, which work the same going forward in time as in
        reverse. By those laws, it seemed that if someone knew the paths
        of all the particles in the universe and flipped them around,
        energy would accumulate rather than disperse: Tepid coffee would
        spontaneously heat up

What he's saying is a bit unclear: we know the _how_ , which is even a kind of plausible explanation as to _why_. What the author says we couldn't explain before is the converse: why does the opposite _never_ happen? So I interpret that quote more like " _Finally, we can understand why a cup of coffee_ only _equilibriates_..."

<comment><USER4> Statistical mechanics doesn't say why a coffee cup never heats up spontaneously - rather, it says that the probability of that happening is incredibly small. You end up with probabilities like 10^-100000. This doesn't require quantum at all, and is effectively the same.

</comment></comment></comment><comment><USER5> This Google Talk [https://www.youtube.com/watch?v=dEaecUuEqfc](https://www.youtube.com/watch?v=dEaecUuEqfc) uses entanglement and quantum information theory in a clear and understandable way to explain 'spooky' quantum phenomena, like the quantum eraser, de- coherence, the aspect experiment, and the measurement problem. Even if you don't know any QM, just basic algebra and calculus, it's really approachable.

I used to be a fan of the Many Worlds interpretation, but after seeing this, I'm now a big fan of the Quantum Information Theory explanation. Starting about 43 minutes in, he goes into the QM Information Theory explanation, but I'd recommend watching the entire prezo.

Link to my original post on the subject: [https://plus.google.com/110412141990454266397/posts/HC49S9ip...](https://plus.google.com/110412141990454266397/posts/HC49S9ipwgn)

<comment> loup-vaillant I must say, I'm not sure what he even means by this "zero universe" business. Sure, the classical illusion is bust, but the wave function itself, as far as we know, is real, is it not?

While we're at throwing quantum explanation links, here is the Quantum Physics Sequence on Lesswrong: [http://lesswrong.com/lw/r5/the_quantum_physics_sequence/](http://lesswrong.com/lw/r5/the_quantum_physics_sequence/) I'd say the math is even simpler there, yet the explanation go deeper. It's a long read however.

<comment><USER6> Whether the wave function is real depends on your answer to the question: is momentum real? You can't directly measure or observe momentum, you can't point to it in the world, but you can definitely feel its impact and it's a convenient measure for certain properties of objects. In that sense the wave function is just as real.

But you can argue both those things are not as real as e.g. extension, force and energy, which are much more readily available to our senses.

<comment><USER7> Can't I just weigh Galileo's cannon ball, then based on T from when I dropped it know its momentum?

I think the difference comes on moving past the macroscopic world: say I drop a uranium atom into Shroedinger's box - I can't calculate at time T whether the cat is alive.

<comment><USER6> Yes, you can calculate the momentum it had anywhere along the path while it dropped. Does being able to calculate some property make it real? If I take the square root of the momentum and call it the 'squish' of an object, is my 'squish' property then real?

</comment></comment></comment></comment></comment><comment><USER8> It reminds me of another paper that was discussed here earlier (I can't find the submission, though):

 _A quantum solution to the arrow-of-time dilemma_ —Lorenzo Maccone

        The arrow of time dilemma: the laws of physics are
        invariant for time inversion, whereas the familiar
        phenomena we see everyday are not (i.e. entropy
        increases). I show that, within a quantum mechanical
        framework, all phenomena which leave a trail of
        information behind (and hence can be studied by
        physics) are those where entropy necessarily increases
        or remains constant. All phenomena where the entropy
        decreases must not leave any information of their
        having happened. This situation is completely
        indistinguishable from their not having happened at
        all. In the light of this observation, the second law
        of thermodynamics is reduced to a mere tautology:
        physics cannot study those processes where entropy has
        decreased, even if they were commonplace.

Phys. Rev. Lett. 103, 080401 – Published 17 August 2009

[http://journals.aps.org/prl/abstract/10.1103/PhysRevLett.103...](http://journals.aps.org/prl/abstract/10.1103/PhysRevLett.103.080401) – [http://arxiv.org/abs/0802.0438](http://arxiv.org/abs/0802.0438)

</comment><comment><USER9> This was surprisingly beautiful. As a geek in programming/computers/information/mathematics, but only a physics admirer from afar, it is very suggestive, even natural, to explain the deepest physical reality in terms of information:

"It was as though particles gradually lost their individual autonomy and became pawns of the collective state. Eventually, the correlations contained all the information, and the individual particles contained none. At that point, Lloyd discovered, particles arrived at a state of equilibrium, and their states stopped changing, like coffee that has cooled to room temperature."

"What's really going on is things are becoming more correlated with each other," Lloyd recalls realizing. "The arrow of time is an arrow of increasing correlations."

"The present can be defined by the process of becoming correlated with our surroundings."

<comment><USER10> Makes me imagine anthropomorphized variables in a program having discovered the file system and the class definitions that they're instantiated from, but are still trying to figure out what RAM is...

<comment><USER11> I laughed at how clever the analogy is. Time is relative to us as observers, the arrow of time is fundamental I would think.

</comment></comment></comment><comment><USER12> Do we need entanglement to explain the Arrow of Time? Even though in classical mechanics, the past and the future are both equally observable, we remember the past and not the future because the future does not contain certain information yet -- the information to be introduced into the universe in the form of quantum fluctuations. One could even argue that _all_ information in the universe was created at some point in time due to one quantum event or other.

I may have misunderstood though (I'm not a physicist). Entanglement _does_ however, explain why systems tend to equilibrium rather than any other type of state as it evolves _forward_ in time.

On a related note, I found this quote interesting. It reminds me of how HN comments about quantum information theory has a tendency to get downvoted:

> The idea, presented in his 1988 doctoral thesis, fell on deaf ears. When he > submitted it to a journal, he was told that there was "no physics in this > paper." Quantum information theory "was profoundly unpopular" at the time, > Lloyd said, and questions about time's arrow "were for crackpots and Nobel > laureates who have gone soft in the head." he remembers one physicist > telling him.

<comment><USER13> Well,

Information is produced in the course of a system evolving and information is destroyed (the past is forgotten).

The tendency of a system to move towards greater entropy could be said to give an explanation for the difference between past and future. But how does that work in an open system like the planet earth, where entropy hasn't increased, where the system has self-organized over time.

The ability of a system to store information in only one direction of movement could be the explanation - if we could define that more exactly. But since information is constantly being "created", destroyed and transformed, defining this is a difficult task.

Which is to say the problem as a whole is hard.

<comment><USER14> I always like the crazily simplified explanation: to truly undo something you need to undo your memory of it as well.

<comment><USER15> this exmplanation reminds me of the "mu" word from zen culture (as seen on Gödel, Escher, Bach).

</comment></comment></comment></comment><comment><USER16> This is nonsense; entropy and the arrow of time are essentially a many-body effects and require no quantum effects to occur. A simplest way to see it is to make small simulation of a, say, 1000 gas particles with only classical bouncing in a one side of a box partitioned in half with a barrier, obviously with a time-reversible numerical method -- after the removal of the barrier the gas will evenly spread over the box without any entanglement.

<comment> loup-vaillant yet, once the particles are spread, if you somehow reverse their velocities, they will concentrate back to one half.

Yet we can never do that. Why do you think?

The obvious answer in a classical universe is that we simply don't know the velocity and position of each particle, so we can't just reverse them. To pull such a feat, we'd have to be _incredibly_ lucky, as in "winning every lottery for a century" lucky.

With entanglement and de-coherence however, such reversal becomes impossible even in principle: see, when the universe splits through de-coherence, you no longer have access to the other half. Even if you manage to reverse your half of the universe, you need the other half to be reversed too, or they'll never merge back together.

And not just the other half, since de-coherence happens all the time. You need _all_ the Everett branches to be reversed. No. Way. So it does look like a better candidate for the arrow of time.

(Of course, a better candidate still would be collapse interpretation, since that one is _not_ time reversible in the first place. But this interpretation is ridiculous to begin with, so let's ignore it.)

\---

Read this to have an idea of how time could work in a timeless universe: [http://lesswrong.com/lw/qr/timeless_causality/](http://lesswrong.com/lw/qr/timeless_causality/)

<comment><USER17> > The obvious answer in a classical universe is ...

Since there is an obvious answer in classical physics, it's a bit disingenuous to claim that this solves a long-standing problem in classical physics, no?

> With entanglement and de-coherence however, such reversal becomes impossible > even in principle [...] So it does look like a better candidate for the > arrow of time.

That would be true if you could demonstrate by experiment that a broken egg springing back up onto the table and reforming is physically impossible instead of just unfathomably unlikely. Can you demonstrate that?

<comment> loup-vaillant You do not understand. Let me rephrase.

You go on a space ship, on your way to the edges of the universe. Your buddy goes on a space ship, on his way to the _other_ side of the universe. You will soon be outside each other's observable universe.

Now, if you drop something in your ship (it spins, so you have gravity), you can "reverse time", and pull it back up. Can you do the same to you buddy's ship, should something ever fall there?

The simple answer is no. You can't. He's on his own.

Now there _is_ a way I haven't spoken of: non-causal interaction. You and your buddy could agree on some things before you depart. For instance, you could agree to pull back up whatever falls.

With Everett branches, it's even easier: you pre-commit to reversing your own Everett branch, whatever it is, so all your selves do it. If successful, the worlds should merge back together, at least locally. Just one catch: _all_ your other selves must successfully reverse time locally. It only takes one failure for the plan to fail.

But if you want to reverse time _after the fact_ , say because you happen to be in an Everett branch you don't like (you lost a bet about which way the photon will go), you won't be able to reverse time here, because your other self certainly will not (he won the bet, so…). Maybe, just maybe, you could use the vanishingly small entanglement left with the other Everett Branch to directly communicate with your other self. I'm not even sure it can be done in principle. For practical purposes, it should be forever beyond reach, even if you have a super-intelligent AI to help you.

<comment><USER17> > Maybe, just maybe, you could use the vanishingly small entanglement left > with the other Everett Branch to directly communicate with your other self. > I'm not even sure it can be done in principle.

My understanding is that this would violate a physical law that we still believe to hold.

You're right though, that I don't understand. At least I thought I understood your last post. With this one, I don't follow the connection to the OP.

<comment> loup-vaillant Oops, I didn't intent to obscure my meaning.

I was replying mainly to mbq: [https://news.ycombinator.com/item?id=7602812](https://news.ycombinator.com/item?id=7602812) My understanding is, with QM, is is even harder or even impossible to reverse time, even with perfect knowledge of your reachable surroundings.

In a classical universe however, it looks much easier, so in such a universe, the explanation for time is less satisfactory.

</comment></comment></comment></comment></comment></comment><comment><USER18> I have a question. I just went to a source of physical (quantum) randomness [http://www.randomnumbers.info/](http://www.randomnumbers.info/) and I'm giving you a random number between 0 and 10,000 which I've just generated there. Here it goes: 6296.

Ok. Now that light cone had finally reached you. And you (neurons in your brain to be precise) are thoughtfully entangled with that random event (outcome), now in your past.

Now imagine the following. A few days passes. And you forget that number. A few years passes. Connections between the neurons which were storing this information are now gone. Molecules and atoms which were part of these neurons are gone from your body. There are no entanglements any more which link you to that event. Is that event in your future now? Again?

<comment><USER19> > There are no entanglements any more which link you to that event.

Not directly, but the information has spread out from your neurons into the surrounding matter ad nauseum. It's just we can't interpret the information anymore.

The event still happened in your past, you just can't see it through your limited human view of reality.

<comment><USER18> And what if you would move away from that surrounding matter? Or, say launch it away with near light speed, so it would get behind the horizon at some point. How is that situation different from the one in which I've just generated the number and the light cone haven't reached you yet?

<comment><USER19> > And what if you would move away from that surrounding matter?

You can't :)

By surrounding matter I meant the rest of your body that isn't neurons, as well as the environment outside your body.

<comment><USER18> Can't I? What if the state of these poor remaining neurons and the body is scanned, encoded as polarization of a bunch of photons and sent to a receiver far far away? In that case good old environment would definitely end up behind the cosmic horizon.

<comment><USER19> Then you have implemented teleportation and we have new problems to think about!

<comment><USER18> Oh. Common. No need for any new inventions.

Just replace a person [that gets entangled with a particular outcome of a random event (have measured it)] with a simpler organism, say a dog. Or a hamster. Or with a roomba vacuum cleaner ;). Or even with a computer. And we definitely know that a state of a computer can be represented as a bit string encoded on any media. Including polarization of a bunch of photons.

</comment></comment></comment></comment></comment></comment></comment><comment><USER20> I love following article: [http://www.flownet.com/ron/QM.pdf](http://www.flownet.com/ron/QM.pdf)

It basically shows that observation (measurement) and entanglement are the same things.

Think about it: particles are not magically going out of superposition as we observe (measure) them. We (our atoms) become entangled with those particles, we become superposition. It's just propagation of entangled state.

Why we don't perceive ourselves as in superposition? "It turns out that this result generalizes to any number of mutually entangled particles. If we ignore any one particle, the entropy diagram of the remaining particles looks like a system of N-1 particles in a classically correlated state with a non-zero entropy.". That means each atom of our bodies _perceives_ other atoms entangled with it as they were not in any superposition (though as a whole, the system is still in superposition). We (atoms) are constantly entangled and in superposition with our environment, but we perceive it as classical state.

In what state each atom "sees" every other? According to probability. That's why in double slit experiment we see only _one_ of most probable outcomes, not a random one.

Time could be rate of entanglement propagation. Entanglement propagates with speed of light (speed of particles), so we seem live in same timeline. But if something moves away from us with speed of light, the time for this object goes slower, but only relative to us.

Until two particles interact with any way, they live in totally different timelines. After they "observe" each other (entangle with each other), also their _time_ becomes entangled. That's why after we see a cup begin dropped, it becomes part of our reality, and the cup becomes broken in our time.

We live in _spacetime_. As mentioned in article ""Spooky action at a distance" ought to be no more and no less) mysterious than the "spooky action across time" which makes the universe consistent with itself from one moment to the next.".

Why arrow of time? The article says: "Under QIT, a measurement is just the propagation of a mutually entangled state to a large number of particles. To reverse this process we would have to "disentagngle" these quantum states. In principle this is possible. In practice it is not.". I think differently though.

That are my thoughts. Please don't judge :)

<comment><USER21> I have a question: What does being in a superposition mean exactly here? I only know the term from classical mechanics, e.g. that an acceleration vector in R^3 can be seen as a superposition of three accelerations along the base vectors (a linear combination).

<comment><USER22> It's kind of like that. The state of a particle in classical mechanics is a linear combination of some basis vectors which are not it's states as such. But the superposition in QM is the superpositions of _states_. The phase space in classical mechanics is not a vector space, but in QM it _is_. This is a fundamental difference because in QM you can take any number of states, make a linear combination a it will result in another perfectly valid state. Not so in classical mechanics. For example, consider a particle orbiting a point. If you take some position vectors as it moves and make a linear combination, the resulting vector will not be a possible position of a particle in this system. In QM, it would necessary be another possible state. This is a slightly sloppy example, but I hope you get the gist.

</comment></comment></comment><comment><USER23> The question of whether time is in fact directional is far from being closed, at least for quantum physicists. In fact, one of the physicists cited in the article is known for proposing a time-symmetric formulation of Quantum Mechanics [1].

[1] [http://www.phy.bris.ac.uk/people/Popescu_S/papers/sandu_othe...](http://www.phy.bris.ac.uk/people/Popescu_S/papers/sandu_others5.pdf)

<comment><USER24> Interesting overview of the Arrow of Time on wikipedia: [https://en.wikipedia.org/wiki/Arrow_of_time](https://en.wikipedia.org/wiki/Arrow_of_time)

</comment></comment><comment><USER25> From a Bohmian perspective, quantum mechanics consists of a wave function psi(q) that guides all the particles Q. The wave function is distinct from the particles. The particles are in equilibrium, relative to the wave function. It is the wave function that is not in equilibrium in its realm of states.

As it turns out, the usual psi^2 probability distribution of the particles is a reflection that the particles are in quantum equilibrium, that is, psi^2 is the natural measure in quantum mechanics for what equilibrium ought to be since it is the only measure preserved by the dynamics. And so if the particles start that way, they stay that way. And they are likely to start that way using psi^2 as the distribution.

There is actually a lot of subtlety involved in accepting that argument; I recommend [http://plato.stanford.edu/entries/qm- bohm/#qr](http://plato.stanford.edu/entries/qm-bohm/#qr) and an actual paper: [http://www.ge.infn.it/~zanghi/BMQE.pdf](http://www.ge.infn.it/~zanghi/BMQE.pdf)

But what it implies is that the wave function is responsible for the arrow of time. It is a special state that evolves into a less special state. Presumably this is what their research is pointing at.

I would also comment that their description is exactly the classical explanation transferred to the quantum world (which it needs to be since our world is quantum). That is, we start in a special state and it evolves into a less special state because the less special states are more numerous and so more likely to be, all things being equal. And by more likely, we are talking 10^100 kind of more likely.

They still have the problem that the fundamental evolution of the wave function is time reversible. So if that bothered someone (it shouldn't), then their argument does not actually resolve that problem.

So I take from their work that what they are doing is getting the classical thermodynamic explanation (which is about volumes in phase space, not human ignorance) and translating it to the quantum theory. Neither wrong nor revolutionary.

</comment><comment><USER26> The title of the article is unfortunate. Classical physics adequately addresses the arrow of time through thermodynamics (the second law in particular). What is missing is so called "decoherence". In other words, quantum physics is supposed to explain everything but when we interpret results we divide the world into classic (the observer) and quantum (the observed) parts. The answer, from reading the article, seems to be that even if the world is in a pure state (quantum) a large part of it could behave like a mixture state (classic observer/environment) through entanglement. This makes it easier to have a coherent mental picture of quantum physics.

</comment><comment><USER27> > After some time, most of the particles in the coffee are correlated with air > particles; the coffee has reached thermal equilibrium.

No doubt this is some way oversimplified explanation, but it still makes no sense.

Say I have hot coffee and lukewarm coffee. The lukewarm coffee will equilibrate faster. Does it interact with the air faster? What if I bring in coffee that's the same temperature as the air, so that it's instantly at equilibrium. Does it interact with the air instantly?

<comment><USER22> > Say I have hot coffee and lukewarm coffee. The lukewarm coffee will > equilibrate faster.

It won't (all else being equal). :) Because of Newton's law of cooling, hot coffee will cool down faster (precisely, the rate of change of temperature of a solid body is proportional to the difference in temperature between the body and the environment).

<comment><USER28> Parent meant "sooner" not "faster". The derivative of temperature was not intended, the dervative of entanglement was intended.

</comment></comment></comment><comment><USER29> Is this really new? IANAP, but I clearly remember being taught about the Arrow of Time as a probabilistic/thermodynamical phenomenon even in high school and I also read similar explanations that involved causality and probability theory _without refering to quantum entanglement_. Is the "quantum" bit even needed there for anything?

<comment><USER30> Probability theory is how we _model_ the arrow of time, but it's not a physical mechanism by which the arrow of time occurs. The article covers this distinction.

<comment><USER31> Isn't the classical definition of Arrow of time is from the system with less entropy to a system with more entropy? What is lacking in this definition of Arrow of time that we need to take it to Quantum level?

<comment><USER30> Again, probability is just a model that can predict something, but not explain how it works. Take a pseudorandom number generator and do rand() > 0.5. Your probability is 50%, and that is a pretty good model to predict how the subroutine will behave, but it may also be useful to understand what algorithm the PRNG is using.

<comment><USER28> In physics, a "model" is the same as "how something works", unless and until you can uncover details (like the precise order of generated numbers) that the old model can't express.

</comment></comment></comment></comment></comment><comment><USER32> From the article

      One aspect of time's arrow remains unsolved.
      "There is nothing in these works to say why you
      started at the gate," Popescu said, referring to
      the park analogy. "In other words, they don't
      explain why the initial state of the universe was
      far from equilibrium." He said this is a question
      about the nature of the Big Bang.

Could it be that expansion, which proceeded much faster than light, therefore didn't allow entanglement to take place, delaying the heat death of the universe until everything is fully entangled?

If expansion had been slower, would entropy maybe have kept up with it, leaving us as just a single black hole instead of a dispersed, interesting, unentangled, things-are-still-happening universe 13 billion years later?

</comment><comment><USER33> A lot of people in this thread are questioning how this adds any new information about time or how it is different/better than a classical explanation of systems (coffee cup reaching equilibrium based on thermodynamic laws).

One way that this result makes sense to me is by considering the properties of light speed and "spooky action at a distance." Particles become entangled with one another at the speed of light -- photons or fields carrying the information between the two. Looking at this from the perspective of light speed, there has been an instantaneous change between the two particles. State A has led directly to a more complicated, entangled State B. Still looking at this from light speed, there is no time between the transition from one state to the next and from that one to the next and so on. The universe has already worked itself out from the initial disentangled state to all the states that are increasingly more entangled.

Thanks to Einstein, we know that all objects try to move at light speed, but that the more massive they are the slower they become. Because we are massive objects, we don't experience time instantaneously like the photons do. We see the propagation of entanglement and see the state transitions. Our massiveness has given rise to a direction of time, the order that we understand the states of the universe to be proceeding in. Unlike light, we have to experience all the intermediate states in the order of less entangled -> more entangled. Thus an arrow of time.

This is already subtly bundled up in the classical explanations. Coffee cools off because it reaches equilibrium. Classical physics says this is because the particles in the coffee are hotter than the surrounding air, so it is more likely for those particles to break free of the coffee, thereby reducing its average kinetic motion. Consider though how those particles are interacting with one another. They don't just "know" the direction they're supposed to go, they bump into each other's fields and communicate at light speed. Each particle informs the next and as they become more entangled and learn more about where they are, they progress from state to state.

</comment><comment><USER34> I wonder how much knowledge is lost because the research isn't "popular". What is the opportunity cost of so many researchers doing string theory research, not necessarily because they believe they'll find a breakthrough (obviously, this doesn't describe most), but because they won't be able to get published or find a research position if they aren't doing the "in" thing.

This doesn't just apply to physics, but the history of physics makes it easy to find case studies in this.

</comment><comment><USER35> Wow, just today I read this:

[http://physics.stackexchange.com/questions/10068/on-the- natu...](http://physics.stackexchange.com/questions/10068/on-the-nature-of- the-collapse-of-the-wave-function)

and I thought it was all explained quite simply and now this?

</comment><comment><USER36> I've always wanted to study quantum mechanics because of this very "entanglement". Can people please post recommendations on good resources/books on the topic for a person like me having no solid experience with physics(except college level courses)?

<comment><USER37> The bible is Nielsen and Chuang's Quantum Computation and Quantum Information: [http://www.amazon.com/Quantum-Computation-Information- Cambri...](http://www.amazon.com/Quantum-Computation-Information-Cambridge- Sciences/dp/0521635039) See also these resources in Nielsen's blog: [http://michaelnielsen.org/blog/writing/](http://michaelnielsen.org/blog/writing/)

<comment><USER36> That looks interesting. Does one need to have a background in QM before reading this? If yes, what would you suggest as a good read on basics of QM?

<comment><USER37> Let me double-check it today, but I think that it introduces the basics of QM. You need to know some linear algebra though.

<comment><USER36> I started reading this, and boy am I loving it - thank you :)

</comment></comment></comment></comment></comment><comment><USER38> I found the article rather confusing: it starts out by saying look, the laws of physics make sense forwards or backwards. But we only see one kind (entropy increasing) of process. Why is that? Entanglement.

Is there something about entanglement that is irreversible? As the article says "it is the loss of information through quantum entanglement, rather than a subjective lack of human knowledge, that drives a cup of coffee into equilibrium with the surrounding room." Okay, but then why don't we ever see the reverse making coffee depart from equilibrium? Something like the acquisition of information through breaking entanglement drives a cup of coffee away from equilibrium.

<comment><USER39> Perhaps they got lost in their math.

[http://arxiv.org/abs/gr-qc/0507094](http://arxiv.org/abs/gr-qc/0507094)

</comment></comment><comment> one-more-minute This is an interesting step, but doesn't actually explain why time is asymmetrical. Ok, so things equilibrate as time moves forwards because they entangle as time moves forwards. But this just shifts the question – why is entanglement asymmetrical when time, when the underlying laws are not?

You still have the same problem: if you reverse time, the states become untangled and the coffee heats up.

It's nice to be able to model this from a quantum perspective, but make no mistake – no philosophical issues have been resolved here, and we don't "finally" understand anything we didn't before.

</comment><comment><USER40> Just a thought that I've been thinking about. Time has a direction because of causation. State1 causes state2 which causes state3 and so on. You get weird paradoxes if you allow causation to work in both directions. The universe would also have to magically align everything perfectly so that everything is consistent.

Another observation is that even with reversible laws of physics that can work in both directions, if you have a single starting state, all other states will causally propagate from it. In a single dimension of time/causation.

<comment><USER41> Causation relies on a particular direction of time, not the other way around.

For example, suppose you have two billiard balls, A and B. In our world, A travels from left to right, strikes B, and then B flies off to the right.

We would say A striking B caused it to fly off.

But an observer moving through time in the opposite direction would be no less justified to claim:

B travelled from right to left, struck A, and caused A to fly off to the left!

<comment><USER40> Yes, reversible laws of physics are possible. State1 can cause state2, and state2 can cause state1.

Here is the question: Do you pick a state for state1 and then figure out what state2 should be from it (that is, cause state2)? Or do you pick a state for state2 and figure out what state1 should be (causing state1)?

If you have a "starting state", it doesn't matter if the time is reversible. All states will be caused by the starting state propagating forward in one direction. This is _exactly_ what we seem to observe in the real universe. The big bang starts the universe and everything appears to be a chain of cause and effect from it. We never observe events that are _caused_ by things in the future. Glasses do not spontaneously assemble themselves out of shards and fly on top of tables. Photons do not just spontaneously fly from all directions in space to form sensible images on Earth.

Now you might say "what if the universe somehow decided on all the states at once". Well that isn't what appears to be true in our universe for one (or you'd have things spontaneously happening in the future and then rippling effects back in time, rather than the other way around.) Second it might not even be possible. In order to do that you'd have to try every possible combination of states and see which ones are valid. Does writing down every possible combination of bits create universes? Even if you apply some rule to them to check if they are "valid" universes?

I think that "real" universes like ours have to have a chain of causation like that.

Here is a better description of this line of thought than mine: [http://lesswrong.com/lw/fok/causal_universes/](http://lesswrong.com/lw/fok/causal_universes/)

</comment></comment></comment><comment><USER42> In the article the author describes the notion of a "pure state" which is something that has independently evolving probability. Individual 'units' lose their pure state and become part of an entangled ensemble--move to equilibrium.

How is the evolution of biological organisms and technological systems explained in this sense? Played backwards, evolution would fit this and traditional notions of thermodynamic entropy. Is evolution a kind of de- entangling?

<comment><USER43> >How is the evolution of biological organisms and technological systems explained in this sense? Played backwards, evolution would fit this and traditional notions of thermodynamic entropy. Is evolution a kind of de- entangling?

Evolution and technological change are completely different from the physical arrow of time. Optimization processes (evolution, technology) _cannot_ , as far as we know, actually disentangle themselves on-net. What they can do is move the waste-heat/entropy/entanglement into concepts they don't care about, or entangle themselves with some radiating source of "fuel".

(Shout-outs to everyone who thinks the concept of an "optimization process" is total hokum, as I'd like to hear alternate explanations for the apparently similar behavior of so many things that seem to share no purely physical properties at all, and yet all seem to function to shift entropy from some things into other things according to a computable ordering.)

Or in other words, yes, all Earthly life actually lives by converting sunlight into a combination of life and waste, with the "waste entropy" often being radiated off as waste-photons into space, which we don't care about.

An interesting question, I conjecture, is how this conception of entropy/entanglement ties into _energy_ , which apparently remains necessary for the whole process to occur, and yet is conserved in all physical processes.

</comment></comment><comment><USER44> It's never been clear to me how deeply the thermodynamic quantities are really connected to time. For example there could be a state in which entropy (or entanglement) increased from left to right in space, yet it wouldn't mean that time flows from left to right.

</comment><comment><USER45> i recall learning that time "flows" both ways at the quantum scale, but i admit is has been a while since i've attended any lectures. has there been any new discoveries to say otherwise? i think i've read about research of both time reversal violations and time-invariance at the quantum scale.

also, what are peoples' thoughts on time being an emergent property at the macro scale and that down at the quantum level, everything is described by time independent equations, like the Wheeler-DeWitt equation? [http://en.wikipedia.org/wiki/Wheeler%E2%80%93DeWitt_equation](http://en.wikipedia.org/wiki/Wheeler%E2%80%93DeWitt_equation)

</comment><comment><USER46> Quantum mechanics is where physics became more like mathematics: common sense no longer provides much guidance. It is really cool that it provides the missing explanation for one of the most common sense ideas in classical physics: the arrow of time.

</comment><comment><USER47> I love this[1] 'arrow of time documentary' if you are looking for something fun to watch. [https://www.youtube.com/watch?v=4BjGWLJNPcA](https://www.youtube.com/watch?v=4BjGWLJNPcA)

</comment><comment><USER48> Does it seem to anyone else that quantum entanglement and decoherance is the universes way of doing the least amount of computation possible? Like the universe is lazily loaded?

<comment><USER49> Can you give a concrete example of what you mean?

<comment><USER48> Sure (as far as my layman's understanding of quantum physics goes).

So, you have independent physical system (say, a photon). Before it interacts it exists in quantum superposition. It has the potential to exist in any possible configuration and, in fact, seems to exist in all of them simultaneously. Almost like a variable of a certain type but this type is kind of special in that some possible values are more likely than others.

You can combine these 'probability types' systems with others and get useful information out of them in aggregate (example, wave interference patterns) very easily. They seem very well suited to treating them in aggregate in bulk calculations -- IOW, it is computationally cheaper to keep them in this state until the individual values of the variables must be extracted and used. Then the universe accesses the actual value of that individual variable that, so far, has only been needed as part of the aggregate if at all, through an interaction. Then, and only then, is the variable loaded with a concrete value chosen from its probability type through entanglement and it becomes useless as part of these aggregate calculations since it must be treated as an individual entity with a value.

(I am ignorant of quantum physics outside of pop science articles, so if I have something egregiously wrong, please let me know).

Let's say you've made a video game. It is a MMO set in the Stone Age based around massive battles with slings and swords. There are hundreds of thousands of players and computer controlled NPCs in the same world simultaneously. To conserve server resources many calculations are done on the client computer. The clients cannot be expected to do a full calculation for every projectile in the world so there is an algorithm that chooses to load state of only those players that are near enough to actually act on that particular client.

Let's say a player has come onto the battlefield out of range of everyone else but has a scrying spell that allows that player to see an overhead map showing dots of troop formations. This is the aggregate calculation. This player doesn't need to know every other player's full state, just their general density (because he only gets a dot for every ten or so players). As this player moves toward the battle, some NPC comes in range. Suddenly the player needs to know much more state so it is chosen from the possible values and now that NPC must act in a certain way -- only have certain state changes, because only certain transitions make sense now that he's been interacted with. The NPC can't go from fully armored with a spear to in a loin cloth with a sling, for example. And any NPCs in range of _that_ NPC must also de-cohere into a fully defined state and so on. They all become entangled.

Does any of that make any sense whatsoever? I know these are imperfect analogies.

<comment><USER49> Very cool way of thinking about it! Thanks for that elaboration.

Re: SoftwareMaven's "why is the 'player character' so important?", I don't think the player character we follow is necessarily any more important than the other player characters. You can say every individual character (or particle in the real-world side of the analogy) has an importance only within its own reference frame and I think it still works.

Just like you can have many players playing the MMO game and "collapsing the state" of different things from their own reference frames at different times, you can have the same be true for the particles in the real-world analogy. No one player of the game is more "important" than any others. The only requirement is that it all stays self-consistent in the backend and across everyone's individual points of view at all times.

But (for better or worse) I don't think what we're talking about now is science, really, unless there's some way to test it.

Maybe you could try to detect a "lag" by doing something that causes an especially large number of states to collapse across an especially large number of frames of references all at once, but I'm not sure if you could do anything that would detect this lag because all of our ways of detecting would be lagging too. (This goes along the same lines as trying to tell if the computer you're using is running within a VM or running natively.)

Any ideas?

<comment><USER48> I really don't know.

I need to research more into what it means to have a collapse of state. Also whether a state of superposition is one that a system can return to or if once a system has collapsed if it stays that way. And if a system can return to superposition, what makes that happen?

</comment></comment></comment></comment></comment><comment><USER50> So, if I get it right, states become more and more coupled, thus entropy tends to decrease in an open system ? I'm confused.

</comment><comment><USER51> David Ruelle elegantly discusses similar ideas in a great nontechnical book called Chance and Chaos (1995). Worth reading.

</comment><comment><USER35> I thought it was the second law of thermodynamics that already explained the arrow of time? Well, that and friction?

<comment><USER52> The second law is an empirical statement. This entanglement based approach is an attempt to understand the underlying physical mechanism that controls the spread of entropy. If this picture is right, the next question is what is the physical process behind entanglement.

<comment><USER35> The second law was proven as a statistical outcome. Ordered states are vastly outnumbered by disordered ones.

And isn't the whole description of entanglement based on empirical observations anyway?

</comment></comment></comment><comment><USER35> The real question is, given the second law of thermodynamics, where did all the order come from in the first place?

</comment><comment><USER53> Should I be looking for Planck's constant in the equations of thermodynamics?

</comment><comment><USER54>
        The rate of information increases.

Hence why

        Information wants to be free.

Parasitic on

        Only information explains its own existence.

Which all, I think, intuitively follows from Spinozist/Cartesian "Conatus" principle. That is to say:

        The order and connection of ideas is the same as the order and connection of things.

Some of us rave about this or that: "well, how many folk use X today" or "qualify as X" or "subscribe to X". But these expressions are all within the scope of multiply converging nexuses of increasing correlative potentia. The coffee cup _is_ a simple example — so like Wittgenstein's point: "if a lion could speak, we could not understand him". The lion, like the cup, has restricted correlative powers: these laws apply, these others do not.

The laws of information are laws about the dimensions of proportionality, which give the arrow of time an aspect of curvature (needing to exhaust a universe for exponentially narrowing arrows, so the onion-skinning of properties of a thing "come way may" at "frozen" temporal localities — what happens when we "bend" time at certain family resemblance (physical) properties?).

<comment><USER55> I have the sense there is something you are trying to say, but I cannot know what the dimensions of proportionality can be. I can see why you assign frozen temporal localities to property assignment but I think there is some confusion in your argument between information as perceived and information as signaled.

</comment></comment><comment><USER56> At or very near the Big Bang, the Universe was in a state of minimum Entropy i.e. minimum entanglement i.e. maximum order (in some sense).

Post Big bang the cosmological arrow of time is in the direction of increasing disorder i.e. increasing Entanglement i.e. decreasing order

On a smaller closed system, Before is when the system is more pure, less entangled, more ordered After is when it has become less ordered, more entangled.

Obvious really...

</comment><comment><USER57> Seeing this article is rather bittersweet. I came to a similar conclusion in my college years but I never pursuit it further.

Taking Quantum Physics in college was a life changing experience and it reshaped how I viewed the world. I was always obsessed by time and one afternoon it became clear.

I explained my variation not as a cup of coffee but a handful of dice. Essentially every tick of time is rolling these dice. And the variation of dice from one combination to the next is the arrow of time.

Like one of the authors in this article, I got the most amount of resistance from physics major. For most part they had a dogmatic view of anything that they had not studied yet. If it wasn't in their books then it didn't exist.

I also came to the conclusion time travel as depicted in the movies will never happen. It can happen randomly in a smaller body but for anything large the arrow of time is almost impossible to reverse.

<comment><USER58> There's good reason you got the most amount of resistance from physics majors. Intuition won't help you with theoretical physics. The only understanding is that achieved through studying the math in depth. Unless you've developed the formalism (in which case you'd be the subject of this article), you haven't reached any conclusions.

Hate to break it to you. There's no such thing as pedagogical theoretical physics- no shortcut to understanding physics.

<comment><USER57> How did you assume I took quantum chemistry in college and was asked by my prof to join his lab without having any math background, or to be the #1 student in my physics class of 300, or was a member of 3 person team that won our state math championship. Not to mention scoring high enough to make it to the chemistry Olympiad, but ultimately being rejected once realizing US citizenship was required....</comment></comment></comment>


MacRuby 0.7 is released - <AUTHOR> http://www.macruby.org/blog/2010/10/01/macruby07.html

<comment><USER2> I think my postulating from a few months ago is becoming closer to reality. [http://parveenkaler.com/2010/06/30/could-ruby-be-apples- lang...](http://parveenkaler.com/2010/06/30/could-ruby-be-apples-language-and- api-future-3/)

The release notes mention that there has been work on static Ruby compilation as well as well as fixes for clang/llvm.

The one weakness on Apple's platform is that they don't have the rich, language-agnostic runtime and a modern language to match Microsoft like .NET/C#. And Google is building on top of the JVM.

I think the future Apple stack looks like:

      Objective-C & Ruby
      ----
      Language-agnostic runtime (Grand Central Dispatch, Blocks, etc)
      ----
      CLANG
      ----
      LLVM
      ----
      Unix (iOS or OS X)

<comment><USER3> You'd hope so. Objective-C remaining the only option this decade seems nuts.

<comment><USER2> Garbage collection was added in 2.0, boilerplate properties code can be removed with the latest LLVM/CLang, and it's message passing rather than method calling. Add namespaces and remove the .h/.m split and I'd argue it was a better language than C# or Java.

And the spec is less than 135 pages long. The Java spec is 650 pages. The C# spec is 530 pages. [http://developer.apple.com/library/mac/#documentation/cocoa/...](http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/ObjectiveC/ObjC.pdf) <http://java.sun.com/docs/books/jls/download/langspec-3.0.pdf> [http://www.ecma-international.org/publications/files/ECMA- ST...](http://www.ecma-international.org/publications/files/ECMA- ST/Ecma-334.pdf)

To be fair the Java and C# specs are written in a terse but exhaustive manner because standards bodies are the main audience. But it still says something about the conciseness of the languages.

<comment><AUTHOR> _remove the .h/.m split_

The header/@interface is more there for you than the compiler. That is, you don't _have_ to have the @implementation and the @interface in separate files. One way is to use the @class declaration to say that the class will exist at run-time and the compiler doesn't have to worry about the lack of a header. Another way is to #import the .m directly.

There are two issues that come up with the first method: A warning when you use the class about it and methods/dot-syntax accessors possibly not existing and problems if you want to subclass a class. There's probably a compiler flag to suppress the warnings for the former problem and class_setSuperclass for the latter. Even if it is deprecated.

For the second method, you'll need to do some trickery to prevent duplicate symbols. Its solvable, but the exact details escapes me at the moment.

Anyway, here's a quick sample project to show the first way in action: <http://thisismyinter.net/misc/hn/Lone.zip>.

If you guessed that its a giant hack either way, you'd be right!

 _Add namespaces_

This is tricker than you'd think, mostly due to the C heritage it has. We'll probably be stuck with class prefixes for a long time. At least they makes classes Googleable.

<comment><USER4>
        > One way is to use the @class declaration to say that the
        > class will exist at run-time and the compiler doesn't have
        > to worry about the lack of a header.

Sure, you could just put "uses NSWindowController;" in your .m file and the compiler would know all about the NSWindowController class and its methods, but what about all the typedefs, defines, functions, and other bits C/C++ heritage that everyday Obj-C code uses?

Obj-C has been around for 25+ years, and while the libraries have changed a lot during that time the language can still be implemented essentially as a preprocessor on top of a plain old C/C++ compiler, and I don't think that will ever change.

Long live MacRuby, though. I look forward to the day that becomes an official first-class language for OS X development.

<comment><AUTHOR> I never said it was a _good_ idea[1]. Just that it was _possible_.

But, yes. Long live MacRuby. I can't wait until the day I can use it for iOS applications.

1\. From my previous post: _If you guessed that its a giant hack either way, you'd be right!_

</comment></comment></comment></comment></comment></comment><comment><USER5> Why would "Sandbox" functionality need to be first-class implemented in any Ruby? Perhaps a version of Ruby that will run on the iPhone where some carrier's rules could include "No free apps can use cellular internet access". Let AT&T dig their own grave.

<comment><AUTHOR> _...limit potential damage that can happen if a vulnerability is exploited._

Security aspects are a much more likely reason for using sandboxing than carriers complaining is. Plus, sandbox is already available from C -- see: `man 7 sandbox`.

Anyway, I imagine tptacek (or anyone who knows more about security than I do) can explain this better than I can, but, I'll give it a shot: In limiting your process, you're preventing an unknown state from happening within your process. Its another level of control that you can use to ensure that your program will only do what you programmed it to do and that it _can't_ do anything else.

One part of how this sandboxing works is that any process spawned will also be contained within the sandbox. So, say there is a vulnerability -- in your code, in a gem you use, whatever -- the point is, there is a vulnerability. Maybe it will give an evil nasty person remote access to your system, or perhaps a local user can use it to gain privileges that they shouldn't have. Or something else that I'm not thinking of.

Anyway, as a result of a vulnerability, the user now has access to your system. Or maybe they have more access than they should. You can use Sandbox to forcibly limit how much access a process and child processes can have. You can make it so that a process can't write to any directory except the temporary directory that it uses and block access to the internet. Make it harder for the evil nasty person to break, steal or otherwise continue doing things that they shouldn't be doing.

// edit: to summarize: No matter how safe your Ruby code happens to be, if you use an unsafe C extension, you're screwed if you're not using sandbox(7).

<comment><USER5> Not that extra security is bad for your gems, but I was more or less insinuating iPhone support since that's what I really want. ;)</comment></comment></comment>


Avast acquires rival AVG for $1.3B to create a security software giant - <AUTHOR> http://venturebeat.com/2016/07/07/avast-acquires-rival-avg-for-1-3-billion-to-create-a-security-software-giant/ <comment><USER4> I haven't used AVG or Avast in years. Personally, I have found that Microsoft Security Essentials and Malwarebytes antimalware has been sufficient for me.

<comment><USER5> I used to use MSE as it was so light, but it seems to be awful.

[https://www.av-test.org/en/compare-manufacturer-results/](https://www.av- test.org/en/compare-manufacturer-results/)

<comment><USER6> I'm quite skeptical about "independent" AV test sites like these, especially when they come to the conclusion that solutions that would essentially make the AV industry obsolete are inferior ("AV industry" meaning third-party AV solutions in this context). There's a big incentive for them to come to that conclusion, otherwise they'd have no reason to exist any further.

Relevant quote: "It is difficult to get a man to understand something, when his salary depends on his not understanding it." (Upton Sinclair)

<comment><USER7> I don't think you'll find anyone, paid or otherwise, who would say MSE performs better than commercial solutions. It's weighted in favor of better solutions, obviously, but MSE is pretty much the baseline of the industry.

<comment><USER8> No doubt about it. The question is if it's worth it. Yes there is a risk - <USER2> a population that largely accepts risk from unhealthy eating or smoking should IMHO not be all that worried about the in comparison about the (a 2nd IMHO) small increase in risk when using MSE compared to an annoying product. Also, ones own behavior, like how do you handle or react to email attachments, how up-to-date do you keep your system, what websites do you visit (a 3rd IMHO) probably has a larger impact than your choice of anti-virus software.

In addition, if the anti-virus software annoys users enough they soon start ignoring its popups and always just click them away, so that they end up missing actual alerts.

<comment><USER9> In addition to those, there is also a risk that the 3rd party AV solutions themselves have security holes. I know Google Project Zero has found a few issues that make you question whether you are not opening yourself up to worse attacks by using these products than you would by not using them.

</comment></comment></comment></comment></comment></comment><comment><USER10> While these companies do sell products I thought one interesting point was 'The combined company will have access to "400 million endpoints"'. That's 400 million mobile devices and computers that are collecting information about accessed URLs, attempted exploits, installed software, usage patterns and a bunch of other potentially valuable information for consumer marketing, security analysis, and market analysis.

</comment><comment><USER11> Huh. Avast, eh? The same company that sold almost uninstallable 3rd-party crapware in Germany, together with AVG, who're happy to MITM you to sell your data?

Do I remember that correctly?

</comment><comment><USER12> It's hilarious how such a huge industry has become of something that has soberly assessed very little value or effect.

In fact, considering the massive vulnerabilities in AV software discovered by e.g. Googles Zero project, I'm pretty sure the security gain has already slipped into "negative effect" territory five years ago.

<comment><USER13> I keep seeing this point of view around IT communities, and I think it shows how out of touch most people are with the average user capabilities, or just being pedantic.

AV software isn't there to prevent ingenious hackers to take control of random computers. Yes, it actually might create more surface for that purpose.

It exists because most users do not have any understanding of the platform, and will just click on "accept", "yes" and "ok" hoping things will turn out well. AV are pretty decent at mitigating that. At the cost of some performance loss, you'll avoid having a bunch of ads and popups take over your computer, or at least mitigate the phenomenon.

<comment><USER14> But for such a user the choice is not third-party AV or nothing - <USER3> comes with AV software - so the true benefit of an AV product is only in how much better it is than the integrated one. That difference needs to be more significant than the product's drawbacks AND price.

</comment></comment></comment><comment><USER15> I wonder by how much ego played its role in this acquisition and how much commercial terms. Prague based Avast acquiring its Brno based rival. There have always been rivalrly between those cities too. Definitely the biggest tech transaction in Czech Republic? If we can still say that with so many offices they have worldwide

</comment><comment><USER16> Journos didn't take the opportunity to title this: "Avast acquires rival AVG for $1.3B to create a vast security software company".

Anyway, it's amazing how high the price ticket of a company is that is no match for the real security ones!

</comment><comment><USER17> ugh, AVG has always been my go-to AV for home Windows users.. I hope the Free edition will remain.. (Even though they have been trying to aggressively convert users to the pay version for years)

<comment><USER18> Doesn't Windows anyway come with a free antivirus solution these days? If so, this might be a good opportunity for Windows users to get rid of the nagware.

<comment><USER19> Windows comes with a solid piece of software called Windows Defender. It does the job very well. I've been running it for years without any problems. It never gets in the way, runs moderately fast, never bogs my system down, it's free, and it updates very regularly. I don't know what else I would ask for.

</comment></comment></comment><comment><USER20> Bejesus! One should assess environmental impact of CPU cycles wasted on antivirus protection. And based on result of such research - ban operation systems, which architecture allows execution of malware. Yes, a large market of "security" software will be lost. But this will be for good.

<comment><USER21> So we should ban Linux, Mac, BSD, Android, iOS, and Windows... what's left? BeOS? Maybe we should assess the CPU cycles wasted by trolls on the Internet and band anyone who doesn't think about their comment for five seconds before posting...?

<comment><USER20> iOS.</comment></comment></comment>


Lloyds moves to claw back Eric Daniels' bonus - <AUTHOR> http://www.telegraph.co.uk/finance/newsbysector/banksandfinance/8932509/Lloyds-moves-to-claw-back-Eric-Daniels-bonus.html <comment><AUTHOR> Some cultural notes: Lloyds is a bank; they announced a near £4bn loss and were then part-nationalised. They were also involved in mis-selling "payment protection insurance" and had to put aside approx £3bn.

Eric Daniels was chief executive, and Lloyds, despite these serious failings, awarded him a bonus of £1.45m; this is at a time when workers in the "public sector" (health, local government, police, fire, schools, etc etc) are facing cuts to pensions and no wage increases.</comment>


Ask HN: I've made an OS WPF Restaurant POS but it isn't interesting anymore. - <AUTHOR>

I'm not an OS man and started it as a pet project. Somehow it is active for two years and users love it but it seems not so many developers are interested on WPF anymore. How can I improve this for attracting more developer attention?<p>https://github.com/emreeren/SambaPOS-3 <comment> shawn-butler I think not having an English version of the product site hurts. I know it is unfair criticism but it does add friction. Also it is not immediately clear what license the code is under. Maybe a License.txt?

<comment><USER2> Google translate of the home page has this: SambaPOS free to download and can be used without any restrictions, and Touch Screen-assisted Restaurant Program Open Source project. I use the program as you wish, may make changes to the source code and share it with our community.

</comment></comment><comment><USER2> WPF/Thick client is not sexy, but as you've found there is a large market for good POS systems.

I agree with shawn-butler -- I think the lack of English documentation/implementation is huge.</comment>


Show HN: Octohint: Read code at GitHub in an intelligent way - <AUTHOR> https://medium.com/@pd4d10/introducing-octohint-e1a3e4b80c47 <comment><USER2> Does it only work with TypeScript? Or do you at least get partial functionality with plain old JavaScript? What about ES2015+?

<comment><AUTHOR> ES5 and ES6+ are supported.

For details see [https://github.com/pd4d10/octohint#supported- languages](https://github.com/pd4d10/octohint#supported-languages)

</comment></comment><comment><USER2> Very nice! Looks like something GitHub should look at implementing into the main site.</comment>


Dick Costolo "didn't get Twitter" the first 3 times someone explained it to him - <AUTHOR> http://www.burningdoor.com/askthewizard/2007/09/lessons_learned_obviously_its.html

<comment><USER2> Dick Costolo still doesn't get Twitter. The quick bar is proof.

</comment><comment><USER3> You could argue that even as CEO he still doesn't get it.

</comment><comment><USER4> Me neither. I realize it's a smashing success, but I see no reason for it to be so other then "cuz everyone else is doing it"..

Personally, I hate Twitter.

</comment><comment><USER5> So? I still don't get it!</comment>


Outcomes of hydroxychloroquine usage in US veterans hospitalized with Covid-19 [pdf] - <AUTHOR> https://www.medrxiv.org/content/10.1101/2020.04.16.20065920v1.full.pdf <comment><USER2> I thought the other major part of the treatment was including a zinc supplement in addition to the Azithromycin and Hydroxychloroquine?

<comment><USER3> Funny, your comment from 23 days ago only mentions Hydroxychloroquine and Azithromycin: [https://news.ycombinator.com/item?id=22721807](https://news.ycombinator.com/item?id=22721807)

</comment></comment><comment><USER4> So in other words, still no positive results for Hydroxycloroquine treatment of Covid-19. Bummer.</comment>


VS Code to autocomplete JavaScript class 'this' properties automatically - <AUTHOR> https://react-etc.net/entry/vs-code-to-autocomplete-javascript-class-this-properties-automatically <comment><USER2> The most important word in the title is "class". It only does this properly for JS code inside an explicit ES6 class, and, after some cursory testing, doesn't work too well if you bind things to the class at runtime/outside of the main class block.

VS code doesn't autocomplete "this" for "old-school" (function-provided "this" objects and manual prototype inheritance etc.) object-orientish JS; it doesn't compute it properly or at all for re-bound "this" (e.g. apply()/bind()).

Making autocompletion analysis work for non-straightforward non-ES6 OO javascript is a very hard (maybe impossible even without any "eval"ed code, though I'm not sure) thing to do, so this isn't a ding on VS code: any autocompletion is better than none.

That said, if the only way to get good OO-code autocompletion is to reduce the subset of the language/OO models usable to basically "what you could have in Java/C#", it might be a good opportunity to re-evaluate your choice of language. Transpilers for more easily-statically-analyzable languages do exist, after all.

<comment><USER3> > ...it might be a good opportunity to re-evaluate your choice of language. > Transpilers for more easily-statically-analyzable languages do exist, after > all.

I find TypeScript does a pretty good job of allowing as much static analysis as you want without preventing you from using all the features of JS that break it if you wish. In an ideal world I'd work in a fully static language that transpiles to JS but the reality is it's usually necessary to deal with legacy JS libraries. I haven't seen a fully static transpiled language deal with that gracefully, but I'd love to be wrong about that!

<comment><USER4> > I haven't seen a fully static transpiled language deal with that gracefully, > but I'd love to be wrong about that!

Scala.js is specifically designed to be very good at this. You might want to give a shot, if you haven't already ;) Usually you would stay within the type- safe Scala code, or even talk to JavaScript libraries in a type-safe way. But it will always let you do anything you could do in JavaScript (it is one of its core language design decisions). If you want to do something especially weird, the syntax to do so might be pretty awkward, but in most cases it will feel very natural.

<comment><USER5> In ReasonML, most of your code is just Reason (which is just OCaml), but you can easily provide type declarations and use Javascript code in a typesafe way, or you can just drop to raw JS at any point in a Reason file.

</comment></comment></comment></comment><comment><USER6> Not to be a grump, but if you were using a staticly-typed language with any half-baked IDE 20 years ago, this behavior was available.

<comment><USER7> hard to fathom there's an entire generation of developers out there for whom this is entirely new magic. there's an entire class of problem and suite of (bad) tooling that they're having to grapple with to deal with things that simply aren't issues in statically typed languages.

<comment><USER8> As someone who spent a good 8 years doing development in static languages and then the next 8 or so doing mostly JavaScript, I do occasionally miss the superior tooling available in static languages - and yet, I'm more productive in dynamic languages. This isn't just experience, I occasionally still write Java and Scala code. But dynamic languages are sufficiently more powerful that the trade off with tooling is worth it.

In Scala the compile time alone is a massive drag.

<comment><USER9> Are you more productive according to the stopwatch? Or do you just _feel_ more productive?

I believe that a strong static type system with generics is an unmitigated win, and that any time you think you may have lost fighting the compiler is more than regained by the time saved not having to track down type bugs at runtime, using the IDE to perform code completion and refactoring, etc. This effect is magnified as the project grows large.

</comment></comment></comment></comment><comment><USER10> Can someone explain why this (can't stop those puns) is a big deal?

1\. I mean why hasn't it existed before? Surely an editor can figure out which object you're in and auto-complete _this_ on the basis of that.

2\. If it is hard for some reason, how did they do it?

<comment><USER11> The value depends on how you call the function at runtime which requires much deeper code analysis than something like syntax highlighting.

<comment><USER12> I think that the best editing experience would be editor combined with debugger. JavaScript is a dynamic language, a lot of autocompletes before run is just guesses. But if you're running program and stopped it at that line, you know all available objects and their properties, so autocomplete would be perfect. It would require a bit different development style, but it might worth it.

<comment><USER13> Problem is enumerating all the possible code paths that could break at the current line.

<comment><USER12> That's developer problem. I'll provide input values for needed use-case myself (for example with unit test or just manually) and IDE should stop at given line and provide autocomplete. I don't think that there's implementation difficulty, it's just a bit different style of coding, but it should work very well with test driven development.

</comment></comment></comment></comment></comment><comment><USER14> I was blown away how well VSC interacts with JS, especially autocompletion via imports.

<comment><USER15> It's built in and for TypeScript. It uses .d.ts files for JS completion. And yeah, it's great.

<comment><USER14> AFAIK TypeScript has a JavaScript mode too?

</comment></comment></comment><comment><USER16> VS Code JavaScript/Typescript extension dev here

Yes this feature is completely obvious in hindsight, so much so that I felt a little silly highlighting that we never did it before. I guess sometimes you just need someone to file a feature request to point this type of thing out

Anyways, please try it out in the current VS Code insiders builds and VS Code 1.20 once it is released next week. Lots of much more exciting stuff coming in 1.20 as well

</comment><comment><USER17> By itself this isn't very impressive, but there's more context in the wings if you pay careful attention to the TypeScript type system. Take a look at [https://github.com/Microsoft/TypeScript/pull/21316](https://github.com/Microsoft/TypeScript/pull/21316) and [https://github.com/Microsoft/TypeScript/pull/21496](https://github.com/Microsoft/TypeScript/pull/21496). This, combined with the existing literal types and mapped types, allows the TypeScript compiler to understand a huge set of existing practices in the JavaScript world, and do high quality type inference over code that looks totally untypable.

For example, this is a pattern I see a lot:

      const args = parseCliFlags({
        help: {
          parser: Boolean,
          description: 'whether to show help',
          short: 'h',
        },
        custom: {
          parser: (v: string) => {return {hmmm: 'yes'}},
          repeated: true
        }
      });
      if (args.help) {
        console.log('help screen!');
      }
      for (const custom of args.custom) {
        console.log(custom.hmmm);
      }

So we produce an args object based on the descriptors passed into parseCliFlags. Specifically, we use the parser function and the repeated field. With the above PRs, this code can be fully type checked:

      interface Descriptor {
        readonly parser: (value: string) => any;
        readonly description?: string;
        readonly short?: string;
        readonly repeated?: true;
      }
      interface Descriptors {
        readonly [flag: string]: Descriptor;
      }
      type FlagTypes<T> = { [K in keyof T]: FlagTypeOf<T[K]> };
      type ReturnTypeOf<V> = V extends (...args: any[])=>infer R ? R : never;
      type FlagTypeOf<V> = V extends {repeated: true, parser: (val: string)=> infer R} ? R[] : V extends {parser: (val: string)=> infer R} ? R : never;

That code is tricky to write, but it only needs to be written once, and submitted to DefinitelyTyped. From that point, every VSCode user could benefit from these typings (they already have this part working today, with typings for your node libraries downloaded automatically from DefinitelyTyped).

</comment><comment> irq-1 The feature does not know the type of "this".

It doesn't complete "this." but rather when you type a member variable it inserts "this.member". ex. type "width" and it replaces it with "this.width".

<comment><USER18> Got a link to more info on the feature? This article seems uninformative at best.

</comment></comment><comment><USER19> Perhaps unrelated, but JavaScript has the most annoying handling of "this" in classes that I've ever seen.

I'm constantly typing "bind(this)", while the default case should be that "this" within a class points to the object.

I understand backward compatibility, but I wish there was some command I could add at the beginning of the file to make JS behave normally. Kind of like "use strict".

</comment><comment><USER20> _this_ is great. But seriously, this is my setup for 75% of my work, Visual Studio Code with JS, excited to see this little feature in action.

</comment><comment><USER21> How does this compare to Webstorm's autocomplete functionality (as it's one of the primary reasons I started using WS years ago)?

</comment><comment><USER22> Is this new feature specific to vanilla JS classes? I've been using autocomplete for Typescript classes in VS Code for as far back as I can remember.

<comment><USER23> Edit: I misinterpreted the question at first. I guess in TS you declare a class' properties explicitly while in javascript it is usually done in the constructor. The feature must be related to these dynamic properties. Original answer below.

This[0] page says _this_ problem can be also seen in Typescript. But TS has the _arrow function as a class method_ feature that in Javascript is only at stage 2 in it's way to standardization, so it's easier to solve there.

[0] [https://github.com/Microsoft/TypeScript/wiki/'this'-in- TypeS...](https://github.com/Microsoft/TypeScript/wiki/'this'-in-TypeScript)

</comment></comment><comment><USER24> I don't think this title is correct.

`this` is the receiver of the function, which can change depending on how the function is invoked, scope, etc.

</comment><comment><USER25> Madness. Code is so much cleaner when developers drop "this" from their code.

<comment><USER3> Unlike Java, JavaScript requires "this".

Edit: I didn't realize this would be a contentious point! I'm not trying to advocate for any particular style of JavaScript, just making the point that places in Java where "this" can be omitted, in JavaScript it cannot.

<comment><USER26> It does not.

Certain frameworks will encourage more of its use (such as with passing functions-as-props in React), but Javascript itself can support multiple paradigms, with the `this` keyword supporting only some of its messiest parts.

<comment><USER3> Is this true even with classes defined with the "class" keyword? I just tried it and I can't access fields without "this."

<comment><USER27> The "class" keyword was added fairly recently to simplify Java-style OO programming in JavaScript; it's true that that _style_ of programming requires extensive use of "this" in JS, specifically because, unlike Java, JavaScript is not designed from the ground up to favor that style exclusively.

Java will probably always be a better language for writing Java than JavaScript is, but the Java-in-browsers story has sucked for a long time, so we're stuck with people who want Java using JavaScript as Java.

<comment><USER28> So how is JavaScript supposed to be used then?

<comment><USER29> Reluctantly.</comment></comment></comment></comment></comment></comment></comment>


IView: The Latest LCD Technology Concept That Apple Should Adopt - <AUTHOR> http://crenk.com/iview-the-latest-lcd-technology-concept-that-apple-should-adopt/ <comment><USER2> You do know, of course, it's devilishly hard to bend an LCD, right?</comment>


How does a search engine know what words mean? - <AUTHOR> http://www.scienceforseo.com/informationtext-analysis/how-does-a-search-engine-know-what-words-mean/ <comment><USER2> I think a major breakthrough will occur when we ditch the whole "meaning" thing. I think humans probably use language the same way a computer uses numbers, i.e. manipulation of abstract symbols. Words, like numbers, are ultimately just empty buckets with a bunch of tags attached that tell us something about how it interacts with the world. Our tagging system is very complex, and I suspect that much of human creativity stems from experimentally assigning inappropriate tags to concepts and seeing if the result makes a more coherent pattern.

<comment><USER3> Our search company (Trovix) assigns meaning to words. Google does not. They use statistical analysis to derive contextual links.

<comment><USER4> I agree with you on that one.

</comment></comment></comment><comment><USER5> This article itself is a good example why obsessing with SEO is bad. The article is written for search engines to index, not for humans to understand. It obviously compiles information from various sources, but little effort is made to make the content actually understandable - apparently the important thing for the author is to mention a variety of terms in proper context.

<comment><USER4> You know zilch about seo :)</comment></comment>