[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Crazy idea: compiling C to Lua
- From: Rena <hyperhacker@...>
- Date: Wed, 13 Mar 2013 07:31:31 -0400
Just had an interesting thought: could you write a compiler in Lua,
that compiles C into Lua bytecode or source code?
I think you'd need a C module (compiled to native code) that provides
Lua the ability to do some of the things C can do, such as call
syscalls and allocate raw memory blocks (char*s), but once you have
that framework in place, it could be possible to compile C programs
into Lua code, that would then only rely on Lua and that "framework"
module.
Or have I finally gone off the deep end?
--
Sent from my Game Boy.