This is the simplest implimentation of the classical nearest-neighbours Ising model on the (hyper-)rectangular lattice I could think of. Using Julia is especially nice given the Base.Cartesian module, allowing easy implimentation in arbitrary dimensions.
100 lines of code to get the energy & magnetization for D-dimensional Ising model with speeds comparable to C++.
Also Wolff cluster updates are implimented (extra 20 loc).