Learning (murga)Lua


Forum: Programming and Scripting
Topic: Learning (murga)Lua
started by: jaapz

Posted by jaapz on Mar. 17 2008,21:30
Hello,

I've got some questions about learning murgaLua. Is it an easy programming language to learn, especially for somone who knows PHP well? Will it be worth learning it? (Functional enough?)
Do you know some sites where i can learn murgaLua through tutorials or so? Do you know some e-books about murgaLua?

I hope it won't be too hard to learn, cos then i can help DSL some more :).

Thx,
Jaapz

Posted by mikshaw on Mar. 18 2008,00:29
Lua is very easy to learn. As far as I can tell, it is quite basic compared to PHP, Perl or other popular scripting languages, but it seems that is intentional since it's designed to be a complement to other programming languages or embedded in other programs.

MurgaLua has, as far as I see, a fully fuctional Lua interpreter, and it includes some modules that handle some common things that Lua itself cannot do. Additionally it has the uncommon feature of having graphical widgets (FLTK) included, so it's easy to build interfaces for existing commandline applications as well as Lua apps.

Over the past several months I've been working on a package of demos that I hope will help people in learning how to use murgaLua. I visit the murgaLua forum daily, and regularly post the results of my tests there, as well as updates to the demos package
< http://www.murga-projects.com/forum/ >
There are others there also who can help with things that are beyond my abilities. Some users are quite good with C and other programming languages, which can help in translating what you know in PHP to Lua.

Posted by humpty on Mar. 18 2008,01:03
is "murga-lua" the lua in dsl, or is it an extension ?
Posted by mikshaw on Mar. 18 2008,01:48
murgaLua is *the* Lua in DSL since about DSL 3.0 or 3.1
I believe it's pretty much compatible with proper Lua 5.1
I think the main difference is that murgaLua is not embeddable as proper Lua is, and is not available as a dynamic library.

Posted by roberts on Mar. 18 2008,02:52
There are probably 60 some lua and lua fltk scripts in DSL.
I started with Jay Carlson's LuaFltk which was a binding of Lua 4 and FLTK widget set. Jay no longer updates this. DSL was one of the first distributions to actually use Lua and Lua/Fltk as a standalone scripting language.

When John Murga wrote to me to inform me that he was going to do a new binding based on Lua 5 and FLTK. I was very happy and converted some 50+ scripts to murgaLua. John Murga has been keeping murgaLua updated with curent Lua versions as well as FLTK. His bindings also include sockets, luasqlite, lua filesystem, and xml.

His bindings are more closely aligned FLTK standards and I find his system very nice to work with.

Take a look at

$ ls -l /usr/local/bin/*.lua for just some of the Lua and murgaLua now being used in DSL.

Many times to study and modify from these examples will get you started. I have included murgaLua scripts from several users.

Explore, Learn, and have fun.

Posted by jaapz on Mar. 18 2008,11:56
Ok thx for your responses :)
Is there a program where i can make fltk gui's just by selecting some tools and then kinda draw buttons and stuff?
I saw something like that on John Murga's site. It looks like Gambas or Eclipse.

Posted by mikshaw on Mar. 18 2008,12:12
It's called Fluid, and is included with both the FLTK and murgaLua packages. It is also included with fltk.uci, although that is not the most recent version.

Since Fluid generates C++ code, it is necessary to translate it to murgaLua. There is a script available in the murgaLua package that will do this (not always 100%, but pretty close).

Posted by jaapz on Mar. 19 2008,07:14
cool :) i'll check that out
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.