eLua vs Lua on RTOS

classic Classic list List threaded Threaded
2 messages Options
Lwazi Dub Lwazi Dub
Reply | Threaded
Open this post in threaded view
|

eLua vs Lua on RTOS

Hi everyone,

I am not a Lua programmer but I find this project interesting. Why
would one use eLua instead of running their Lua app on an RTOS?
Does/Will eLua have threads that run directly on cpu cores? I have a
thousand other questions and thoughts but I will leave that for
another thread maybe.

Thanks,

Lwazi
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Dado Sutter Dado Sutter
Reply | Threaded
Open this post in threaded view
|

Re: eLua vs Lua on RTOS

Hello,

On Tue, Jan 25, 2011 at 16:13, Lwazi Dub <[hidden email]> wrote:
Hi everyone,

I am not a Lua programmer but I find this project interesting.

Thanks and welcome to the list.
 
Why
would one use eLua instead of running their Lua app on an RTOS?

Lwazi, this is one of the questions I hear more often and with more and more (and cheaper) Linux embedded platforms around, we'll hear it much more in the future.
It may deserve a long entry on our FAQ one of these days (any English natively speaker to help ? :).
Differences go from a (muuuuuuuuuuuch) smaller footprint to full control of your hardware by your programs, with nothing else "in the middle".

-There is also not enough kernel-mode drivers for every peripheral of every platform yet. It is much simpler to add them (MCU manufacturers usually make available royalty-free libs if they are used only for their platforms) them to eLua than to do the equivalent in Linux.
-You would also need to extend Lua with binds to these "drivers", as Lua itself does not have any module/lib to support mcu peripherals and the extra auxiliary modules embedded programming requires. We've added a bunch of them in eLua already.
-eLua has been running on 32bits MCUs for several years and only now, the faster and external-memory-capable MCUs are getting cheaper enough for Linux to be a nice option.
-We want to offer a simple embedded development framework for users not necessarily deeply involved with software development, pretty much like what the Arduino did for their typical users. In eLua, we would add to that field-engineers that benefit from easy scripting and configuring their process-oriented devices. Lua is simple to learn and to teach, which is not always the case for Linux.

Does/Will eLua have threads that run directly on cpu cores?

Another long and interesting subject.
Preemtive multitasking is a great thing. On the embedded world, it can also be one of the greatest nighmares one can have for modeling and debugging, if you're not a computer science expert.
I'm not saying we don't want it but so far we've been following the greatest Lua mottos: simplicity, minimamalism, elegance (in the sense of using other approaches to the same goals), ......
Coroutine (non-preemptive multitasking) is a great and simple approach that hasn't been explored or well supported by most high-level languages in the past. Lua implements it very nicely and eLua benefits from it without a single extra byte of code.
It is sufficient for most embedded applications and it is a blessing for the newcomers and a large part of the eLua audience too.
I would be very glad to have true/preemptive multitasking in eLua in the future, if we have some more help for the dev and we come to an elegant and light implementation.
You can have it today, if you strugle a bit with an RTOS and run multiple copies of eLua but keep in mind that we haven't architectured eLua for it.
With the modern MCUs going multicore too, we might have more code support and expertise in the future to try a decent model too.


I have a thousand other questions and thoughts but I will leave that for
another thread maybe.

Nice, we'll be glad to hear them all.
Thanks for sharing this !
 
Thanks,

Lwazi

Best
Dado

 
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev