Shared posts

12 Apr 03:27

Photo



12 Apr 03:26

Photo



12 Apr 03:24

Photo



12 Apr 03:19

Shapes of torus and modular group

by Luboš Motl
In June 2012, I emphasized that the Higgs field was the first experimentally observed elementary scalar field – the Higgs boson is the first elementary spinless particle we know – and because string theory loves to predict scalar fields and gives them many roles while many alternative thinkers love to invent legends claiming that there's something wrong about scalar fields, the discovery of the Higgs boson may be viewed as a minor, modest victory for string theory.

I would like to spend some time with some scalar fields in string theory and with their interesting properties. Quite generally, string theory predicts the existence of many dynamical scalar fields that would be replaced by non-dynamical parameters in quantum field theories. Because they're dynamical, string theory either implies the existence of new long-range forces (these vacua are more or less experimentally ruled out); or it implies that there's a potential that prefers some value or values of these scalar fields so these "parameters" suddenly become calculable.



A two-dimensional torus may be obtained from a rectangle (or a square) if we identify the upper edge with the lower one; and the left edge with the right edge. So much like in PacMan-like games, you reappear on the opposite side of the screen if you try to escape from it ("periodic boundary conditions"). The first identification turns the rectangle into a cylinder; the second one bends it into a doughnut.

The simplest scalar fields – such as the type I string theory coupling constant \(g_s\) – take values in the set \(\RR^+\) or, if we take the natural logarithm (the dilaton), in \(\RR\). The one-dimensional lines cannot have any curvature and they are too simple. So we will focus on something that may be the second simplest configuration space for scalar fields – the set of shapes of a two-dimensional torus.




We want to talk about the two-dimensional surfaces of toroidal topology and ask how many shapes they can have. Of course, it depends what we mean by a "shape".




If you ask how many metrics may be put on a two-torus, or a \(T^2=S^1\times S^1\), the answer is obviously "infinitely many". And it's a very large type of an infinity. Why? Well, you may describe the internal geometry of a two-torus by three components of the metric tensor\[

g_{11},\, g_{12},\, g_{22}

\] which are functions of the coordinates \(\sigma=x^1\) and \(\tau=x^2\) that we take to be periodic. But even if you acknowledge that two functions \(x^{\prime 1},x^{\prime 2}\) may be chosen arbitrarily to redefine the coordinates – and to redefine the functions \(g_{ij}\), it is still true that at least one function of \(\sigma,\tau\) remains totally undetermined. For example, for every torus you have, you may create a \(7\) times larger one. But the overall size isn't the only free parameter; at each point of the torus, there is a free parameter.

But let us change the rules of the game a little bit. Let's define the "shape" in such a way that only the local angles on the torus matter. The overall size of the torus doesn't matter and in fact, we may redefine the metric tensor by an independent overall scalar scaling of the whole metric tensor (the Weyl transformation) at each point and we still consider the shape to be the same thing. So we identify the geometries not only by the "diffeomorphisms" (it doesn't matter which coordinates you choose to describe the torus) but also by the Weyl symmetry,\[

g_{ij}(\sigma,\tau) \equiv e^{2\phi(\sigma,\tau)} g_{ij}(\sigma,\tau)

\] Note that the scaling parameter – which I wrote as an exponential for it to be positive and added the coefficient \(2\) to the exponent because the metric really defines \(ds^2\) – may depend on the location on the torus. With these identifications, there are locally three geometric parameters \(g_{ij}(\sigma,\tau)\) but there are also three functions of \(\sigma,\tau\) – namely \(x^{\prime 1},x^{\prime 2},\phi\) – that may be chosen arbitrarily and that define an equivalence. So roughly speaking, the freedom to redefine cancels the parameters describing the shape. Almost nothing is left.

By having noticed that \(3-3=0\), we actually only prove that there isn't an infinite number of shape parameters left – parameters organized into whole arbitrary functions of \(\sigma,\tau\) – that may define the shape of the torus. However, there may still be some finite remaining parameters which aren't allowed to depend on the location arbitrarily. They're "global parameters" and it's impossible to change their values by coordinate or Weyl transformations.

How many parameters like that a torus has?

Consider a manifold that is topologically a torus. You may always choose the coordinates \(\sigma,\tau\) such that their periodicity is \(2\pi\), for example, which means that the metric tensor components obey the following periodicity conditions:\[

g_{ij}(\sigma,\tau) = g_{ij}(\sigma+2\pi,\tau) = g_{ij}(\sigma,\tau+2\pi).

\] Now, in the July 2012 article about the Euler characteristic \(\chi\), I showed that \(\chi\) is a topological invariant so every two-torus must have \(\chi=0\) because the two-tori represented by a flat rectangle have \(\chi=0\) and the Euler characteristic may be computed from integrals of the curvature.

It means that the integral\[

\int d^2x\,\sqrt{|g|} R = 0

\] of the Ricci scalar vanishes. Because a Weyl transformation generally changes the Ricci scalar as a function of the position, we may choose a Weyl transformation that achieves \(R(\sigma,\tau)=0\) for all values of \(\sigma,\tau\). Some extra arguments would be needed to show that such a Weyl transformation doesn't have to contradict the periodic conditions above.

Believe me that all the minor gaps may be filled and it's true that by a Weyl transformation, every two-torus may be brought to a form that has \(R=0\) locally. Because the Riemann tensor in \(d=2\) has just one independent component \(R_{1212}\), the single condition \(R=0\) actually implies \(R_{ijkl}=0\) and the two-torus has therefore been made Ricci-flat. So one can choose coordinates in which the metric tensor is constant and because we didn't have to damage the periodic conditions, the torus has been brought to the form defined by constant values of \(g_{11},g_{12},g_{22}\) which are interpreted as functions of \(\sigma,\tau\) identified with the \(2\pi\) periodicities.

Note that there is one overall Weyl scaling left:\[

(g_{11},g_{12},g_{22}) \approx e^{2\phi}(g_{11},g_{12},g_{22})

\] As a result, the conformal shapes of the two-torus are determined by \(3-1=2\) i.e. two independent real parameters. Well, we may organize them into a single complex parameter we will confusingly call \(\tau\). What is it, except that it's clearly a different \(\tau\) than \(\tau=x^2\)? (Recipe: \(\tau\) only means \(x^2\) if it appears close to \(\sigma\) in a similar role. Otherwise, the meaning of \(\tau\) will be the new one I will describe momentarily.)

By a simple linear transformation of \(\sigma,\tau\), we may bring the flat torus to the form where\[

g_{ij} (\sigma,\tau) = \delta_{ij}

\] but this requires us to change the periodic identifications:\[

(x^1,x^2)\sim (x^1+2\pi,x^2)\sim (x^1+2\pi\,{\rm Re}(\tau),x^2+2\pi\,{\rm Im}(\tau))

\] The first identification is still the same thing as \(\sigma\sim \sigma+2\pi\) we started with (and you may always bring the first identification to this simple form by a rotation of the \(x^1\)-\(x^2\) plane combined with a scaling); the second one is tilted. The vector given by the complex number \(2\pi\tau\) in the complex \(z=x^1+ix^2\) plane defines another identification of points on the plane. It's natural to organize the two real parameters into one complex parameter because the metric on the two-plane is given by an expression that nicely "decouples" \(z\) from its complex conjugate:\[

ds^2 = (dx^1)^2 + (dx^2)^2 = dz^* dz.

\] Note that the torus obtained from a "square" is given by \(\tau=i\): the real part of \(\tau\) vanishes and the imaginary part is equal to one which produces the "usual" identification for the second coordinate. However, there are infinitely many shapes of the two-torus given by \(\tau\in\CC\). The nonzero real part of \(\tau\) "tilts" the torus while the imaginary part of \(\tau\) different from one makes the torus "thinner" or "thicker".

We face a critical question: are all complex values of \(\tau\) producing different shapes?

The answer is No, of course. The "modular group" will be the main class of identifications of different values of \(\tau\).

Using the complex variable \(z=x^1+i x^2\) describing the two-plane, we define the torus by the following identifications:\[

z\sim z+2\pi, \quad z\sim z+2\pi \tau.

\] Feel free to erase \(2\pi\) everywhere if it is annoying you; this factor is a convention related to the circumference of the circle (you may change the convention by redefining the normalization of \(z\)). You see that if you change\[

\tau\to-\tau,

\] you will get the same identification of points on the \(z\)-plane because points \(z\) are identified with \(z+2\pi m +2\pi \tau n\) for \(m,n\in\ZZ\) and it's the same set of points as if you change \(n\to-n\) or, equivalently, \(\tau\to-\tau\). So some identifications – some values of \(\tau\) – are identified with other identifications. I hope it's not too confusing! ;-)

We may use the freedom to change the sign of \(\tau\) to impose the usual convention\[

{\rm Im}(\tau) \gt 0.

\] The imaginary part is positive. Note that we may demand it to be strictly positive. If the imaginary part were zero, \(\tau\) would be real and the identifications would only identify points in the horizontal direction. We couldn't get a non-singular finite two-dimensional manifold in this way.



But there exists a wider class of equivalences between different values of \(\tau\). Note that the identifications of the \(z\)-plane are given by vectors in the "lattice"\[

2\pi m + 2\pi n \tau,\quad m,n\in \ZZ.

\] Its integer-based basis vectors are \(\{1,\tau\}\), if I omit the annoying \(2\pi\) myself. However, you may change this basis to any other integer-based basis \(\{A+B\tau,C+D\tau\}\) where \(A,B,C,D\in\ZZ\). Note that every integer combination of these two basis vectors\[

M(A+B\tau) + N(C+D\tau)

\] is an integer combination of the vectors \(1,\tau\). If the converse holds as well, we may say that the two bases are equally valid and they define the same identification. Well, the converse holds if the vectors \(\{1,\tau\}\) may be expressed as integer combinations of the vectors \(\{A+B\tau,C+D\tau\}\). In other words, it holds if the inverse matrix\[

\pmatrix{+A&+B\\+C&+D}^{-1} = \frac{1}{AD-BC} \pmatrix{+D&-B\\-C&+A}

\] has integer entries. And that's true if \(AD-BC=\pm 1\), i.e. if the determinant is equal to one, up to the sign. Well, if we only allow values of \(\tau\) whose imaginary part is positive, as we have said, they may only be related by transformations with \(AD-BC\gt 0\) which means that we require \(AD-BC=1\). Such \(2\times 2\) matrices form the group called \(SL(2,\ZZ)\), the modular group. Well, I am actually identifying matrices \(M\) and \(-M\) (they have the same determinant!) and this quotient is known as \(PSL(2,\ZZ)\) but I will still call it \(SL(2,\ZZ)\).

What do these identifications do with \(\tau\)?

We said that the integer-based basis vectors \(\{1,\tau\}\) are equally good as the integer-based basis vectors \(\{A+B\tau,C+D\tau\}\). Note that in the first case, we used the convention in which the first identification was determined by the complex number \(1\). This may be achieved, without changing the shape of the torus, by a rotation and overall scaling of the torus. These two operations may be unified into the multiplication by a complex number. And indeed, we may multiply the complex numbers \(\{A+B\tau,C+D\tau\}\) by a complex number, namely the inverse of the first one, so that the first one becomes \(1\):\[

\{A+B\tau,C+D\tau\} \sim \{1,\frac{C+D\tau}{A+B\tau}\}

\] And the final two integer-based vectors obey our convention: the first one is equal to one. Let's now change the conventions and relabel \(A,B,C,D\) as \(d,c,b,a\) (I could have chosen a better convention that avoids this doubling of conventions) so that we may say that there is an equivalence\[

\tau\sim\tau' = \frac{a\tau+b}{c\tau+d},\quad a,b,c,d\in\ZZ,\quad ad-bc = 1.

\] The "shape of the torus" parameters \(\tau,\tau'\) related in this way for some \(SL(2,\ZZ)\) matrices produce the same shapes. It may be unexpected for \(\tau\) to transform this "nonlinearly" under the group; we're more used to linear representations. But at the end, \(\tau\) is just some ratio of the two parameters (defining the identifications) that did transform linearly; you should be able to see where the nonlinearity came from. So how many inequivalent values of \(\tau\) are there? Can we choose a region of the \(\tau\)-plane so that this region counts each allowed shape exactly once?

The answer is Yes, we can. What the region exactly is depends on conventions but there exists a rather natural convention for the "fundamental domain", too. In order to see how large it is, we must study the modular group \(SL(2,\ZZ)\) a bit. A key claim is that every matrix in \(SL(2,\ZZ)\) may be written as a product of the matrices\[

S = \pmatrix{0&-1\\+1&0}, \,\, T=\pmatrix{1&+1\\0&+1},\,\, T^{-1} = \pmatrix{1&-1\\0&+1}

\] You may use as many copies of these matrices as you want, in any order. It's useful to notice that they act on \(\tau\) as follows:\[

S:\tau\to -\frac{1}{\tau},\quad T^{\pm 1}:\tau\to \tau\pm 1

\] They either invert \(\tau\) – with the extra sign needed to keep the imaginary part positive, note that \(i^{-1}=-i\); or they change \(\tau\) by plus minus one. Before we will investigate why a general \(SL(2,\ZZ)\) matrix may be written in terms of \(S\) and \(T^{\pm 1}\), let's see how it restricts the fundamental domain for \(\tau\). To be sure, the answer looks like the grey region here:



The region is given by the inequalities\[

-\frac{1}{2}\lt \tau_1\lt +\frac{1}{2},\quad \tau_2\gt 0,\quad |\tau|\gt 1

\] where the subscripts \(1,2\) refer to the real and imaginary parts, respectively. I sort of deliberately jump in between various conventions in order to prepare the dear reader for the messy world where different people – and, quite often, the same people – keep on using tons of inconsistent conventions, notations, and the most heretical ones even dare to speak different languages (than Czech).



A four-minute introduction to the belly of the Universe. And yes, the belly's most important city is my hometown of Pilsen. A better commercial for my country than this piece on the Franz Kafka airport in Prague. (The officer's name is pretty normal here, Mr Macháček Zlámaljelito, or Mr Little-rinser-off He-broke-the-black-pudding.) Or try Czech porn models try to learn and say one English sentence. Or a trilingual interview with a skier.

The middle inequality repeats the assumption that the imaginary part of \(\tau\) is positive. The first condition puts the real part between \(-1/2\) and \(+1/2\). The last part demands that the absolute value of \(\tau\) is greater than one. How did we derive the new two conditions? We must show that the fundamental domain defined by the conditions above counts all possibilities; but it doesn't double-count or multiply-count any of them.

First, why does the fundamental domain count all possibilities? Start with a \(\tau\) possibly outside the fundamental domain but with \(\tau_2\gt 0\). You may transform it by \(T^k:\tau\to\tau+k\) for an integer \(k\) to get it into the width-one strip \(-1/2\lt \tau_1\lt +1/2\). The transformed \(\tau\) belongs to the strip but it may have \(|\tau|\lt 1\). If it's so, you may invert \(\tau\) by \(S:\tau\to -1/\tau\) to get \(|\tau|\gt 1\). That may bring us outside the strip again in which case we apply \(T^k\), and so on.

Ultimately we're guaranteed to end up in the fundamental domain. There are many reasons why it is so. For example, the boundary of the fundamental domain is composed of segments that are \(SL(2,\ZZ)\) transformations of other segments of the boundary. In particular, the left vertical boundary is related to the right vertical boundary by \(\tau\to\tau+1\) and the arc is mapped onto itself by \(\tau\to-1/\tau\). Because we know how to map some "places near the fundamental domain" to the fundamental domain by an appropriate \(SL(2,\ZZ)\) transformation, we know that there's always some "life behind the boundary". The only region where we could get some "new \(\tau\) inequivalent to the fundamental domain" are those where the mirrored boundaries get infinitely dense but one may see that it may only occur near the real axis, a measure-zero region.

I don't claim the paragraph above to be the full proof but be sure I could give you the full proof and it would be a bit boring. Similarly, one may prove that the fundamental domain doesn't double-count any shapes: if \(\tau\) obeys all the inequalities, it's easy to see that \((a\tau+b)/(c\tau+d)\) inevitably violates at least one of them unless the matrix is (plus minus) the unit matrix.

The reader is encouraged to think about these matters by herself. She should realize that the multiplication of matrices by \(S,T^{\pm 1}\) is related to Euclid's algorithm to find the greatest common divisor of two integers. For example, multiply an \(SL(2,\ZZ)\) matrix by a column vector \(\vec v\) composed of integers. The greatest common divisor of \(v^1,v^2\) doesn't change if we exchange these two components – this pretty much corresponds to the action by \(S\); but it also remains invariant if we replace them by \(v^1-v^2,v^2\) which corresponds to the action by \(T^{-1}\). My previous claim that you ultimately get to the fundamental domain by cleverly combining \(S\) and \(T^{\pm 1}\) is nothing else than the claim that Euclid's algorithm succeeds after a finite number of steps.

And yes, the relationship to Euclid's algorithm is just one of the manifestations of the broader fact that the modular group and all the insights sketched in this blog entry are tightly linked to number theory, the science about prime numbers and other special properties of integers.

Applications

The fundamental domain of \(\tau\) describing the "shape of a torus" is omnipresent in modern theoretical physics and in string theory in particular. Many of these contexts used to be thought to be independent but they were often found to be intrinsically the same thing, by dualities. In some of the situations, we didn't really "see" the torus whose shape is expressed by \(\tau\); however, because of the newly found dualities, the torus suddenly emerged and became as tangible as all other tori. Many of the insights of string theory since the mid 1990s were able to "geometrize" many concepts that previously didn't admit such a visualization.



The oldest application of the fundamental domain in string theory is the shape of one-loop closed string Feynman diagrams. Note that in string theory, the Feynman diagrams – collections of propagators joined at vertices – become "thickened" and "smoothly connected" Riemann surfaces, systems of pants, world sheets of any topology. The one-loop point-like-particle Feynman diagrams get replaced by a torus with extra tubes attached to it; those correspond to the external particles/lines.

Because the diffeomorphisms and Weyl symmetries are symmetries of the world sheet, the torus may be transformed to the standard form given by the parameter \(\tau\). To calculate the contribution of a one-loop diagram in string theory, we still need to integrate over \(\tau\) – it's a real-two-dimensional integral. But there's a cool surprise.

In quantum field theory, the corresponding integral would go over the whole half-strip given by\[

-\frac{1}{2}\lt \tau_1\lt +\frac{1}{2},\quad \tau_2\gt 0.

\] This half-strip also contains lots of points with arbitrarily small values of \(\tau_2\), the imaginary part of \(\tau\), and the region near the real axis is the source of all the ultraviolet divergences. In string theory, you must be careful not to double-count the shapes of the tori so the integration only goes over the fundamental domain which is defined by the conditions above as well as the inequality\[

|\tau|\gt 1

\] and the region close to the real axis is completely omitted from the integral. That's one way to explain why string theory is free of ultraviolet divergences. The corresponding region of the interval is completely omitted. By the modular \(SL(2,\ZZ)\) transformations, one may show that it's equivalent to some region that has the potential to produce infrared divergences. But there aren't any independent ultraviolet divergences in string theory. Ever. Never. The argument holds for arbitrarily complicated \(n\)-loop diagrams and has been proven rigorously.

But the shape of the one-loop world sheets is just one example of the place in string theory where the fundamental domain of the modular group appears.

The maximally supersymmetric gauge theory in \(d=4\) has a coupling constant \(g_{YM}\) but also a \(\theta\)-angle. They may be combined into\[

\tau = \frac{i}{g_{YM}^2} + \frac{\theta}{2\pi}

\] so that the \(\tau\to -1/\tau\) transformation gets naturally identified with the S-duality ("electromagnetic duality" of a sort) acting as \(g_{YM}\to 1/g_{YM}\) and where the \(\tau\to\tau\pm 1\) gets reinterpreted as the \(2\pi\) angular periodicity of the \(\theta\)-angle. These basic identifications generate the whole \(SL(2,\ZZ)\) which is therefore a symmetry, the S-duality group, of the gauge theory.

A totally analogous situation appears in type IIB string theory: just replace \(1/g_{YM}^2\) by \(1/g_s=\exp(-\phi)\) (the string coupling constant is the exponential of the dilaton) and rename the \(\theta\)-angle as the Ramond-Ramond axion scalar field and the maths is the same.

Although we know that such values of \(\tau\) identified by the \(SL(2,\ZZ)\) modular transformations describe the "possible shapes of some torus", there used to be times when the people didn't know what the torus actually was. Moreover, the two cases – the \(\NNN=4\) gauge theory and type IIB string theory – were thought to be independent of one another.

The revolutionary insights of the last 20 years have completely changed the thinking. The two cases are closely related. Moreover, we know how to visualize "the torus" in both cases.

First, type IIB string theory is related to the \(\NNN=4\) Yang-Mills theory in a simple way: the Yang-Mills theory simply describes the low-energy dynamics of D3-branes, objects that may exist within type IIB string theory. The Yang-Mills coupling constant (and the \(\theta\)-angle) on the D3-brane simply inherits the string coupling constant (and the Ramond-Ramond axion field) from the surrounding type IIB stringy spacetime. This relationship becomes particularly obvious in the AdS/CFT correspondence which claims that the Yang-Mills theory is physically equivalent to type IIB string theory on the \(AdS_5\times S^5\) background.

Moreover, we also know how to properly visualize the "torus" whose possible shapes are parameterized by the complex number \(\tau\). In the case of the gauge theory, we may say that this gauge theory may be thought of as the compactification of a 6-dimensional \((2,0)\) theory on a vanishingly small two-torus. In this way, the proof of the S-duality group of the gauge theory may be reduced to a proof of the existence of this 6-dimensional theory (and its compactifications): the duality is completely manifest because it results from the tori's being the same.

Similarly, type IIB string theory which has a 10-dimensional spacetime may be understood as the compactification of a 12-dimensional theory, F-theory, on a similar 2-torus. The difference is that F-theory can't exist in the decompactified form – in an infinitely large 12-dimensional spacetime, at least people think it can't. This theory forces you to compactify its two dimensions on a two-torus.

The letter "F" in F-theory stands for vaFa, Father, or Fiber, according to your taste.

While F-theory or the \((2,0)\) theory may look too abstract, there exist various additional dualities that translate them to equivalent compactifications of M-theory or gauge theories in which the two-torus still has a well-defined role. The main punch line is that we have tools that allow us to "imagine" the two-torus and give it a geometric, physical interpretation whenever there is a parameter \(\tau\) identified by the modular group. In most cases, string theory provides us with many seemingly inequivalent ways to "geometrize" the way how we think about the physics. The physical phenomena are still exactly equivalent but we may look at them from many directions, directions which provide us with many different expansions or ways to calculate the same thing. These surprising equivalences – dualities – are extremely powerful.

F-theory, the clever way of rephrasing type IIB string theory as a 12-dimensional theory that makes the origin of the torus manifest, also allows us to construct many new solutions to string theory which may be imagined as compactifications of the 12-dimensional theory. If you want 3+1 dimensions to remain large, you may compactify a 12-dimensional theory on an 8-manifold. Essentially because the number of compactified dimensions is so large, eight, F-theory is the class of string vacua that is the "largest" one and produces the richest classes of stringy vacua in the "landscape".

Note that an obvious virtue of F-theory relatively to type IIB string theory is that it encourages us to think about non-constant values of \(\tau\) as functions of the remaining 9+1 spacetime coordinates (not participating in the torus). Not only \(\tau\) may change; if you make a trip around a 7-brane (a co-dimension-two singularity in the spacetime), \(\tau\) doesn't have to return to its original value. It may come to \(\tau'\) which is \(\tau\) transformed by the \(SL(2,\ZZ)\) transformation. We call this change of a variable induced by a round trip "a monodromy". Monodromies are omnipresent in F-theory and the possible monodromies essentially classify the possible types of 7-branes – and be sure that there are many types of such branes in F-theory and they usually produce cool enhanced non-Abelian symmetries and gauge fields that are confined to the singular branes.

I plan to write an introduction on F-theory, elliptic curves, etc. sometime in the future.
12 Apr 03:17

Hijacking airplanes with an Android phone (Help Net Security)

by jake
Help Net Security has a report of a rather eye-opening talk from the Hack in the Box conference in Amsterdam. Security researcher Hugo Teso demonstrated exploits of two aircraft communication systems (ADS-B and ACARS), though purposely only in a virtual environment. "By taking advantage of two new technologies for the discovery, information gathering and exploitation phases of the attack, and by creating an exploit framework (SIMON) and an Android app (PlaneSploit) that delivers attack messages to the airplanes' Flight Management Systems (computer unit + control display unit), he demonstrated the terrifying ability to take complete control of [aircraft] by making virtual planes 'dance to his tune.'"
12 Apr 03:16

Git<3, controle de versões para relacionamentos

O leitor mais frequente deste blog sabe que sou um paulistano mais ou menos radicado no Rio Grande do Sul. Ainda que venha frequentemente a SP, a pouca distância desenvolvida já é suficiente para ficar espantado com as constantes mudanças na cidade. Para mim, ela cada vez mais se parece com algo saído do Wayback Machine: você até reconhece o conteúdo, mas as imagens estão quebradas.

É assim com todas as lembranças, diriam os teóricos da História Oral. Sempre há um certo estranhamento quando recontamos os pedaços da nossa mitologia pessoal. Mas não deveria ser diferente, agora que documentamos minuciosamente nossas vidas por meio da tecnologia?

Talvez seja exatamente o contrário: o sentimento de Wayback Machine (SWBM) ocorre cada vez mais rapidamente. O estranhamento deixa de estar apenas na década passada, mas também acontece em relação ao post do dia anterior.

Além disso, damos mais material para os “arqueólogos” e “historiadores” cotidianos, gente que interpreta nossos rastros de acordo com seus interesses (empregadores, namoradas, família etc). Assim, mal acabamos de postar algo e as coisas já precisam de esclarecimentos. Já precisamos “revisar” nossa comunicação.

Imagine se tivéssemos um sistema de controle de versões para conviver com as cidades. Algo como o Git. Olharíamos para um prédio e teríamos a lista de commits de cada pessoa que fez alterações significativas no ambiente. “Onde está o banco de madeira no qual beijei aquela garota?” Foi alterado na linha 25 do código (setembro de 2005). Ok. Sincronizar.

Pior: e se fôssemos capazes de acompanhar os forks de cada um dos nossos relacionamentos? (Uma espécie de Gitframeworks. Teríamos nossos próprios boilerplates, de onde tiramos os códigos básicos para nossos “erros” e “acertos”. Ainda assim, com toda essa informação documentada, o SWBM persistiria.

Diários, religiões, livros, caches, backups, controle de versões: as tecnologias para lidar com o passado também não param de mudar. Mas é como se a própria ideia de que existem três tempos — passado, presente e futuro — fosse um bug fundamental na experiência humana. E, assim como acontece com muitos outros bugs, este é bastante funcional. Traz resultados. Provoca o nascimento de inúmeros cenários alternativos.

Porém, no fundo, os retratos que ficam em nossos servidores não são assim tão diferentes dos que ficam no cérebro. Ainda que existam cópias consideradas fiéis, no final, tudo sempre parece, de alguma forma, um tanto estranho. Afinal, todo código tem que ser relido e reinterpretado constantemente. E aí é que as versões fogem do controle.

11 Apr 19:31

buzzfeed: Yeah, this checks out. Science!



buzzfeed:

Yeah, this checks out.

Science!

11 Apr 19:31

OK, cupid: giving your love life to Google Glass and the hive mind

by Tim Maly
Augmentedfinal4

On January 20, 2013, sometime before 7:45PM, Lauren McCarthy sat down at a table. She was early. She always arrived early. Once she had a spot, she checked her setup. She kept the iPhone in her purse, its camera poking out and angled to capture the whole scene. The iPod touch was kept close at hand. The iPhone was connected to Ustream and Ustream was connected to Amazon's Mechanical Turk. The Turk workers had a web form to fill out, which would send texts to the touch. Satisfied that it was all in order, she settled in to wait for her date.

Over the next two hours, McCarthy and an anonymous man went through the motions of a first date, while a rotating series of Turk workers watched the video feed for an average of four minutes and 32...

Continue reading…

11 Apr 19:30

Review: Home shields you from non-Facebook tasks

When I got my first smartphone in 2010, I checked Facebook obsessively. But over time, the novelty wore off and opening Facebook's app to check photos, links and posts from friends turned into a chore.
11 Apr 04:16

pmikos: H.J. Ward



pmikos:

H.J. Ward

11 Apr 04:13

Why don't trains need differential gears?

by Jason Kottke

The other day I posted a video about how differential gears work to help cars go smoothly around curves. Trains don't have differential gears, so how do they manage to go around curves without slipping or skidding? Richard Feynman explains:

Ha, it looks like I've posted this one before as well. Can never get enough Feynman. (thx, kerry)

Tags: physics   Richard Feynman   science   video
11 Apr 04:12

All Adobe Updates

ALERT: Some pending mandatory software updates require version 21.1.2 of the Oracle/Sun Java(tm) JDK(tm) Update Manager Runtime Environment Meta-Updater, which is not available for your platform.
11 Apr 04:12

HTTP: The Protocol Every Web Developer Must Know – Part 1

by Pavan Podila

HTTP stands for Hypertext Transfer Protocol. It’s a stateless, application-layer protocol for communicating between distributed systems, and is the foundation of the modern web. As a web developer, we all must have a strong understanding of this protocol.

Let’s review this powerful protocol through the lens of a web developer. We’ll tackle the topic in two parts. In this first entry, we’ll cover the basics and outline the various request and response headers. In the follow-up article, we’ll review specific pieces of HTTP – namely caching, connection handling and authentication.

Although I’ll mention some details related to headers, it’s best to instead consult the RFC (RFC 2616) for in-depth coverage. I will be pointing to specific parts of the RFC throughout the article.


HTTP Basics

HTTP allows for communication between a variety of hosts and clients, and supports a mixture of network configurations.

To make this possible, it assumes very little about a particular system, and does not keep state between different message exchanges.

This makes HTTP a stateless protocol. The communication usually takes place over TCP/IP, but any reliable transport can be used. The default port for TCP/IP is 80, but other ports can also be used.

Request/Response Pair

Custom headers can also be created and sent by the client.

Communication between a host and a client occurs, via a request/response pair. The client initiates an HTTP request message, which is serviced through a HTTP response message in return. We will look at this fundamental message-pair in the next section.

The current version of the protocol is HTTP/1.1, which adds a few extra features to the previous 1.0 version. The most important of these, in my opinion, includes persistent connections, chunked transfer-coding and fine-grained caching headers. We’ll briefly touch upon these features in this article; in-depth coverage will be provided in part two.

URLs

At the heart of web communications is the request message, which are sent via Uniform Resource Locators (URLs). I’m sure you are already familiar with URLs, but for completeness sake, I’ll include it here. URLs have a simple structure that consists of the following components:

URL Structure

The protocol is typically http, but it can also be https for secure communications. The default port is 80, but one can be set explicitly, as illustrated in the above image. The resource path is the local path to the resource on the server.

Verbs

There are also web debugging proxies, like Fiddler on Windows and Charles Proxy for OSX.

URLs reveal the identity of the particular host with which we want to communicate, but the action that should be performed on the host is specified via HTTP verbs. Of course, there are several actions that a client would like the host to perform. HTTP has formalized on a few that capture the essentials that are universally applicable for all kinds of applications.

These request verbs are:

  • GET: fetch an existing resource. The URL contains all the necessary information the server needs to locate and return the resource.
  • POST: create a new resource. POST requests usually carry a payload that specifies the data for the new resource.
  • PUT: update an existing resource. The payload may contain the updated data for the resource.
  • DELETE: delete an existing resource.

The above four verbs are the most popular, and most tools and frameworks explicitly expose these request verbs. PUT and DELETE are sometimes considered specialized versions of the POST verb, and they may be packaged as POST requests with the payload containing the exact action: create, update or delete.

There are some lesser used verbs that HTTP also supports:

  • HEAD: this is similar to GET, but without the message body. It’s used to retrieve the server headers for a particular resource, generally to check if the resource has changed, via timestamps.
  • TRACE: used to retrieve the hops that a request takes to round trip from the server. Each intermediate proxy or gateway would inject its IP or DNS name into the Via header field. This can be used for diagnostic purposes.
  • OPTIONS: used to retrieve the server capabilities. On the client-side, it can be used to modify the request based on what the server can support.

Status Codes

With URLs and verbs, the client can initiate requests to the server. In return, the server responds with status codes and message payloads. The status code is important and tells the client how to interpret the server response. The HTTP spec defines certain number ranges for specific types of responses:

1xx: Informational Messages

All HTTP/1.1 clients are required to accept the Transfer-Encoding header.

This class of codes was introduced in HTTP/1.1 and is purely provisional. The server can send a Expect: 100-continue message, telling the client to continue sending the remainder of the request, or ignore if it has already sent it. HTTP/1.0 clients are supposed to ignore this header.

2xx: Successful

This tells the client that the request was successfully processed. The most common code is 200 OK. For a GET request, the server sends the resource in the message body. There are other less frequently used codes:

  • 202 Accepted: the request was accepted but may not include the resource in the response. This is useful for async processing on the server side. The server may choose to send information for monitoring.
  • 204 No Content: there is no message body in the response.
  • 205 Reset Content: indicates to the client to reset its document view.
  • 206 Partial Content: indicates that the response only contains partial content. Additional headers indicate the exact range and content expiration information.

3xx: Redirection

404 indicates that the resource is invalid and does not exist on the server.

This requires the client to take additional action. The most common use-case is to jump to a different URL in order to fetch the resource.

  • 301 Moved Permanently: the resource is now located at a new URL.
  • 303 See Other: the resource is temporarily located at a new URL. The Location response header contains the temporary URL.
  • 304 Not Modified: the server has determined that the resource has not changed and the client should use its cached copy. This relies on the fact that the client is sending ETag (Enttity Tag) information that is a hash of the content. The server compares this with its own computed ETag to check for modifications.

4xx: Client Error

These codes are used when the server thinks that the client is at fault, either by requesting an invalid resource or making a bad request. The most popular code in this class is 404 Not Found, which I think everyone will identify with. 404 indicates that the resource is invalid and does not exist on the server. The other codes in this class include:

  • 400 Bad Request: the request was malformed.
  • 401 Unauthorized: request requires authentication. The client can repeat the request with the Authorization header. If the client already included the Authorization header, then the credentials were wrong.
  • 403 Forbidden: server has denied access to the resource.
  • 405 Method Not Allowed: invalid HTTP verb used in the request line, or the server does not support that verb.
  • 409 Conflict: the server could not complete the request because the client is trying to modify a resource that is newer than the client’s timestamp. Conflicts arise mostly for PUT requests during collaborative edits on a resource.

5xx: Server Error

This class of codes are used to indicate a server failure while processing the request. The most commonly used error code is 500 Internal Server Error. The others in this class are:

  • 501 Not Implemented: the server does not yet support the requested functionality.
  • 503 Service Unavailable: this could happen if an internal system on the server has failed or the server is overloaded. Typically, the server won’t even respond and the request will timeout.

Request and Response Message Formats

So far, we’ve seen that URLs, verbs and status codes make up the fundamental pieces of an HTTP request/response pair.

Request-Response details

Let’s now look at the content of these messages. The HTTP specification states that a request or response message has the following generic structure:

message = <start-line>
          *(<message-header>)
          CRLF
          [<message-body>]

<start-line> = Request-Line | Status-Line 
<message-header> = Field-Name ':' Field-Value

It’s mandatory to place a new line between the message headers and body. The message can contain one or more headers, of which are broadly classified into:

The message body may contain the complete entity data, or it may be piecemeal if the chunked encoding (Transfer-Encoding: chunked) is used. All HTTP/1.1 clients are required to accept the Transfer-Encoding header.

General Headers

There are a few headers (general headers) that are shared by both request and response messages:

general-header = Cache-Control            
               | Connection        
               | Date              
               | Pragma            
               | Trailer           
               | Transfer-Encoding 
               | Upgrade           
               | Via               
               | Warning

We have already seen some of these headers, specifically Via and Transfer-Encoding. We will cover Cache-Control and Connection in part two.

The status code is important and tells the client how to interpret the server response.

  • Via header is used in a TRACE message and updated by all intermittent proxies and gateways
  • Pragma is considered a custom header and may be used to include implementation-specific headers. The most commonly used pragma-directive is Pragma: no-cache, which really is Cache-Control: no-cache under HTTP/1.1. This will be covered in Part 2 of the article.
  • The Date header field is used to timestamp the request/response message
  • Upgrade is used to switch protocols and allow a smooth transition to a newer protocol.
  • Transfer-Encoding is generally used to break the response into smaller parts with the Transfer-Encoding: chunked value. This is a new header in HTTP/1.1 and allows for streaming of response to the client instead of one big payload.

Entity headers

Request and Response messages may also include entity headers to provide meta-information about the the content (aka Message Body or Entity). These headers include:

entity-header  = Allow                    
               | Content-Encoding  
               | Content-Language  
               | Content-Length    
               | Content-Location  
               | Content-MD5       
               | Content-Range     
               | Content-Type      
               | Expires           
               | Last-Modified  

All of the Content- prefixed headers provide information about the structure, encoding and size of the message body. Some of these headers need to be present if the entity is part of the message.

The Expires header indicates a timestamp of whent he entity expires. Interestingly, a “never expires” entity is sent with a timestamp of one year into the future. The Last-Modified header indicates the last modification timestamp for the entity.

Custom headers can also be created and sent by the client; they will be treated as entity headers by the HTTP protocol.

This is really an extension mechanism, and some client-server implementations may choose to communicate specifically over these extension headers. Although HTTP supports custom headers, what it really looks for are the request and response headers, which we cover next.

Request Format

The request message has the same generic structure as above, except for the request line which looks like:

Request-Line = Method SP URI SP HTTP-Version CRLF
Method = "OPTIONS"
       | "HEAD"  
       | "GET"  
       | "POST"  
       | "PUT"  
       | "DELETE"  
       | "TRACE"

SP is the space separator between the tokens. HTTP-Version is specified as “HTTP/1.1″ and then followed by a new line. Thus, a typical request message might look like:

GET /articles/http-basics HTTP/1.1
Host: www.articles.com
Connection: keep-alive
Cache-Control: no-cache
Pragma: no-cache
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Note the request line followed by many request headers. The Host header is mandatory for HTTP/1.1 clients. GET requests do not have a message body, but POST requests can contain the post data in the body.

The request headers act as modifiers of the request message. The complete list of known request headers is not too long, and is provided below. Unknown headers are treated as entity-header fields.

request-header = Accept                   
               | Accept-Charset    
               | Accept-Encoding   
               | Accept-Language   
               | Authorization     
               | Expect            
               | From              
               | Host              
               | If-Match          
               | If-Modified-Since 
               | If-None-Match     
               | If-Range          
               | If-Unmodified-Since
               | Max-Forwards       
               | Proxy-Authorization
               | Range              
               | Referer            
               | TE                 
               | User-Agent

The Accept prefixed headers indicate the acceptable media-types, languages and character sets on the client. From, Host, Referer and User-Agent identify details about the client that initiated the request. The If- prefixed headers are used to make a request more conditional, and the server returns the resource only if the condition matches. Otherwise, it returns a 304 Not Modified. The condition can be based on a timestamp or an ETag (a hash of the entity).

Response Format

The response format is similar to the request message, except for the status line and headers. The status line has the following structure:

Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
  • HTTP-Version is sent as HTTP/1.1
  • The Status-Code is one of the many statuses discussed earlier.
  • The Reason-Phrase is a human-readable version of the status code.

A typical status line for a successful response might look like so:

HTTP/1.1 200 OK

The response headers are also fairly limited, and the full set is given below:

 response-header = Accept-Ranges
                 | Age
                 | ETag              
                 | Location          
                 | Proxy-Authenticate
                 | Retry-After       
                 | Server            
                 | Vary              
                 | WWW-Authenticate
  • Age is the time in seconds since the message was generated on the server.
  • ETag is the MD5 hash of the entity and used to check for modifications.
  • Location is used when sending a redirection and contains the new URL.
  • Server identifies the server generating the message.

It’s been a lot of theory upto this point, so I won’t blame you for drowsy eyes. In the next sections, we will get more practical and take a survey of the tools, frameworks and libraries.


Tools to View HTTP Traffic

There are a number of tools available to monitor HTTP communication. Here, we list some of the more popular tools.

Undoubtedly, the Chrome/Webkit inspector is a favorite amongst web developers:

Chrome Inspector

There are also web debugging proxies, like Fiddler on Windows and Charles Proxy for OSX. My colleague, Rey Bango wrote an excellent article on this topic.

Fiddler
Charles Proxy

For the command line, we have utilities like curl, tcpdump and tshark for monitoring HTTP traffic.


Using HTTP in Web Frameworks and Libraries

Now that we have looked at the request/response messages, it’s time that we learn how libraries and frameworks expose it in the form of an API. We’ll use ExpressJS for Node, Ruby on Rails, and jQuery Ajax as our examples.

ExpressJS

If you are building web servers in NodeJS, chances are high that you’ve considered ExpressJS. ExpressJS was originally inspired by a Ruby Web framework, called Sinatra. As expected, the API is also equally influenced.

Because we are dealing with a server-side framework, there are two primary tasks when dealing with HTTP messages:

  • Read URL fragments and request headers.
  • Write response headers and body

Understanding HTTP is crucial for having a clean, simple and RESTful interface between two endpoints.

ExpressJS provides a simple API for doing just that. We won’t cover the details of the API. Instead, we will provide links to the detailed documentation on ExpressJS guides. The methods in the API are self-explanatory in most cases. A sampling of the request-related API is below:

On the way out to the client, ExpressJS provides the following response API:

  • res.status: set an explicit status code.
  • res.set: set a specific response header.
  • res.send: send HTML, JSON or an octet-stream.
  • res.sendFile: transfer a file to the client.
  • res.render: render an express view template.
  • res.redirect: redirect to a different route. Express automatically adds the default redirection code of 302.

Ruby on Rails

The request and response messages are mostly the same, except for the first line and message headers.

In Rails, the ActionController and ActionDispatch modules provide the API for handling request and response messages.

ActionController provides a high level API to read the request URL, render output and redirect to a different end-point. An end-point (aka route) is handled as an action method. Most of the necessary context information inside an action-method is provided via the request, response and params objects.

  • params: gives access to the URL parameters and POST data.
  • request: contains information about the client, headers and URL.
  • response: used to set headers and status codes.
  • render: render views by expanding templates.
  • redirect_to: redirect to a different action-method or URL.

ActionDispatch provides fine-grained access to the request/response messages, via the ActionDispatch::Request and ActionDispatch::Response classes. It exposes a set of query methods to check the type of request (get?(), post?(), head?(), local?()). Request headers can be directly accessed via the request.headers() method.

On the response side, it provides methods to set cookies(), location=() and status=(). If you feel adventurous, you can also set the body=() and bypass the Rails rendering system.

jQuery Ajax

Because jQuery is primarily a client-side library, its Ajax API provides the opposite of a server-side framework. In other words, it allows you to read response messages and modify request messages. jQuery exposes a simple API via jQuery.ajax(settings):

By passing a settings object with the beforeSend callback, we can modify the request headers. The callback receives the jqXHR (jQuery XMLHttpRequest) object that exposes a method, called setRequestHeader() to set headers.

$.ajax({
    url: 'http://www.articles.com/latest',
    type: 'GET',
    beforeSend: function (jqXHR) {
      jqXHR.setRequestHeader('Accepts-Language', 'en-US,en');
    }
  });
  • The jqXHR object can also be used to read the response headers with the jqXHR.getResponseHeader().
  • If you want to take specific actions for various status codes, you can use the statusCode callback:
$.ajax({
  statusCode: {
    404: function() {
      alert("page not found");
    }
  }
});

Summary

So that sums up our quick tour of the HTTP protocol.

We reviewed URL structure, verbs and status codes: the three pillars of HTTP communication.

The request and response messages are mostly the same, except for the first line and message headers. Finally, we reviewed how you can modify the request and response headers in web frameworks and libraries.

Understanding HTTP is crucial for having a clean, simple, and RESTful interface between two endpoints. On a larger scale, it also helps when designing your network infrastructure and providing a great experience to your end users.

In part two, we’ll review connection handling, authentication and caching! See you then.


References

11 Apr 04:11

Photo



11 Apr 04:09

Random image from fukung.net: 1186075512346.jpg

11 Apr 04:09

perfectlypoly: Her reaction!

by siddman


perfectlypoly:

Her reaction!

11 Apr 04:08

Ellen Stratton



Ellen Stratton

11 Apr 04:08

Masked, 1940s.

by lacontessa


Masked, 1940s.

11 Apr 04:07

Girl #3629

by GHM
See the Answer [Here]
Boobs Pic [1]
11 Apr 04:07

girlsiwoulddate: Want to see more hot girls? Come on over to...

by siddman


girlsiwoulddate:

Want to see more hot girls? Come on over to http://girlsiwoulddate.tumblr.com/

11 Apr 04:07

Photo



11 Apr 04:07

Photo



11 Apr 04:07

Photo



11 Apr 04:06

source

11 Apr 04:06

source

11 Apr 04:06

Photo



11 Apr 04:05

Thanks for submission, cs-mara Fuck Yeah Nice Boobs/Ass Submission   Boobs/Ass Ask Boobs/Ass mail:...

image

Thanks for submission, cs-mara

Fuck Yeah Nice Boobs/Ass

Submission   Boobs/Ass

Ask Boobs/Ass

mail: boobs2012@live.com

11 Apr 04:04

Photo



11 Apr 04:04

Photo



11 Apr 04:03

Photo