Programming environment for editing various of my live apps without restarting them.
on.save_settings = function()
	if App_name == nil then return end  -- we never connected to an app; save no settings
	if Settings == nil then
		Settings = {}  -- just for initial schema migration
	end
	for key,node in pairs(Definitions) do
		if type(key) == 'number' then
			-- can't save the array side for now because of a limitation in the 
			Definitions[key] = nil
		else
			node.data = nil  -- don't save uncommitted data for now
			node.show_cursor = nil
			node.editor = nil  -- TODO: check for hierarchy
		end
	end
	print('saving Viewport to config', Viewport.x, Viewport.y, Viewport.zoom)
	Settings[App_name] = {
		viewport=Viewport,
		definitions=Definitions,
	}
	return Settings
end