@parchment experimental extensions

Hi all, I’ve begun working on a new experimental opcode for the Z-Machine and Glulx. Support currently exists for Gnusto (get the latest copy from Github), but not Quixe, yet. It shouldn’t be hard to add support when there’s demand for it. (Now whether Zarf would be interested in including it in the default Quixe I don’t know.) All you need to do is drop it in and replace it (compress it if you want too.)

@parchment allows you to execute functions which might do any number of things. There is one currently: to switch on a raw eval() mode. In this mode anything you print will be buffered and then when you switch the mode off again it will be run through Javascript’s eval(), allowing you to execute arbitrary JS code. Because you can literally execute anything you must add PARCHMENT_SECURITY_OVERRIDE=1; to your copy of parchment.html so that only those interpreters which specifically allow you to execute any code will do so. It won’t work on the official Parchment for example.

The spec is at my IF site, and the best way to see how to do it is through the test .inf.


I’ve made note of this URL and this is amazing that you did that, Dannii, thank you so much!

Now I’m trying to come up with smaller ways to use my idea so I can test this for my purpose sooner rather than later…

I would only use it coupled with my own website anyway so it doesn’t seem like a big deal that it doesn’t run on official Parchment.

Thanks again! 8)