Category talk:J: Difference between revisions

→‎GeSHi Highlighter for J: Sanitation and execution.
(→‎GeSHi Highlighter for J: I could write a CGI script, but would it actually do any good?)
(→‎GeSHi Highlighter for J: Sanitation and execution.)
Line 59:
While we're on the subject, I would be interested in a programmatic approach to generating these files. The structure of the GeSHi language files is very, very simple; It's little more than a PHP-native serialization of a few regex setrings and symbol constants. If GeSHi supported JSON for that structure, it would be trivial to import language highlighting as a JSON file, and such a file would be trivial to generate programmatically. But GeSHi doesn't, so I'm stuck with PHP files until I (or someone else) writes a JSON->PHP conversion. That said, a number of folks have sent me language files, and so are familiar with its structure. Would anyone be interested in writing a webform-driven language-file ''generator''? For security's sake, I can't automate the import of the generated files, but it would greatly open up the process of generating the files, and perhaps make maintenance easier. I'd give it a subdomain such as geshi.rosettacode.org. --[[User:Short Circuit|Michael Mol]] 03:33, 10 November 2009 (UTC)
:Hm, I think I could write a CGI script (in Perl 5) to let folks fill out a form, perhaps with some minimal markup, to create a language definition. With careful use of resource limits and sanitization of the input, we could even let the user test the new definition without a local copy of PHP. But I'm not sure how using such a Web application would actually be easier or quicker than writing the literal definition. I mean, one of the things that makes writing new definitions so easy is that you can use a preexisting definition of a similar language as a starting point. Can you describe in more detail the interface you're imagining? —[[User:Underscore|Underscore]] ([[User talk:Underscore|Talk]]) 13:23, 10 November 2009 (UTC)
:: It's been ages since I've had a chance to look at the structure, but an editable list for each of the list-type members would be good. I don't know what to do about the regex-driven ones; A wizard would be sweet, but I don't know that that would be possible.
:: I could provide a MySQL backend for persistence That would make it plausible to tweak existing support.
:: Not sure how far to go as far as sanitation and execution. The more secure I try make it, the more time I'll need to spend responding to problems. --[[User:Short Circuit|Michael Mol]] 16:09, 10 November 2009 (UTC)