a mod -b (Maple disagrees with Wolfram) According to my professor (and maple)

a mod -b such as 1000%(-9)

Is an invalid question that cannot be answered, since c>0,
he claimed also that Maple will respond with "Error, invalid mod".
However, Wolfram Alpha will respond with -8, a negative remainder.
Yesterday I mailed Wolfram support about this, and the reply was  (paraphrasing):

Our internal engineer team has concluded that the output of this question is correct.    

Meaning there is no error in 1000%(-9)=-8
I'm confused.
 A: This is a matter of convention. Usually the binary mod  you write is "the remainder" (in a specified interval) when doing Euclidean division.
For integers (no assumption on positivity) $n,m$ with $m \neq 0$ I tend to define Euclidean division so that $n = q m +r$ with integers $q,r$ and $0 \le r \le |m|-1$, so the remainder is always positive.
Then $1000 \bmod -9$ makes perfect sense yet it would be $1$ not $-8$. 
Others  prefer different conventions, namely they take the remainder "between"  $m$ and $0$ so it is positive (or zero) for positive $m$ and negative for negative (or zero) for negative $m$. This is what Wolfram|Alpha does. 
Still others will make the sign of the remainder depend on the number $n$ to be divided.  
Mainly, this is a consequence how one want integral division to behave: should the integral quotient be the floor, the truncation or still something else of the exact quotient. A nice overview is given on the Wikipedia page Modulo operation, as pointed out by peterwhy.
Personally I prefer the first as in a more general context modulo is considered with respect to ideals and the ideal generated by $b$ and $-b$ are the same, so I do not want to have different representatives of the classes. 
But there are also good reasons for the other conventions; especially, it can be more reasonable in a computational context.  
To say it is an invalid expression is in my opinion not a good idea. Somebody might not see a need to define or implement it, but there are perfectly valid ways to make sense of it. 
