2 ms·
fun yak shaving exercise. is there a practical reason why you might want to do this?
by pplante 13y ago
fun yak shaving exercise. is there a practical reason why you might want to do this?
- daenz 13y agoI once wanted to control the generation of Python code from selenium tests. The selenium UI does this with javascript (it has javascript code that can convert a selenium test to Python). Instead of rewriting their whole conversion library from js to Python, I used spidermonkey to just run the javascript. The end result was, I had a Python module that could take a recorded selenium test and output Python code to run that test. The only dependency was spidermonkey.
- philsnow 13y agoI wrote a chess playing service to teach myself app engine a while back, and I wanted to verify valid moves on the client before sending them to the server, as well as verify them on server. I didn't want to write that logic in both javascript (for client) and python / go (for server) and create a suite of tests to attempt to verify that the server and client logic was equivalent. I looked around for ways to either run (minimal) python functions in javascript or else run (minimal) javascript functions in python, but at the time didn't come up with anything workable (within the constraints of using GAE). * no classes, objects, function attributes, prototypes, etc etc necessary, just chess move validity checking