lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, Apr 23, 2012 at 07:25, Robert Klemme <shortcutter@googlemail.com> wrote:
> On Mon, Apr 23, 2012 at 1:24 PM, Rena <hyperhacker@gmail.com> wrote:
>> On Mon, Apr 23, 2012 at 05:19, sergei karhof <karhof21@gmail.com> wrote:
>>> On Mon, Apr 23, 2012 at 5:25 AM, Alessandro Delgado
>>> <adelgado1313@gmail.com> wrote:
>>>
>>>> What I'd /really/ like would be a fully Lua-based operating system. Sure,
>>>> some some C or assembler here and there, but the least possible.
>
>> I've always wanted to see an "OS" written in Lua, which in reality
>
> It's interesting to see this type of discussion: over there in the
> Ruby community it came (or: comes) up from time to time, sometimes in
> the variant of wanting a Ruby shell (note: there is already IRB, pry
> and rush).  Apparently some fans of a scripting language are so
> enthralled by the respective language that they deem it desirable to
> extend that language's usage to all aspects of a shell / an operating
> system.  These things rarely come into existence (or fill a niche
> only) so globally the communities do not seem to agree that it's such
> a good idea, because resources invested in these kinds of projects
> seem rather low.  Maybe it is, maybe it isn't - I don't want to judge.
>  Maybe the phenomenon is more interesting on the human level, i.e.
> what does it tells us about us that these kinds of things come up from
> time to time?

To me, the really interesting idea isn't "what if we wrote a whole OS
in Lua", but "what if we took the nice scriptablility that Lua offers,
and extended it to an entire OS". Any scripting language could
probably do the job; I just feel Lua is one of the best. :-)

Already, I use Lua to script my text editor (TextAdept) and window
manager (Awesome) to make them work just how I like. It's amazingly
powerful being able to define the exact behaviours I want without
having to hack and recompile messy C code[1]. It's been a great
experience and I find myself wishing I could script all my other
applications. Now imagine everything were already written in Lua and
easily extensible and scriptable... some amazing things you could do.
There's also lots of potential in having apps interact with eachother
via sockets.

(Fun fact: several Nintendo emulators now have Lua scripting
capabilities, allowing you to debug or extend games in a lot of
interesting ways. I added this feature to Mupen64Plus myself, though I
don't think it's yet made its way into a release build...)

[1](In my experience trying to add features to a program written in C
can be quite difficult as you have to do a lot of analysis to figure
out just how the program works to add the feature correctly, and might
even have to do some restructuring to make it work. Whereas
Lua-scriptable apps provide nice hooks and documentation, so you can
just write your own function in ~/.config/somewhere and not have to
touch the source code at all. In other words, it's easier when the
program is designed for it. (Who'd have guessed? :-)))

I dream of a day where I can program my computer to behave exactly how
I want, right down to individual apps, without having to reimplement
everything myself...

-- 
Sent from my toaster.