Let's move the Mars rover!
Ruby ≥ 2.0, 101

E,N,W,S=*0..3
x,y,i=eval"a="+gets
gets.bytes{|c|x+=c%2*1i**i=i+1-c&amp;3}
$&gt;&lt;&lt;[(x+y.i).rect,"NWSE"[i]]*?,


This solution can be tested here: https://ideone.com/C4PLdE

Note that the solution linked on ideone is one character longer (1.i instead of 1i in line 3). The reason for this is that ideone only supports Ruby 1.9, which doesn't allow the short-hand syntax for complex literals.