Spontaneous pattern formation by self-assembly is of long-standing and continuing interest not only for its aesthetic appeal, but also for its fundamental and technological relevance. So far, the study of self-organization processes has mainly focused on static structures, but dynamic systems--those that develop order only when dissipating energy--are of particular interest for studying complex behaviour. Here we describe the formation of dynamic patterns of millimetre-sized magnetic disks at a liquid-air interface, subject to a magnetic field produced by a rotating permanent magnet. The disks spin around their axes with angular frequency equal to that of the magnet, and are attracted towards its axis of rotation while repelling each other. This repulsive hydrodynamic interaction is due to fluid motion associated with spinning; the interplay between attractive and repulsive interactions leads to the formation of patterns exhibiting various types of ordering, some of which are entirely new. This versatile system should lead to a better understanding of dynamic self-assembly, while providing a test-bed for stability theories of interacting point vortices and vortex patches.