[groovy-macro] static method call expressions

2016-04-11 Thread Mario Garcia
Hello: I'm playing a little bit with groovy-macro, BTW it's really cool how easy you can create statements and expressions. However I'm having some issues when trying to create an static method call: *Statement callJsonOutput(final MapExpression mapExpression) {* *return macro(true)

Re: Pull request to make private methods static when they are plain functions

2016-04-27 Thread Mario Garcia
Thanks for the clarification :) On 28 Apr 2016 02:12, "John Wagenleitner" <john.wagenleit...@gmail.com> wrote: > > > On Sun, Apr 24, 2016 at 11:13 PM, Mario Garcia <mario.g...@gmail.com> > wrote: > >> +1 >> >> Besides, I was wondering If mo

Re: Pull request to make private methods static when they are plain functions

2016-04-25 Thread Mario Garcia
+1 Besides, I was wondering If most, if not all these static methods, should have all parameters marked as final. Is there any policy about this ? Would it help ? 2016-04-24 21:46 GMT+02:00 Jochen Theodorou : > On 24.04.2016 18:12, John Wagenleitner wrote: > >> About to merge

Re: Problem creating groovy-macro spec files

2016-05-22 Thread Mario Garcia
return the same value at SEMANTIC_ANALYSIS phase. 2016-05-22 16:05 GMT+02:00 Guillaume Laforge <glafo...@gmail.com>: > You might want to ping Sergei, Groovy Macro's creator. > I've added Sergei in CC. > > Guillaume > > On Sun, May 22, 2016 at 3:29 PM, Mario Garcia <ma

Re: http://www.groovy-lang.org/ down

2016-05-22 Thread Mario Garcia
Thanks for the explanation Guillaume. Just a quick question. I was wondering if, the same way Groovy has a mirror in Github, could it be possible to have the Groovy site published as a gh-pages? That would work as a possible documentation back-up in the future. Of course I don't mean to do it any

Re: Problem creating groovy-macro spec files

2016-05-22 Thread Mario Garcia
BTW I'm using Linux Debian open-jdk 1.8.0_72 2016-05-22 14:33 GMT+02:00 Mario Garcia <mario.g...@gmail.com>: > Hi: > > I'm trying to write some examples about the new features coming in the new > 'groovy-macro' but I'm experiencing some issues. > > In order to use 'gr

Re: [Question] The Apache Groovy Language Reference

2016-05-23 Thread Mario Garcia
Hi: There is also a single page document at http://groovy-lang.org/single-page-documentation.html Mario 2016-05-23 10:59 GMT+02:00 Duncan Dickinson : > Hi Edinson, > > The main documentation is at http://groovy-lang.org/documentation.html > and includes language

Re: Progress on the Antlr4-based parser update(2016.04.30)

2016-05-01 Thread Mario Garcia
Very impressive work! Congrats! On 30 Apr 2016 17:32, "Jochen Theodorou" wrote: > yes, they are doing a really nice job on this. I am very happy for them to > invest so much time here > > bye Jochen > > On 30.04.2016 13:06, Guillaume Laforge wrote: > >> Great progress guys!

Re: Automatic closure coercion and delegate

2016-05-03 Thread Mario Garcia
+1 2016-05-03 10:29 GMT+02:00 Jochen Theodorou : > On 03.05.2016 08:26, Cédric Champeau wrote: > [...] > >> repositories { // Action> maven { Action >> url '' >> } >> } >> > > I see... I would feel much better if this was done by a special interface, >

Re: [groovy-macro] static method call expressions

2016-04-19 Thread Mario Garcia
get the method call expression directly. Mario 2016-04-11 14:26 GMT+02:00 Mario Garcia <mario.g...@gmail.com>: > Hello: > > I'm playing a little bit with groovy-macro, BTW it's really cool how easy > you can create statements and expressions. > > However I'm having some issues

[AST] Is there any way to remove an AnnotationNode from an AnnotatedNode ?

2016-04-20 Thread Mario Garcia
I don't know how to do this. Looking the g/api there is a "addAnnotation" but there is not a "removeAnnotation" like method. Mario

Re: [AST] Is there any way to remove an AnnotationNode from an AnnotatedNode ?

2016-04-20 Thread Mario Garcia
Oh I didn't know that. Thank you Shil :) 2016-04-20 16:20 GMT+02:00 Shil Sinha <shil.si...@gmail.com>: > The annotationNodes list for an AnnotatedNode is accessible and and > mutable so you should be able to remove it yourself. > > On Wed, Apr 20, 2016 at 7:56 AM, Mar

Groovy macro documentation

2016-10-07 Thread Mario Garcia
Hi all: I sent a WIP with some groovy-macro documentation. The main problem with the PR is that there're two tests failing. I've been checking tests code and I can't see anything that may cause these tests to fail. I'll be reviewing the whole thing during the weekend but it would be better if

Re: [VOTE][LAZY] Apache Groovy Roadmap - take 2

2017-03-16 Thread Mario Garcia
+1 On 16 Mar 2017 15:29, "Guillaume Laforge" wrote: > +1 > > On Wed, Mar 15, 2017 at 4:15 AM, Paul King wrote: > >> Hi folks, >> >> Earlier in the year, Cédric did a great job of outlining a possible >> roadmap for Groovy. I think there was general

Re: The new annotation Groovydoc for Groovy 3

2017-04-10 Thread Mario Garcia
Thanks for the pointer! I'll take a look at it Mario 2017-04-10 8:56 GMT+02:00 Daniel Sun : > Hi Mario, > > Here is the background of the new annotation: > > About a new annotation Groovydoc > http://groovy.329449.n5.nabble.com/About-a-new-annotation-Groovydoc- >

Re: The new annotation Groovydoc for Groovy 3

2017-04-09 Thread Mario Garcia
Very interesting Dani. Although I can think myself a couple of use cases for this, I'm intrigued, where did this come from ? What was the scenario you had in mind ? On 10 Apr 2017 02:26, "Daniel Sun" wrote: We can call it "Runtime Groovydoc". -- View this message in

Re: master branch has had the 'parrot' branch merged

2017-04-11 Thread Mario Garcia
Great news :) Great work guys!! 2017-04-11 3:49 GMT+02:00 Paul King : > > Hi all, > > I merged the parrot branch into master. All the tests pass. > > I'll split off the GROOVY_2_6_X branch next week (the idea of that branch > is outlined in earlier emails) and merge in the

Re: Build failing

2017-06-18 Thread Mario Garcia
+1 to what Russel said. Maybe given one example the rest can follow your steps. And course +1 to change whatever is necessary from your point of view. El 17 jun. 2017 1:18 p. m., "Russel Winder" escribió: > On Sat, 2017-06-17 at 09:44 +0200, Cédric Champeau wrote: > >

Re: What the... static compile by default

2018-05-11 Thread Mario Garcia
*About Static Compilation changes:* I've used the way it's documented in the official documentation, and I agree with Cedric, I don't like having a system property. I see more benefits using the compiler configuration file: - Configuration is more fine grained (apply to all, apply to some

Re: What the... static compile by default

2018-05-11 Thread Mario Garcia
rored back to >> Apache. > > > This may be interesting for Groovy also. > We haven't made the move yet so I can't give you feedback from first-hand > experience. > > Remko > > > On Sat, May 12, 2018 at 12:32 AM, Mario Garcia <mario.g...@gmail.com> > wro

Re: Java object conversion using ConfigSlurper

2018-05-16 Thread Mario Garcia
Hi, good work :) It seems a nice feature, but I'm wondering why having two different methods doing the same ? asType and getAs. - I think is always better to avoid having two methods doing the same, specially when asType can be called both directly or via sugar syntax. - I also think

Re: Upcoming releases

2018-02-06 Thread Mario Garcia
That's good News :) 2018-02-06 8:19 GMT+01:00 Paul King : > > I am planning to prepare a 2.5.0-beta-3 release towards the end of this > week and 2.4.14 not long after. Now's a good time to let us know if there > is something critical you need for those releases. > > I am

Re: DGM for first or default

2018-10-18 Thread Mario Garcia
Eric you can use `find`: list.find() ?: defaultValue The method find with no arguments takes the first element, and if the collection is empty or null it will return null and you won't get an IndexOutOfBounds Regards Mario El jue., 18 oct. 2018 a las 19:32, Milles, Eric (TR Technology & Ops)

Re: DGM for first or default

2018-10-18 Thread Mario Garcia
Good point OC: [0,'',[],[:]].find()?:'not quite what you wanted here' [0,1,2].find()?:'nor in this case' The more I think on this the more I think is an interesting topic. I fully understand your frustration with first(), but apart from the example with Cocoa you mentioned, looking in the JVM it

Re: groovy git commit: Add missing concat methods of tuples

2018-11-26 Thread Mario Garcia
concatenated(Tuple) ... return new instance > > Cheers, > mg > > > Am 26.11.2018 um 19:29 schrieb Mario Garcia: > > I'd do it if the intention is to enforce immutability of tuples, like > "...any operation applied to a tuple should result in a new tuple"

Re: groovy git commit: Add missing concat methods of tuples

2018-11-26 Thread Mario Garcia
I'd do it if the intention is to enforce immutability of tuples, like "...any operation applied to a tuple should result in a new tuple" Regards Mario El lun., 26 nov. 2018 15:44, Paul King escribió: > On Tue, Nov 27, 2018 at 12:34 AM wrote: > > > > Repository: groovy > > Updated Branches: >

Re: requesting your advice on picocli modules

2019-05-30 Thread Mario Garcia
+ 1 picoli-groovy.jar Great project BTW! El jue., 30 may. 2019 a las 14:51, Remko Popma () escribió: > Hi, > > I maintain the picocli library for creating command line applications in > Groovy, Java, and other JVM languages. > I have a question for the Groovy community (both users and

Re: [PROPOSAL]Support conditional return

2020-07-26 Thread Mario Garcia
Hi all: Very interesting topic. The first idea sprang to mind was the PMD rule in Java saying you should have more than one exit point in your methods ( https://pmd.github.io/latest/pmd_rules_java_codestyle.html#onlyonereturn). But the reality is that sometimes (more often than not) we are

Re: Proposal handling of potential variable declarations for expressions starting with an underscore or dollar

2021-02-11 Thread Mario Garcia
If it helps, I've seen some programmers with python background using the underscore in Groovy for method declaration. It seems they use the convention of the underscore prefix to note these methods aren't for public consumption. El jue, 11 feb 2021 a las 9:49, Paul King () escribió: > > Hi

Re: [DISCUSS] Some potential additional system properties/CompilerConfiguration flags for Groovy 4

2021-09-21 Thread Mario Garcia
Hi: Here are my thoughts. Maybe I'm wrong but, if somebody is familiar with JDK17 sealed classes, I don't think that person would expect that using sealed syntax with JDK8 is going to output a JDK17 sealed class. I would add it to the documentation and that's it. To me seems that implementing

Re: Welcome Remko Popma to the Apache Groovy PMC!

2022-07-13 Thread Mario Garcia
Good news! Congratulations Remko! El mié, 13 jul 2022 a las 8:59, Paul King () escribió: > Remko Popma has been voted as an additional member to the Apache > Groovy PMC. Congratulations Remko! > > Remko has been a committer for some time, and was the main contributor > for the groovy-cli-picocli

Re: Possible additional DGM collectEntries variants

2022-12-20 Thread Mario Garcia
+1. Hi all. For me it makes more sense to have a specific method for that (collectEntriesWith, collectEntriesWithKey...) than overloading collectEntries and forcing me to introduce the java.util.function api just for so little. El lun, 19 dic 2022 a las 12:23, Paul King () escribió: > > Hi

Re: Fix remainder operator for BigInteger (GROOVY-10800)

2023-03-23 Thread Mario Garcia
The idea of fixing inconsistencies is great. I also like the idea of giving a mid-term solution for those using the mod operator "incorrectly". But I'm not sure about opening the door for precisely overloading operators with different names than the ones specified by default, that seems to be just

Re: Fix remainder operator for BigInteger (GROOVY-10800)

2023-03-23 Thread Mario Garcia
d, subtract, multiply, power > Commons numbers fractions: add, subtract, multiply, pow > Commons numbers complex: add, subtract, multiply, pow > > Cheers, Paul. > > > On Thu, Mar 23, 2023 at 6:21 PM Mario Garcia wrote: > >> The idea of fixing inconsistencies is great. I