Text this: Nonsmooth Modeling and Simulation for Switched Circuits