Yegor Bryukhov | 1 May 06:08 2007
Picon

[groovy-user] How to find Groovy version form inside the application?

Hello,

Is there any API to find the version of Groovy?

--
Best regards,
Yegor
__________________________________________________________
Yegor Bryukhov,
Research Associate
Center for Algorithms and Interactive Scientific Software
City College of New York

Jochen Theodorou | 1 May 06:32 2007
Picon

Re: [groovy-user] Speed outlook for groovy

Glen Pepicelli schrieb:
> 
> Hi all.
> 
> Been using Groovy now for a few weeks and think it's the greatest thing
> since sliced turkey ... (yum).
> 
> Unfortunately, I noticed that groovy's runtime performance is turkey like
> too.  (For those of you you don't know a turkey is a fat flightless bird).
> 
> Now that's NOT A complaint.  Groovy is going to save me a ton of time.
> 
> But I've got to plan ahead and was wondering about a year out from now what
> the speed situation will be?  Faster, slower, about the same?
> 
> Also I noticed that each closure makes a 4K increase in code size... yikes. 
> Condidering closures are great for one liners that could add up.

A year is much... There is for example invokedynamic that might help to 
increase performance, I want to add polymorphic inline caches (PIC) to 
groovy, which might do a speed up too... let me say it this way... I 
think we will implement the 4-5 language features we want to have for 
1.1 and 2.0 will get a new MetaClass system that allows us to address 
the speed issue. The work on 2.0 will start soon as a branch... but 
without any tests it is difficult to say how much speed we will gain. 
The best thing would be a special hotspot for groovy....

bye blackdrag

--

-- 
Jochen "blackdrag" Theodorou
Groovy Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Edward Povazan | 1 May 06:35 2007
Picon

Re: [groovy-user] Dumb question about println with findAll


On 30-Apr-07, at 1:39 PM, Barzilai Spinak wrote:

> Edward Povazan wrote:
>> Hello,
>>
>> On 30-Apr-07, at 12:07 PM, Joel Neely wrote:
>>
>>> Suppose I have a boolean array, e.g.
>>>
>>> def foo = [false, false, true, false, true, false];
>>>
>>> and I want to see the indices of the true values. I had expected  
>>> to be
>>> able to do something like:
>>>
>>> println (0..<foo.size()).findAll {foo[it]};
>> Be wary of using println without parentheses on more complex  
>> expressions. Or rather in this case, beware of what the  
>> parentheses mean :)
>> This is actually:
>> println(0..<foo.size()) which == null and then
>> null.findAll {foo[it]}
>> So you are printing the range 0..<foo.size() which is correct :)
>>
>> -Ed
>
> I saw the parenthesis problem right away but you beat me at  
> answering. It has come up quite often on the list, lately  ;-)
> Anyway, shouldn't null.findAll throw a NPE? I know that "null" is  
> an real Groovy object... but then. maybe it should have its  
> MetaClass throw NPE?
Interesting, I think of null in Groovy as 'nothing', so finding or  
collecting nothing gives nothing :)
I don't know if this was the intent when designing the semantics of  
the language, that we should think of null not as in Java references  
or C pointers etc. but as a 'nothingness'/empty etc. But doing so  
keeps me happy in my coding.

-Ed

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

tog | 1 May 07:46 2007
Picon

Re: [groovy-user] Groovy 1.1-beta-1 released with annotation support

Congratulation MrG and all the team for this new version ...
With all these new features, Groovy is now getting ready for the enterprise !!!
This looks very promising.

keep Groovin'

On 5/1/07, Guillaume Laforge <glaforge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Dear all,

After Groovy was awarded the first prize of the JAX conference in Germany last week for being the most innovative and creative project in 2007 in the Java community, we're pleased to announce the release of Groovy 1.1-beta-1.

This release is the first beta release after the release of Groovy 1.0. But it's a very important release as we've been working on key features putting Groovy clearly as the de facto enterprise scripting solution. Indeed, Groovy is now the first and sole alternative language for the JVM that supports Java 5 annotations. Groovy 1.1-beta-1 also supports Java 5 static imports.

You can now use Groovy to write your EJB 3 / JPA beans , to wire your components with Google Guice, to mark your services transactional with Spring's <at> Transactional annotation, to develop JBoss Seam entities, or to be able to write unit tests with JUnit 4 or TestNG. If you want the best and seamless Java integration, and be able to use the latest frameworks around that leverage Java 5 annotations, look no further, Groovy is the unique solution to your scripting and dynamic needs. Whether you hack a script in your shell, or if you want to implement Domain-Specific Languages, Groovy has everything you need to make you more productive.

Of course, this release contains a nice list of bug fixes and improvements, making Groovy a very stable and viable platform on its own, or for your integration needs. You can find the list of all the bugs and improvements on JIRA.

Just to highlight some of the other interesting gems you'll find in this release, note that Groovy mocks now let's you deal with properties as well, you can group list and map elements with a discriminator closure with the groupBy() method from the GDK, the use directive now returns the value returned by the closure it is passed, and you can add maps together. All in all, minor features, but which might come in handy from time to time. A more interesting one is probably the ExpandoMetaClass from Grails has been brought back to Groovy.

You can download Groovy from the usual location. You'll be able to download the binary distribution, the source distribution, and a zip of the online documentation (over 500 pages) and the JavaDoc.

While the core Groovy team was working on the language, the Groovy Eclipse Plugin team has been making awesome progress, and the (soon-to-be-released) plugin now sports good code-completion capabilities. But we also have good news for the IntelliJ IDEA lovers, JetBrains is working full-steam to provide their own Groovy plugin, so stay tuned for additional news in that area.

A part of the Groovy and Grails team will be present at JavaOne 2007 in San Francisco to present the cool things you can do with Groovy, or how Grails reivents Spring / Hibernate development, so please come and say hi if you're around. This year, Groovy and Grails will be very well represented, there will be 8 Groovy sessions and 3 Grails sessions. Overall, twice as much as last year.

Additionaly, on Monday evening, just before JavaOne, there will be a special GroovyOne community event from 7pm to 10pm at the W Hotel organized by the fine folks from NoFluffJustStuff and the AboutGroovy community site. It will be a great opportunity to meet core Groovy and Grails developers, leads and book authors. More details to follow.

Thanks a lot to everybody involved, and on behalf of the Groovy team, we hope you will enjoy this new release!

--
Guillaume Laforge
Groovy Project Manager



Charles Oliver Nutter | 1 May 08:11 2007
Picon

Re: [groovy-user] Speed outlook for groovy

Jochen Theodorou wrote:
> A year is much... There is for example invokedynamic that might help to 
> increase performance, I want to add polymorphic inline caches (PIC) to 
> groovy, which might do a speed up too... let me say it this way... I 
> think we will implement the 4-5 language features we want to have for 
> 1.1 and 2.0 will get a new MetaClass system that allows us to address 
> the speed issue. The work on 2.0 will start soon as a branch... but 
> without any tests it is difficult to say how much speed we will gain. 
> The best thing would be a special hotspot for groovy....

i.e. a special hotspot for dynlangs...and trust me, we want the exact 
same thing. It's time to come together.

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Alex Shneyderman | 1 May 08:27 2007
Picon

Re: [groovy-user] How to find Groovy version form inside the application?

You could trace

groovy -v

to

org.codehaus.groovy.runtime.InvokerHelper.getVersion()

On 5/1/07, Yegor Bryukhov <ybryukhov@...> wrote:
> Hello,
>
> Is there any API to find the version of Groovy?
>
> --
> Best regards,
> Yegor

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Daniel.Sun | 1 May 08:55 2007
Picon

[groovy-user] Annotation bug in Groovy1.1 beta-1


Hi all,

 <at> Override does not work, the following code should not pass because B.prte
can not override A.prt.
but the code passes, the result is 

----------------------------------------------------------------
groovy> class A {
groovy> 	void prt() { println "A" }
groovy> }
groovy> class B extends A {
groovy> 	 <at> Override
groovy> 	void prte() { println "B" }
groovy> }
groovy> A a = new B()
groovy> a.prt()

A
------------------------------------------------------
If I change the name the B.prte to B.prt, I get B.

Daniel.Sun

===============================================
class A {
	void prt() { println "A" }
}

class B extends A {
	 <at> Override
	void prte() { println "B" } // not prt, but pass
}

A a = new B()
a.prt()
--

-- 
View this message in context: http://www.nabble.com/Annotation-bug-in-Groovy1.1-beta-1-tf3673630.html#a10265220
Sent from the groovy - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Jochen Theodorou | 1 May 09:10 2007
Picon

Re: [groovy-user] Annotation bug in Groovy1.1 beta-1

Daniel.Sun schrieb:
> Hi all,
> 
>  <at> Override does not work, the following code should not pass because B.prte
> can not override A.prt.

 <at> Override is an annotation used bei the java compiler, the groovy 
compiler ignores all source level annoatations. Annotation support means 
to allow the suer to use Annoatations that are added to the bytecode, 
for example for different annoatation based persistence frameworks. 
Annoatation support does not mean to do what the java compiler does.

bye blackdrag

--

-- 
Jochen "blackdrag" Theodorou
Groovy Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Daniel.Sun | 1 May 09:11 2007
Picon

Re: [groovy-user] Annotation bug in Groovy1.1 beta-1


Jochen,

Thank you, Jochen.
Though annotation in Groovy is partially supported, it's enough for us to
use :)

Cheers,
Daniel.Sun

Jochen Theodorou wrote:
> 
> Daniel.Sun schrieb:
>> Hi all,
>> 
>>  <at> Override does not work, the following code should not pass because
>> B.prte
>> can not override A.prt.
> 
>  <at> Override is an annotation used bei the java compiler, the groovy 
> compiler ignores all source level annoatations. Annotation support means 
> to allow the suer to use Annoatations that are added to the bytecode, 
> for example for different annoatation based persistence frameworks. 
> Annoatation support does not mean to do what the java compiler does.
> 
> bye blackdrag
> 
> -- 
> Jochen "blackdrag" Theodorou
> Groovy Tech Lead (http://groovy.codehaus.org)
> http://blackdragsview.blogspot.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 

--

-- 
View this message in context: http://www.nabble.com/Annotation-bug-in-Groovy1.1-beta-1-tf3673630.html#a10265324
Sent from the groovy - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Jochen Theodorou | 1 May 09:22 2007
Picon

Re: [groovy-user] Speed outlook for groovy

Charles Oliver Nutter schrieb:
> Jochen Theodorou wrote:
>> A year is much... There is for example invokedynamic that might help 
>> to increase performance, I want to add polymorphic inline caches (PIC) 
>> to groovy, which might do a speed up too... let me say it this way... 
>> I think we will implement the 4-5 language features we want to have 
>> for 1.1 and 2.0 will get a new MetaClass system that allows us to 
>> address the speed issue. The work on 2.0 will start soon as a 
>> branch... but without any tests it is difficult to say how much speed 
>> we will gain. The best thing would be a special hotspot for groovy....
> 
> i.e. a special hotspot for dynlangs...and trust me, we want the exact 
> same thing. It's time to come together.

I also thought about a common MetaClass for JRuby and Groovy, but they 
are very different. Groovy allows to set the MetaClass itself, something 
Ruby does not allow I think. This way we can change the way methods are 
dispatched or what is recognized as method. For example we could have 
Ruby style dispatching.. but can have Ruby a Groovy style dispatching? 
JRuby lives from not to have to check types for the method it calls and 
other things. So a MetaClass that has to respect both ways would have a 
overhead for JRuby. Additionally the MetaClass in 2.0 will be more like 
a query and modification interface for the user, the real implementation 
will be separated from it and user will no longer exchange the MetaClass 
completely, they will add artifacts to the MetaClass that are 
controlling what the MetaClass does. The needs for a Groovy MetaClass 
are simply very different from JRuby.

And about invokedynamic, I made some suggestions to John.

bye blackdrag

--

-- 
Jochen "blackdrag" Theodorou
Groovy Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Gmane