Quantcast

Testing the Java 8 / Parrot parser online!

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Testing the Java 8 / Parrot parser online!

Guillaume Laforge
Administrator
Hi all,

I've deployed a version of the venerable Groovy Web Console that uses the Parrot parser!
And we'd love if you could try it out  and report your findings.
You don't have to install anything, just go online, and run some scripts or classes, using Java 8 syntax constructs and APIs, and see how well it works.

I've blogged about it here:

And you can try it here online directly, without installing anything:

It's built with Java 8, and runs on the upcoming version of Google App Engine's Java runtime running on an OpenJDK 8. It's using the "indy" jar, thus with the invoke dynamic support automatically.

I'll deploy that version at some point to the usual web console URL, once we have an official release of the Parrot parser.

What we'd like is you to go and try it out :-)
Please spend a moment to try different things, and if you find any problem, please report them back here.

Thanks for your help!

Guillaume

--
Guillaume Laforge
Apache Groovy committer & PMC Vice-President
Developer Advocate @ Google Cloud Platform

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Testing the Java 8 / Parrot parser online!

Winnebeck, Jason

That is awesome. If the Java 8 syntax is supported, does that mean Groovy will support lambdas? One thing that saddened me about using Java 8 from Groovy is that you have the overhead of closure classes/meta class and the “dynamic” conversion/proxy into the Java functional interfaces, while the same code written in Java uses the lambda functionality which appears to return a singleton instance of a VM-generated class with presumably much less overhead.

 

Jason

 

From: Guillaume Laforge [mailto:[hidden email]]
Sent: Friday, March 24, 2017 4:37 PM
To: [hidden email]
Subject: Testing the Java 8 / Parrot parser online!

 

Hi all,

 

I've deployed a version of the venerable Groovy Web Console that uses the Parrot parser!

And we'd love if you could try it out  and report your findings.

You don't have to install anything, just go online, and run some scripts or classes, using Java 8 syntax constructs and APIs, and see how well it works.

 

I've blogged about it here:

 

And you can try it here online directly, without installing anything:

 

It's built with Java 8, and runs on the upcoming version of Google App Engine's Java runtime running on an OpenJDK 8. It's using the "indy" jar, thus with the invoke dynamic support automatically.

 

I'll deploy that version at some point to the usual web console URL, once we have an official release of the Parrot parser.

 

What we'd like is you to go and try it out :-)

Please spend a moment to try different things, and if you find any problem, please report them back here.

 

Thanks for your help!

 

Guillaume

 

--

Guillaume Laforge
Apache Groovy committer & PMC Vice-President

Developer Advocate @ Google Cloud Platform

 

This email message and any attachments are for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message and any attachments.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Testing the Java 8 / Parrot parser online!

Guillaume Laforge
Administrator
Currently, lambdas are indeed backed by Groovy closures, or use the SAM type coercion mechanism.

On Fri, Mar 24, 2017 at 10:06 PM, Winnebeck, Jason <[hidden email]> wrote:

That is awesome. If the Java 8 syntax is supported, does that mean Groovy will support lambdas? One thing that saddened me about using Java 8 from Groovy is that you have the overhead of closure classes/meta class and the “dynamic” conversion/proxy into the Java functional interfaces, while the same code written in Java uses the lambda functionality which appears to return a singleton instance of a VM-generated class with presumably much less overhead.

 

Jason

 

From: Guillaume Laforge [mailto:[hidden email]]
Sent: Friday, March 24, 2017 4:37 PM
To: [hidden email]
Subject: Testing the Java 8 / Parrot parser online!

 

Hi all,

 

I've deployed a version of the venerable Groovy Web Console that uses the Parrot parser!

And we'd love if you could try it out  and report your findings.

You don't have to install anything, just go online, and run some scripts or classes, using Java 8 syntax constructs and APIs, and see how well it works.

 

I've blogged about it here:

 

And you can try it here online directly, without installing anything:

 

It's built with Java 8, and runs on the upcoming version of Google App Engine's Java runtime running on an OpenJDK 8. It's using the "indy" jar, thus with the invoke dynamic support automatically.

 

I'll deploy that version at some point to the usual web console URL, once we have an official release of the Parrot parser.

 

What we'd like is you to go and try it out :-)

Please spend a moment to try different things, and if you find any problem, please report them back here.

 

Thanks for your help!

 

Guillaume

 

--

Guillaume Laforge
Apache Groovy committer & PMC Vice-President

Developer Advocate @ Google Cloud Platform

 

This email message and any attachments are for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message and any attachments.



--
Guillaume Laforge
Apache Groovy committer & PMC Vice-President
Developer Advocate @ Google Cloud Platform

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Testing the Java 8 / Parrot parser online!

Jochen Theodorou
In reply to this post by Winnebeck, Jason
On 24.03.2017 22:06, Winnebeck, Jason wrote:
> That is awesome. If the Java 8 syntax is supported, does that mean
> Groovy will support lambdas? One thing that saddened me about using Java
> 8 from Groovy is that you have the overhead of closure classes/meta
> class and the “dynamic” conversion/proxy into the Java functional
> interfaces, while the same code written in Java uses the lambda
> functionality which appears to return a singleton instance of a
> VM-generated class with presumably much less overhead.

Groovy will be supporting that at one point I think.

bye Jochen

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Testing the Java 8 / Parrot parser online!

Russel Winder-3
In reply to this post by Guillaume Laforge
On Fri, 2017-03-24 at 21:36 +0100, Guillaume Laforge wrote:
> […]
>
> It's built with Java 8, and runs on the upcoming version of Google
> App
> Engine's Java runtime running on an OpenJDK 8. It's using the "indy"
> jar,
> thus with the invoke dynamic support automatically.
> […]

What is the exact difference between the indy artefacts and the non-
indy artefacts?

Why are we still making two complete sets of artefacts int eh Groovy
build, surely now we should have just one.

--
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[hidden email]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [hidden email]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Testing the Java 8 / Parrot parser online!

Jochen Theodorou
On 25.03.2017 07:52, Russel Winder wrote:

> On Fri, 2017-03-24 at 21:36 +0100, Guillaume Laforge wrote:
>> […]
>>
>> It's built with Java 8, and runs on the upcoming version of Google
>> App
>> Engine's Java runtime running on an OpenJDK 8. It's using the "indy"
>> jar,
>> thus with the invoke dynamic support automatically.
>> […]
>
> What is the exact difference between the indy artefacts and the non-
> indy artefacts?
>
> Why are we still making two complete sets of artefacts int eh Groovy
> build, surely now we should have just one.

I cannot suggest to users to use indy with a normal JDK7, so the minimum
requirement for it is JDK8. And we are not there yet.

bye Jochen


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Testing the Java 8 / Parrot parser online!

jwagenleitner
On Sat, Mar 25, 2017 at 1:26 AM, Jochen Theodorou <[hidden email]> wrote:
On <a href="tel:25.03.2017%2007" value="+12503201707" target="_blank">25.03.2017 07:52, Russel Winder wrote:
On Fri, 2017-03-24 at 21:36 +0100, Guillaume Laforge wrote:
[…]

It's built with Java 8, and runs on the upcoming version of Google
App
Engine's Java runtime running on an OpenJDK 8. It's using the "indy"
jar,
thus with the invoke dynamic support automatically.
[…]

What is the exact difference between the indy artefacts and the non-
indy artefacts?


My understanding is that the only difference between the "-indy" and non-indy jars pertains to class files generated from .groovy source files within the Groovy project itself.  Using the indy jars does affect scripts compiled or run against those jars, the default is still the legacy callsite code.  In order compile with indy you'd still have to set the indy setting in the compiler config or pass -indy to groovyc.  Since core contains very few groovy source files (I think maybe just one), using the -indy jars would mainly affect those using subprojects such as groovy-console, groovy-docgenerator, etc. that are mostly written using Groovy.

 
Why are we still making two complete sets of artefacts int eh Groovy
build, surely now we should have just one.

I cannot suggest to users to use indy with a normal JDK7, so the minimum requirement for it is JDK8. And we are not there yet.

bye Jochen

 
Based on what I've seen I agree, at least for making indy the default mode for compilation would be best to wait until jdk8 is the min version.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Testing the Java 8 / Parrot parser online!

paulk_asert
Well, master is currently destined for Groovy 3 (or perhaps 4 -
depending on how things pan out and how we finalise numbering) and it
is ear-marked for JDK8+, so we could start making those changes soon.
I was going to wait until I split off the GROOVY_2_6_X branch which
I'll do after working out the best way to do the Parrot/Parrot
back-port merging.

Cheers, Paul.

On Sun, Mar 26, 2017 at 7:23 AM, John Wagenleitner
<[hidden email]> wrote:

> On Sat, Mar 25, 2017 at 1:26 AM, Jochen Theodorou <[hidden email]> wrote:
>>
>> On 25.03.2017 07:52, Russel Winder wrote:
>>>
>>> On Fri, 2017-03-24 at 21:36 +0100, Guillaume Laforge wrote:
>>>>
>>>> […]
>>>>
>>>> It's built with Java 8, and runs on the upcoming version of Google
>>>> App
>>>> Engine's Java runtime running on an OpenJDK 8. It's using the "indy"
>>>> jar,
>>>> thus with the invoke dynamic support automatically.
>>>> […]
>>>
>>>
>>> What is the exact difference between the indy artefacts and the non-
>>> indy artefacts?
>>>
>
> My understanding is that the only difference between the "-indy" and
> non-indy jars pertains to class files generated from .groovy source files
> within the Groovy project itself.  Using the indy jars does affect scripts
> compiled or run against those jars, the default is still the legacy callsite
> code.  In order compile with indy you'd still have to set the indy setting
> in the compiler config or pass -indy to groovyc.  Since core contains very
> few groovy source files (I think maybe just one), using the -indy jars would
> mainly affect those using subprojects such as groovy-console,
> groovy-docgenerator, etc. that are mostly written using Groovy.
>
>
>>>
>>> Why are we still making two complete sets of artefacts int eh Groovy
>>> build, surely now we should have just one.
>>
>>
>> I cannot suggest to users to use indy with a normal JDK7, so the minimum
>> requirement for it is JDK8. And we are not there yet.
>>
>> bye Jochen
>>
>
> Based on what I've seen I agree, at least for making indy the default mode
> for compilation would be best to wait until jdk8 is the min version.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Groovy and JVM version [was Testing the Java 8 / Parrot parser online!]

Russel Winder-3
In reply to this post by Jochen Theodorou
On Sat, 2017-03-25 at 09:26 +0100, Jochen Theodorou wrote:
> […]
>
> I cannot suggest to users to use indy with a normal JDK7, so the
> minimum 
> requirement for it is JDK8. And we are not there yet.

I have to admit I am still of the opinion that you define a version
that will be the last version compatible with infrastructure X and the
say, if you want to use a later version upgrade your infrastructure. I
think Groovy is past that point with JVM; I do not see why development
of our product should be beholden to the inability of people to upgrade
from Java 7 to Java 8.

Are we going to say that Groovy 2.5 will only work with JDK8 or does
that have to wait for 2.6 or 3.0? Given master is no beyond 2.5 can we
get rid of the two build set up for master and just have indy?

--
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[hidden email]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [hidden email]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Groovy and JVM version [was Testing the Java 8 / Parrot parser online!]

paulk_asert
Russel, seems we were thinking about the same things. I responded to
the earlier thread. Does that answer your question?
In summary, we could start trying to move to indy only on master. I
think stability wise we are in good shape. There are some question
marks still however about indy performance in some circumstances, so
we no doubt would want to do a fresh round of performance checks.

Cheers, Paul.

On Mon, Mar 27, 2017 at 11:35 PM, Russel Winder <[hidden email]> wrote:

> On Sat, 2017-03-25 at 09:26 +0100, Jochen Theodorou wrote:
>> […]
>>
>> I cannot suggest to users to use indy with a normal JDK7, so the
>> minimum
>> requirement for it is JDK8. And we are not there yet.
>
> I have to admit I am still of the opinion that you define a version
> that will be the last version compatible with infrastructure X and the
> say, if you want to use a later version upgrade your infrastructure. I
> think Groovy is past that point with JVM; I do not see why development
> of our product should be beholden to the inability of people to upgrade
> from Java 7 to Java 8.
>
> Are we going to say that Groovy 2.5 will only work with JDK8 or does
> that have to wait for 2.6 or 3.0? Given master is no beyond 2.5 can we
> get rid of the two build set up for master and just have indy?
>
> --
> Russel.
> =============================================================================
> Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[hidden email]
> 41 Buckmaster Road    m: +44 7770 465 077   xmpp: [hidden email]
> London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
12
Loading...