oh, thank youThe light parameters are 4-dimensional vectors, not 3-dimensional vectors as in your code. OpenGL is currently reading the fourth component from outside the corresponding arrays.
that helped, and now it works fine if i set position's w component to 1 (so that the light propagates in all directions), as you can see:

but if i put w to 0 to get a directional light, this is what i get:

the code now looks like this
i guess i'm still missing something :/