[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua-based OS (was: Safe Lua)
- From: HyperHacker <hyperhacker@...>
- Date: Wed, 3 Aug 2011 12:33:52 -0600
On Wed, Aug 3, 2011 at 12:20, Justin Cormack
> On 3 Aug 2011, at 16:31, Sean Conner <email@example.com> wrote:
>> It was thus said that the Great HyperHacker once stated:
>>> A much easier method though might be to hack a Linux kernel. And no
>>> matter which method you choose, proprietary graphic drivers present a
>> Even easier would be a Linux system with a custom init program (process
>> 1) written in Lua.
> I am working on that, just for fun, using luajit.
I actually think an OS written mostly in Lua could be a very practical
and useful idea - just not on the PC. Think of smartphones, tablets,
and so forth. Android is mostly Java, with all applications being pure
Java - why can't similar be done with Lua? I suspect a phone OS
written in Lua would be much like Android, but simpler (Android's API
is horrendously complicated) and leaner (for having Lua instead of
I don't want to say "entirely", because of course modern CPUs
unfortunately can't boot into Lua code :) but all you'd need to do in
C/assembly is enough to create a Lua state and give it some functions
it can use to interface with the hardware directly, allocate blocks of
memory, and create other Lua states, and load a "kernel" script
(likely precompiled bytecode) into it. From there it can take care of
loading applications and modules, each in their own Lua state having
whatever functions are appropriate. (e.g. "userland" applications
wouldn't have the raw hardware I/O functions provided.)
Of course even here, using a Linux kernel is still an option as well.
Sent from my toaster.