On Mon Nov 08 19:57:18 2004, coke wrote: > I was talking with Dan on IRC about what we're going to do as a > replacement for macros. Talk turned to implementing a registered > 'compile'r for "pre parsed PIR". > > For this to be useful, of course, we'd need to be able to run it from > the command line. As dan said: > > <@Dan> Sure. Add it as a todo, since that's what we should do. The > bytecode loading system should autodetect based on > extension or > magic info, or with a -switch of some sort > > Which I take to mean, something like: > > ./parrot foo.pimc #parsed imc - automatic detection > ./parrot foo.pbc #magic info in pre-compiled bytecode > ./parrot -lang=ppir foo.imc #file contains parsed imc with a sneaky > filename. > > The primary issue I see is the ability to register official compilers > in your parrot build. For example, I provide a tcl compiler - but we'd > need a way for > > ./parrot foo.tcl > > to be able to find tcl's compiler. (or tell you the reason why.) > > This would also eventually let me do something evil, like: > > % ln /usr/local/bin/parrot /usr/local/bin/tclsh > % cat foo.tcl > #/usr/local/bin/tclsh > puts "whee!" > % chmod a+x foo.tcl > % ./foo.tcl > whee! > %
I think the need for something like this is obviated by the shiny pbc_to_exe. Now, if I want to run tcl scripts with parrot, I can just make a tclsh binary. The only thing I can't do with pbc_to_exe that I could do with this sceme is pass parameters to affect parrot's behavior; but if we want to be able to do that, that's a different ticket. Rejecting ticket.