|I just added an existing scheme json parser to anarki (http://www.lshift.net/blog/2005/08/22/json-for-mzscheme-and-a-portable-packrat-parsing-combinator-library). It seems to be over 20x faster than the pure-arc version shown in this forum. Not a big deal for most uses, but I've been importing a couple KB of json.|
The parser needed some changes for lifting into arc: it returns arc literals for true/false/null (false and null both return nil). Let me know if you spot any other bugs.
The process raised several issues:
a) anarki needs a process for loading scheme libraries. The best I could do was add to the end of ac.scm. Did I miss something? I think the ideal solution would be to specify scheme libraries on the arc commandline to be loaded on startup.
b) Is there a way to update the mzscheme lib load path from within scheme? The best I could find was the PLTCOLLECTS variable.
c) Setting the PLTCOLLECTS variable is contextual, so the best I could do was to comment out the load to json with instructions. So I'm pretty sure I haven't broken anarki for everyone :o)
And oh, does github usually take a while to reflect new pushes on the website?
The whole process seems hacky to me, so feel free to tell me off if this was a bad idea.