Programmable Smart Radio Environments: From Theory to Hardware Implementation