Re: GPars 2 Stuff

2018-01-08 Thread Russel Winder
On Mon, 2018-01-08 at 08:21 +0530, Balachandran Sivakumar wrote: > Hi Dr. Russel, > > On Thu, Jan 4, 2018 at 12:20 AM, Russel Winder wrote: > > In GPars 1.X it was possible to do things such as: > > > > [1, 2, 3, 4, 5].parallel.reduce{a, b -> Math.min(a, b)} > > > > Without GPars it is poss

Re: GPars 2 Stuff

2018-01-08 Thread Russel Winder
On Sun, 2018-01-07 at 20:38 +0100, MG wrote: > (watching NFL playoffs, so just a quick comment) > > Was thinking the same as Daniel here. > > Was also wondering whether adding the groovier variety of the > functionality coud not be automated ? At least for the examples shown it > looks like thi

Re: GPars 2 Stuff

2018-01-08 Thread Russel Winder
On Sun, 2018-01-07 at 09:14 -0700, Daniel Sun wrote: > Hi Russel, > >`[1, 2, 3, 4, 5].parallel.reduce{a, b -> Math.min(a, b)}` is much > groovier than ` [1, 2, 3, 4, 5].parallelStream().reduce{a, b -> Math.min(a, > b)}.get()`, so I hope the original API can be kept and its implementation >

Re: GPars 2 Stuff

2018-01-07 Thread Balachandran Sivakumar
Hi Dr. Russel, On Thu, Jan 4, 2018 at 12:20 AM, Russel Winder wrote: > In GPars 1.X it was possible to do things such as: > > [1, 2, 3, 4, 5].parallel.reduce{a, b -> Math.min(a, b)} > > Without GPars it is possible using Groovy to achieve the exact same > functionality on JDK8+ with: > >

Re: GPars 2 Stuff

2018-01-07 Thread MG
(watching NFL playoffs, so just a quick comment) Was thinking the same as Daniel here. Was also wondering whether adding the groovier variety of the functionality coud not be automated ? At least for the examples shown it looks like this might be a good option in principal. AST transformation

Re: GPars 2 Stuff

2018-01-07 Thread Daniel Sun
Hi Russel, `[1, 2, 3, 4, 5].parallel.reduce{a, b -> Math.min(a, b)}` is much groovier than ` [1, 2, 3, 4, 5].parallelStream().reduce{a, b -> Math.min(a, b)}.get()`, so I hope the original API can be kept and its implementation can base on Java8's functionality. Cheers, Daniel.Sun -- Sen

Re: GPars 2 Stuff

2018-01-05 Thread Russel Winder
On Wed, 2018-01-03 at 20:41 +0100, James NORTHROP wrote: > Would second the motion to reduce redundancy where possible, as it > reduces duplication of effort in testing, docs, etc. where, maybe, we > can get GPars down to a core minimum of functionality, above and > beyond what java provides; essen

re: GPars 2 Stuff

2018-01-03 Thread James NORTHROP
01/18 19:51 > De : "Russel Winder" > A : "GPars Users" > Copie à : "Groovy_Users" > Objet : GPars 2 Stuff > > In GPars 1.X it was possible to do things such as: > > [1, 2, 3, 4, 5].parallel.reduce{a, b -> Math.min(a, b)} > &

GPars 2 Stuff

2018-01-03 Thread Russel Winder
In GPars 1.X it was possible to do things such as: [1, 2, 3, 4, 5].parallel.reduce{a, b -> Math.min(a, b)} Without GPars it is possible using Groovy to achieve the exact same functionality on JDK8+ with: [1, 2, 3, 4, 5].parallelStream().reduce{a, b -> Math.min(a, b)}.get() The question