What are the signs for work done by (on?) a gas during isothermal reversible compression?
The easiest way to remember the sign conventions is to think of the gas particles as "wanting" to get away from each other. To reduce the volume of the gas, you have to do work on the gas - the surroundings are doing the work. In chemistry we always take the point of view of the system. If we do work on the system, we add energy to it, and therefore, the sign of work is positive.

This means the opposite is true as well. When the volume of the system increases, the sign of the work term must be negative - the system is losing energy and doing work on the surroundings.

For your equations, all of this holds for the first one:

$$-nRT\ln  (Vf/Vi)$$

This is because a decrease in volume will give you a fraction in the $\rm{ln}$ term, which leads to a negative sign. The leading negative sign reverses that. The result is that any compression will have a positive work term, and any expansion will have a negative work term.

You can see how the correct sign is a result of the derivation in the wikipedia article.