Replace LiveCode Script with JavaScript, forever
Moderator: Klaus
-
- Livecode Opensource Backer
- Posts: 10076
- Joined: Fri Feb 19, 2010 10:17 am
Re: Replace LiveCode Script with JavaScript, forever
And here is, as you might say, the image that makes a certain point re my remarks:
- -
Look to the left!
Ooooo: it's Javascript.
And so it goes;
-
- -
Look to the left!
Ooooo: it's Javascript.
And so it goes;
-
Re: Replace LiveCode Script with JavaScript, forever
richmond62 wrote: ↑Tue Aug 11, 2020 7:46 amI do think a bit more documentation about how one might connect "something" written in LiveCodeNo constructive point in the OP's original post
with "something" written in another programming language might not be a bad thing.
@ Richard -FourthWorld wrote: ↑Tue Aug 11, 2020 8:14 amHere's a good starting point:
https://livecode.com/resources/api/#liv ... ript/shell
I have to admit, Richard, I'm not sure how 'shell' would be used as a bridge from Lc to say, any other programming language either, unless you mean to write out and save a code snippet, then use shell to execute it at system level. The question would then be how you get any information back from said execution?
@ Richmond -
I'd agree with that (the documentation part), but hybrid programming is nothing new. You've had experience with BBC basics, and while I don't know much about that family specifically, I *do* know that lots of other basics (and a few other high level languages) had inline assemblers or even the ability to use straight up binary available in them to speed up things they were just too slow at.Hybrid programming might prove quite useful under certain circumstances; and while that
probably sounds like rediscovering the wheel, a way to make a 'wheel' using LiveCode that was well
documented would be a good thing.
It wouldn't be much of a leap to think Lc could do the same, but I'm not sure of the benefit if it were applied to say, inline scripting of another scripting language


-
- Livecode Opensource Backer
- Posts: 10076
- Joined: Fri Feb 19, 2010 10:17 am
Re: Replace LiveCode Script with JavaScript, forever
HyperCard of course . . .
All pause for bowing heads and muttering "ॐ, ॐ,ॐ" at mention of HyperCard.
did allow AppleScript inline . . .
All pause for bowing heads and muttering "ॐ, ॐ,ॐ" at mention of HyperCard.
did allow AppleScript inline . . .
Re: Replace LiveCode Script with JavaScript, forever
That isn't still available in Lc? Shows how little I know
However, I was referring to a completely different scripting language, in this case .js


However, I was referring to a completely different scripting language, in this case .js


-
- Livecode Opensource Backer
- Posts: 10076
- Joined: Fri Feb 19, 2010 10:17 am
Re: Replace LiveCode Script with JavaScript, forever
https://livecode.com/infinite-livecode-an-example/
"The engineering team at LiveCode recently published a technical whitepaper on how we’d like to make LiveCode Builder interoperate better with other languages by improving its so-called ‘foreign function interface’."
Aha . . .
Well, not quite what I meant.
"The engineering team at LiveCode recently published a technical whitepaper on how we’d like to make LiveCode Builder interoperate better with other languages by improving its so-called ‘foreign function interface’."
Aha . . .
Well, not quite what I meant.
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Replace LiveCode Script with JavaScript, forever
JavaScript is used for the Dictionary, which is displayed using a Browser widget.richmond62 wrote: ↑Tue Aug 11, 2020 10:26 amAnd here is, as you might say, the image that makes a certain point re my remarks:
-
Screenshot 2020-08-11 at 12.22.59.png
-
Look to the left!
Ooooo: it's Javascript.
And so it goes;
-
Screenshot 2020-08-11 at 12.25.49.png
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Replace LiveCode Script with JavaScript, forever
In LC, shell is a function; any result from executing it will be the return value.bogs wrote: ↑Tue Aug 11, 2020 11:11 amrichmond62 wrote: ↑Tue Aug 11, 2020 7:46 amI do think a bit more documentation about how one might connect "something" written in LiveCodeNo constructive point in the OP's original post
with "something" written in another programming language might not be a bad thing.@ Richard -FourthWorld wrote: ↑Tue Aug 11, 2020 8:14 amHere's a good starting point:
https://livecode.com/resources/api/#liv ... ript/shell
I have to admit, Richard, I'm not sure how 'shell' would be used as a bridge from Lc to say, any other programming language either, unless you mean to write out and save a code snippet, then use shell to execute it at system level. The question would then be how you get any information back from said execution?
It's fun to play with - consider exploring with bash to get a feel for how it works. Using rsync with it is even more fun (and very practical, since you can make your own rsync GUI to run your backups with it).
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Replace LiveCode Script with JavaScript, forever
Similarly, LC offers "do <otherLanguageStatements> as...", where the "as" clause specifies the target language, where the target language can be any of the host-OS-provided options returned with the alternateLanguages function.richmond62 wrote: ↑Tue Aug 11, 2020 11:19 amHyperCard of course . . .
All pause for bowing heads and muttering "ॐ, ॐ,ॐ" at mention of HyperCard.
did allow AppleScript inline . . .
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Replace LiveCode Script with JavaScript, forever
The list of things not wanted may be infinite. Can you describe what you do want?richmond62 wrote: ↑Tue Aug 11, 2020 11:40 amhttps://livecode.com/infinite-livecode-an-example/
"The engineering team at LiveCode recently published a technical whitepaper on how we’d like to make LiveCode Builder interoperate better with other languages by improving its so-called ‘foreign function interface’."
Aha . . .
Well, not quite what I meant.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Replace LiveCode Script with JavaScript, forever
Pretty useless on 'nix though, as it is only supported on Mac, Win, and html5.FourthWorld wrote: ↑Tue Aug 11, 2020 4:13 pmSimilarly, LC offers "do <otherLanguageStatements> as...", where the "as" clause specifies the target language, where the target language can be any of the host-OS-provided options returned with the alternateLanguages function.

-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Replace LiveCode Script with JavaScript, forever
Lot's of things are "useless" on Linux (macOS is a certified Unix), like LC's window registry functions, support for macOS bundles, hardware integration for mobile devices, and other platform-specific features.bogs wrote: ↑Tue Aug 11, 2020 4:24 pmPretty useless on 'nix though, as it is only supported on Mac, Win, and html5.FourthWorld wrote: ↑Tue Aug 11, 2020 4:13 pmSimilarly, LC offers "do <otherLanguageStatements> as...", where the "as" clause specifies the target language, where the target language can be any of the host-OS-provided options returned with the alternateLanguages function.
Most interoperability on Linux is done with stdin and stdout, where LC's shell function is the natural go-to.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 10076
- Joined: Fri Feb 19, 2010 10:17 am
Re: Replace LiveCode Script with JavaScript, forever
Prickle, prickle . . .Can you describe what you do want?

Seems I did that earlier:
What I meant is, for the sake of argument, to program a front-end in LiveCode and some of the
"heavy lifting round the back" in another language and be able to "spit out" a standalone application at the end of the work.
-
- Livecode Opensource Backer
- Posts: 10076
- Joined: Fri Feb 19, 2010 10:17 am
Re: Replace LiveCode Script with JavaScript, forever
-the host-OS-provided options returned with the alternateLanguages function
Well, yeah:
- -
But that completely misses the point.
I don't want to use Applescript in LiveCode (I want to use LiveCode).

BUT I want, when I "get stuck" with LiveCode (or, far more likely, when I find I can do somethings rather
more easily in, say, LISP), to do part of my programming work outwith the LiveCode IDE and then connect that work with
my LiveCode work into one functioning unit.
A chap who lives in my block of flats is a 'serious programmer' (i.e. not like Richmond)
and regularly does programming on the same project in C, C++, C#, PASCAL and Java.
- Attachments
-
- Babel.livecode.zip
- Grab it while its lukewarm.
- (977 Bytes) Downloaded 248 times
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Replace LiveCode Script with JavaScript, forever
I wouldn't want to see the company take on the considerable effort to create a standalone packager for any language that doesn't already have one.richmond62 wrote: ↑Tue Aug 11, 2020 5:13 pmPrickle, prickle . . .Can you describe what you do want?![]()
Seems I did that earlier:
What I meant is, for the sake of argument, to program a front-end in LiveCode and some of the
"heavy lifting round the back" in another language and be able to "spit out" a standalone application at the end of the work.
As you say, "I want to use LiveCode".
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Replace LiveCode Script with JavaScript, forever
In practical terms, what does that mean? Has he found a compiler that will let you mix all those languages in source files, and produce a single executable?richmond62 wrote: ↑Tue Aug 11, 2020 5:23 pmA chap who lives in my block of flats is a 'serious programmer' (i.e. not like Richmond)
and regularly does programming on the same project in C, C++, C#, PASCAL and Java.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn