Let X a curve over F_q and G a semi-simple simply-connected group. The initial observation is that the conjecture of Weil's which says that the volume of the adelic quotient of G with respect to the Tamagawa measure equals 1, is equivalent to the Atiyah-Bott formula for the cohomology of the moduli space Bun_G(X) of principal G-bundles on X. The latter formula makes sense over an arbitrary ground field and says that H^*(BunG(X)) is given by the chiral homology of the commutative chiral algebra corresponding to H^*(BG), where BG is the classifying space of G. When the ground field is C, the Atiyah-Bott formula can be easily proved by considerations from differential geometry, when we think of G-bundles as connections on the trivial bundle modulo gauge transformations. In algebraic geometry, we will give an alternative proof by approximating Bun_G(X) by means of the multi-point version of the affine Grassmannian of G using a recent result on the contractibility of the space of rational maps from X to G. (This is Joint work with J. Lurie.)