Re: A strange script

2017-01-21 Thread Suderman Keith
nt: class java.io.StringWriter no argument Keith > On Jan 21, 2017, at 2:37 PM, Suderman Keith wrote: > > This took me awhile to wrap my head around this as well. Keep in mind what > Guillaume said, the object passed to the closure is a writer. This example > should hopefully ma

Re: A strange script

2017-01-21 Thread Suderman Keith
This took me awhile to wrap my head around this as well. Keep in mind what Guillaume said, the object passed to the closure is a writer. This example should hopefully make it clearer what is going on: a = { println x.class x -> println x x.write('foo') return '

Re: Closure does not see field when setting value

2016-11-10 Thread Suderman Keith
> On Nov 9, 2016, at 4:53 PM, Krzysztof Kowalczyk > wrote: > > Thanks, > > I understand why it is happening. I don't understand why someone would want > the binding to be created on the fly in such way. It is counterintuitive for > me. It has serious consequences and I don't see a use case w

Re: .with() variant that returns the original object

2016-11-08 Thread Suderman Keith
> On Nov 8, 2016, at 11:41 AM, Jochen Theodorou wrote: > > what about an overloaded with: +1 Or even something like: myObject.with { ... } // current behaviour myObject.with(return:this) { ... } // returns this when finished. myObejct.with(return:new Object()) { ... } // returns a new Object

Re: .with() variant that returns the original object

2016-11-08 Thread Suderman Keith
+1 for withThis withThis{} indicates it is just another form of the .with{} method that returns this, that seems the most logical and consistent name. The name `tap` strikes me as non-sensical; what does doing something "with" an object have to do with tapping a beer keg or wire tapping a phon

Re: Groovy kernel for Jupyter Notebook

2016-09-17 Thread Suderman Keith
After a longer than anticipated delay (lots of fires to put out at work) I finally have a working "proof-of-concept" Jupyter kernel for Groovy that is (marginally) worth sharing. The code is available from https://github.com/lappsgrid-incubator/jupyter-groovy-kernel under the Apache 2.0 licens

Re: JsonOutput serialization options feature

2016-09-11 Thread Suderman Keith
+1 I haven't had a chance to look at your pull request, but the lack of configurability is the main reason I use Jackson instead of the Groovy JsonBuilder/JsonOutput classes. Keith > On Sep 10, 2016, at 8:59 PM, John Wagenleitner > wrote: > > Groovy Json u

Re: changing "with" to return self or doto

2016-07-06 Thread Suderman Keith
> On Jul 6, 2016, at 10:41 AM, Jochen Theodorou wrote: > > > > On 06.07.2016 16:24, Suderman Keith wrote: >> -1 to a breaking change (in 2.5 or 3.0). I agree with Jason, breaking >> changes only for methods that are widely considered to be broken. > > if

Re: changing "with" to return self or doto

2016-07-06 Thread Suderman Keith
-1 to a breaking change (in 2.5 or 3.0). I agree with Jason, breaking changes only for methods that are widely considered to be broken. -1 to a new method. While a new method may be better than a breaking change I don’t like to see Object’s namespace become even more polluted with marginally

Re: HTTPBuilder and Content-type

2016-06-07 Thread Suderman Keith
> On Jun 7, 2016, at 11:40 AM, Imholz, John J. wrote: > > I'm still not sure how to get the Content-type sent as 'text/xml' (the > webservice I'm hitting doesn't like 'application/xml’.) You should just be able to specify the content type as ‘text/xml’ without having to use one of the Content

Re: About Gradle, Kotlin and Inner Fear

2016-05-25 Thread Suderman Keith
I suspect a deep knowledge of the inner workings of Eclipse would be required. You could always take a look at the code on GitHub [1] and see if you can make sense of it. Although, it may not be as dead as we have been led to believe (I personally use IntelliJ) as it looks like that latest SNAP

Re: groovy-lang.org down for now

2016-05-22 Thread Suderman Keith
> On May 22, 2016, at 5:58 PM, Jochen Theodorou > wrote: > > The question is what we can do here. The domain is in the hands of the ASF. I > don´t even know how to directly reach someone of the infrastructure team. Maybe someone could reach out to one of the Groovy me

Re: Groovy kernel for Jupyter Notebook

2016-05-08 Thread Suderman Keith
lly useful to share (on GitHub) until early June. Cheers, Keith > > > Cheers, > Paolo > > > On Mon, May 2, 2016 at 11:24 PM, Suderman Keith <mailto:suder...@anc.org>> wrote: > Does anyone know of a Groovy kernel for iPython/Jupyter (http://jupyter.org/ &g

Groovy kernel for Jupyter Notebook

2016-05-02 Thread Suderman Keith
Does anyone know of a Groovy kernel for iPython/Jupyter (http://jupyter.org/ )? My searches have not turned up much. I don't want a Groovy alternative to iPython/Jupyter notebooks (i.e. http://beakernotebook.com/ won’t cut it), I need a Groovy