Re: 12.7 million downloads for 2015

2016-01-08 Thread Søren Berg Glasius
Hi Guillaume,

Very impressive numbers indeed! Groovy 2016 here we come!

Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.

From: Guillaume Laforge 
Reply: users@groovy.apache.org 
Date: January 7, 2016 at 23:28:53
To: users@groovy.apache.org 
Subject:  12.7 million downloads for 2015  

Hi again,

As the year ended, I collected the latest download figures from Maven Central 
and Bintray.

In 2015, Apache Groovy's been downloaded 12.7 million times!

With about 8 millions from Maven Central and 4.7 millions from Bintray.
Historically, Central represented the biggest chunk, but interestingly, for the 
last quarter, the downloads are even between the two.

The total figure above doesn't account for the first quarter numbers from 
Codehaus, as Codehaus is no more and I didn't have access to the latest figures 
there.
And with Apache, you can also download Groovy from dozens of mirrors worldwide, 
and I don't think we can have a consolidated access to those numbers either 
AFAIK.

For reference, from memory, we had 4.5 million downloads in 2014, 3 millions in 
2013, and 1.7 million in 2012. So that's a big increase!
Clearly, the move to the Apache Software Foundation seems to have sparked the 
interest of new Groovy developers.

Let's make 2016 another Groovy year for you all!

Guillaume

--
Guillaume Laforge
Apache Groovy committer & PMC chair
Product Ninja & Advocate at Restlet

Blog: http://glaforge.appspot.com/
Social: @glaforge / Google+

Re: float/double calculation bug ?

2017-03-19 Thread Søren Berg Glasius
Hi,

This discussion does not belong on the dev mailing list, but the user
mailing list (*users@groovy.apache.org )*. Please
continue your very interesting discussion there :-) Thanks.

/Søren
On Sun, 19 Mar 2017 at 16:47 James Bond  wrote:

What happens if you use .toDouble() instead of .toFloat, and an explicitly
double 100.0 literal?  Right now, your computation is taking an integer,
dividing by a float, then multiplying by another float.  I suspect that
going double precision won't fix this in all cases (floating point math is,
after all, just an approximation), but at least you're processing the
values as precisely as you can.

On Sun, Mar 19, 2017 at 8:28 AM, Derek Visch  wrote:

Looks like floating point to me, what are you expecting?

On Mar 19, 2017 10:04 AM, "Tx. T"  wrote:

Any idea why the follow code "calc" returns the "70%" of the 33 incorrectly?

testing on: Groovy Version: 2.4.9 JVM: 1.8.0_112 Vendor: Oracle
Corporation OS: Mac OS X

Mac OS X 10.12.3



groovy:000> def calc = { amount, ttl ->
groovy:001> double rtn
groovy:002> if (amount[-1] != '%') rtn = amount.toDouble()
groovy:003> else rtn = ttl / 100.0 * amount.replaceAll(/%\Z/,
'').toFloat()
groovy:004>
groovy:004> rtn
groovy:005> }
===> groovysh_evaluate$_run_closure1@39fcbef6*groovy:000> calc("70%", 33)
===> 230999.997*
groovy:000> calc("10%", 33)
===> 33000.0
groovy:000> calc("20%", 33)
===> 66000.0
groovy:000> calc("30%", 33)
===> 99000.0
groovy:000> calc("40%", 33)
===> 132000.0
groovy:000> calc("50%", 33)
===> 165000.0
groovy:000> calc("60%", 33)
===> 198000.0*groovy:000> calc("70%", 330000)
===> 230999.997*
groovy:000> calc("80%", 33)
===> 264000.0
groovy:000> calc("90%", 33)
===> 297000.0
groovy:000> calc("100%", 33)
===> 33.0


-- 
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


Re: float/double calculation bug ?

2017-03-19 Thread Søren Berg Glasius
You are running into Floating point rounding in the JVM, which is not a
Groovy bug.

Your code can be salvaged by using BigDecimal:

def calc = { amount, ttl ->
BigDecimal rtn
if (amount[-1] != '%') rtn = amount.toBigDecimal()
else rtn = ttl / 100.0 * amount.replaceAll(/%\Z/, '').toBigDecimal()

rtn
}


On Sun, 19 Mar 2017 at 17:16 Søren Berg Glasius  wrote:

Hi,

This discussion does not belong on the dev mailing list, but the user
mailing list (*users@groovy.apache.org )*. Please
continue your very interesting discussion there :-) Thanks.

/Søren

On Sun, 19 Mar 2017 at 16:47 James Bond  wrote:

What happens if you use .toDouble() instead of .toFloat, and an explicitly
double 100.0 literal?  Right now, your computation is taking an integer,
dividing by a float, then multiplying by another float.  I suspect that
going double precision won't fix this in all cases (floating point math is,
after all, just an approximation), but at least you're processing the
values as precisely as you can.

On Sun, Mar 19, 2017 at 8:28 AM, Derek Visch  wrote:

Looks like floating point to me, what are you expecting?

On Mar 19, 2017 10:04 AM, "Tx. T"  wrote:

Any idea why the follow code "calc" returns the "70%" of the 33 incorrectly?

testing on: Groovy Version: 2.4.9 JVM: 1.8.0_112 Vendor: Oracle
Corporation OS: Mac OS X

Mac OS X 10.12.3



groovy:000> def calc = { amount, ttl ->
groovy:001> double rtn
groovy:002> if (amount[-1] != '%') rtn = amount.toDouble()
groovy:003> else rtn = ttl / 100.0 * amount.replaceAll(/%\Z/,
'').toFloat()
groovy:004>
groovy:004> rtn
groovy:005> }
===> groovysh_evaluate$_run_closure1@39fcbef6*groovy:000> calc("70%", 33)
===> 230999.997*
groovy:000> calc("10%", 33)
===> 33000.0
groovy:000> calc("20%", 33)
===> 66000.0
groovy:000> calc("30%", 33)
===> 99000.0
groovy:000> calc("40%", 33)
===> 132000.0
groovy:000> calc("50%", 33)
===> 165000.0
groovy:000> calc("60%", 33)
===> 198000.0*groovy:000> calc("70%", 33)
===> 230999.997*
groovy:000> calc("80%", 33)
===> 264000.0
groovy:000> calc("90%", 33)
===> 297000.0
groovy:000> calc("100%", 330000)
===> 33.0


-- 
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88 <40%2044%2091%2088>, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.

-- 
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88 <40%2044%2091%2088>, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


Re: [ANNOUNCE] Apache Groovy 2.4.11 released

2017-04-28 Thread Søren Berg Glasius
Congratulations on the latest release. It is awesome to see Groovy move
forward at a steady pace!

Have a gr8 weekend!

/Søren

On Fri, 28 Apr 2017 at 04:08 Paul King  wrote:

> Dear community,
>
> The Apache Groovy team is pleased to announce version 2.4.11 of Apache
> Groovy.
> Apache Groovy is a multi-facet programming language for the JVM.
> Further details can be found at the http://groovy.apache.org website.
>
> This release is a maintenance release of the GROOVY_2_4_X branch.
> It is strongly encouraged that all users using prior
> versions on this branch upgrade to this version.
>
> This release includes 15 bug fixes/improvements as outlined in the
> changelog:
>
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12318123&version=12340047
>
> Sources can be downloaded from: http://www.groovy-lang.org/download.html
> Convenience binaries, SDK and documentation can be found at:
> http://www.groovy-lang.org/download.html
> Jars are also available within the major binary repositories.
> We would like to thank all people who contributed to this release.
>
> We welcome your help and feedback. For more information on how to
> report problems, and to get involved, visit the project website at
> https://groovy.apache.org/
>
> Best regards,
>
> The Apache Groovy team.
>
-- 
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


Re: Java 8 Date/Time API Extension Methods

2017-05-07 Thread Søren Berg Glasius
Well done! Thank you for sharing!

/Søren

On Sat, 6 May 2017 at 22:30 Joe Wolf  wrote:

> Hi, I want to announce the 1.0 release of an OSS project I've been working
> on called goodtimes.
>
> The Groovy JDK has always been one of my favorite parts of Groovy, but it
> currently lacks support for newer Java 8 classes. Goodtimes fills some of
> this gap until the GDK is updated by providing extension methods for the
> Java 8 Date/Time API akin to those available for java.util.Date and
> Calendar.
>
> Source and documentation are hosted on GitHub:
> https://github.com/bdkosher/goodtimes
>
> Just add the dependency to your classpath to give it a try (assuming
> you're on Java 8, of course).
>
> @Grab('com.github.bdkosher:goodtimes:1.0')
>
> compile 'com.github.bdkosher:goodtimes:1.0'
>
> -Joe
> @bdkosher
>
-- 
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


Re: Java 8 Date/Time API Extension Methods

2017-06-07 Thread Søren Berg Glasius
I think it makes perfect sense that you can do the same calculations with
java.time.* as you can with java.util.Date

/Søren

On Wed, 7 Jun 2017 at 16:08 Guillaume Laforge  wrote:

> I'm coming back on this idea of having it directly integrated in Groovy
> core.
>
> Any more thoughts on this from anyone?
>
> On Tue, May 9, 2017 at 3:32 AM, Joe Wolf  wrote:
>
>> Thanks Søren and Guillaume. I'm glad to finally contribute something to
>> the Groovy community!
>>
>> On Sun, May 7, 2017 at 4:14 PM, Guillaume Laforge 
>> wrote:
>>
>>> This is indeed cool, and I'm wondering if it shouldn't be part of Groovy
>>> itself directly :-)
>>>
>>> On Sun, May 7, 2017 at 10:09 PM, Søren Berg Glasius 
>>> wrote:
>>>
>>>> Well done! Thank you for sharing!
>>>>
>>>> /Søren
>>>>
>>>>
>>>> On Sat, 6 May 2017 at 22:30 Joe Wolf  wrote:
>>>>
>>>>> Hi, I want to announce the 1.0 release of an OSS project I've been
>>>>> working on called goodtimes.
>>>>>
>>>>> The Groovy JDK has always been one of my favorite parts of Groovy, but
>>>>> it currently lacks support for newer Java 8 classes. Goodtimes fills some
>>>>> of this gap until the GDK is updated by providing extension methods for 
>>>>> the
>>>>> Java 8 Date/Time API akin to those available for java.util.Date and
>>>>> Calendar.
>>>>>
>>>>> Source and documentation are hosted on GitHub:
>>>>> https://github.com/bdkosher/goodtimes
>>>>>
>>>>> Just add the dependency to your classpath to give it a try (assuming
>>>>> you're on Java 8, of course).
>>>>>
>>>>> @Grab('com.github.bdkosher:goodtimes:1.0')
>>>>>
>>>>> compile 'com.github.bdkosher:goodtimes:1.0'
>>>>>
>>>>> -Joe
>>>>> @bdkosher
>>>>>
>>>> --
>>>> Best regards / Med venlig hilsen,
>>>> Søren Berg Glasius
>>>>
>>>> Hedevej 1, Gl. Rye, 8680 Ry, Denmark
>>>> Mobile: +45 40 44 91 88 <+45%2040%2044%2091%2088>, Skype: sbglasius
>>>> --- Press ESC once to quit - twice to save the changes.
>>>>
>>>
>>>
>>>
>>> --
>>> Guillaume Laforge
>>> Apache Groovy committer & PMC Vice-President
>>> Developer Advocate @ Google Cloud Platform
>>>
>>> Blog: http://glaforge.appspot.com/
>>> Social: @glaforge <http://twitter.com/glaforge> / Google+
>>> <https://plus.google.com/u/0/114130972232398734985/posts>
>>>
>>
>>
>
>
> --
> Guillaume Laforge
> Apache Groovy committer & PMC Vice-President
> Developer Advocate @ Google Cloud Platform
>
> Blog: http://glaforge.appspot.com/
> Social: @glaforge <http://twitter.com/glaforge> / Google+
> <https://plus.google.com/u/0/114130972232398734985/posts>
>
-- 
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


Re: Apache Groovy and language influences

2017-10-04 Thread Søren Berg Glasius
Hi G-man!

Nice slidedeck. Thank you for sharing!


/Søren

On Thu, 5 Oct 2017 at 02:44 Guillaume Laforge  wrote:

> Hi all,
>
> Earlier today at the JavaOne conference in San Francisco, I did a
> presentation on the cross influences between languages, where I'm showing
> some of the languages that we were inspired from when we created Groovy,
> and also how Groovy influenced other languages as well.
>
> Thought you might be interested in some of the background and history :-)
>
>
> https://speakerdeck.com/glaforge/how-languages-influence-each-other-reflections-on-14-years-of-apache-groovy
>
> Guillaume
>
> --
> Guillaume Laforge
> Apache Groovy committer & PMC Vice-President
> Developer Advocate @ Google Cloud Platform
>
> Blog: http://glaforge.appspot.com/
> Social: @glaforge <http://twitter.com/glaforge> / Google+
> <https://plus.google.com/u/0/114130972232398734985/posts>
>
-- 
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


GR8Conf EU Call For Paper

2018-01-18 Thread Søren Berg Glasius
Dear community,

GR8Conf Europe 2018 Call For Paper is open and I would like to encourage
you to submit talks to the conference. Subjects could be anything with
relation to the Groovy Ecosystem, or subjects related to DevOps.

You can submit your content here: http://cfp.gr8conf.org - this is your
chance to shine in the Groovy community!

Have a great weekend,



-- 
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


Last day to submit talks to GR8Conf EU 10th anniversary

2018-01-31 Thread Søren Berg Glasius
Hi,

Just want to let you know that today is the last day to propose talks for
GR8Conf Europe 2018 - the 10th anniversary edition.

Talks that evolves around the Groovy Ecosystem are welcomed, both
beginners, intermediate and advanced talks. If you have topics that leans
towards DevOps, then submit those too!

You can submit at this link: http://cfp.gr8conf.org - and if you have any
questions, please let me know!

Best regards,
Søren Berg Glasius
GR8Conf Europe Organizer
-- 
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


Re: Groovy Champions proposal feedback

2018-02-13 Thread Søren Berg Glasius
I'm definitely +1

It is always important to recognize and encourage the ones making a
difference to the community.

On Tue, 13 Feb 2018 at 11:32 Schalk Cronjé  wrote:

>
> That's a +1 from me for the concep.
>
>
> On 13/02/2018 10:58, Paul King wrote:
> >
> > Hi everyone,
> >
> > A few of us have had various discussions (in fact over many years)
> > about having a recognition scheme similar to Java Champions,
> > perhaps called "Groovy Champions" or "Apache Groovy Champions"
> > or something else entirely if we think of a better name.
> >
> > I think the idea has always been to recognize contribution within the
> > whole Groovy ecosystem not just the Apache Groovy project. The many
> > tens of projects within the ecosystem are often where many ideas come
> > from for the project's future evolution and also where future
> contributors
> > may arise. And in any case, Groovy has always been about making
> > coding productive and fun and we should celebrate that widely!
> >
> > There are various questions to ask like should such a scheme
> > be formally coordinated by the project/by Apache or should it be run as a
> > community-driven unsanctioned activity and if so what guidelines should
> > be in place. Also, there are many details like how will the scheme
> > operate?
> > How are new members elected? Is it a lifetime recognition or is there
> > an "emeritus" status? And so forth. Java Champions vote themselves
> > on new champions and the recognition has a lifetime status for instance.
> > if we progress this idea, we'd need to make that all clear but that isn't
> > the purpose of this email - we need to first decide if we like the idea.
> >
> > Even if we like the idea, there are still some hurdles to step through.
> > We've already sought some informal feedback from other parts of
> > Apache and other projects within the Groovy Ecosystem and we'll
> > likely need further discussions. We want something that embraces
> > the whole community but fits in with Apache project governance
> > around trademarks/branding.
> >
> > So, the first question is: are we as a project in favor of such a scheme?
> >
> > Cheers, Paul.
>
>
> --
> Schalk W. Cronjé
> Twitter / Ello / Toeter : @ysb33r
>
> --
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


Re: Groovy Champions proposal feedback

2018-02-13 Thread Søren Berg Glasius
+1 on the name!

I think it's cool to differentiate the Groovy award from other awards like
Java Rock-stars and Java Champions, Grails Rock-stars, and more!


On Tue, 13 Feb 2018 at 14:09 Guillaume Laforge  wrote:

> It's funny, I think we didn't think about "stars" in our previous
> conversations, and I must say I quite like it, and it makes sense
> considering our logo :-D
>
> On Tue, Feb 13, 2018 at 1:58 PM, Jennifer Strater 
> wrote:
>
>> +1 for the proposal and +1 for "Groovy Stars"
>>
>> On Tue, Feb 13, 2018 at 1:54 PM, Paul King  wrote:
>>
>>> I don't mind "Groovy Stars" as a name!
>>>
>>> Of course it begs the question "Star trek" or "Star Wars" - the long
>>> journey
>>> of programming language design vs the language wars! :-)
>>>
>>>
>>> On Tue, Feb 13, 2018 at 9:46 PM, Dierk König 
>>> wrote:
>>>
>>>> I’m all for honoring contributions to the language/ecosystem/community.
>>>> Given our logo, „Groovy Star“ comes to mind :-)
>>>>
>>>> Cheers
>>>> Dierk
>>>>
>>>> sent from:mobile
>>>>
>>>> Am 13.02.2018 um 12:29 schrieb Paolo Di Tommaso <
>>>> paolo.ditomm...@gmail.com>:
>>>>
>>>> It sound a nice idea also to promote the visibility of the groovy
>>>> community.
>>>>
>>>>
>>>> p
>>>>
>>>> On Tue, Feb 13, 2018 at 12:18 PM, Søren Berg Glasius >>> > wrote:
>>>>
>>>>> I'm definitely +1
>>>>>
>>>>> It is always important to recognize and encourage the ones making a
>>>>> difference to the community.
>>>>>
>>>>> On Tue, 13 Feb 2018 at 11:32 Schalk Cronjé  wrote:
>>>>>
>>>>>>
>>>>>> That's a +1 from me for the concep.
>>>>>>
>>>>>>
>>>>>> On 13/02/2018 10:58, Paul King wrote:
>>>>>> >
>>>>>> > Hi everyone,
>>>>>> >
>>>>>> > A few of us have had various discussions (in fact over many years)
>>>>>> > about having a recognition scheme similar to Java Champions,
>>>>>> > perhaps called "Groovy Champions" or "Apache Groovy Champions"
>>>>>> > or something else entirely if we think of a better name.
>>>>>> >
>>>>>> > I think the idea has always been to recognize contribution within
>>>>>> the
>>>>>> > whole Groovy ecosystem not just the Apache Groovy project. The many
>>>>>> > tens of projects within the ecosystem are often where many ideas
>>>>>> come
>>>>>> > from for the project's future evolution and also where future
>>>>>> contributors
>>>>>> > may arise. And in any case, Groovy has always been about making
>>>>>> > coding productive and fun and we should celebrate that widely!
>>>>>> >
>>>>>> > There are various questions to ask like should such a scheme
>>>>>> > be formally coordinated by the project/by Apache or should it be
>>>>>> run as a
>>>>>> > community-driven unsanctioned activity and if so what guidelines
>>>>>> should
>>>>>> > be in place. Also, there are many details like how will the scheme
>>>>>> > operate?
>>>>>> > How are new members elected? Is it a lifetime recognition or is
>>>>>> there
>>>>>> > an "emeritus" status? And so forth. Java Champions vote themselves
>>>>>> > on new champions and the recognition has a lifetime status for
>>>>>> instance.
>>>>>> > if we progress this idea, we'd need to make that all clear but that
>>>>>> isn't
>>>>>> > the purpose of this email - we need to first decide if we like the
>>>>>> idea.
>>>>>> >
>>>>>> > Even if we like the idea, there are still some hurdles to step
>>>>>> through.
>>>>>> > We've already sought some informal feedback from other parts of
>>>>>> > Apache and other projects within the Groovy Ecosystem and we'll
>>>>>> > likely need further discussions. We want something that embraces
>>>>>> > the whole community but fits in with Apache project governance
>>>>>> > around trademarks/branding.
>>>>>> >
>>>>>> > So, the first question is: are we as a project in favor of such a
>>>>>> scheme?
>>>>>> >
>>>>>> > Cheers, Paul.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Schalk W. Cronjé
>>>>>> Twitter / Ello / Toeter : @ysb33r
>>>>>>
>>>>>> --
>>>>> Best regards / Med venlig hilsen,
>>>>> Søren Berg Glasius
>>>>>
>>>>> Hedevej 1, Gl. Rye, 8680 Ry, Denmark
>>>>> Mobile: +45 40 44 91 88 <+45%2040%2044%2091%2088>, Skype: sbglasius
>>>>> --- Press ESC once to quit - twice to save the changes.
>>>>>
>>>>
>>>>
>>>
>>
>
>
> --
> Guillaume Laforge
> Apache Groovy committer & PMC Vice-President
> Developer Advocate @ Google Cloud Platform
>
> Blog: http://glaforge.appspot.com/
> Social: @glaforge <http://twitter.com/glaforge> / Google+
> <https://plus.google.com/u/0/114130972232398734985/posts>
>
-- 
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


Re: Groovy Champions proposal feedback

2018-02-19 Thread Søren Berg Glasius
I disagree with MG.

A star is an object that shines, and in this case shines light on the
Groovy language and ecosystem. Hence I think the name is both professional,
and since it can be directly linked to the star in the Groovy logo I think
it makes perfect sense. In sports you also have star players and in music
(and Java) you have rock stars. That you can find examples that relates to
games on Nintendo does not make a valid point IMO. The "All Stars" just
makes it so much better - as that's what Paul, Jochen and others are .

My few cents worth.

/Søren

On Sun, 18 Feb 2018 at 17:02 MG  wrote:

>
>
> On 18.02.2018 13:38, Eric Kinsella wrote:
>
> +1up on Groovy Stars.
>
>
> "Get a life" ;-)
>
> But seriously, all the people one-upping "Groovy Stars" - consider whether
> that name really sends the right professional message with regards to
> Groovy ? I am convinced it does not.
> Managers who might decide whether Groovy can be used in a project are
> typically conservative and sensitive to those things, and they do not
> normally follow nerd humor... (next suggestion I see coming along the
> Stars-crossed-line, is to call Paul and Jochen "Groovy All Stars")
>
> As another example, it looks like "Pokemon Stars" on the Nintendo Switch
> might become a reality:
>
> http://www.techradar.com/news/pokemon-stars-all-the-latest-leaks-from-the-rumored-nintendo-switch-game
>
>
>
>
> On Sun, Feb 18, 2018 at 6:13 AM, Daniel Sun 
> wrote:
>
>> Hi Paul,
>>
>>  “Groovy Champions” make people associate it with "Java Champions"
>> easily. As for "Groovy Stars", it is interesting but let me associate
>> "Song
>> Stars" and "Kungfu Stars" easily... I wish other people would not
>> associate
>> as I do...
>>
>>   Similarly, many years ago some one suggested to name current "Grape"
>> as "Groovy Baby", the latter is interesting but not formal...
>>
>>   To sum up, +1 to “Groovy Champions”.
>>
>> Cheers,
>> Daniel.Sun
>>
>>
>>
>> --
>> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html
>>
>
>
> --
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


Re: Groovy Champions proposal feedback - Groovy MVPs ?

2018-02-20 Thread Søren Berg Glasius
Are we at a point where there should be put out a vote for which name to
use? There are several good ones, and a few not so good... not judging
however :D

On Tue, 20 Feb 2018 at 11:07 Guillaume Laforge  wrote:

> Or even GrooVIP :-D
>
> On Tue, Feb 20, 2018 at 9:20 AM, Cédric Champeau <
> cedric.champ...@gmail.com> wrote:
>
>> I agree with Guillaume: MVP sounds "Minimal Viable Product" in my head :)
>> Anoter option: VIP ;)
>>
>> 2018-02-20 <20%2018%2002%2020> 8:32 GMT+01:00 Jennifer Strater <
>> jenn.stra...@gmail.com>:
>>
>>> Although there seems to be a lot of disagreement about the name,
>>> everyone seems to be in favor of the idea. What is the next step, Paul?
>>>
>>>
>>> On 20. Feb 2018, at 07:56, Peter McNeil  wrote:
>>>
>>> You're all missing the obvious "Groovy GR8" :-)
>>>
>>> On 20/02/18 11:35, Paul King wrote:
>>>
>>> Supreme Thanks Award Recognising contributions? :-)
>>>
>>> On Tue, Feb 20, 2018 at 7:08 AM, Kostas Saidis  wrote:
>>>
>>>> My own few cents, too:
>>>>
>>>> Groovy Star, Groovy Champion, Groovy MVP all have their pros and cons.
>>>> I would suggest something along the lines of Groovy Exceptional Community
>>>> Member (Groovy ECM) or Groovy Distinguished Community Member (Groovy DCM).
>>>> New acronym, professional enough, focusing on the overall community and not
>>>> only the language per se.
>>>>
>>>> Kostas
>>>>
>>>>
>>>> On 19/2/2018 10:26 μμ, MG wrote:
>>>>
>>>> I have never heard "MVP" =  "Minimum Viable Product", so I doubt this
>>>> would pose a problem. Also do you suggest that people would actually read
>>>> "Groovy has announced its Minimum Viable Products of 2018" ?
>>>> STAR has 129 meanings as an acronym, btw, according to
>>>> https://acronyms.thefreedictionary.com/STAR
>>>>
>>>> On 19.02.2018 20:39, Guillaume Laforge wrote:
>>>>
>>>> For me, MVP sounds too much like Minimum Viable Product :
>>>> https://en.wikipedia.org/wiki/Minimum_viable_product
>>>>
>>>> On Mon, Feb 19, 2018 at 8:32 PM, MG  wrote:
>>>>
>>>>> Following the sports analogy, what about
>>>>>
>>>>> "Groovy MVPs"
>>>>>
>>>>> ?
>>>>>
>>>>> Any game can have Most Valuable Players (even if only one is typically
>>>>> crowned in the US), and I think "Groovy announced its 2018 MVPs" has a 
>>>>> nice
>>>>> ring to it.
>>>>>
>>>>> Cheers,
>>>>> mg
>>>>>
>>>>>
>>>>>
>>>>> On 19.02.2018 12:03, Søren Berg Glasius wrote:
>>>>>
>>>>> I disagree with MG.
>>>>>
>>>>> A star is an object that shines, and in this case shines light on the
>>>>> Groovy language and ecosystem. Hence I think the name is both 
>>>>> professional,
>>>>> and since it can be directly linked to the star in the Groovy logo I think
>>>>> it makes perfect sense. In sports you also have star players and in music
>>>>> (and Java) you have rock stars. That you can find examples that relates to
>>>>> games on Nintendo does not make a valid point IMO. The "All Stars" just
>>>>> makes it so much better - as that's what Paul, Jochen and others are .
>>>>>
>>>>> My few cents worth.
>>>>>
>>>>> /Søren
>>>>>
>>>>> On Sun, 18 Feb 2018 at 17:02 MG  wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On 18.02.2018 13:38, Eric Kinsella wrote:
>>>>>>
>>>>>> +1up on Groovy Stars.
>>>>>>
>>>>>>
>>>>>> "Get a life" ;-)
>>>>>>
>>>>>> But seriously, all the people one-upping "Groovy Stars" - consider
>>>>>> whether that name really sends the right professional message with 
>>>>>> regards
>>>>>> to Groovy ? I am convinced it does not.
>>>>>> Managers who might decide whether Groovy can be used in a project are
>>>>>> typically conservative and sensitive to those things, and they do not
>

Re: Groovy Champions proposal feedback

2018-02-25 Thread Søren Berg Glasius
@Mario

Very good thoughts, I really like the idea that an award is permanent, I
believe that goes for Java Champs as well.

Naming wise, Groovyssimo is fun, but not naming material for an award :-)
But we need to narrow down the name-space to something realistic that can
be voted on.



On Mon, 26 Feb 2018 at 08:50 Mario Garcia  wrote:

> +1 to what Guillaume said :) Common guys! Lets focus on what we think is a
> great language and let others think what they want!
>
> Regarding the duration of the award. I've though about it, trying not to
> think in terms of annually or permanent, but trying to see what's out there
> outside the CS world, and I ended up thinking on the Nobel prize. I'd like
> some ideas of Nobel prize:
>
>- Takes place every year
>- A given prize could be vacant a given year.
>- It's so important that it's really noticeable to be awarded
>- Makes people very proud of some achievement they did a given year
>- Once you're a Nobel you will always be a Nobel.
>- Of  course there's been awarded people that even rejected the prize
>but that never really underrated the prize overtime
>- New members are chosen by previous members and some other relevant
>people (members of the parliament among others). Here I'd add the idea
>of letting anybody to propose a nominee, but leaving the final decision to
>the prize committee (whatever we decide who is in)
>
> Despite the difference of content between the Nobel prize and the Groovy
> awards, after reviewing these points I think they seem to fit better in the
> Groovy Champions/Stars idea. There is also something I haven't heard yet. I
> guess this will require a kind of permanent organization, e.g. to contact
> members, nominees, organize the awards, a web to show the winners...etc
>
> BTW: Here you have another naming for the awards: Groovisimo Awards. Can
> you imaging a "Groovisimo" statue like the Oscars ? It would be a blast
> X
>
> My two cents
> Mario
>
> 2018-02-25 10:53 GMT+01:00 Guillaume Laforge :
>
>> James Stachan's quote has really been taken out of context, and
>> over-exagerated bu the Scala-fanboys.
>> If Scala had been what it is now, James would probably not have initiated
>> Groovy *then*. But Scala was nascent just like Groovy *then*.
>> It's like if Gavin King had said that he wouldn't have invented Hibernate
>> if JPA had existed... but JPA came ten years later.
>>
>> This quote was really harmful, but as the saying goes, lots of water's
>> gone through the bridges since then.
>>
>> There's still the myth of slowliness, which we all know is not true
>> anymore, even in pure dynamic mode (without even mentioning static
>> compilation)
>> Usually, you spend way more time in network latency (access to remote
>> resources, access to database, etc) than waiting for the CPU spent by just
>> the pure language execution time.
>>
>> Also back on James Strachan: he went to play with Scala, then with
>> Kotlin, and has come back to using Groovy.
>> He's using Groovy on a regular basis through his work with Jenkins, its
>> pipelines, etc.
>> So he's back at his old love!
>>
>> So let's turn the page on those stories, please.
>>
>> Guillaume
>>
>>
>> On Sun, Feb 25, 2018 at 10:26 AM, Daniel Sun 
>> wrote:
>>
>>> The creator of Groovy said "I can honestly say if someone had shown me
>>> the
>>> Programming in Scala book...". I think he compared Scala with the old
>>> version of Groovy he created in about 2003. As we all know, Groovy has
>>> evolved a lot, so I never care about others' out-dated opinions on
>>> Groovy :)
>>>
>>> Cheers,
>>> Daniel.Sun
>>>
>>>
>>>
>>> --
>>> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html
>>>
>>
>>
>>
>> --
>> Guillaume Laforge
>> Apache Groovy committer & PMC Vice-President
>> Developer Advocate @ Google Cloud Platform
>>
>> Blog: http://glaforge.appspot.com/
>> Social: @glaforge <http://twitter.com/glaforge> / Google+
>> <https://plus.google.com/u/0/114130972232398734985/posts>
>>
>
> --
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


Re: [DISCUSS] Groovy 2.6 potential retirement to focus on Groovy 3.0

2018-06-13 Thread Søren Berg Glasius
While the project I'm on is still on JDK 7, but due to Grails 2.x I think
that option 3 is the best way to move forward (and nudge projects on to a
higher version of Grails as well).

/Søren

On Wed, 13 Jun 2018, 09.42 ,  wrote:

> I agree on option 3 (abandon 2.6 immediately).
>
>
>
> JDK 6 or 7 is not in use anywhere that I have project visibility.
>
>
>
> Full support for JKD9+ is becoming a pressing issue. Users are concerned
> about the ability of Groovy to run on future JDK releases (including
> GraalVM), more than legacy support.
>
>
>
> Best Regards
>
>
>
> *From:* Paolo Di Tommaso [mailto:paolo.ditomm...@gmail.com]
> *Sent:* Wednesday, June 13, 2018 3:18 AM
> *To:* users@groovy.apache.org
> *Subject:* Re: [DISCUSS] Groovy 2.6 potential retirement to focus on
> Groovy 3.0
>
>
>
> I agree on option 3 (abandon 2.6 immediately).
>
>
>
> Full support for JKD9+ is becoming a pressing issue. Users are concerned
> about the ability of Groovy to run on future JDK releases (including
> GraalVM), more than legacy support.
>
>
>
>
>
> Cheers,
>
> p
>
>
>
> On Wed, Jun 13, 2018 at 9:11 AM, David Dawson <
> david.daw...@simplicityitself.com> wrote:
>
> I would vote 2.
>
>
>
> Actually, i would vote 3) abandon 2.6 immediately.
>
>
>
> No projects I have any knowledge of still use jdk 7.
>
>
>
> *From:* pa...@asert.com.au
>
> *Sent:* 13 June 2018 08:06
>
> *To:* users@groovy.apache.org
>
> *Reply to:* users@groovy.apache.org
>
> *Subject:* [DISCUSS] Groovy 2.6 potential retirement to focus on Groovy
> 3.0
>
>
>
>
>
> Hi everyone,
>
>
>
> There was some discussion at gr8conf about how to speed up delivery of
> Groovy 3.0. Some of that discussion was around the scope of what we want to
> include and have yet to complete in 3.0 but I won't discuss that right now.
>
>
>
> One of the other discussion points was Groovy around 2.6. As many of you
> know, we have released alpha versions of Groovy 2.6. That version is a
> backport of most but not all of Groovy 3.0 to JDK7 including the Parrot
> parser (though it isn't enabled by default). The purpose of this version
> has always been to assist people/projects wanting to use the Parrot parser
> but who might be stuck on JDK7. So in some sense it is an intermediate
> version to assist with porting towards Groovy 3.0. While that is still a
> noble goal in theory, in practice, many of our users are already on JDK8
> and we have limited resources to work on many potential areas.
>
>
>
> With that in mind, we'd like to understand the preferences in our user
> base for the following two options:
>
>
>
> Option 1: please continue releasing the best possible 2.6 even if that
> slows down the final release of Groovy 3.0 and delays further work on
> better support for JDK9+.
>
>
>
> Option 2: please release one more alpha of 2.6 over the next month or so
> which will become the best version to use to assist porting for users stuck
> on JDK7 and then focus on 3.0. The 2.6 branch will essentially be retired
> though we will consider PRs from the community for critical fixes.
>
>
>
> Feedback welcome.
>
>
>
> Cheers, Paul.
>
>
>
>
>
>
>
-- 

Best regards / Med venlig hilsen,

Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


Re: What is the best replacement for running scripts using groovy-all?

2018-12-19 Thread Søren Berg Glasius
Hi Paul,

This is where The @Grab anotation comes in handy:
http://docs.groovy-lang.org/latest/html/documentation/grape.html

It wil automatically download your dependencies and it works in Groovy
scripts too.

Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


On Wed, 19 Dec 2018 at 20:27, Paul Moore  wrote:

> On Wed, 19 Dec 2018 at 08:56, Paul Moore  wrote:
> >
> > On Wed, 19 Dec 2018 at 00:03, Keith Suderman  wrote:
> > >
> > > Option 4) Use the Maven Assembly plugin or the Shade plugin to build
> your own groovy-all Jar file.  Or just use
> https://github.com/gradle/gradle-groovy-all
> >
> > Thanks. Are there any "beginner guide" style instructions on how to
> > use the Maven Assembly plugin or Shade plugin that you can point me
> > to? As I say, I don't use Maven, so the instructions for the plugins
> > use a lot of terms and ideas I'm not familiar with. I can (and
> > probably will!) use the gradle-groovy-all but I'd like to learn a bit
> > more about the Java ecosystem (I'm mostly a Python programmer, but I
> > use Groovy as an alternative for environments where JVM-based tools
> > are a better fit than Python-based ones). I find that starting Groovy
> > *without* a Java/JVM background, there's a lot of assumed knowledge
> > it's quite hard to pick up (unless you're willing to learn Java at the
> > same time ;-))
>
> I've been digging around with this some more, and I've come to the
> conclusion that it's not that important to me in fact to have a single
> groovy-all jar for my deployment. But what I *do* need is a simple way
> to collect together everything I need to run my script(s) and ship
> them to the target machine(s). So my starting point is one or more
> .groovy files. I do *not* want to compile these - I want to ship the
> source script to the server, so that minor changes can be made in
> place using just a text editor. And with them, I want a directory full
> of supporting jar files.
>
> Having created and tested the scripts, I need to collect together all
> of the jar files I used to run them. Obviously, the first thing I need
> is the Groovy jars. Ideally I'd try to strip out unneeded jars (my
> code is to be run on a server with no GUI, so I suspect the
> groovy-swing jar could be skipped, for example). But that's probably
> way more trouble than it's worth, so I'm OK with skipping that step.
> Other dependencies, I've tended to collect from various places (for
> development, I can use @Grab annotations in the source, but my server
> doesn't have Internet access, so that won't work for the deployed
> version).
>
> From what I gather with Java projects, dependencies get managed by a
> tool like Maven or Gradle or by the IDE. But it's very hard for me to
> understand the documentation for these tools, as they are typically
> looking at the problem from the point of view of "compile and build a
> binary from the sources" rather than "collect dependencies into one
> place, but don't compile anything". One problem I'm struggling with is
> that with my background, what I'm trying to do is "obviously" the
> right approach, but I get the feeling that it's very different from
> the Java/Groovy way of doing things, so I keep missing the point of
> people's explanations.
>
> Essentially, what I want is a project structure like this:
>
> MyProject
> script1.groovy
> script2.groovy
> script3.groovy
> script4.groovy
> dependencies.txt
> target
> lib
>
> dependencies.txt can be anything but what it contains should be a list
> of dependencies - something like
>
> org.codehaus.groovy:groovy-all:pom:2.5.4
> javax.mail:mail:jar:1.4.4
> org.apache.commons:commons-csv:jar:1.6
>
> Running "some command" should then copy all the jars needed (based on
> those dependencies) to target/lib. Ideally, copy *.groovy to target as
> well, so I can just zip up the target directory, ship it to the
> destination machine, where I can unzip it and run it with whatever JVM
> is present there.
>
> Am I missing something fundamental which makes this impossible to
> achieve with Java, or is it just that my Google skills have failed me?
> Or is it that Java projects simply aren't normally of this form?
>
> Paul
>


Re: Code coverage tools?

2019-06-20 Thread Søren Berg Glasius
@Scott Hickey  but can you make it work
with @CompileStatic and the Elvis operator? We are having big struggles to
get that working. (In a Grails 3.3.x application)
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


On Fri, 21 Jun 2019 at 00:31, Scott Hickey  wrote:

> We are using Clover - it is open source now. We have found it works much
> better for us at Mutual of Omaha than JaCoCo or Cobertura.
>
> Scott Hickey
> Mutual of Omaha
>
> On Thu, Jun 20, 2019 at 12:02 PM Sean LeBlanc 
> wrote:
>
>> What are people using currently to get accurate code coverage from
>> new(ish) versions of Groovy? We are on 2.4.10 and I see similar issues as
>> what this thread is talking about:
>>
>>
>>
>> https://github.com/cobertura/cobertura/issues/184
>>
>>
>>
>>
>>
>>
>>
>> Does anyone have good experiences with getting more accurate code
>> coverage numbers with Groovy > 2.0.8? And what route did you take?
>>
>


Re: [ANNOUNCE] Apache Groovy 3.0.0 released

2020-02-10 Thread Søren Berg Glasius
Awesome. A new Era has begun 😊

Med venlig hilsen / Best regards

Søren Berg Glasius

Sent from my phone, thus brief

On Mon, Feb 10, 2020, 14:06 Paul King  wrote:

> Dear community,
>
> The Apache Groovy team is pleased to announce version 3.0.0 of Apache
> Groovy.
> Apache Groovy is a multi-faceted programming language for the JVM.
> Further details can be found at the https://groovy.apache.org website.
>
> We are sure you'll enjoy the features in this new version of Groovy.
> Your feedback on any unintentional glitches is welcome.
>
> This release includes 15 bug fixes/improvements since RC3 as outlined
> in the changelog:
>
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12318123&version=12345566
> (There are over 500 new features, improvements and bug fixes since Groovy
> 2.5!)
>
> Sources, convenience binaries, downloadable documentation and an SDK
> bundle can be found at: https://groovy.apache.org/download.html
> We recommend you verify your installation using the information on that
> page.
>
> Jars are also available within the major binary repositories.
>
> We welcome your help and feedback and in particular want to thank
> everyone who contributed to this release. We value all forms of
> contribution from our contributors past and present but special
> mention for this release should be made to Daniel Sun for his
> instrumental contributions to the Parrot parser and Eric Milles for
> his recent improvements to Groovy's static compiler.
>
> For more information on how to report problems, and to get involved,
> visit the project website at https://groovy.apache.org/
>
> Best regards,
>
> The Apache Groovy team.
>


Re: Help with adding Groovy to Programming-Idioms

2020-10-09 Thread Søren Berg Glasius
Hi Valentin,

I think it sounds like a great idea, and I would like to participate and
contribute to small snippets. I am a seasoned Groovy developer (I think)
and the co-founder* of GR8Conf, the "All Things Groovy" conference.

Let me know how to proceed.

* Other founder is in fact Guillaume Laforge :-)

Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


Den fre. 9. okt. 2020 kl. 12.07 skrev Valentin Deleplace <
delepl...@google.com>:

> Hello folks
> I admin https://programming-idioms.org/about and I'd like to add Groovy
> to the list of available languages. The website is a collection of "how to
> do X in language Y".
> My friend Guillaume Laforge advised me to ask this mailing list for help!
> The goal is to encourage contribution of quality contents so it can
> actually be helpful to a beginner or seasoned groovyist visitor.
>
> A quality contribution is a snippet that is correct, concise, having an
> explanation, a link to the official docs, and ideally a link to an online
> demo. For example at
> https://programming-idioms.org/idiom/96/check-string-prefix some
> implementations are high-quality, but not all of them.
>
> Writing a correct snippet takes about 3mn, while writing a high-quality
> contribution easily takes over 15mn.
> Before I open the gates by adding Groovy in the system, I'd like to know
> if some of you would be willing to contribute and curate some contents?
>
> Thank you in advance
> Valentin
>
>
> Valentin
> Happy path engineer
> Google Cloud Platform
> Twitter : @val_deleplace
>


Re: Accessing groovyx.net.http.*

2020-11-24 Thread Søren Berg Glasius
Hi Jon,

You could try https://github.com/http-builder-ng/http-builder-ng - I'm not
sure if it works with 3.0.x but it is the successor of http-builder. It is
however, too bad that it has gone dormant, but perhaps someone will pick it
up and continue to develop it.

Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


Den tir. 24. nov. 2020 kl. 17.44 skrev Kerridge, Jon <
j.kerri...@napier.ac.uk>:

> Hi,
>
> I am trying to get the examples from Chapter15 of GiNA2 (Interacting with
> Webservices) working in groovy3.0.6.
>
>
>
> I have a Gradle build which contains a reference to the repository:
>
>
> https://mvnrepository.com/artifact/org.codehaus.groovy.modules.http-builder/http-builder
>
>
>
> and a dependency
>
>
>
> compile 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.2'
>
>  for which I get the error
>
>- Could not GET '
>
> https://mvnrepository.com/artifact/org.codehaus.groovy.modules.http-builder/http-builder/org/codehaus/groovy/modules/http-builder/http-builder/0.7.2/http-builder-0.7.2.pom'.
>Received status code 403 from server: Forbidden
>
> I know that everything has got moved with the move to Apache. I just
> cannot find the correct place to get the library from.
>
> Any help very gratefully received.
>
>
>
> Jon
>
>
>
>
>
> Jon Kerridge PhD FBCS FHEA CITP CEng
>
> Emeritus Professor of Computing
> School of Computing
> Edinburgh Napier University
> Merchiston Campus
>
> 10 Colinton Road
>
> Edinburgh
>
> EH10 5DT
>
>
>
> j.kerri...@napier.ac.uk
>
>
>
> This message and its attachment(s) are intended for the addressee(s) only
> and should not be read, copied, disclosed, forwarded or relied upon by any
> person other than the intended addressee(s) without the permission of the
> sender. If you are not the intended addressee you must not take any action
> based on this message and its attachment(s) nor must you copy or show them
> to anyone. Please respond to the sender and ensure that this message and
> its attachment(s) are deleted.
>
> It is your responsibility to ensure that this message and its
> attachment(s) are scanned for viruses or other defects. Edinburgh Napier
> University does not accept liability for any loss or damage which may
> result from this message or its attachment(s), or for errors or omissions
> arising after it was sent. Email is not a secure medium. Emails entering
> Edinburgh Napier University's system are subject to routine monitoring and
> filtering by Edinburgh Napier University.
>
> Edinburgh Napier University is a registered Scottish charity. Registration
> number SC018373
>
> BSL users can contact us via contactSCOTLAND-BSL, the on-line British Sign
> Language interpreting service. Find out more on the contactSCOTLAND website.
>


Re: groovyc stopped to compile Java after Big Sur update

2021-01-30 Thread Søren Berg Glasius
sdkman.io ftw!


Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


Den fre. 29. jan. 2021 kl. 19.53 skrev Nelson, Erick <
erick.nel...@hdsupply.com>:

> Curiously , on my Catalina box, I don’t have JAVA_HOME set either
>
>
>
> I installed the jdk with this package…
>
>
>
> % ll Desktop/OpenJDK8U-jdk_x64_mac_hotspot_8u252b09.pkg
>
> -rw-r--r--@ 1 en032339  staff  104023171 May 13  2020
> Desktop/OpenJDK8U-jdk_x64_mac_hotspot_8u252b09.pkg
>
>
>
> This is what I see…
>
>
>
> % /usr/libexec/java_home
>
> /Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home
>
>
>
> %
> /Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home/bin/java
> -version
>
> java version "1.8.0_251"
>
> Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
>
> Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)
>
>
>
> %
> /Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home/bin/javac
> -version
>
> javac 1.8.0_251
>
>
>
>
>
> In /usr/bin , is see symlinks…
>
>
>
> % ll | grep java$
>
> lrwxr-xr-x 1 root   wheel74 May 12  2020 java ->
> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
>
> en032339@C02CJMZ8MD6M bin % ll | grep javac$
>
> lrwxr-xr-x 1 root   wheel75 May 12  2020 javac ->
> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac
>
>
>
> Which curiously seem to be the exact same version… but this  version
> convoluted as the this path is littered with symlinks too which seem to end
> up here /System/Library/Frameworks/JavaVM.framework/Versions/Current
>
> However, it still appears to be the same version…
>
>
>
> en032339@C02CJMZ8MD6M ~ % java -version
>
> java version "1.8.0_251"
>
> Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
>
> Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)
>
>
>
> % javac -version
>
> javac 1.8.0_251
>
>
>
> How it got this way I’m not sure. I’m assuming it all occurred when I
> installed the *pkg file above.
>
>
>
> *From: *"o...@ocs.cz" 
> *Reply-To: *"users@groovy.apache.org" 
> *Date: *Friday, January 29, 2021 at 9:57 AM
> *To: *"users@groovy.apache.org" 
> *Subject: *Re: groovyc stopped to compile Java after Big Sur update
>
>
>
> P.S.
>
>
>
> On 29. 1. 2021, at 6:50 PM, o...@ocs.cz wrote:
>
> Nevertheless, there's no JAVA_HOME at all on my Catalina either, and
> groovy compiles Java in there without a glitch. How comes?
>
>
>
> Hmmm... I wonder. Perhaps the groovy compiler is smart enough to call
> /usr/libexec/java_home itself if the JAVA_HOME variable is empty; it then
> gets the wrong value and fails. Makes sense.
>
>
>
> And also, is there a way to set the thing up properly without fixing the
> path in my build scripts? The java_home thing returns a completely wrong
> path without the -V switch:
>
> ===
>
> 1 ocs *~>* /usr/libexec/java_home
>
> /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
>
> 2 ocs *~>*
>
> ===
>
>
>
> If it is indeed so, the question could be re-phrased “How to make the
> /usr/libexec/java_home tool to return the proper value?“
>
>
>
> Note Java 8 is indeed the default; I completely forgot there used to be
> 13, which we can't use anyway:
>
>
>
> ===
>
> 5 ocs *~>* /usr/libexec/java_home
>
> /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
>
> 6 ocs *~>* java -version
>
> java version "1.8.0_181"
>
> Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
>
> Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
>
> 7 ocs *~>*
>
> ===
>
>
>
> Strangely enough, with Catalina on the same machine with both the Javas
> this was not a problem either. Weird.
>
>
>
> Thanks a lot,
>
> OC
>
>
>
>
>
>
> On 1/29/21, 8:47 AM, "o...@ocs.cz"  wrote:
>
>Hi there,
>
>I've got a project which uses both Groovy and Java sources. After Big
> Sur update -- without touching the project, it remained unchanged and does
> build perfectly on my other machine with a Catalina -- it reports “unable
> to locate the java compiler com.sun.tools.javac.Main, please change your
> classloader settings” and fails.
>
>I have absolutely no idea why and how should I “change my classloader
> settings” in this 

Re: Update the Groovy color used on github.

2021-06-16 Thread Søren Berg Glasius
+1

Good call!

Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


Den ons. 16. jun. 2021 kl. 09.11 skrev Mario Garcia :

> +1
>
> El mié, 16 jun 2021 a las 1:15, Paul King () escribió:
>
>> +1
>>
>> On Fri, Jun 11, 2021 at 3:24 PM Michael Bailey 
>> wrote:
>>
>>> I opened a PR to get the Groovy color on Github updated to the blue from
>>> the logo.
>>> See https://github.com/github/linguist/pull/5418
>>>
>>> If you would like to see Github use the color from the Groovy logo,
>>> please reply with a +1 to this thread and give a thumbs up on this PR ->
>>> https://github.com/github/linguist/pull/5418
>>>
>>> The plus one on this thread will help show community support.
>>>
>>


Re: Checking directory state using Groovy

2021-10-15 Thread Søren Berg Glasius
@Rachel Rudnick  that is a very clever use of
*use* - good call!

Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


Den fre. 15. okt. 2021 kl. 17.12 skrev Rachel Greenham :

> Looks like you could pretty much use Files as an extension module and/or
> category for Path...
>
> Hang on, does it work?
>
> groovy> import java.nio.file.*
> groovy> use (Files) {
> groovy> Path p = Path.of("src/groovy")
> groovy> println "is directory? ${p.isDirectory()}"
> groovy> p.list().each { println "${it}: ${it.getOwner()}
> ${it.getPosixFilePermissions()}" }
> groovy> }
>
> is directory? true
> src/groovy/benchmark: rachel [OWNER_WRITE, OTHERS_READ, OWNER_EXECUTE,
> GROUP_READ, GROUP_EXECUTE, OTHERS_EXECUTE, OWNER_READ]
> src/groovy/xdocs: rachel [OWNER_WRITE, OTHERS_READ, OWNER_EXECUTE,
> GROUP_READ, GROUP_EXECUTE, OTHERS_EXECUTE, OWNER_READ]
> src/groovy/bootstrap: rachel [OWNER_WRITE, OTHERS_READ, OWNER_EXECUTE,
> GROUP_READ, GROUP_EXECUTE, OTHERS_EXECUTE, OWNER_READ]
> src/groovy/LICENSE: rachel [OWNER_WRITE, OTHERS_READ, GROUP_READ,
> OWNER_READ]
> ...
>
> oh yeah that works 😉
>
> --
> Rachel Greenham
> rac...@merus.eu
>
> > On 15 Oct 2021, at 15:57, Nelson, Erick 
> wrote:
> >
> > import java.nio.file.Path
> > import java.nio.file.Files
> >
> > File f = new File('test')
> > Path p = f.toPath()
> > Files.isReadable(p) // boolean
> > Files.isWritable(p) // boolean
> > Files.isExecutable(p) // boolean
> > Files.isDirectory(p) // boolean
> > Files.isRegularFile(p) // boolean
> >
> >
> > From: James McMahon 
> > Date: Friday, October 15, 2021 at 4:50 AM
> > To: users@groovy.apache.org 
> > Subject: Checking directory state using Groovy
> >
> > Hello. I am trying to convert an existing script from python to Groovy.
> It executes a number of os.path and os.access commands, which I've not yet
> been able to find examples of that are written in Groovy. I have found
> similar implementations that employ "add on" Jenkins libraries for Groovy,
> but I will not have access to such libraries.Here is a brief excerpt from
> what I now do in python. Has anyone done similarly in Groovy? Can I impose
> for an example?
> >
> > Thanks very much in advance. Here is my python:
> >
> > if ( os.path.exists(result['thisURL']) and
> os.path.isfile(result['thisURL']) ) :
> >  if ( os.access(result['thisURL'], os.F_OK)
> >   and os.access(result['thisURL'], os.R_OK)
> >   and os.access(thisDri, os.W_OK)
> >   and os.access(thisDir, os.X_OK) ) :
> >   # do some stuff
> >   else :
> >   # dir and file not accessible, do some different stuff
>
>


Re: groovy.json.JsonSulper

2022-07-05 Thread Søren Berg Glasius
First off, user questions should be sent to users@groovy.apache.org not
d...@groovy.apache.org, as the later is for the dev team to discuss the ins
and outs of Groovy, I have added users@groovy.apache.org to continue the
conversation there

Second, I just tried your code in Groovy Console on Groovy 4.0.1/Java 8 and
it worked, so you need to provide more information about what version of
Groovy and Java you are using.

Bonus, this:
def req = new URL("https://jsonplaceholder.typicode.com/todos/1
").openConnection();
def postRC = req.getResponseCode();
def streamText = req.getInputStream().getText()

can be replaced with:
def streamText = 'https://jsonplaceholder.typicode.com/todos/1'.toURL().text



Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry
Mobile: +45 40 44 91 88
--- Press ESC once to quit - twice to save the changes.


Den tir. 5. jul. 2022 kl. 12.49 skrev Dharma Teja :

> Hi Team,
>
> When I was using the below groovy script, *groovy.json.JsonSulper *was
> throwing this error, Can you please help me with this
>
> Throws java.lang.RuntimeException: Unable to load FastStringService
>
>
> import groovy.json.*
> import java.net.http.*
> def req = new URL("https://jsonplaceholder.typicode.com/todos/1
> ").openConnection();
> def postRC = req.getResponseCode();
> def streamText = req.getInputStream().getText()
> def jsonSlurper = new JsonSlurper()
> println streamText
> def json = jsonSlurper.parseText(streamText)
> println json
>
>
> Thanks,
> Teja
>


Re: Dynamic assignment of list name in iterator statement?

2023-02-23 Thread Søren Berg Glasius
Hi Jim,

It is possible:

languages = ['english', 'french', 'spanish']
englishCharsList = ['a','b']
frenchCharsList = ['c','d']
spanishCharsList = ['e','f']

languages.each { lang ->
this."${lang}CharsList".each { ch ->
println "$lang -> $ch"
}
}

Check it out here:
https://gwc-experiment.appspot.com/?g=groovy_3_0&codez=eJxVjkEKwyAQRfeeYhDBTZobtJtue4PShbVGBRmCY1fBu2e0ppBZDMN__38mGfRf4x3BFZ7aoU-Rgp5AL9mh7RetBpv4EgPfg8n0iFR6xuhJvxn-AmdmmX2YjYozdAwXhiIdP8zO2AAbNAEuNwE8JUSapdqaVv8F8rDyGsY2a45YEoJUowKUDbLjKqrYAZXRSNo


Best regards,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry
Mobile: +45 40 44 91 88
--- Press ESC once to quit - twice to save the changes.


Den tor. 23. feb. 2023 kl. 01.52 skrev James McMahon :

> Good evening. I have a list named languageCharactersList. I begin my
> iteration through elements in that list with this:
>
> languageCharactersList.eachWithIndex( it, i ->
>
> I hope to make this more generic, so that I can build a variable name that
> points to the appropriate list, which then allows me to keep my iteration
> loop generic.
>
> I'd like to do this:
> def languages = ['english', 'french', 'spanish']
> def englishCharsList = []
> def frenchCharsList = [.]
> def spanishCharsList = []
>
> I'll set up an iterator to grab each of the languages. Within that
> iterative loop I will set a general variable like so:
> def CharsList = "english"+"CharsList" (then "french", then "spanish",.)
>
> I was hoping I could then set up the generic iterator like so:
> *"$CharsList"*.eachWithIndex{ it, i ->
> or like so
> *$CharsList*.eachWithIndex{ it, i ->
>
> But Groovy doesn't allow this approach, and throws a stack trace.
>
> How can we employ a variable assignment in that list iterator statement
> so it can be generalized?
>
> Thanks in advance.
> Jim
>
>


Re: Dynamic assignment of list name in iterator statement?

2023-03-05 Thread Søren Berg Glasius
Hi Jim,

If your switch hits "English" it will also set the rest of the cases. You
need a "break" after "containsEnglish = true" - just like in Java


Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry
Mobile: +45 40 44 91 88
--- Press ESC once to quit - twice to save the changes.


Den søn. 5. mar. 2023 kl. 09.37 skrev James McMahon :

> Was trying to come up with a Groovy way to collapse a lengthy switch
> statement to dynamically building the variable name. I've failed at that.
> Instead, I've fallen back on this option:
>
>  switch("$k") {
>case "English":
> containsEnglish = true
>case "Spanish":
> containsSpanish = true
>case "French":
> containsFrench = true
>case "Japanese":
> containsJapanese = true
>case "German":
> containsGerman = true
>.
>.
>.
>default:
> break
>   }
>
> I initialize each of my "containsXYZ" variables to false at the beginning
> of my Groovy script. It works well, though it seems to lack elegance and
> brevity to me.
>
> Thanks again.
> Jim
>
> On Sat, Mar 4, 2023 at 5:10 PM James McMahon  wrote:
>
>> Søren  ,
>> May I ask you a follow up? I am trying what I thought I read in your
>> reply (thank you for that, by the way). But I continue to get this error:
>> "The LHS of an assignment should be a variable or a field accessing
>> expression @ "
>>
>> This is what I currently have, attempting to set my variable name to
>> include the key drawn from my Groovy map. How must I change this to get it
>> to work?
>>
>>  mapLanguages.each { k, x ->
>>   log.warn('mapLanguages entry is this: {} {}', ["$k", "$x"] as
>> Object[])
>>   x.each {
>>languageChar -> log.warn('language char in {} is this:
>> {}', ["$k", "$languageChar"] as Object[])
>>   }
>>   "contains${k}" = true
>>  }
>>
>> Many thanks again,
>> Jim
>>
>> On Thu, Feb 23, 2023 at 3:01 AM Søren Berg Glasius 
>> wrote:
>>
>>> Hi Jim,
>>>
>>> It is possible:
>>>
>>> languages = ['english', 'french', 'spanish']
>>> englishCharsList = ['a','b']
>>> frenchCharsList = ['c','d']
>>> spanishCharsList = ['e','f']
>>>
>>> languages.each { lang ->
>>> this."${lang}CharsList".each { ch ->
>>> println "$lang -> $ch"
>>> }
>>> }
>>>
>>> Check it out here:
>>> https://gwc-experiment.appspot.com/?g=groovy_3_0&codez=eJxVjkEKwyAQRfeeYhDBTZobtJtue4PShbVGBRmCY1fBu2e0ppBZDMN__38mGfRf4x3BFZ7aoU-Rgp5AL9mh7RetBpv4EgPfg8n0iFR6xuhJvxn-AmdmmX2YjYozdAwXhiIdP8zO2AAbNAEuNwE8JUSapdqaVv8F8rDyGsY2a45YEoJUowKUDbLjKqrYAZXRSNo
>>>
>>>
>>> Best regards,
>>> Søren Berg Glasius
>>>
>>> Hedevej 1, Gl. Rye, 8680 Ry
>>> Mobile: +45 40 44 91 88
>>> --- Press ESC once to quit - twice to save the changes.
>>>
>>>
>>> Den tor. 23. feb. 2023 kl. 01.52 skrev James McMahon <
>>> jsmcmah...@gmail.com>:
>>>
>>>> Good evening. I have a list named languageCharactersList. I begin my
>>>> iteration through elements in that list with this:
>>>>
>>>> languageCharactersList.eachWithIndex( it, i ->
>>>>
>>>> I hope to make this more generic, so that I can build a variable name
>>>> that points to the appropriate list, which then allows me to keep my
>>>> iteration loop generic.
>>>>
>>>> I'd like to do this:
>>>> def languages = ['english', 'french', 'spanish']
>>>> def englishCharsList = []
>>>> def frenchCharsList = [.]
>>>> def spanishCharsList = []
>>>>
>>>> I'll set up an iterator to grab each of the languages. Within that
>>>> iterative loop I will set a general variable like so:
>>>> def CharsList = "english"+"CharsList" (then "french", then
>>>> "spanish",.)
>>>>
>>>> I was hoping I could then set up the generic iterator like so:
>>>> *"$CharsList"*.eachWithIndex{ it, i ->
>>>> or like so
>>>> *$CharsList*.eachWithIndex{ it, i ->
>>>>
>>>> But Groovy doesn't allow this approach, and throws a stack trace.
>>>>
>>>> How can we employ a variable assignment in that list iterator statement
>>>> so it can be generalized?
>>>>
>>>> Thanks in advance.
>>>> Jim
>>>>
>>>>


Re: Groovy on Windows 11, unable to resolve class

2024-01-18 Thread Søren Berg Glasius
I'm not at windows user myself, but seems to remember, that is most likely
because of the spaces in "C:\Program Files (x86)\Groovy\"

Den tors. 18. jan. 2024 kl. 11.47 skrev poubelle zenira <
poubelle...@gmail.com>:

> I just installed groovy 4 on windows from the installer.
>
> When running groovysh I get:
> "ClassNotFoundException: org.apache.groovy.groovysh.Main"
>
> And when trying to import a groovy, i get an "unable to resolve class"
> error
>
> I checked the windows path,
> GROOVY_HOME is set to C:\Program Files (x86)\Groovy\, where groovy is
> installed (I leaved the default installation parameters)
> And I manually added %GROOVY_HOME%\bin to the path because it was not
> there.
>
> But it still doesn't work.
>


-- 

Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry
Mobile: +45 40 44 91 88
--- Press ESC once to quit - twice to save the changes.


Re: String comparison tests on exception messages keep failing due to >'< character keeps getting removed!

2024-05-13 Thread Søren Berg Glasius
Hi Tommy,

This works:

class Library {
boolean someLibraryMethod() {
throw new RuntimeException("'" + "LAZY DEVELOPER! This is a test" + "'")
}
boolean someOtherLibraryMethod() {
throw new RuntimeException("'LAZY DEVELOPER! This is a test'")
}
}

class LibraryTest extends Specification {

def lib = new Library()

def "someLibraryMethod returns true"() {
when:
def result = lib.someLibraryMethod()

then:
def e = thrown(RuntimeException)
e.message == "'" + "LAZY DEVELOPER! This is a test" + "'"
e.message == "'LAZY DEVELOPER! This is a test'"
}

def "someOtherLibraryMethod returns true"() {
when:
def result = lib.someOtherLibraryMethod()

then:
def e = thrown(RuntimeException)
e.message == "'" + "LAZY DEVELOPER! This is a test" + "'"
e.message == "'LAZY DEVELOPER! This is a test'"
}
}

With Java 21 (21.0.3-tem) and Groovy 4.0.21

Look at this repo I've created for you

https://github.com/sbglasius/groovy-exception-experiment




Den man. 13. maj 2024 kl. 18.45 skrev Tommy Svensson :

> Here is a test I have been forced to comment out since it is 100%
> impossible to make work due to  '  character keeps getting removed!
>
> assert se3.message == "'" +"LAZY DEVELOPER! This is a test" + "'"
>
>
> No matter what you do here the result will be:
>
> Assertion failed:
>
> assert se3.message == "'" +"LAZY DEVELOPER! This is a
> test" + "'"
>|   |
>|   'LAZY DEVELOPER! This is a Test'
>LAZY DEVELOPER! This is a Test
>
>  That is the "'" character will be removed in the constant
> comparison text
>  and thus the test will always fail, not matter what I do!!!
>
> Any suggestions ?
>
> I'm using release 21 of Groovy.
>
> __
>
> Tommy Svensson
>
> to...@natusoft.se
>
>
>
>

-- 

Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry
Mobile: +45 40 44 91 88
--- Press ESC once to quit - twice to save the changes.


Re: Sort on linkedlists with double values (inside main list)

2024-05-20 Thread Søren Berg Glasius
But when you sort on the value that is an ArrayList ([it.y, it.x]) you rely
on the *hashCode()* of that ArrayList not the values inside.
So it is a coincidence that it works for others than Float/Double. The
right syntax in Groovy is as described by Paul King.

Den man. 20. maj 2024 kl. 15.25 skrev M.v.Gulik :

>
> On Mon, 20 May 2024 at 15:40, Paul King  wrote:
>
>> What sort result are you trying to achieve? There should be no need to
>> perform any recursion.
>>
>
> Main target was reordering some set of randomly ordered x,y coordinates
> into (*for example**) a *x,y*(*left to right, top to bottom*) order (**:where
> any of the actual sort directions could be easily flipped*).
>
> So far "**.sort{[it.y, it.x]}*" seems the best and easiest way to do this
> (*despite its Float/Double caveat*).
>


-- 

Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry
Mobile: +45 40 44 91 88
--- Press ESC once to quit - twice to save the changes.


Re: Where do you find a community?

2024-05-26 Thread Søren Berg Glasius
Hi,

The Groovy Slack is mirrored on https://groovy.linen.dev/ where the history
from Slack is retained.

Den søn. 26. maj 2024 kl. 14.13 skrev James McMahon :

> I can tell you from firsthand experience that this Groovy community has
> always responded very quickly to questions. I am only a modest level
> programmer - a C- at best - and the members here have never looked down on
> any question, and have helped me solve some very challenging ones. I have a
> lot of respect for the people at groovy.apache.org and nifi.apache.org
> who have helped me through the years. Any time I've faced a configuration
> impediment or a coding challenge, they've been there.
>
> On Sun, May 26, 2024 at 8:01 AM OCsite  wrote:
>
>> Martin,
>>
>> I'd say the community is right here. Whenever I needed a help and neither
>> the (excellent, in my opinion) documentation nor sites like Groovy Goodness
>> (mrhaki, definitely worth checking whenever in doubt) helped, I've asked
>> here, and almost always I've got helpful and very knowledgeable answers.
>>
>> I would hate it if I had to use something with a terrible GUI like the
>> Discord thing instead of a convenient, practical and nice maillist. Besides
>> a maillist is conceptually worlds better than any kind of IRC for these
>> things, for it sort of endorses thinking through before sending; both your
>> questions and the answers tend to be well formulated, while IRCs endorse
>> the very opposite. Even if there was an |RC with a good GUI — so far, I
>> haven't seen one, but well, in theory such thing might exist — I'd still
>> strongly prefer a maillist.
>>
>> I suggest you try to ask those questions you need help with here and see
>> whether you find this list as excellent for learning Groovy and as helpful
>> as I did.
>>
>> All the best,
>> OC
>>
>> On 26. 5. 2024, at 4:13, Polgár Márton 
>> wrote:
>>
>> Hello,
>>
>> I have been experimenting with the thought of learning an accessible,
>> reliable and concise scripting language and considered Groovy a worthy
>> candidate. To decide whether this is the case, I started doing these little
>> exercises online which usually spawns a lot of micro-questions that are
>> hard to answer from the docs, no matter that they look alright. This is
>> where we arrive at the elephant in the room with Groovy: the striking lack
>> of living, interactive, low-barrier communities.
>>
>> Groovy might not be a trendy language but it has plenty of visibility and
>> stakeholders compared to what I was used to with Raku. The big difference
>> is that Raku has a vivid IRC network, it has a Discord server, and in
>> addition it also has a blog, a subreddit, a legacy mailing list, a Mastodon
>> and so on.
>>
>> Obviously I'm not running around investigating the communities of all
>> sorts of niche languages but on Discord I've seen servers for languages
>> from Pascal and Prolog to Factor and Uiua. The older languages usually have
>> a dedicated IRC channel, some have both. There is also Zig with the
>> principle of a distributed community which is to my understanding mostly
>> about allowing and encouraging people to create spaces across various
>> platforms, with a loose set of rules.
>>
>> For Groovy, the only real-time platform would be the Slack - if Slack
>> being a hassle wasn't enough, it's hidden behind a kind of survey that
>> seems to serve some sort of gatekeeping. There is a semi-active subreddit
>> and this mailing list. Grails stuff operates under similar terms, except
>> half dead. It seems clear that this is not how you get people involved with
>> the language in 2024 - honestly, not even having good old IRC with a bunch
>> of available people really raises some questions.
>>
>> Where is the Groovy community? Is there even one? Who are the target
>> audience if there is one? Why is there no visible effort to make the
>> language more accessible to newcomers, some place they could go and
>> practice? Is it that the people running the business are running out of
>> motivation or is this Apache project somehow uninterested in extending the
>> user/contributor base, unlike most indie projects?
>>
>> I am really curious about an answer because for me these are questions
>> that determine both the practical feasibility to learn a language and the
>> overall state and potential of a community.
>>
>> Sincerely
>> Martin Burger
>>
>>
>>

-- 

Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry
Mobile: +45 40 44 91 88
--- Press ESC once to quit - twice to save the changes.


GR8Conf EU + Gradle miniSummit

2016-01-20 Thread Søren Berg Glasius (GR8Conf EU)
GR8Conf Europe is happy to announce, that this years conference will feature an 
additional track, with focus on Gradle. We call it the "Gradle miniSummit".

The conference takes place in beautiful Copenhagen, Denmark, from June 1st 
through 3rd, where the first day is a University day, with longer workshops, 
and the 2nd and 3rd are regular conference days with talks from the entire 
Groovy ecosystem. You can read more about the conference on: http://gr8conf.eu

Note to speakers:
The GR8Conf EU + Gradle miniSummit call for paper is open. Please submit your 
talks at http://cfp.gr8conf.org

Best regards,
Søren Berg Glasius
GR8Conf co-founder and organizer.

GR8Conf ApS
Mobile: +45 40 44 91 88, Web: www.gr8conf.eu, Skype: sbglasius 
Company Address: Buchwaldsgade 50, 5000 Odense C, Denmark
Personal Address: Hedevej 1, Gl. Rye, 8680 Ry, Denmark
--- GR8Conf - Dedicated to the Groovy Ecosystem



Re: not sure about Collection.intersect

2016-02-08 Thread Søren Berg Glasius (GR8Conf EU)
Hi Paul,

c1 contains one instance of TestClass, c2 contains another. Those two are not 
equals, because they probably do not implement the equals method, and thus 
comparison is done between object references in memory, and they are different, 
being two different objects.

if you equals was implemented to compare the name of TestClass I'm pretty sure 
it would work.

Best regards,
Søren Berg Glasius
GR8Conf Europe organizing team

GR8Conf ApS
Mobile: +45 40 44 91 88, Web: www.gr8conf.eu, Skype: sbglasius 
Company Address: Buchwaldsgade 50, 5000 Odense C, Denmark
Personal Address: Hedevej 1, Gl. Rye, 8680 Ry, Denmark
--- GR8Conf - Dedicated to the Groovy Ecosystem

From: Strachan, Paul 
Reply: users@groovy.apache.org 
Date: February 8, 2016 at 15:12:06
To: users@groovy.apache.org 
Subject:  not sure about Collection.intersect  

Groovy 2.4.4 / 2.4.5

 

Hi – I’d like to get a list of objects from collection A that exist in 
collection B using intersect() but I’m getting no results:

 

def c1 = []// as Set
def c2 = []// as Set
c1 << new TestClass(name: 'mike')
c2 << new TestClass(name: 'mike')
println c1.contains(c2[0])
assert c1.intersect(c2).size() == 1
  
  
Output:

 

true

Assertion failed:

 

assert c1.intersect(c2).size() == 1

   |  | |   |  |

   |  []    |   0  false

   |    [sample.TestClass@57]

   [sample.TestClass@57]

 

 

TestClass.groovy

 

package sample
import groovy.transform.EqualsAndHashCode
@EqualsAndHashCode(includes = 'name')
class TestClass {
    String name
}

 

 

Is intersect only for simple types?

 

 


**
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**

Re: not sure about Collection.intersect

2016-02-08 Thread Søren Berg Glasius (GR8Conf EU)
And by the way,

the easy way to implement equals and haschode is this:

import groovy.transform.EqualsAndHashCode

@EqualsAndHashCode
class TestClass {
    String name
}

Best regards,
Søren Berg Glasius
GR8Conf Europe organizing team

GR8Conf ApS
Mobile: +45 40 44 91 88, Web: www.gr8conf.eu, Skype: sbglasius 
Company Address: Buchwaldsgade 50, 5000 Odense C, Denmark
Personal Address: Hedevej 1, Gl. Rye, 8680 Ry, Denmark
--- GR8Conf - Dedicated to the Groovy Ecosystem

From: Edinson E. Padrón Urdaneta 
Reply: users@groovy.apache.org 
Date: February 8, 2016 at 15:29:00
To: users@groovy.apache.org 
Subject:  Re: not sure about Collection.intersect  

I have to look at the implementation of the `intersect` method to be sure but 
does your TestClass class overwrite `hashcode` and `equal`? There should be a 
way to compare the instances of said class.

Re: Check if List is of specific size and elements of specific type

2016-03-29 Thread Søren Berg Glasius (GR8Conf EU)
Hi Maarten,

You could be close with this.

def listVariable = [1,2]
assert listVariable*.getClass() == [int, int]

but your assert will have to be

assert listVariable*.getClass() == [Integer, Integer]

since ints are actually the object type Integer

Best regards,
Søren Berg Glasius
GR8Conf Europe organizing team

GR8Conf ApS
Mobile: +45 40 44 91 88, Web: www.gr8conf.eu, Skype: sbglasius 
Company Address: Buchwaldsgade 50, 5000 Odense C, Denmark
Personal Address: Hedevej 1, Gl. Rye, 8680 Ry, Denmark
--- GR8Conf - Dedicated to the Groovy Ecosystem

From: Maarten Boekhold 
Reply: users@groovy.apache.org 
Date: March 29, 2016 at 12:25:42
To: us...@groovy.incubator.apache.org 
Subject:  Check if List is of specific size and elements of specific type  

Hi,  

Is there a quick and easy way to do something like:  

assert listVariable == [int, int]  

eg, the list is of size 2 and each element is an int?  

Maarten  


Re: Check if List is of specific size and elements of specific type

2016-03-29 Thread Søren Berg Glasius (GR8Conf EU)
@dinko yeah, that's why I choose to do my example with listVariable*.getClass() 

Best regards,
Søren Berg Glasius
GR8Conf Europe organizing team

GR8Conf ApS
Mobile: +45 40 44 91 88, Web: www.gr8conf.eu, Skype: sbglasius 
Company Address: Buchwaldsgade 50, 5000 Odense C, Denmark
Personal Address: Hedevej 1, Gl. Rye, 8680 Ry, Denmark
--- GR8Conf - Dedicated to the Groovy Ecosystem

From: Dinko Srkoč 
Reply: users@groovy.apache.org 
Date: March 29, 2016 at 14:04:50
To: users@groovy.apache.org 
Subject:  Re: Check if List is of specific size and elements of specific type  

On 29 March 2016 at 12:29, Marcos Carceles  wrote:  
> Would this work?  
>  
> listVariable*.class == [Integer, Integer]  

It would in this particular example, but this may be dangerous for  
some other cases. Try e.g. this:  

[1, [:], [class: 1]]*.class  

Cheers,  
Dinko  

>  
> On 29 March 2016 at 12:25, Maarten Boekhold  wrote:  
>>  
>> Hi,  
>>  
>> Is there a quick and easy way to do something like:  
>>  
>> assert listVariable == [int, int]  
>>  
>> eg, the list is of size 2 and each element is an int?  
>>  
>> Maarten  
>  
>  


Re: aliasing methods

2016-04-13 Thread Søren Berg Glasius (GR8Conf EU)
Hi,

Can you come with some specific code examples? 

Best regards,
Søren Berg Glasius
GR8Conf Europe organizing team

GR8Conf ApS
Mobile: +45 40 44 91 88, Web: www.gr8conf.eu, Skype: sbglasius 
Company Address: Buchwaldsgade 50, 5000 Odense C, Denmark
Personal Address: Hedevej 1, Gl. Rye, 8680 Ry, Denmark
--- GR8Conf - Dedicated to the Groovy Ecosystem

From: frenchy48 
Reply: users@groovy.apache.org 
Date: April 13, 2016 at 10:04:28
To: us...@groovy.incubator.apache.org 
Subject:  aliasing methods  

Hello all  
I have a resource file that describes alias names for method (something with  
entries like: "org.smurf.MyClass#myMethod=otherName")  

now an initialisation code will read this resource to alias "myMethod" to  
"otherName"  

there are numerous problems:  
- when doing this aliasing I do not have instances (just the class)  
- there may be methods that are overloaded  
- and methods with arguments or no argument  

code such as:  

is not completely ok (if it is null I won't make the difference between a  
no-arg method and a method with just one arg which happens to be null)  
is there a more elegant expression to do that?  
thanks  



-  
member of Grumpy Old Programmers  
--  
View this message in context: 
http://groovy.329449.n5.nabble.com/aliasing-methods-tp5732316.html  
Sent from the Groovy Users mailing list archive at Nabble.com.  


Re: Groovy Running Slower With More Memory

2016-05-09 Thread Søren Berg Glasius (GR8Conf EU)
Hi Daniel,

Without knowing for sure, I would think that setting the minimum heap size to 
20G would take some time to allocate. What about just setting the maximum heap 
size, and let the JVM handle the minimum size, or start lower, like 2G.



Best regards,
Søren Berg Glasius
GR8Conf Europe organizing team

GR8Conf ApS
Mobile: +45 40 44 91 88, Web: www.gr8conf.eu, Skype: sbglasius 
Company Address: Buchwaldsgade 50, 5000 Odense C, Denmark
Personal Address: Hedevej 1, Gl. Rye, 8680 Ry, Denmark
--- GR8Conf - Dedicated to the Groovy Ecosystem

From: Daniel Price 
Reply: users@groovy.apache.org 
Date: May 9, 2016 at 18:28:38
To: users@groovy.apache.org 
Subject:  Groovy Running Slower With More Memory  

Good Afternoon.  I've been running some Groovy 2.4.2 scripts on a Windows 7 
64-bit PC with 16GB of RAM.  My scripts are memory intensive SQL Server DB 
manipulators, and I have modified startGroovy.bat to:

%JAVA_OPTS% -Xms8192M -Xmx8192M

I recently gained access to a new server running Windows Server 2012 that has 
32GB RAM and lots of flash disk, so I thought giving Groovy more RAM might 
allow the scripts to run faster.  So I installed Groovy on the server and 
modified startGroovy.bat to:

%JAVA_OPTS% -Xms20480M -Xmx20480M

But the new server runs my scripts about twice as slow as my PC.  This is true 
even with the exact same RAM settings in startGroovy.bat.

I don't know if I should expect to see a large decrease in run time based on 
additional RAM, but an increase seems odd to me.

Could this be due to OS differences?

Thanks!

Re: re-using a comparison closure

2016-05-16 Thread Søren Berg Glasius (GR8Conf EU)
Hi Guy

Just assign the variable 

def comapreVersions = { a,b ->
return getVersion(a).toInteger() <=> getVersion(b).toInteger()
}

and then use it in your sort:


list.sort(compareVersions)



Best regards,
Søren Berg Glasius
GR8Conf Europe organizing team

GR8Conf ApS
Mobile: +45 40 44 91 88, Web: www.gr8conf.eu, Skype: sbglasius 
Company Address: Buchwaldsgade 50, 5000 Odense C, Denmark
Personal Address: Hedevej 1, Gl. Rye, 8680 Ry, Denmark
--- GR8Conf - Dedicated to the Groovy Ecosystem

From: Guy Matz 
Reply: users@groovy.apache.org 
Date: May 16, 2016 at 17:28:34
To: users@groovy.apache.org 
Subject:  re-using a comparison closure  

Hi!
I have to sort a list of strings based on a number within the string . . .  I 
am able to sort using something like:
list.sort( { a,b -> getVersion(a) <=> getVersion(b)})

I need to use this in a bunch of places in my code and was hoping to replace it 
with a method, like:
list.sort( compareVersions)

with compareVersions:
def compareVersions(a, b) {
  return getVersion(a).toInteger() <=> getVersion(b).toInteger()
}

putting the method (compoareVersions) into the sort as a param doesn't work.  
Anyone know what I'm missing?

Thanks!!
Guy

Re: re-using a comparison closure

2016-05-16 Thread Søren Berg Glasius (GR8Conf EU)
Hi 

You can define it in a class as a static closure


class Sorters {
     static compareVersions =  { a,b ->
         return getVersion(a).toInteger() <=> getVersion(b).toInteger()
     }
}

and use it like:

list.sort(Sorters.compareVersions)

Best regards,
Søren Berg Glasius
GR8Conf Europe organizing team

GR8Conf ApS
Mobile: +45 40 44 91 88, Web: www.gr8conf.eu, Skype: sbglasius 
Company Address: Buchwaldsgade 50, 5000 Odense C, Denmark
Personal Address: Hedevej 1, Gl. Rye, 8680 Ry, Denmark
--- GR8Conf - Dedicated to the Groovy Ecosystem

From: Guy Matz 
Reply: users@groovy.apache.org 
Date: May 16, 2016 at 17:42:21
To: users@groovy.apache.org 
Subject:  Re: re-using a comparison closure  

Thanks!  Now, I have a number of methods that need access to that closure . . . 
 Can I make the closure global?  Is there a better way?

Thanks again,
Guy

On Mon, May 16, 2016 at 11:30 AM, Søren Berg Glasius (GR8Conf EU) 
 wrote:
Hi Guy

Just assign the variable 

def comapreVersions = { a,b ->
return getVersion(a).toInteger() <=> getVersion(b).toInteger()
}

and then use it in your sort:


list.sort(compareVersions)



Best regards,
Søren Berg Glasius
GR8Conf Europe organizing team

GR8Conf ApS
Mobile: +45 40 44 91 88, Web: www.gr8conf.eu, Skype: sbglasius 
Company Address: Buchwaldsgade 50, 5000 Odense C, Denmark
Personal Address: Hedevej 1, Gl. Rye, 8680 Ry, Denmark
--- GR8Conf - Dedicated to the Groovy Ecosystem

From: Guy Matz 
Reply: users@groovy.apache.org 
Date: May 16, 2016 at 17:28:34
To: users@groovy.apache.org 
Subject:  re-using a comparison closure

Hi!
I have to sort a list of strings based on a number within the string . . .  I 
am able to sort using something like:
list.sort( { a,b -> getVersion(a) <=> getVersion(b)})

I need to use this in a bunch of places in my code and was hoping to replace it 
with a method, like:
list.sort( compareVersions)

with compareVersions:
def compareVersions(a, b) {
  return getVersion(a).toInteger() <=> getVersion(b).toInteger()
}

putting the method (compoareVersions) into the sort as a param doesn't work.  
Anyone know what I'm missing?

Thanks!!
Guy



GR8Conf EU Registration ends soon!

2016-05-16 Thread Søren Berg Glasius (GR8Conf EU)
Hi,

Registrations for GR8Conf EU ends one week from now, Monday May 23rd. 

You do not want to miss this year's event! Here you can learn all about Groovy, 
Grails and Gradle from the project founders and core developers!  

From the Groovy core team you can meet: Guillaume Laforge, Cedric Champeau and 
Jochen Theodorou. From the Grails core team you can meet: Jeff Brown and Graeme 
Rocher. Cedric also represents Gradle. 

The opening keynote is delivered by Ken Kousen.  

One University day with workshops, Two conference days, Three conference 
tracks, 24 speakers from all over the world. Not to mention our home brewed 
beer for Meet & Greet.

For more information, please visit gr8conf.eu now!
 

Best regards,
Søren Berg Glasius
GR8Conf Europe organizing team

GR8Conf ApS
Mobile: +45 40 44 91 88, Web: www.gr8conf.eu, Skype: sbglasius 
Company Address: Buchwaldsgade 50, 5000 Odense C, Denmark
Personal Address: Hedevej 1, Gl. Rye, 8680 Ry, Denmark
--- GR8Conf - Dedicated to the Groovy Ecosystem