SwagColoredKitteh / shiny-pancake

A renderer that takes commands from standard input. Though, it turned more into a kind of replay viewer.
GNU General Public License v3.0
6 stars 1 forks source link

Macros/preprocessors as separate commands. #15

Open SwagColoredKitteh opened 8 years ago

SwagColoredKitteh commented 8 years ago

Instead of implementing macros into shiny-pancake itself, we could define a command #PIPE <COMMAND> that tells shiny-pancake to execute the command and pipe everything through it, then use the output of that command. This would allow macros to be implemented in any language.

One very bad concequence, though, may be that anyone malicious could use this to execute arbitrary code on someone's system. So might want to force all of these to be manually whitelisted with a configuration file or command-line parameter.

MarcosCosmos commented 8 years ago

Another issue is that it means multiple passes of the same string so performance might be problematic.

SwagColoredKitteh commented 8 years ago

It might be a solution to make built-in preprocessors that act on the individual command datastructures and to integrate the most important preprocessors.

SwagColoredKitteh commented 8 years ago

Another drawback of this would be that you might depend on external scripts in arbitrary programming languages, which could hurt portability, might be better to export the already-translated file.