standalone application languages

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
mattmaier
Posts: 109
Joined: Fri Apr 19, 2013 2:49 am

standalone application languages

Post by mattmaier » Fri Apr 19, 2013 2:54 am

I can find a lot of stuff saying that LiveCode compiles into executables that run on lots of different operating systems, and that it has ways of talking to lots of different languages.

What I can't find is what languages LiveCode actually compiles into. What are the executables written in?

For example, I was looking at Google App Engine, but they're saying they only let you run applications written in Python or Java.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5145
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: standalone application languages

Post by Mark » Fri Apr 19, 2013 10:31 am

Hi,

You are confusing two things. First, the creation of the standalone and second the ability to execute syntax in other languages. These are two different things.

Standalones are created by attaching the stack files to the already compiled engine. The engine is programmed in C++, Objective-C or Java. You can check out the open-source version of LiveCode to see which languages are used.

There is also the possibility to create scripts in other languages. Languages available on Windows are JScript and VBScript and possibly other languages if you have them installed. On Mac OS X, AppleScipt is installed as additional language by default. You might also have the JavaScript extension installed. You can check which languages are available by executing

Code: Select all

put the alternateLanguages
in the message box.
You can execute these languages with the do command:

Code: Select all

do "beep" as AppleScript // OSX
do "MSGBox" && quote & "hi" & quote as VBScript // Windows
You can also run Python scripts from the shell:

Code: Select all

get shell("python -c" && quote & "print 'hello world'" & quote) // single line
get shell("python" && quote & "path/to/python.py" & quote) // multi-line script
It is also possible to run Perl and shell scripts in similar ways on Mac OS X and of course batch and mult-line VBScripts on Windows.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

mattmaier
Posts: 109
Joined: Fri Apr 19, 2013 2:49 am

Re: standalone application languages

Post by mattmaier » Sat Apr 20, 2013 3:42 pm

Hi Mark,

So the engine is pre-compiled (I guess that's got something to do with the "compileless" workflow) and it gets extended by the stacks I write.

What do you mean by
the engine is programmed in C++, Objective-C or Java
?

Does that mean there are three different version of the engine? If so, where is the option to pick which version to use?

I've already got the open source version of livecode. What do you mean by
see which languages are used
? Can you direct me to a specific place? None of the resources I can find explain what language(s) the standalone applications are actually compiled into.

The "alternateLanguages" command shows JScript, but that's just javascript, not Java.

Maybe rephrasing my original question will help. I'm not a programmer, but I want to create an application that people will access over the web. Google App Engine seems like a good place to start because they provide the whole platform. LiveCode also seems like a good place to start because I can learn one simple language and compile it to run on lots of different systems. However, there is a disconnect between the two. Since GAE provides the whole platform, it will only run programs written in certain languages (Java, Python and Go). What I can't find in any of the LiveCode resources is an answer to whether or not what I write in LiveCode can be compiled into a version that will run on Google App Engine.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5145
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: standalone application languages

Post by Mark » Sat Apr 20, 2013 4:44 pm

Hi,

Currently, there is no LiveCode engine available for Google Apps. Probably, this answers your question already.

You (or someone else) would have to write a LiveCode runtime environment for the GAE. I doubt that Google would embrace that anytime soon. Perhaps it would be possible to create a Java library that interpretes LiveCode and compiles with Google's Java runtime environment. I could imagine that someone will some day try this, but it would involve rewriting the entire LiveCode engine as a Java library. That's lots of work.

The current engine is written in multiple languages, depending on the destination platform. For Mac and Windows it is C++ and Objective-C. For Android, part of the engine is written in Java. I didn't look at the source code yet so I don't know the exact details. If you're not a programmer, it isn't really relevant, because you can only dispose of the engines that are currently available and all that matter is the operating and processor they are compiled for.

"See what languages are used" means that you look at the source code of LiveCode.

Yup, JScript is Microsoft's flavour of JavaScript. I now understand that this is not what you're looking for.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

mattmaier
Posts: 109
Joined: Fri Apr 19, 2013 2:49 am

Re: standalone application languages

Post by mattmaier » Sat Apr 20, 2013 6:09 pm

Mark,

Thanks, I think that clarifies things :-)

So GAE works by interpreting Java, Python or Go programs, and only those programs, which means its services can only be used if you write something in pure Java, Python or Go. If you start from scratch in one of those development environments, then you can deploy the application on GAE.

An alternative would be to extend LiveCode to be able to compile directly into a pure Java/Python/Go application...which is not feasible.

If I'm understanding your explanation correctly, then the code that LiveCode produces as an end-product is in C++ and/or Objective-C (only Android needs some Java). Does that mean it might be possible (leaving aside the question of clean translations) to use a converter to translate LiveCode's standalone application into pure Java/Python/Go? I don't have permission to post links, but I found a couple C-to-Java converters with a quick google search.

Basically these seem like two incompatible toolchains. If I want to end at GAE then I have to start in, say, a Java development environment. I tried to get started in Java a while ago and found it slow going. LiveCode is much more attractive for a variety of reasons. So, if I'm planning to start my toolchain in LiveCode, I have to end somewhere other than GAE.

I haven't gotten to the point in following the resources where they start to describe how to deploy LiveCode applications for servers and/or the web. If I'm understanding this correctly, then when I get to something that can be accessed over the internet I will have a C++/Objective-C application that will have to either be run in a browser plugin or run on a server.

Does that mean I should look at Azure or Amazon's web services instead of GAE? They're just standard servers, not a full platform, so they should be able to run the LiveCode-produced application, right?

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”