Lua is a choice for improving the production efficiency. But, I concern
its performance. Refer to this link:
http://benchmarksgame.alioth.debian.org/u32/benchmark.php?test=all&lang=lua&lang2=go
make the app development faster, than C. C is too low level for
complicated application. Lua, Go or something else, is expected!
Post by srd_128Hi Greg,
At the risk of hijacking this subject (Google's GO on Nuttx), let me
respond to a few of your comments with respect to Lua and its Nuttx patch.
Paul sees great potential in Go on Nuttx. Mike, Darcy et al see great
potential in Lua on Nuttx (I happen to also be in their camp as a
longtime Lua user in embedded platforms). What we all see is the great
potential Nuttx has to host these powerful scripting languages and
unlock the gate that has traditionally separated MCUs from the POSIX
apps/tools developed on and for MMU-based OSs.
The work of integrating Lua has begun, has been demo'd, and it should
be finished in a way that models how future 3rd party packages
(scripting langs, etc.) could/should be handled. Lua is not the first
(Greg, you've already done great work in supporting Pascal), Lua won't
be the last, but Lua is a great choice for today's MCUs and offers a
treasure trove of libs and apps. And it's a great choice to work out
the challenges in paving that path.
IMHO the problem with the "Lua Patch" is it's not a Lua patch, it's a
Nuttx tree patch. And that makes it impossible to maintain. I think it
would be a lot easier to manage if Lua were to be applied in the
1) Download the Lua src version (5.1.4, 5.2.1, etc.) This is easy to
script with wget and drop a Makefile cookie.
2) Untar the src into the Nuttx apps tree, drop a cookie.
3) move and copy header files around with mv/cp in Makefile, drop a
cookie.
4) apply a patch to the resultant Lua src. This patch contains only
the edits to Lua source files necessary to compile that version of Lua
for that version of Nuttx.
5) compile/link the gestalt.
Step 4 is the key point. The patch should contain only the delta from
Lua-5.1.4 (let's say) to Lua-5.1.4-running-on-Nuttx. Since both the
Lua and Nuttx OS APIs are stable, this patch shouldn't be difficult
for the community to modify (dare I say maintain?) as both Nuttx and
Lua each evolve. Given this baseline, it would be trivial to then
create a similar patch for Lua-5.2.0 or Lua-5.2.1 (kdiff3 with a
little oversight and done).
The same approach would work with Go.
Welcome thoughts, comments, flames ;)
Cheers,
-david
Post by Paul.Y.ZhangHi, Greg,
I am in favor of using NuttX in any environment that is possible. But
I would have concerns about the logistics and appropriateness of
incorporating the Go runtime into the NuttX repository. That really
depends upon what the run time consists of and how big it is and how
you would envision incorporated the Go runtime into NuttX. For most
interpreted languages, the runtime usually consists of the entire
interpreter/virtual machine and is quite large. Is that the case
here too?
Post by Paul.Y.ZhangGo is not a interpreted language, it is totally a compiled language.
Quoted from http://golang.org/doc/ : "Go compiles quickly to machine
code yet has the convenience of garbage collection and the power of
run-time reflection. It's a fast, statically typed, compiled language
that feels like a dynamically typed, interpreted language. "
On the other hand, if you are talking about some kind of simple
"shim"
Post by Paul.Y.Zhanglayer that will allow support for the Go language, I am 100% in
favor.
Post by Paul.Y.ZhangIf you are talking about a fork of the entire runtime, then I have
concerns.
Go runtime on bare metal is impossible, because its current runtime
assumes running on unix kernel, so if nuttx is posix compatible, the go
runtime may be ported on nuttx kernel thru a shim layer. Actually, i
have no idea for thisI am not a programming expert, just a product
manger, so i do not know the detailed below the language magic.
We have been through this same discussion on the forum very recently,
but with the Lua language. Mike Smith and Darcy Gong integrated Lua
into NuttX and Darcy provided the patches to incorporate Lua into the
NuttX apps/ repository. But I was not quite sure what to do with the
patches. I am still not sure.
My concerns is that I do not want the NuttX source tree to become a
large collection of forks from other repositories. The would dilute
1) There is no way that I can maintain this foreign code within
NuttX.
Post by Paul.Y.ZhangOften these "patches" are as large or larger than the entire NuttX
apps/ package. What would I do with all of this foreign code later?
Who would support that code? I can't.
2) In a few months, the forked code will be obsolete because no one
will be maintaining it. In a year it will be a useless. If there
is no
Post by Paul.Y.Zhangon-going maintenance and synchronization with the application
repository, then the fork will be become obsolete very quickly.
The correct thing to do, really, is not to incorporate these large
applications into NuttX, but rather to incorporate NuttX support into
the application in the application's repository. That way, the
code is
Post by Paul.Y.Zhangmaintained and has a future direction. It would be better if Lua
supported NuttX, rather than NuttX supporting Lua. In the same
way, it
Post by Paul.Y.Zhangwould be better if Go supported NuttX rather than NuttX supporting Go.
Agree!
What happened to the Lua port? I put it here for now because I still
http://tech.groups.yahoo.com/group/nuttx/files/lua/
What can you do if the owners of the application repository are not
interested in supporting NuttX? Perhaps we can create our own project
that is a fork of other projects for NuttX. But that would be, I
think, a different project from NuttX with different administrators
and different maintainers. I would be happy to be a developer on that
project, but I cannot own those forks. That is much more than I am
able or willing to do myself.
I do not want to discourage you. Just the opposite. I want to
encourage you, but I simply do not know how to do that. I am open to
suggestions from other members of the group. If anyone wants to own a
project that consists of forks from other projects, I will help you
with that. Any ideas? suggestions?
This same topic comes up repeatedly. What is the solution?
There is really a requirement for this in the market, and there is
still
Post by Paul.Y.Zhangno answer. Someone need take a try.
Thanks, I have got your thought.
--
Paul