News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
Distribution ideas?
Author Message
fluff
Junior Member
**


Posts: 2
Group: Registered
Joined: May 2014
Status: Offline
Reputation: 0
Post: #1
Distribution ideas?

Hey guys,

I think that murgaLua is the magic pill that computing needs right now. Far too many other frameworks are bloated, inconsistent across platforms, or restricted by the rules of large corporations. Even other Lua frameworks such as LOVE2D feel very limited to the specific purpose(s) they were designed for, or don't include the dependencies, or are too hard to use, etc. etc. But not murgaLua! This solves all of the problems I've had with Java and Python, and it doesn't force me into using ActiveState software. Great work here.

The only thing I wonder about now is how to set up a program to run from a "double-click" or a "start" or "run" command. I mean, calling the interpreter is fine when you're running a command-line program, and batch files are handy in a development environment, but I sort of hope for a more user-friendly solution. Here are some conclusions I have arrived at:

1. MurgaLua programs are in a file format. Their file extension is .lua, but there is nothing in them that says to use murgaLua. There are specific dependencies, sure, and you can use the #!usr/bin/lua or whatever, which is appropriate for Linux, but on Windows there's really nothing to make these scripts "just work" unless you associate the .lua file extension with murgaLua. If you named your main entry point file something.mlua for example, you could associate .mlua with murgaLua as executable Lua files and leave the .lua files as lua library files.

2. When distributing the Win/Mac/Linux runtimes with your program scripts, it could be quite tempting to rename murgaLua to YourProgramName, but the problem is that as far as I know murgaLua does not look for a main entry point file. Therefore, you would need a separate executable to specifically look for main.lua or main.mlua if you don't want the primary way for people to access your program be a .bat/.sh/.command file. In that case, it would make sense to compile this start-up program with murgaLua. This is where I'm stumped.

2.1. I can't get the compiler to work. I tried to compile calculator.lua and it gave me an error, but calculator.lua works just fine on its own running it on the interpreter. There is no documentation on this that I can find.

2.2. I don't have a lot of Lua experience. I was wondering if there is a way to make murgaLua run an outside Lua file from the inside after the runner has been compiled. This way, we avoid doubling up the interpreter binaries and bloating the install folder.

Thanks for making and/or supporting a great program! I'm sure I will have more questions and hopefully answers to other people's questions in the future.

EDIT: I just noticed that every thread here has tens of thousands of views. Spambots?

This post was last modified: 05-31-2014 07:50 AM by fluff.

05-31-2014 07:49 AM
Find all posts by this user Quote this message in a reply
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #2
RE: Distribution ideas?

I will write some docs on the compiler ....

Yes, it is possible to load lua files dynamically (and actually that is what the GUI demo does).

There are some improvements coming in that area.

Yeah, spam bots a plenty :-(

06-11-2014 01:20 PM
Visit this user's website Find all posts by this user Quote this message in a reply
fluff
Junior Member
**


Posts: 2
Group: Registered
Joined: May 2014
Status: Offline
Reputation: 0
Post: #3
RE: Distribution ideas?

Awesome. I'll be watching this space. As with all software development projects, I would assume this is a timescale of months.

----

Now I'll get a little off-topic. I've been playing around with Node-Webkit, which follows a similar design principal to murgaLua: high lowest common denominator for all of the many supported platforms, make it once and run it anywhere. NW is bloated and unfriendly to some programmers (but not me, I love JavaScript). One of the advantages NW has is well-documented distribution options: you edit package.json it will work automatically. With murgaLua, it's essentially Lua builds with cool libraries, but Lua doesn't by default look for a main entry point. Sure, you could install murgaLua on your system, but by that same note you could install Python. Like Python, Lua changes quite a bit from version to version. Windows, Mac, and Linux don't. The Web doesn't. Those are clearly-documented platforms. murgaLua is a platform, and like NW you can distribute the platform with your program. The less mucking around with batch files and shell scripts, the easier it will be for new users.

You know how Java died? It was big, volatile, and never really caught on with the mainstream (Grandma). The folks at Microsoft stabbed at it with a steel pike, and it eventually bled out. Because of its size, it also doesn't come with a lot of "portable" Linux distributions and is also not often distributed with Java-dependent software. It's a way to make Mac programs now, and that's about it. It's found other life in server-side code and mobile platforms, but the big Oracle buyout plus the JNI viruses essentially killed it on Windows. Plus it's damn hard to program in Java, and that was always my biggest gripe with it.

JavaScript and Lua are not compiled languages. They can be, but they don't have to be. That means that development environments are a lot easier to get ahold of. The same can be said about Python and the ActiveState family of languages, but those require big spaghetti-like runtimes. The key is in the "embedded" scripting language. A language that isn't meant to be distributed is a language that isn't meant to be used. It's really sad how true that is. So many BASICs were born and died because they were though of as "specialty software". That view is promoted by CPU manufacturers and OS vendors. OSX only runs on specially-marked chips built into first-party computers. iOS, Android, and Symbian/JavaME are all distinct, non-interoperable platforms, save for the "apps" that provide extra compatibility, which Apple will not allow. This allows for vendor lock-in and market segmentation. Divide and conquer.

07-02-2014 03:05 PM
Find all posts by this user Quote this message in a reply
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #4
RE: Distribution ideas?

fluff Wrote:
Now I'll get a little off-topic. I've been playing around with Node-Webkit, which follows a similar design principal to murgaLua: high lowest common denominator for all of the many supported platforms, make it once and run it anywhere. NW is bloated and unfriendly to some programmers (but not me, I love JavaScript). One of the advantages NW has is well-documented distribution options: you edit package.json it will work automatically. With murgaLua, it's essentially Lua builds with cool libraries, but Lua doesn't by default look for a main entry point. Sure, you could install murgaLua on your system, but by that same note you could install Python. Like Python, Lua changes quite a bit from version to version. Windows, Mac, and Linux don't. The Web doesn't. Those are clearly-documented platforms. murgaLua is a platform, and like NW you can distribute the platform with your program. The less mucking around with batch files and shell scripts, the easier it will be for new users.

Interestingly enough I am doing a fair amount of work at work with Node-Webkit right now ... It is great, I love it.

The murgaLua compiler is very similar to the NW packager.

I would recommend checking out Duktape ...
http://www.duktape.org/

Pretty cool too, and something that I thought of adding to murgaLua at some point.

fluff Wrote:
You know how Java died? It was big, volatile, and never really caught on with the mainstream (Grandma). The folks at Microsoft stabbed at it with a steel pike, and it eventually bled out. Because of its size, it also doesn't come with a lot of "portable" Linux distributions and is also not often distributed with Java-dependent software. It's a way to make Mac programs now, and that's about it. It's found other life in server-side code and mobile platforms, but the big Oracle buyout plus the JNI viruses essentially killed it on Windows. Plus it's damn hard to program in Java, and that was always my biggest gripe with it.

Interesting story, but not quite true :-P

Java is far from dead in the enterprise and professional programming world ...

I guess these links may surprise you :
http://www.tiobe.com/index.php/content/p...index.html
http://langpop.com/
http://blog.codeeval.com/codeevalblog/20...pf1fmSyMI=

Cheers
John de Murga

08-01-2014 02:29 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: