Hi, Im a complete newbie to IO and I have to say Im already very, very
impressed. I only found out about the language a couple of days ago
and Im already writing apps with it.
I've played around with lua as well and couldn't help comparing both
languages (both languages seem to fit the same niche). I think its
fair to say that IO's compiled vm will probably be larger than lua's.
My question is how much larger (just for the base version with just
the socket addon).
I've tried to do a few searches on this but just get info on the
number of lines that sonstitute the VM. The main reason Im asking is
that I am thinking of writing an application platform for embedded
devices i.e wireless routers and had initially settled on lua for the
job but when I came across IO I couldn't help but be impressed by its
simplicity. The problem is just that I cant seem to get any figures on
how small a compiled (basic vm with IO socket) can be.
> I've played around with lua as well and couldn't help comparing both
> languages (both languages seem to fit the same niche). I think its
> fair to say that IO's compiled vm will probably be larger than lua's.
> My question is how much larger (just for the base version with just
> the socket addon).
I don't see any reason why it would be larger, even if you don't count Lua's bytecode compiler and just count the interpreter itself. I'm sure you could reimplement Io and have a smaller binary for the vm than Lua has by default. There's nothing about Io that would make it difficult to implement.
> I've played around with lua as well and couldn';t help comparing both
> languages (both languages seem to fit the same niche). I think its
> fair to say that IO's compiled vm will probably be larger than lua's.
> My question is how much larger (just for the base version with just
> the socket addon).
I don't see any reason why it would be larger, even if you don't count Lua's bytecode compiler and just count the interpreter itself. I'm sure you could reimplement Io and have a smaller binary for the vm than Lua has by default. There's nothing about Io that would make it difficult to implement.
On 7/30/07, Abraham Alaka < chokosabe%40gmail.com">chokosabegmail.com> wrote:
>
> Thanks for the reply.
>
> I suspected that this might be the case.
>
> I came across a file Io2c.c in Io/libs/iovm/tools/io2c.c
>
> Im guessing its for converting io files to C. Is it working?
io2c.c is used to embed Io code in C allowing the resulting code to be
compiled and linked with the Io executable. The Io vm then executes
this at startup as a sort of prelude library. If you browse under
libs/iovm/io you will notice a large portion of Io features that are
implemented in Io itself. To see how that is accomplished, check the
make rule in libs/iovm/Makefile.local.
Brian.
P.S. This is from the last time I had a working compile but I don't
think it has changed since then from what I can tell. Now if only I
could fix coroutine support on my machine...