implement ~a.b for lua