python + spidermonkey + citeproc-js

I’ve had problems with non-Latin characters and the
python-spidermonkey bridge. The interpreter seemed always to run in
the C locale, regardless of the settings in the shell, and regardless
of configuration flags set on the JSON strings passed across the
bridge. Development of the bridge module seemed to have come to a
standstill, so I was … stuck.

I recently discovered a newer version of python-spidermonkey that is
under active development:

An install and quick test this morning shows that it handles locales
correctly, so we can eventually look forward to full testing of
citeproc-js in Spidermonkey, and hurray for that. There are some
differences in the API of the new bridge, and some limitations (no
print() command in the JS interpreter) that will take some time to
work through, but it’s definitely going to work.

When I get to it, I’ll merge the three separate runner scripts that
are currently rattling around in the archive into one python script
with a proper getopt interface and runtime help. “When I get to it”
will be awhile, but this will be coming.

Frank

You might consider splitting out the rpc stuff into a separate repo?

Just a thought.

Bruce

I’ve had problems with non-Latin characters and the
python-spidermonkey bridge. The interpreter seemed always to run in
the C locale, regardless of the settings in the shell, and regardless
of configuration flags set on the JSON strings passed across the
bridge. Development of the bridge module seemed to have come to a
standstill, so I was … stuck.

I recently discovered a newer version of python-spidermonkey that is
under active development:

GitHub - davisp/python-spidermonkey: Python/JavaScript bridge module, making use of Mozilla's spidermonkey JavaScript implementation.

An install and quick test this morning shows that it handles locales
correctly, so we can eventually look forward to full testing of
citeproc-js in Spidermonkey, and hurray for that. There are some
differences in the API of the new bridge, and some limitations (no
print() command in the JS interpreter) that will take some time to
work through, but it’s definitely going to work.

Things worked out very well indeed with Paul Davis’
python-spidermonkey module. All tests can now be run in Spidermonkey,
including the internal ones, using a new ./test.py script in the repo.
Running them requires installation of the bridge. A link to the site
and instructions is in the citeproc-js README.

Enjoy!
FB

When I get to it, I’ll merge the three separate runner scripts that
are currently rattling around in the archive into one python script
with a proper getopt interface and runtime help. “When I get to it”
will be awhile, but this will be coming.

You might consider splitting out the rpc stuff into a separate repo?

Just a thought.

A very welcome idea. The rpc kit is currently broken, but has served
its purpose for citeproc-js development, so I’ve moved the source out
to a separate bitbucket repo. I don’t plan to do anything further
with it; it’s up for grabs if anyone want to play with it.

http://bitbucket.org/fbennett/citeproc-rpc/

Frank