Permlink Replies: 7 - Pages: 1 - Last Post: 10-Nov-2014 11:40 Last Post By: davidekholm Threads: [ Previous | Next ]
davidekholm

Posts: 3,550
Registered: 18-Oct-2002
Playing with other scripting languages
Posted: 07-Nov-2014 12:51
  Click to reply to this thread Reply
The upcoming jAlbum 12.3 can actually execute any kind of scripting language that runs on the Java Virtual Machine, not only BeanShell and JavaScript (although those are the only ones currently bundled).

If you like to explore modern computer languages like Groovy, Scala, Jython and jRuby, just drop the relevant .jar file inside jAlbum's "ext" folder to add support for it. Once installed, jAlbum's system console now contains an entry for that language and you can script in that language by just using the right file extension for your scripts, for instance using "init.js" for JavaScript or "init.groovy" for Groovy scripts.

Talking about Groovy - an attractive alternative to BeanShell and JavaScript. Groovy is almost as Java compatible as BeanShell but has several improvements, for instance a very relaxed code style. Here's a Groovy example you can run in jAlbum after installing the "groovy-all-2.3.7.jar" file:
list = ["A", "Simple", "String", "Array"]
for (e in list) println(e)


To install Groovy support, get the Groovy binary from Groovys home page unzip it and put the "embeddable/groovy-all-2.3.7.jar" file inside jAlbum's "ext" folder and restart jAlbum.

Why am I writing this? Well I know many of you feel Java is tough. Perhaps you can tell what other scripting language (if not JavaScript) that you wish future jAlbum versions to support out of the box?
jGromit

Posts: 7,279
Registered: 31-Jan-2006
Re: Playing with other scripting languages
Posted: 07-Nov-2014 13:28   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
davidekholm wrote:
Perhaps you can tell what other scripting language (if not JavaScript) that you wish future jAlbum versions to support out of the box?

I want it to support APL. Oh, and find me an APL keyboard I can use. ;)

For anyone who's curious, Google APL language and take a look at some of the examples. A stunningly powerful language, but sometimes referred to as a "write only" language - figuring out someone else's code was often very difficult.
davidekholm

Posts: 3,550
Registered: 18-Oct-2002
Re: Playing with other scripting languages
Posted: 07-Nov-2014 14:34   in response to: jGromit in response to: jGromit
  Click to reply to this thread Reply
jGromit wrote:
davidekholm wrote:
Perhaps you can tell what other scripting language (if not JavaScript) that you wish future jAlbum versions to support out of the box?

I want it to support APL. Oh, and find me an APL keyboard I can use. ;)


Oh, you should study Brainfuck :-) I don't know whether it's available on top of the Java Virtual Machine though.

I'd say one of the coolest things with Java isn't the language itself. It's the large open API and the Java Virtual Machine that makes it possible to run cross platform code. The Java language is just one of many possible languages to run on the JVM.
jGromit

Posts: 7,279
Registered: 31-Jan-2006
Re: Playing with other scripting languages
Posted: 07-Nov-2014 14:43   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
davidekholm wrote:
Oh, you should study Brainfuck :-)

Holy crap!
AndreWolff

Posts: 1,715
Registered: 14-Dec-2007
Re: Playing with other scripting languages
Posted: 09-Nov-2014 14:58   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
What about TypeScript, the successor of JavaScript?

It must be good, because it is designed by Anders Hejlsberg, the best language designer I know. He designed in the past Turbo Pascal, Delphi, C# and VB.Net, all language which I like and are easy to learn.
davidekholm

Posts: 3,550
Registered: 18-Oct-2002
Re: Playing with other scripting languages
Posted: 09-Nov-2014 19:52   in response to: AndreWolff in response to: AndreWolff
  Click to reply to this thread Reply
AndreWolff wrote:
What about TypeScript, the successor of JavaScript?

It must be good, because it is designed by Anders Hejlsberg, the best language designer I know. He designed in the past Turbo Pascal, Delphi, C# and VB.Net, all language which I like and are easy to learn.


Looks interesting. I can't find any sign that it can run on top of the Java Virtual Machine though. You can pass a request for that to the developers!
AndreWolff

Posts: 1,715
Registered: 14-Dec-2007
Re: Playing with other scripting languages
Posted: 09-Nov-2014 20:28   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
I understand from the typescript site that TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.

For me the most important advantage is that you can use it in Visual Studio Express with intellisense support and nice debugging tools.
davidekholm

Posts: 3,550
Registered: 18-Oct-2002
Re: Playing with other scripting languages
Posted: 10-Nov-2014 11:40   in response to: AndreWolff in response to: AndreWolff
  Click to reply to this thread Reply
Then it's workable. You could use that language, compile it to JavaScript and then use that JavaScript in jAlbum.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums