I will discuss some recent work with Mat Bullimore, Justin Hilburn, and Davide Gaiotto on moduli spaces and boundary conditions in 3d gauge theories with N=4 supersymmetry. Over the past ten years, many aspects of geometric representation theory (including the geometric Langlands program) have found a home in such theories and their 2d and 4d cousins. Using the 3d theories, we propose a physical underpinning for "symplectic duality" of generalized categories O (as described by Braden, Licata, Proudfoot, and Webster). We also generalize work of Braverman, Feigin, Rybnikov, and Finkelberg on a finite version of the AGT conjecture.