Polynomial Long Division
J, 94

f=:&gt;@(0&amp;{)
d=:0{[%~0{[:f]
D=:4 :'x((1}.([:f])-((#@]{.[)f)*d);([:&gt;1{]),d)^:(&gt;:((#f y)-(#x)))y'


eg.

(1 0 _5) D (12 _5 3 _1;'')
63 _26 | 12  _5


Explanation of some snippets, given that a: (12 -5 3 -1) and b: (1 0 -5)

length of a:

#a
4


make a and b same order by appending zeroes to b:

(#a) {. b
1 0 -5 0


divide higher powers (first elements) of a, b:

(0{a) % (0{b)
12


multiply b by that and subtract it from a:

a - 12*b
12 0 _60


repeat n times b = f(a,b):

a f^:n b