Re: Maven coordinates going forward

2017-03-27 Thread Paul Moore
On 27 March 2017 at 19:49, Keith Suderman wrote: > +1 for changing Maven coordinates. > > -1 for changing package names. Sure, new code can use the new package > names, but changing existing packages is just breaking changes for the sake > of breaking things with no real

Re: Optimising a Groovy script

2017-03-29 Thread Paul Moore
On 29 March 2017 at 14:56, Nelson, Erick wrote: > I'm not sure using or not using def would cause performance differences. There definitely *seems* to be a difference. def rng = new MersenneTwister() def roll = { rng.nextInt(6) + rng.nextInt(6) + rng.nextInt(6) +

Re: Optimising a Groovy script

2017-03-29 Thread Paul Moore
On 29 March 2017 at 15:34, Paul Moore <p.f.mo...@gmail.com> wrote: > So the big difference is removing def from roll, with removing def > from rng having a smaller but detectable effect. I just tried to generalise the script, by making a simulate function that takes the action as

Re: Optimising a Groovy script

2017-03-29 Thread Paul Moore
On 28 March 2017 at 22:08, Nelson, Erick wrote: > Try this... Thanks for the suggestion - there were some nice improvements in here. > def rng = new MersenneTwister() > > def roll = { > rng.nextInt(6) + rng.nextInt(6) + rng.nextInt(6) + 3 > } You changed my

Re: foo() || return false ?

2017-07-18 Thread Paul Moore
Why do you need something "more concise"? It seems pretty OK to me... On 18 July 2017 at 15:00, Guy Matz wrote: > Right! This is what I'm trying to do, but in a more concise way . . . any > thoughts anyone? > > On Mon, Jul 17, 2017 at 8:43 PM, J. David Beutel

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

2018-12-20 Thread Paul Moore
me point in the future in my work environment (also no >> internet access)): >> >> This solution proposed by Keith does not work >> https://github.com/gradle/gradle-groovy-all >> ? >> >> Cheers, >> mg >> >> >> >> Am 19.12.2018 um

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

2018-12-19 Thread Paul Moore
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/gradl

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

2018-12-19 Thread Paul Moore
On Wed, 19 Dec 2018 at 21:23, James Kleeh wrote: > > Paul, > > The best solution is to use Maven or Gradle to create an all-in-one (fat) jar > that you can ship and run with java -jar > > Gradle has a shadow plugin and Maven has a shade plugin to do just that. Thanks. I'd come to the conclusion

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

2018-12-19 Thread Paul Moore
On Wed, 19 Dec 2018 at 22:33, Paul Moore wrote: > Something simple like > > task customFatJar(type: Jar) { > dependsOn copyDeps > baseName = 'all-in-one-jar' > from "dest/lib" > } > > gives me an "all-in-one-jar.jar" that contains the d

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

2018-12-19 Thread Paul Moore
On Wed, 19 Dec 2018 at 20:18, Søren Berg Glasius wrote: > > 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. Thanks - yes,

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

2018-12-19 Thread Paul Moore
On Wed, 19 Dec 2018 at 22:46, MG wrote: > > Hi, > > out of curiosity (and because having a fat jar again might be > conventient at some point in the future in my work environment (also no > internet access)): > > This solution proposed by Keith does not work >