Lua OS

classic Classic list List threaded Threaded
67 messages Options
1234
Reply | Threaded
Open this post in threaded view
|

Lua OS

sergei karhof
It looks like the Lua OS guy is back on the beat, with his operating
system. I just saw an article on osnews.com
I wonder if, after all, some good for Lua may come out of it, seriously.

Reply | Threaded
Open this post in threaded view
|

Re: Lua OS

云帆江
actually i hope they could use lua to instead python in gnome

On Mon, Apr 23, 2012 at 04:58:30AM +0200, sergei karhof wrote:
> It looks like the Lua OS guy is back on the beat, with his operating
> system. I just saw an article on osnews.com
> I wonder if, after all, some good for Lua may come out of it, seriously.

Reply | Threaded
Open this post in threaded view
|

Re: Lua OS

Alessandro Delgado
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.

Taking something like eLua booting on bare x86 and make it up from there.

Unfortunately, I cannot help but look at Lua OS as wanting to be just, as someone put it on OSNews, a "Linux distribution that is awesome and uses Lua for a lot of stuff."

Time will tell.


att.

--ad.ad
Reply | Threaded
Open this post in threaded view
|

Re: Lua OS

sergei karhof
On Mon, Apr 23, 2012 at 5:25 AM, Alessandro Delgado
<[hidden email]> 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.
>
> Taking something like eLua booting on bare x86 and make it up from there.
>
> Unfortunately, I cannot help but look at Lua OS as wanting to be just, as
> someone put it on OSNews, a "Linux distribution that is awesome and uses Lua
> for a lot of stuff."

Sure, but writing an OS from scratch is a BIIIIIIIG  project, and I am
not sure that even the whole Lua community put together would have the
resources to undertake it. There have been cases of operating systems
written in one's pet language, like Oberon-2, but that was another
story, because they had the institutional support (and probably the
funding) of a big institution like ETH (Switzerland).
Realistically, in the case of Lua I doubt that enough people could
even be signed up for the project to take off. Unfortunately, the
recent history of operating systems is littered with corpses...

What I would really like to see is an operating environment (whatever
the kernel) which has full access to the API of the OS, including
GUIs, system functions, etc.

I had high hopes for Lua in the Haiku/OpenBeOS OS, but unfortunately
the guy who was working on the Lua bindings for the Haiku API has
recently relented his efforts, so we are still waiting for the
bindings. Anyone willing to take up the challenge? It would be a
matter of creating Lua bindings for the API's C++ classes...

Another disappointment was when the NetBSD project dropped the idea of
including Lua in their kernel, because the guy who was working on it
quit the project. Too bad.

Sergei

Reply | Threaded
Open this post in threaded view
|

Re: Lua OS

Mihamina Rakotomandimby
On 04/23/2012 02:19 PM, sergei karhof wrote:
> Sure, but writing an OS from scratch is a BIIIIIIIG  project,

<joke>
Reading again how Linux began, I dont agree with that :-)
AAAAAABBBBBABABAB
</>
--
RMA.

Reply | Threaded
Open this post in threaded view
|

Re: Lua OS

BogdanM
In reply to this post by Alessandro Delgado
On Mon, Apr 23, 2012 at 6:25 AM, Alessandro Delgado
<[hidden email]> 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.
>
> Taking something like eLua booting on bare x86 and make it up from there.

eLua already boots on bare x86. But that doesn't mean anything in real
life (besides looking spectacular :) ). I've thought about this idea
often, from different angles, and the conclusion is always the same:
you'd need a huge amount of work/man power to make eLua aware of all
the hardware out there. I simply don't see this happening. IMO, the
best solution to this is something like Lunatik. Take an already
existing market proven open source OS (Linux/xBSD for example),
integrate Lua in the kernel, then write as much as possible in Lua,
while keeping the tremendous driver base you'd find in the OS. This is
a very complex project in itself, but much more likely to succeed as a
"let's write almost everything in Lua" approach.

Best,
Bogdan

>
> Unfortunately, I cannot help but look at Lua OS as wanting to be just, as
> someone put it on OSNews, a "Linux distribution that is awesome and uses Lua
> for a lot of stuff."
>
> Time will tell.
>
>
> att.
>
> --ad.ad

Reply | Threaded
Open this post in threaded view
|

Re: Lua OS

Rena
In reply to this post by sergei karhof
On Mon, Apr 23, 2012 at 05:19, sergei karhof <[hidden email]> wrote:

> On Mon, Apr 23, 2012 at 5:25 AM, Alessandro Delgado
> <[hidden email]> 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.
>>
>> Taking something like eLua booting on bare x86 and make it up from there.
>>
>> Unfortunately, I cannot help but look at Lua OS as wanting to be just, as
>> someone put it on OSNews, a "Linux distribution that is awesome and uses Lua
>> for a lot of stuff."
>
> Sure, but writing an OS from scratch is a BIIIIIIIG  project, and I am
> not sure that even the whole Lua community put together would have the
> resources to undertake it. There have been cases of operating systems
> written in one's pet language, like Oberon-2, but that was another
> story, because they had the institutional support (and probably the
> funding) of a big institution like ETH (Switzerland).
> Realistically, in the case of Lua I doubt that enough people could
> even be signed up for the project to take off. Unfortunately, the
> recent history of operating systems is littered with corpses...
>
> What I would really like to see is an operating environment (whatever
> the kernel) which has full access to the API of the OS, including
> GUIs, system functions, etc.
>
> I had high hopes for Lua in the Haiku/OpenBeOS OS, but unfortunately
> the guy who was working on the Lua bindings for the Haiku API has
> recently relented his efforts, so we are still waiting for the
> bindings. Anyone willing to take up the challenge? It would be a
> matter of creating Lua bindings for the API's C++ classes...
>
> Another disappointment was when the NetBSD project dropped the idea of
> including Lua in their kernel, because the guy who was working on it
> quit the project. Too bad.
>
> Sergei
>

I've always wanted to see an "OS" written in Lua, which in reality
might just be a Linux kernel with a Lua interface and apps written in
Lua. Think something like Android but better. I'm often annoyed by the
difficulty of scripting what should be simple tasks with a modern UI.

Writing an actual OS kernel in Lua would be an interesting project,
and certainly not impossible. You'd need some C glue code to bootstrap
the kernel, talk to hardware, etc, but most of the logic could be done
in Lua. It's something I've considered doing as a fun project, even
though it's not likely to take off. :-)

Bogdan has the right idea, though: existing OSes benefit from having
all those drivers already available, and you'd be better off taking
advantage of that.

--
Sent from my toaster.

Reply | Threaded
Open this post in threaded view
|

Re: Lua OS

Robert Klemme
On Mon, Apr 23, 2012 at 1:24 PM, Rena <[hidden email]> wrote:
> On Mon, Apr 23, 2012 at 05:19, sergei karhof <[hidden email]> wrote:
>> On Mon, Apr 23, 2012 at 5:25 AM, Alessandro Delgado
>> <[hidden email]> 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?

> --
> Sent from my toaster.

Greetings to your toaster.  I hope he cooled down by now.  ;-)

Kind regards

robert

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

Reply | Threaded
Open this post in threaded view
|

Re: Lua OS

martinwguy
In reply to this post by Alessandro Delgado
On 23 April 2012 05:25, Alessandro Delgado <[hidden email]> wrote:
> What I'd /really/ like would be a fully Lua-based operating system.
>
> Taking something like eLua booting on bare x86 and make it up from there.

Why? If you were a fan of Basic or Perl or shell scripts, would you
want to write an OS in them?

Already we sell a board that runs eLua as its entire operating system
but anything beyond a single flow of control is beyond its abilities.
You'd have to write everything with coroutines and some kind of
scheduler and so on - a bit like teaching a poodle to dance.

If you want to create an application  with little effort, that is
relatively easy to write and within the abilities of Lua/eLua, it's
fine. If you want anything that needs preemptive multitasking, or a
rich set of libraries then Lua/eLua is the wrong tool for the job.

In part this would be helped if eLua implemented Lua Socket, Lua File
System, LuaPosix and so on - the basic modules that every other
package needs - but instead it has its own whimsical and incomplete
library interfaces for everything. The only standard parts are most of
the built-in Lua libraries: io.*(), string.*() and so on. Even os.*()
is absent.

One project in the "Lua OS" direction would be to reimplement eLua
dumping all the eLua extensions and implementing os.*(), Lua socket,
LFS, luaposix and onwards, to make an embedded platform that standard
Lua applications would run on.

Then the world would be yours...

    M

Reply | Threaded
Open this post in threaded view
|

Re: Lua OS

Tim Caswell
What I would find extremely interesting would be a system that's bare-bones linux reusing all the linux device drivers (nobody wants to rewrite all those in lua, trust me).  Then on top of that lua, have a basic network aware lua engine that works somewhat like a web browser.  You can take the idea that Mozilla is doing with Boot to Gecko and instead use lua.  The system can have some basic abilities built-in that are exposed to lua and thus scriptable.  It could be HTML + CSS like the web or it could be something else.  Maybe a traditional desktop gui system that's based on widgets like GTK or QT or even a simple canvas-like API with optional opengl.  The key here is to use the internet at the core.  It needs a way to store applications offline in some local cache and a way to store data locally.  This would be a perfect operating system for Raspberry PI computers that are starting to ship.  People could write software that does anything they want, host it on network servers and interlink them.  It would be like the internet all over again, except using lua and aimed at applications rather than hyperlinked documents.

On Mon, Apr 23, 2012 at 10:10 AM, Martin Guy <[hidden email]> wrote:
On 23 April 2012 05:25, Alessandro Delgado <[hidden email]> wrote:
> What I'd /really/ like would be a fully Lua-based operating system.
>
> Taking something like eLua booting on bare x86 and make it up from there.

Why? If you were a fan of Basic or Perl or shell scripts, would you
want to write an OS in them?

Already we sell a board that runs eLua as its entire operating system
but anything beyond a single flow of control is beyond its abilities.
You'd have to write everything with coroutines and some kind of
scheduler and so on - a bit like teaching a poodle to dance.

If you want to create an application  with little effort, that is
relatively easy to write and within the abilities of Lua/eLua, it's
fine. If you want anything that needs preemptive multitasking, or a
rich set of libraries then Lua/eLua is the wrong tool for the job.

In part this would be helped if eLua implemented Lua Socket, Lua File
System, LuaPosix and so on - the basic modules that every other
package needs - but instead it has its own whimsical and incomplete
library interfaces for everything. The only standard parts are most of
the built-in Lua libraries: io.*(), string.*() and so on. Even os.*()
is absent.

One project in the "Lua OS" direction would be to reimplement eLua
dumping all the eLua extensions and implementing os.*(), Lua socket,
LFS, luaposix and onwards, to make an embedded platform that standard
Lua applications would run on.

Then the world would be yours...

   M


Reply | Threaded
Open this post in threaded view
|

Re: Lua OS

sergei karhof
On Mon, Apr 23, 2012 at 5:39 PM, Tim Caswell <[hidden email]> wrote:

> What I would find extremely interesting would be a system that's bare-bones
> linux reusing all the linux device drivers (nobody wants to rewrite all
> those in lua, trust me).  Then on top of that lua, have a basic network
> aware lua engine that works somewhat like a web browser.  You can take the
> idea that Mozilla is doing with Boot to Gecko and instead use lua.  The
> system can have some basic abilities built-in that are exposed to lua and
> thus scriptable.  It could be HTML + CSS like the web or it could be
> something else.  Maybe a traditional desktop gui system that's based on
> widgets like GTK or QT or even a simple canvas-like API with optional
> opengl.  The key here is to use the internet at the core.  It needs a way to
> store applications offline in some local cache and a way to store data
> locally.  This would be a perfect operating system for Raspberry PI
> computers that are starting to ship.  People could write software that does
> anything they want, host it on network servers and interlink them.  It would
> be like the internet all over again, except using lua and aimed at
> applications rather than hyperlinked documents.

That's pretty much the point of Lua OS: Linux kernel plus a Lua
environment. But it is still in early stages and the guy has not been
working much on it recently.

If such an operating platform were already available, with a bare
minimum of functionality already working, I predict that it would be
soon colonized by us on this list. Eh eh :) And then we would have the
best of both worlds: Linux support for hardware, etc with a Lua
front-end for all system management, as well as for a whole range of
applications. Am I dreaming already?

Reply | Threaded
Open this post in threaded view
|

Re: Lua OS

Tim Caswell


On Mon, Apr 23, 2012 at 11:15 AM, sergei karhof <[hidden email]> wrote:
On Mon, Apr 23, 2012 at 5:39 PM, Tim Caswell <[hidden email]> wrote:
> What I would find extremely interesting would be a system that's bare-bones
> linux reusing all the linux device drivers (nobody wants to rewrite all
> those in lua, trust me).  Then on top of that lua, have a basic network
> aware lua engine that works somewhat like a web browser.  You can take the
> idea that Mozilla is doing with Boot to Gecko and instead use lua.  The
> system can have some basic abilities built-in that are exposed to lua and
> thus scriptable.  It could be HTML + CSS like the web or it could be
> something else.  Maybe a traditional desktop gui system that's based on
> widgets like GTK or QT or even a simple canvas-like API with optional
> opengl.  The key here is to use the internet at the core.  It needs a way to
> store applications offline in some local cache and a way to store data
> locally.  This would be a perfect operating system for Raspberry PI
> computers that are starting to ship.  People could write software that does
> anything they want, host it on network servers and interlink them.  It would
> be like the internet all over again, except using lua and aimed at
> applications rather than hyperlinked documents.

That's pretty much the point of Lua OS: Linux kernel plus a Lua
environment. But it is still in early stages and the guy has not been
working much on it recently.

If such an operating platform were already available, with a bare
minimum of functionality already working, I predict that it would be
soon colonized by us on this list. Eh eh :) And then we would have the
best of both worlds: Linux support for hardware, etc with a Lua
front-end for all system management, as well as for a whole range of
applications. Am I dreaming already?



My point wasn't so much reusing of linux kernel drivers.  I don't think that's a hard point to sell.  My point was making a system like the web where all applications live on network servers and the local machine is a client to this network.  Boot to Gecko has proven this model can work.  If you see the phone, it looks like any other smart-phone.  The apps appear local, there is an app store, you can make phone calls, etc.  But everything and I mean everything other than linux and gecko is loaded from the internet.  They prime the cache for certain apps so that you can make phone calls without internet access, but all apps, including the app launcher are just web pages like http://calculator.gaiamobile.org/

Once in the early 90's I started a project like this using qbasic, but the world and the internet weren't ready for it.  Now with most machines having internet connectivity of some sort most the time, (as well as much easier to embed scripting languages like lua) this is possible.
Reply | Threaded
Open this post in threaded view
|

Re: Lua OS

steve donovan
In reply to this post by Tim Caswell
On Mon, Apr 23, 2012 at 5:39 PM, Tim Caswell <[hidden email]> wrote:
> those in lua, trust me).  Then on top of that lua, have a basic network
> aware lua engine that works somewhat like a web browser.

In fact, LuaKit would do the job nicely - so the desktop is a
'chromeless' browser (to use the old pre-Google expression) and most
Lua applications are local web applets.

It _could_ be done, and it would be entertaining; so your thinking
about the right niche is the way to go...don't redo the old-fashioned
power desktop, or chase the current mobile-for-desktop movement -
Something DIfferent.

steve d.

Reply | Threaded
Open this post in threaded view
|

Re: Lua OS

joao lobato
In reply to this post by sergei karhof
On 4/23/12, sergei karhof <[hidden email]> wrote:
> That's pretty much the point of Lua OS: Linux kernel plus a Lua
> environment. But it is still in early stages and the guy has not been
> working much on it recently.
>

In that case, maybe the "LuaOS guy" should have pooled his resources
with PuppyLinux[1] rather than antagonize lua-l with his fine manners
:-)

[1] www.puppylinux.org/

Reply | Threaded
Open this post in threaded view
|

Re: Lua OS

sergei karhof
On Mon, Apr 23, 2012 at 6:33 PM, joao lobato <[hidden email]> wrote:
> On 4/23/12, sergei karhof <[hidden email]> wrote:
>> That's pretty much the point of Lua OS: Linux kernel plus a Lua
>> environment. But it is still in early stages and the guy has not been
>> working much on it recently.
>>
>
> In that case, maybe the "LuaOS guy" should have pooled his resources
> with PuppyLinux[1] rather than antagonize lua-l with his fine manners
> :-)

FWIW, (Linux) Slitaz 4.0 was released just a few days ago, a major
release. And I see it as a very good candidate for the sort of thing
we are talking about, as an alternative to PuppyLinux (which I don't
know). But perhaps this is a bit off-topic.

Reply | Threaded
Open this post in threaded view
|

Re: Lua OS

Jay Carlson
In reply to this post by Robert Klemme
On Mon, Apr 23, 2012 at 9:25 AM, Robert Klemme
<[hidden email]> wrote:
> On Mon, Apr 23, 2012 at 1:24 PM, Rena <[hidden email]> wrote:

>> 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).

Well, considered as a proposed modern language, /bin/sh kinda blows.
/bin/rc is better. Something like bash 4.0 is pretty featureful, but
it has little unity.

> 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)

OpenWrt is wandering that way with LuCI.

IMO on Unix if you want to play the part of a shell, the problem comes
down to embedding a reasonable domain-specific quasiquotation syntax
for constructing process invocation structures. Which would you rather
write?

  proc{'find', "/usr", "-name", pattern, "-print0"}.pipe{'xargs', '-0', 'du'}()

  find /usr -name "$pattern" -print0 | xargs -0 du

  find /usr -name $pattern -print0 | xargs -0 du

Note that the last is /bin/rc, and writing it that way (without
quotes) in /bin/sh is just asking for trouble.

A huge problem with /bin/sh is it's easy to write stuff that
completely falls over in the presence of unexpected characters.

Anyway, without some way of capturing lexicals in
little-language-strings, Lua is kinda stuck for using strings as
escape hatches to non-Lua syntax.

Reply | Threaded
Open this post in threaded view
|

Re: Lua OS

Dimiter 'malkia' Stanev
In reply to this post by sergei karhof
I'm not sure how to describe it, but you go to any language forum, and
then there is .... make OS in this language :)

In the past some of the demo groups wanted to make their own OS for
showing off demos. While it seemed cool, the question was - who's gonna
install that OS just to see the demos... For them it was like buying a
special device to watch commercials (then again, it was worth watching).

On 4/22/2012 7:58 PM, sergei karhof wrote:
> It looks like the Lua OS guy is back on the beat, with his operating
> system. I just saw an article on osnews.com
> I wonder if, after all, some good for Lua may come out of it, seriously.
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Lua OS

Michal Kottman
In reply to this post by Tim Caswell
On 23 April 2012 17:39, Tim Caswell <[hidden email]> wrote:

> What I would find extremely interesting would be a system that's bare-bones
> linux reusing all the linux device drivers (nobody wants to rewrite all
> those in lua, trust me).  Then on top of that lua, have a basic network
> aware lua engine that works somewhat like a web browser.  You can take the
> idea that Mozilla is doing with Boot to Gecko and instead use lua.  The
> system can have some basic abilities built-in that are exposed to lua and
> thus scriptable.  It could be HTML + CSS like the web or it could be
> something else.  Maybe a traditional desktop gui system that's based on
> widgets like GTK or QT or even a simple canvas-like API with optional
> opengl.  The key here is to use the internet at the core.  It needs a way to
> store applications offline in some local cache and a way to store data
> locally.  This would be a perfect operating system for Raspberry PI
> computers that are starting to ship.  People could write software that does
> anything they want, host it on network servers and interlink them.  It would
> be like the internet all over again, except using lua and aimed at
> applications rather than hyperlinked documents.

How about creating a basic Linux rootf with X server and Qt set up,
and handle the rest with Lua + lqt? You get networking, databases,
filesystem access, WebKit for HTML rendering + CSS + JavaScript,
OpenGL (OK, you also need Lua OpenGL bindings), XML and some other
fancy stuff. At startup, load up a single /init.lua and from there,
manage your "processes" in Lua.

I don't know if I would call this a "Lua OS" though...

Reply | Threaded
Open this post in threaded view
|

Re: Lua OS

sergei karhof
In reply to this post by steve donovan
On Mon, Apr 23, 2012 at 6:28 PM, steve donovan
<[hidden email]> wrote:
> On Mon, Apr 23, 2012 at 5:39 PM, Tim Caswell <[hidden email]> wrote:
>> those in lua, trust me).  Then on top of that lua, have a basic network
>> aware lua engine that works somewhat like a web browser.
>
> In fact, LuaKit would do the job nicely - so the desktop is a
> 'chromeless' browser (to use the old pre-Google expression) and most
> Lua applications are local web applets.

Not everyone likes browser-based applications. (Yuck.)

Reply | Threaded
Open this post in threaded view
|

Re: Lua OS

Andre Leiradella-2
On 23/04/2012 14:25, sergei karhof wrote:
> Not everyone likes browser-based applications. (Yuck.)
+1

1234