Pyfour: A High-level Language for Programmable Devices