Java Code Interpreter for Revolution at Vegas Conference

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

Post Reply
deeverd
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 165
Joined: Mon Jul 16, 2007 11:58 pm

Java Code Interpreter for Revolution at Vegas Conference

Post by deeverd » Fri Jul 20, 2007 11:07 pm

Due to the great value and service that Revolution now gives me, I wanted to make a suggestion for a Revolution product that I believe would add great marketability and exposure to this fantastic program:

An addition to Revolution that would be immensely valuable and popular with users would be to create a translation program that would allow any Rev user to cut and paste Java code script into it, so that Revolution could automatically interpret that script into its own Transcript code and format it to be experimented with by the user in Revolution.

The reason that this would add a large amount of new users to Revolution is that there is such a huge amount of excellent open source code available for Java (and also for Microsoft Visual Studio for that matter). If that treasure trove of open source code could be used by Revolution users, it could certainly lure a lot of frustrated Java programmers to Revolution so that they could enjoy programming much more without giving up all the open source code resources that are available to them in Java.

The reason I mention the Las Vegas Conference in the title of this posting is that an interpreter such as the one I am proposing for someone to create would certainly have perfect timing for them to implement an early beta version of that interpreter at the Las Vegas conference, as well as generate a lot of news among Java users as soon as a working/commercial model is available.

This makes a lot of marketing sense to me, since I live in a small gold mining town where time-tested mining wisdom goes like this: "The best place to find gold is next to a gold mine." Since Java is a gold mine, it makes sense for Revolution users to tap into some of the gold surrounding Java.

Anyway, I wish I knew Java code to work on something like this myself, but currently I am new to programming and Revolution is the first programming language I've ever used. Hope someone can run with this idea and make it successful for them, for us, and for the Revolution.

I am thinking this might not be too difficult of a project for someone who owns a copy of the "Scripter's Scrapbook," since it is filled with both Revolution scripts and Java code for accomplishing the same programs. Best of luck.

Cheers

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

Post by Mark » Sat Jul 21, 2007 12:49 am

Dear deeverd,

Why paste 100 lines of Jave into a Rev script, if you can re-write the code in 10 lines of Transcript while those 10 lines will also run faster than the Java version?

There used to be an external for HyperCard, which allowed for embedding Java beans in a stack. Back then, I really saw its potential and I still believe it is a shame this external was nevere finished. Still, I have never missed such capabilities in Revolution.

If you really need to run Java, can't you run it inside RevBrowser?

Best 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

deeverd
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 165
Joined: Mon Jul 16, 2007 11:58 pm

You're Missing the Point

Post by deeverd » Sat Jul 21, 2007 7:19 pm

Hi Mark,

Thanks for the reply. You mentioned that one could merely rewrite those ten lines of code into Revolution's Transcript, but you're kinda missing the point here. If I could read and understand Java, I'd do just that but Revolution really caters to people like myself who have never done any programming before.

When someone like myself who is new to programming wants to know how to accomplish some interesting task, more times than not there really isn't a good example out there how to script it in Revolution. However, even a fairly casual search with the word "Java" in it often brings up all sorts of possibilities.

Also, a lot of things I want to do have a lot more than 10 lines of code, and it sure would open up a lot of new horizons to be able to cut and paste a Java script into an interpreter just to see how it looks in Revolution.

This would also be one of the best learning tools possible, since newbies such as myself could instantly have access to so many more examples, and thereby reduce the learning curve even further.

So there really is a good reason for having such an interpreter and I truly believe that Revolution would profit from it as much as all of us users.

And, yes, I'm sure that an old hand at programming could say, "Well, then, why don't you also learn Java!" And chances are that I will eventually do just that but I'd certainly rather spend my time right now learning to master Revolution instead, since I enjoy it so much and see so many awesome potentials within it.

Cheers, deeverd

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

Post by Mark » Sat Jul 21, 2007 10:42 pm

Hi deeverd,

Frankly, I don't think that a Java interpreter will ever be built into Revolution itself. Revolution is an OSA environment and thus allows you to use OSA languages from within Revolution. If Java were to be interpreted in Revolution, then why not all other more than 1100 ( http://99-bottles-of-beer.net/ ) programming languages? Everybody could ask: why isn't my favorite language built into Revolution?

The idea of Java is that you need only one runtime engine on your system to run Java, while the Java programmes themselves don't need to include the runtime engine. This makes the software a bit smaller and I think this concept contributes to compatibility.

IMHO, the "right" approach would be to run Java applets inside Revolution, the same way a browser does. The RevBrowser external might allow for this, but I don't know hwo stable this is. A new XCMD like the one for HyperCard would probably be a more elegant approach.

Since you are new to programming, I am pretty sure that everything you would like to do in Revolution is easier to do in native transcript than in Java. Even if you get existing Java software to run inside Revolution, you will have to make Revolution talk to it. Once you get at that point, you will realise that making the software yourself is just as easy. Of course, there are exceptions.

I don't think that the argument that there are no examples for Revolution holds. There are very, very many examples in the HyperCard, Revolution and MetaCard list archives and quite a few in this forum. Also, the examples will show you that there are very many different ways to solve a problem (here are 3 different approaches to the same problem: http://99-bottles-of-beer.net/language- ... t-994.html ).

You will find examples here:
http://h.webring.com/hub?ring=runtimerevoluti1
http://revolution.byu.edu/indexgeneric.php (wow!)
http://www.runrev.info
http://www.altuit.com/webs/altuit2/RunRev/Tutorials.htm
http://www.revjournal.com/tutorials/
http://www.sosmartsoftware.com/?r=revol ... ciels&l=en
http://support.runrev.com/scriptingconferences/

Those are just a few of the many examples and tutorials available on the net.

If you are looking for a specific example and can't find it anywhere, you can always asks for it on this forum or in the Revolution Users Mailing List.

Best,

Mark
Last edited by Mark on Wed Mar 04, 2009 10:24 am, edited 2 times in total.
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

deeverd
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 165
Joined: Mon Jul 16, 2007 11:58 pm

Whatever happened to "Transcript Cookbook" and &q

Post by deeverd » Mon Jul 23, 2007 9:28 pm

Hi Mark,

Your suggested list of resources and information for Revolution are indeed fantastic. The website that goes to the BYU university courses for Revolution (where you said "Wow") are filled with just the sort of information that someone new to programming like myself can really use. Thank you very much.

Although I still disagree with your opinion about the usefulness of a Java interpreter for Revolution, your helpful advice is doing me a world of good.

Please know that I never suggested that there are few resources available for Revolution. I have done a lot of searching over the past few months and have found tons of superb material. However, my first suggestions are based on the amount of helpful material available in the form of code/scripts for Revolution as compared to Java.

Anyway, you are too humble. Another excellent source of scripts I found was on your own website. I'm looking very forward to dissecting your pdf booklet that contains 250 helpful scripts.

One quick question and then I'd better get back to work:

Do you know whatever happened to the "Transcript Cookbook?" Some weeks ago, I downloaded the old, big 6.7 meg pdf manual for Revolution that came out with version 2.12, I believe. It's over 3,000 pages in length and makes for a great resource. But it keeps mentioning things in it such as "Recipes for..." which are supposed to be found in the Transcript Cookbook that was part of a "Development Guide." Do you know if those "recipes" still exist and can be gotten ahold of?

All the best and thanks again, deeverd

davec
Posts: 30
Joined: Tue Dec 12, 2006 9:08 pm
Contact:

Re: You're Missing the Point

Post by davec » Wed Aug 22, 2007 6:37 pm

Hi deeverd
deeverd wrote: If I could read and understand Java, I'd do just that but Revolution really caters to people like myself who have never done any programming before.

When someone like myself who is new to programming wants to know how to accomplish some interesting task, more times than not there really isn't a good example out there how to script it in Revolution. However, even a fairly casual search with the word "Java" in it often brings up all sorts of possibilities.
Well, Java may be popular but that doesn't make it "right" (certainly not for me). It's popular because of the IT herding instinct. It's an good system, but comes at the cost of complexity. Just look at the "Nutshell" books..over 1,000 pages!

Although I've been programming for quite a while now, I'm still a novice Rev user. Rev just needs to be approached differently. When it "clicks" you will wonder how you ever used other development systems.

So, my advice would be to forget Java..it will pull you away from the Zen of Rev. :D

Good luck & fun learning Rev.

Kind Regards,
Dave.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: You're Missing the Point

Post by FourthWorld » Thu Aug 23, 2007 12:51 am

deeverd wrote:Hi Mark,

Thanks for the reply. You mentioned that one could merely rewrite those ten lines of code into Revolution's Transcript, but you're kinda missing the point here. If I could read and understand Java, I'd do just that but Revolution really caters to people like myself who have never done any programming before.
Agreed, and for that reason I think one is better off learning Rev before attempting to also learn either Java or JavaScript (which did you mean?).

Both Java and JavaScript have a significantly steeper learning curve than Rev, and the nature of programming is such that it's very rare that one can just copy-n-paste code from various projects and expect it to run without error. Even if the language itself is supported in the host system, the developer doing the pasting will need to understand the code well enough to modify it to make it work well in the new system.

Very little code in any language is truly portable.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

ooper
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 46
Joined: Mon Aug 17, 2009 12:22 am

Re: Java Code Interpreter for Revolution at Vegas Conference

Post by ooper » Thu Mar 11, 2010 8:19 am

I know this is an old post, but I'd like to respond. Having 8 years of HyperCard and 14 years of professional development I can certainly see a good marriage between Java and RunRev on both ends. One can hardly ignore the amount of quality open source for Java, or its strengths in Object Orientation, which lends itself well for teamwork, not to mention the tools in terms of development, security, performance and so forth. This can nicely complement RunRev's procedural but elegant language on the front end and UI side of the code.

How could they work together?

On one end, RunRev could bundle an XCMD that can call a JVM (Java Virtual Machine) without a relaunch. On the other end, RevTalk (the language) could be compiled to JVM bytecodes. What this means is that Runrev could run in a JVM anywhere and because the bycodes are native, you could run Java code in RunRev and vice-versa. The case in point JVM-compiled versions of Groovy, Ruby, PHP and others, but RunRev is best for its simplicity and dynamic nature. This would give RevTalk all the advantages surrounding the tools and skills that take hold in today's business world.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Java Code Interpreter for Revolution at Vegas Conference

Post by mwieder » Sun Mar 14, 2010 5:18 pm

Good points, and Jan Schenkel presented a preview of his rev-java interface at the latest conference in Edinburgh. It's on the way.

Post Reply