eLua -- Lua lovers wanted, Lua haters wanted more

Back in my early years as “Rock Star System Developer” :rolleyes: , on a regular basis I’d include TCL as a way to on the script things on the fly. (Which soon was script things, don’t use the base code" Think of it as a Visual Basic Addon in Excel, but in the middle of a major systems application.

In the last few years I’ve ditched TCL (sob, but TCL programmers don’t exist, C and Java programmers do) for LUA (more people can use it. ie C and java people) So my basic hello world program, now includes LUA and you can script away.

A number of FRC teams have used LUA, the Greyhound project tied LUA to the CRio with pretty good success. Some teams posted their code that they were happy with.

So I’m on a quest to get eLua, small footprint Lua on the Cortex from VEX and some other platforms. eLua does not have all the libraries, you can include them, but 128K is not much space.

I’d like a discussion on how you used Lua and won, how you used Lua and failed (and nonposts from people saying you should use xxxx, Lua is stupid) So if you have used Lua, post please. I’m thinking coding the WPILibrary API’s from the PIC days, lots of good interfaces that are simple to use.

But before I mount my horse and tilt at another windmill, let me get grounded in robot versions of Lua. From a app developer, it’s a great addon with small footprint. I can avoid the compile-link-download binary steps, but I risk syntax errors at the Lua level.

I’ll cross post this to VEX forum, those roboteers are expanding into things we talk about. Please be nice to them when they cross over here.

First off, I have little to no experience with Lua, we used it briefly in one of my game design courses but I didn’t really have a use at the time.

From what I understand it’s a small language whose core was written in C, what’s the benefit of using it over other scripting languages like ruby, python, or even javascript? In my experience adoption of those languages has been far larger which would create a lower barrier to utilization of this feature.

Is it possible that Lua includes a flag to check syntax? I know Ruby does if you call ruby -c [filename].

Most of the “small languages” are written in C. It’s another scripting language like Ruby, Python and Javascript. Or the mother of all scripting languages AWK.

So my preference would be to write a Robot controller in AWK, I can smack AWK out of my fingers about as fast as you can say specifications out.

But my interest is here "First off, I have little to no experience with Lua, we used it briefly in one of my game design courses but I didn’t really have a use at the time. "

You’ve seen Lua, you know of it, you might / will see it again. I do a ton of “prove to me our network is at fault” I use Wireshark and I write Lua plugs to dig through hours of traces to find “where their network is at fault” So it’s around.

If I have to pick a scripting language, I’ll pick AWK, then Lua then some form of Robot COBOL :eek:

I’m not after widespread adoption. Teams will do C (C++) or Labview. Small numbers will do Perl, Ruby, Lua, Klingon, etc. I’m doing it for personal satisfaction, but the hive mind here is too much, so I have to ask what they think. I put the disclaimer in to fend away the people that can’t grok something else.

I love C, and the Kevin Watson libraries are (wanted to write were, but my fingers wouldn’t do it) just magical. The WPI libs that followed were the base for lots of my team’s robots.

As a mentor, I want to give my roboteers life skills. Not losing a finger in a lathe is one. Programmers need to have the same chance to learn “stuff” So I can offer Lua. Another tool, another possibility. As a mentor, my chances for greatness are limited (oh just look around :slight_smile: ) so I’m doing something that will make me happy.

As far as the syntax check goes, the “home PC” can do a quick compile for syntax, but in the fast “now now now we are in the finals”, that may not happen. Just change a few chars and upload :mad:

I’ve seen Lua. I haven’t seen anything about it that makes me think it’s any better than other scripting languages. I get the impression that it’s Just Another Java.

On the other hand, I really really like Tcl. Its syntax is so minimal that it’s almost nonexistent, and I appreciate a language that gets out of my way. At the same time, it’s so easy to write small procedures to extend the interpreter to act like whatever tiny language is appropriate for the task. I got to the point where I could often write a page of script, then take an existing configuration or data file and just execute it to get things done. The networking support is just short of magical, and there are code packages out there to make web applications almost as easy as writing a DOS batch file. Alas, I’ve been forced away from such simple and effective tools and toward more “institutionally viable” things like PHP.