[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua idea
- From: Rena <hyperhacker@...>
- Date: Mon, 9 Apr 2012 00:03:37 -0600
On Sun, Apr 8, 2012 at 22:15, Javier Guerra Giraldez <javier@guerrag.com> wrote:
> On Sun, Apr 8, 2012 at 11:11 PM, Javier Guerra Giraldez
> <javier@guerrag.com> wrote:
>> what _can_ be done (and i think already done by some people) is to use
>> some filesystem-like library to access the contents of a zipfile as a
>> read-only filesystem, then add that filesystem to the apropriate
>> paths.
>
> ah, forgot to note that the embedded code doesn't have to be bytecode,
> lua sources are safer, more portable, and more compressible.
>
> compiled C code can be included too, if there's no need to be
> portable. C sources could be used and compiled on the fly with TCC,
> but that's unlikely to be enough to get really portable.
>
> --
> Javier
>
This brings to mind an idea I've been kicking around for a while, of a
simple C-like language that can be compiled into shared object/library
files, using just a Lua script instead of needing a C compiler. Say
you want to write a binding to your favourite C/C++ library; instead
of writing the binding in C, you can write it in this simple language
(a C subset with extensions specifically for the purpose?) that your
app can compile by just calling a Lua script, eliminating the need to
even ship binaries.
Of course from there the idea quickly morphs into "what if we didn't
need to write a library at all, and could just call the functions from
Lua directly", which is what Alien and such do... need to look into
those I guess.
--
Sent from my toaster.