On Mon, Oct 23, 2000 at 02:51:40PM -0400, Dan Sugalski wrote:
> >     PLEASE LET'S NOT GO THAT WAY
> Awwww... you're no fun! :)

I am, but nurse says I'm not allowed to write INTERCAL any more.

> That is one of the scenarios. There are some issues with it for a project 
> like this--spitting out binaries directly requires rather more carnal 
> knowledge of the OS/processor pair than something like an interpreter or 
> C-code-spitter does.

Right, right, but once we've got a nice interface to the op tree - which may
be something like B::, or maybe a low-level C API - we can, and probably
should, encourage people to play with it. 

A C-code-spitter is another kettle of fish altogether; as you know, the
current things like B::C and B::CC spit out a state dump of the op-tree and
then an interpreter. This is cool enough, but it isn't what people want. What
they want is a translator, rather than a compiler, and this is slightly more
tricky. However, due to Nat's terrible influence, he suggested to me at
YAPC::Europe that someone should try writing one.[1] I'm working on something
I'm calling B::Translate for Perl 5 which does just this; it's basically a
variant of B::Deparse which spits out C instead. It's a really tricky job,
which reminds me of all the things I dislike about C, but it's getting there,
slowly. 

[1] He also mentioned that that's the sort of thing ActiveState should pay
someone to do, which I mention on the off-chance someone interesting is
listening. :)

-- 
... though the Japanese must be the most stupid people... I'm sure I
read somewhere that Tokyo has the densest population in the world...
    - Gid Holyoake, sdm.

Reply via email to