While running javascript code from within vugen is nice, is it really necessary here to set up an entire javascript execution engine just for a single call to a commonly used C library function?
Think about it - how is this going to perform in the real world, compared to the two invocations of rand() done by the y_rand() function?
( https://github.com/randakar/y-lib/blob/master/y_core.c#L144 is where that lives at right now, btw. )