Calculus, in particular the differentiation and integration of integral forms and differential equations, makes perfect sense for polynomial and algebraic functions, even when regarded ``modulo p''. Hodge theory, on the other hand, uses harmonic analysis and is profoundly analytic. Nevertheless, it is possible to exploit purely characteristic p phenomena, which one might at first regard as bizarre pathologies, to construct analogs of Hodge theory in characteristic p. In some cases these analogies are strong enough to imply classical analytic results. I will attempt to explain recent joint work with V. Vologodsky on ``nonabelian Hodge theory'' in characteristic p and its relationship to a recent theorem of Barranikov and Kontsevich concerning differential equations with irregular singular points.