Lua for non-programmers

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

Lua for non-programmers

King, Mike

Has anyone worked on or know of a project where non-programmers would use Lua to accomplish a task?  I have been given the task of creating a program where the goal is to help non-programmers setup and capture data from different sensors.  The program will need to be able to control different equipment.  The problem is that what needs to be recorded and what needs to be control is unknown.  My plan is create all the needed software components but leave the user to connect them together.  I’ve heard some refer to this type of code as “glue” code.  Is this a bad idea?

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is confidential or proprietary to K&L Microwave, Inc. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, immediately contact the sender by reply e-mail and destroy all copies of the original message.

Reply | Threaded
Open this post in threaded view
|

Re: Lua for non-programmers

Doug Rogers
King, Mike wrote:
> Has anyone worked on or know of a project where non-programmers would
> use Lua to accomplish a task?  I have been given the task of creating a
> program where the goal is to help non-programmers setup and capture data
> from different sensors.

Mike, you might be interested in (the (ongoing development of) the eLua
project. While you may not need an embedded solution, they have put
together a set of primitive sensor-like devices.

   http://www.eluaproject.net/

Actually, most of the talk I've seen has been on the quite active
mailing list and it seems to contain more than what has been posted to
the site. Also, beware that the current release is GPL. They have
mentioned a possible switch of licenses.

I have provided a Lua interface to scientific code in the past with
modest success. But that was aimed at programmers, so it is not as
helpful for you.

Let us know what you come up with. Good luck!

Doug

______________________________________________________________________________________
The information contained in this email transmission may contain proprietary and business
sensitive information.  If you are not the intended recipient, you are hereby notified that
any review, dissemination, distribution or duplication of this communication is strictly
prohibited.  Unauthorized interception of this e-mail is a violation of law.  If you are not
the intended recipient, please contact the sender by reply email and immediately destroy all
copies of the original message.

Any technical data and/or information provided with or in this email may be subject to U.S.
export controls law.  Export, diversion or disclosure contrary to U.S. law is prohibited.  
Such technical data or information is not to be exported from the U.S. or given to any foreign
person in the U.S. without prior written authorization of Elbit Systems of America and the
appropriate U.S. Government agency.
Reply | Threaded
Open this post in threaded view
|

Re: Lua for non-programmers

Asko Kauppi
In reply to this post by King, Mike

This is exactly how you should do (create all the software components  
but leave the user to connect them).

I'm doing similar work for meteorologists, at the moment. Some things  
that come to my mind:

- keep it simple. abstraction of the elements you provide must be  
"right"
- above the simple (but maybe complex for end users) API you can  
easily create any kind of wrappers in Lua, based on what the users  
really _seem_ to be needing (or together with them, which is even  
better so they understand what's going on behind the scenes but still  
can go the "easy way").

Because of historical use, we've i.e. introduced variables of A_B or  
A_B_C type. The A,B and C are actually parameters and all of that  
converts on-demand (via _G __index metamethod) to a function call that  
is way more elaborate. This gives users the easy "variable style"  
access but also the "function style" access that provides more  
control. I.e. if a data doesn't exist, A_B_C will cast an error  
whereas function type returns "nil, err" as usual in Lua.

One more thing. Some often used strings s.a. "T" for temperature are  
bound to globals (T="T"). This means users don't need to give the  
quotes if they say 'param=T' or something.

In my understanding, Lua suits perfectly to crafting an easy-entry non-
programmer language. The key is to converse with your target audience  
and get to know its habits and current way of thinking.

-asko


King, Mike kirjoitti 20.5.2009 kello 21:53:

> Has anyone worked on or know of a project where non-programmers  
> would use Lua to accomplish a task?  I have been given the task of  
> creating a program where the goal is to help non-programmers setup  
> and capture data from different sensors.  The program will need to  
> be able to control different equipment.  The problem is that what  
> needs to be recorded and what needs to be control is unknown.  My  
> plan is create all the needed software components but leave the user  
> to connect them together.  I’ve heard some refer to this type of  
> code as “glue” code.  Is this a bad idea?
> CONFIDENTIALITY NOTICE: This e-mail message, including any  
> attachments, is for the sole use of the intended recipient(s) and  
> may contain information that is confidential or proprietary to K&L  
> Microwave, Inc. Any unauthorized review, use, disclosure or  
> distribution is prohibited. If you are not the intended recipient,  
> immediately contact the sender by reply e-mail and destroy all  
> copies of the original message.
>

Reply | Threaded
Open this post in threaded view
|

Re: Lua for non-programmers

Gavin Wraith

> > Has anyone worked on or know of a project where non-programmers
> > would use Lua to accomplish a task?

A long while ago I devised a Lua-based language (Weave) for creating
web pages. The syntax the user was supposed to understand was
[[ ... ]] for text, { ... } for lists and built-in functions for
tags. A few people used it. However, it demanded some understanding
of HTML and CSS. So now I have moved on to something much simpler:
templates for web-pages, with variables replacing text
(see  http://www.wra1th.plus.com/man.html). All the user has to
do is provide a directory of files containing "equations" of
the form "<variable> = [[<text>]]". The Lua application that does
the merging does a loadfile on each file (of appropriate filetype)
in the directory and puts the merged file in the same directory,
and with the same filetype as, the template. It uses a GUI whereby
the user simply drags in the template file and the directory of
content-files. This scheme has the advantage that at the most
elementary level the only thing the user needs to understand is
the [[ ... ]] notation and the concept of assignment, but that the
whole power of Lua is still there to be exploited by more expert
users. Of course, all the ancillary files - css stylefiles, graphics
files etc - will be there with the template but the user need know
nothing about any of that.

This may not count as a proper example of non-programmers using Lua;
but it gives them the chance of using Lua, so to speak.

--
Gavin Wraith ([hidden email])
Home page: http://www.wra1th.plus.com/
Reply | Threaded
Open this post in threaded view
|

Re: Lua for non-programmers

David Dunham
In reply to this post by King, Mike
On 20 May 2009, at 11:53, King, Mike wrote:

> Has anyone worked on or know of a project where non-programmers  
> would use Lua to accomplish a task?  I have been given the task of  
> creating a program where the goal is to help non-programmers setup  
> and capture data from different sensors.  The program will need to  
> be able to control different equipment.  The problem is that what  
> needs to be recorded and what needs to be control is unknown.  My  
> plan is create all the needed software components but leave the user  
> to connect them together.  I’ve heard some refer to this type of  
> code as “glue” code.  Is this a bad idea?


I have artists writing animation sequences... A lot of it is actually  
data-driven.

David Dunham       Development Manager
+1 206 926 5722      GameHouse Studios


Reply | Threaded
Open this post in threaded view
|

Re: Lua for non-programmers

jbsnyder
Administrator
In reply to this post by Doug Rogers

On May 20, 2009, at 4:19 PM, Doug Rogers wrote:

> King, Mike wrote:
>> Has anyone worked on or know of a project where non-programmers  
>> would use Lua to accomplish a task?  I have been given the task of  
>> creating a program where the goal is to help non-programmers setup  
>> and capture data from different sensors.
>
> Mike, you might be interested in (the (ongoing development of) the  
> eLua project. While you may not need an embedded solution, they have  
> put together a set of primitive sensor-like devices.
>
>  http://www.eluaproject.net/
>
> Actually, most of the talk I've seen has been on the quite active  
> mailing list and it seems to contain more than what has been posted  
> to the site. Also, beware that the current release is GPL. They have  
> mentioned a possible switch of licenses.
The next release of eLua is switching to an MIT license.  The license  
file has not yet been changed out, but when 0.6 (waiting on  
documentation writing) goes out it should change.  Bogdan may be able  
to answer why we haven't switched it yet.

I'm currently working on updating Lua-RPC to work with eLua and with  
Lua 5.1.4 (http://github.com/jsnyder/luarpc/tree/master), which would  
allow for easily acquiring data on an eLua device and to return that  
data to a desktop instance of Lua.  Currently the code is built around  
using internet sockets for the RPC connection, and seems to be now  
working between instances of desktop Lua 5.1.4. (Caveat: I have not  
made any official "release" of these modifications, and they probably  
should get more testing before casual or critical usage).

One of my intentions in adding this RPC mechanism is for use of eLua  
devices as sort-of "intelligent" data acquisition devices where they  
can house some control logic, operating independently, but also be  
used to acquire, log, and transmit sensor and performance data.

I can't speak for the eLua project (Bogdan Marinescu or Dado Sutter  
would be better to ask), but I'm personally interested in having it be  
friendly to both seasoned Lua/C programmers and rather inexperienced  
programmers who can get started without much or any prior programming  
knowledge.

--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
http://fanplastic.org/key.txt
ph: (847) 448-0386


PGP.sig (201 bytes) Download Attachment