[VOTE]About the "implies" operator(=>) for Groovy 3

2017-01-26 Thread Daniel Sun
Hi all, The new parser(Parrot) supports "implies" operator(=>) now, e.g. // if and only if isDistributedTxFailed is true and isCompensated is false, yields notConsistent. if (isDistributedTxFailed => isCompensated) { println 'eventuallyConsistent ' } else { println 'notConsistent'

Re: Congratulations to our newest committer Daniel Sun

2016-11-14 Thread Daniel Sun
Thank you, everybody :) Cheers, Daniel.Sun -- View this message in context: http://groovy.329449.n5.nabble.com/Congratulations-to-our-newest-committer-Daniel-Sun-tp5736468p5736738.html Sent from the Groovy Users mailing list archive at Nabble.com.

Re: [VOTE] new operator ?=

2016-11-25 Thread Daniel Sun
As most of us vote +1, I'll try to implement the new feature after I fix some major issues(https://issues.apache.org/jira/browse/GROOVY-8005?jql=project%20%3D%20GROOVY%20AND%20resolution%20%3D%20Unresolved%20AND%20assignee%20%3D%20daniel_sun%20ORDER%20BY%20priority%20DESC) Cheers, Daniel.Sun

Re: [VOTE] new operator ?=

2016-11-23 Thread Daniel Sun
nd if you don't know it and don't use it, it's not a huge >> loss. So it doesn't hurt to add it, and while not instantly readable, it's a >> trivial docs lookup when someone is reading the code. >> >> So, I vote +1. But, honestly, I don't see myself using it very often as &g

Re: Http Builder NG

2016-11-22 Thread Daniel Sun
Good job :) Cheers, Daniel.Sun -- View this message in context: http://groovy.329449.n5.nabble.com/Http-Builder-NG-tp5736876p5736879.html Sent from the Groovy Users mailing list archive at Nabble.com.

Re: [VOTE] new operator ?=

2016-11-28 Thread Daniel Sun
Interesting, but hard to understand somehow at the first time hearing the name ;) Cheers, Daniel.Sun 在 "jeff.l [via Groovy]" <ml-node+s329449n5737052...@n5.nabble.com>,2016年11月29日 上午8:30写道: Elsignment? — Jeff On Nov 23, 2016, at 4:30 PM, Daniel Sun <[hidden ema

Re: ConcurrentModificationException with use of memoize

2016-11-17 Thread Daniel Sun
Hi Don, I assume that it may be related to the cache based on Collections.synchronizedMap, the implementation is refined via using ConcurrentLinkedHashMap on parrot branch. Could you give it a try by following the steps? $ git clone -b parrot https://github.com/apache/groovy.git $ cd

Re: println slashy string

2016-12-08 Thread Daniel Sun
Parrot's lexer will also reject the code too, but Parrot parser supports printing a dollar slashy string: println $/hello/$ // yield hello. *Notice: *the old parser does not support the code Cheers, Daniel.Sun -- View this message in context:

Re: Maven coordinates going forward

2017-03-27 Thread Daniel Sun
> The two are independent. I suggest changing both at the same time would be the right thing to do. Agreed! Cheers, Daniel.Sun -- View this message in context: http://groovy.329449.n5.nabble.com/Maven-coordinates-going-forward-tp5739395p5739409.html Sent from the Groovy Users mailing list

Re: Official Docker Groovy images

2017-02-28 Thread Daniel Sun
Nice! -- View this message in context: http://groovy.329449.n5.nabble.com/Official-Docker-Groovy-images-tp5738848p5738851.html Sent from the Groovy Users mailing list archive at Nabble.com.

Re: Exciting Addition to Groovy Ecosystem

2017-07-07 Thread Daniel Sun
Hi Edmond, Its UI is impressive. If the tabs could be moved, the usability will be better ;) Cheers, Daniel.Sun -- View this message in context: http://groovy.329449.n5.nabble.com/Exciting-Addition-to-Groovy-Ecosystem-tp5742007p5742008.html Sent from the Groovy Users mailing list

[VOTE]About the Union Type for method/constructor declaration

2017-07-22 Thread Daniel Sun
Hi all, I've been thinking about Union Type for method/constructor declaration. It is similar to multi-catch in try-catch statement, e.g. class UnionTypeSample { public UnionTypeSample(A|B|C p) { // do something } def m(D|E p) { // do something } } Groovy will

回复:upcoming release(s)

2017-07-23 Thread Daniel Sun
原始邮件 主题:Re: upcoming release(s) 发件人:"Russel Winder-3 [via Groovy]" 收件人:Daniel Sun 抄送: On Sun, 2017-07-23 at 04:55 -0700, Daniel Sun wrote: > Looking forward to 2.6.0 and 3.0.0, which contains the Parrot parser > providing many new features :) > > p.s. use

Re: [VOTE]About the Union Type for method/constructor declaration

2017-07-23 Thread Daniel Sun
Hi Jochen, As you said, it is actually union overloads. Fully supporting union type is a big task. So I did not propose union type defination etc. for the time being ;) Cheers, Daniel.Sun -- View this message in context:

Re: [VOTE]About the Union Type for method/constructor declaration

2017-07-23 Thread Daniel Sun
Because many people do not like the feature, it will not be implemented for the time being util we reach a consensus. P.S. It is actually a poll. Cheers, Daniel.Sun -- View this message in context:

Re: Start a forum using Discourse

2017-08-19 Thread Daniel Sun
Hi Nathan, I like your idea :) Cheers, Daniel.Sun -- View this message in context: http://groovy.329449.n5.nabble.com/Start-a-forum-using-Discourse-tp5742677p5742679.html Sent from the Groovy Users mailing list archive at Nabble.com.

Re: JSR 308 support for Groovy

2017-06-12 Thread Daniel Sun
Hi Paul, > The grammar isn't expecting an annotation on the parameterized type. It > fails for both the old and new parsers with slightly different error > messages. I will set aside some time to complete the grammar and AST construction. Cheers, Daniel.Sun -- View this message in

Re: Java 8 Date/Time API Extension Methods

2017-06-08 Thread Daniel Sun
Hi Joe, Thanks for your awesome work. I like it. Cheers, Daniel.Sun -- View this message in context: http://groovy.329449.n5.nabble.com/Java-8-Date-Time-API-Extension-Methods-tp5740663p5741533.html Sent from the Groovy Users mailing list archive at Nabble.com.

Re: JSR 308 support for Groovy

2017-06-13 Thread Daniel Sun
Hi Paul, I'm reading an article on JSR308, which is really useful. http://www.oracle.com/technetwork/articles/java/ma14-architect-annotations-2177655.html In addition, I've already created a branch jsr308(https://github.com/danielsun1106/groovy-parser/tree/jsr308) to experiment the

Re: About using groovyConsole under Java9

2017-09-22 Thread Daniel Sun
Java will not ignore unknown option e.g. --add-modules, so we should add option conditionally: https://github.com/apache/groovy/commit/ca05e9ff8f217d5ac16a87fff7023a481b9c1b3f -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: About using groovyConsole under Java9

2017-09-21 Thread Daniel Sun
The next release of 2.6.0+ will add the option `--add-modules ALL-SYSTEM` by default: https://github.com/apache/groovy/commit/e6b62dfa1fc5b6471304dfe5244e84f7f6987392 Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: Apache Groovy and language influences

2017-10-04 Thread Daniel Sun
Nice :) -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: Start a forum using Discourse

2017-08-20 Thread Daniel Sun
Hi Guillaume, Maybe we can encourage groovy developers to set up some non-official forums, which are similar to what Java does ( http://javarevisited.blogspot.jp/2015/01/top-5-java-forums-for-programmers.html ) and will warm up Groovy community further more. Cheers, Daniel.Sun -- View

Re: [Poll] About supporting Java-like array

2018-05-01 Thread Daniel Sun
Hi Jochen, Supporting Java-like array is to copy & paste code in Java easily, e.g. experiment Java code in groovy console :-) > I really don't think Groovy has to support everything from Java. I agree. If we could improve the compatibility between Groovy and Java, it would be good

Re: [Poll] About supporting Java-like array

2018-05-02 Thread Daniel Sun
FYI, here is the poll result from twitter(https://twitter.com/daniel_sun/status/990544485196091395): 19 votes in total, 58% +1, 42% 0, 0% -1 Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: [Poll] About supporting Java-like array

2018-04-29 Thread Daniel Sun
Hi mg, As far as I remember, two dimensional array like`int[][] a = [[1, 2, 3], [4, 5, 6]]` will go wrong in the Groovy style. Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

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 --

Re: setting up maven environment

2018-01-11 Thread Daniel Sun
FYI, http://docs.groovy-lang.org/latest/html/documentation/tools-groovyc.html#_maven_integration Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: Sample Forum

2018-01-17 Thread Daniel Sun
Hi Nathan, Thanks for your spending time on setting up the forum. I tried just now, it's amazing! As for the following feature about delay sending, I wish you could remove it(and wish send the mail without any delay)... because if we are editing and have not completed in 2 minutes

Re: [ANN] Announcing CodeNarc 1.1

2018-01-14 Thread Daniel Sun
Nice work! Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: Executing Groovy DSL scripts concurrently

2018-02-07 Thread Daniel Sun
Hi Adithyan, How about caching the class instance and reuse it? Here are some scratch code for your reference: ``` static LRUCache lruCache = new LRUCache(100); def dslSrc = ''' your DSL source code ''' def md5 = md5(dslSrc) def resultClass =

JitPack for Groovy

2018-02-22 Thread Daniel Sun
Hi all, I have created a demo project to show how to try Groovy in a Java project via JitPack. Here is the link to the project repository: https://github.com/danielsun1106/try-jitpack The key parts of build.gradle is shown as follows: ``` repositories { mavenCentral() maven {

Re: Groovy Champions proposal feedback

2018-02-18 Thread Daniel Sun
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

Re: Start a forum - continued

2018-01-02 Thread Daniel Sun
Hi Nathan, It's easy to discuss via a forum, so I vote +1 here. According to Apache policy, we should discuss via mailing lists, so the forum integrate with the mailing lists to exchange messages between the two system. Whether the forum is official or not, the forum will attract

Re: Vote for Groovy 3 support in IntelliJ :-)

2018-03-15 Thread Daniel Sun
Done :-) Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: [ANNOUNCE] Apache Groovy 3.0.0-alpha-2 released

2018-04-17 Thread Daniel Sun
Paul, thanks for your help during the release :-) -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: [ANNOUNCE] Groovy 2.5.0-rc-1 Windows Installer Released

2018-04-16 Thread Daniel Sun
Nice work. Thanks! -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: [ANNOUNCE] Apache Groovy 3.0.0-alpha-2 released

2018-04-19 Thread Daniel Sun
Hi Francesco, You should still be able to use groovy-all, but the relevant individual JARs will be downloaded(not the original fat jar file groovy-all.jar). org.codehaus.groovy groovy-all 3.0.0-alpha-2 pom Cheers, Daniel.Sun -- Sent from:

Re: [ANNOUNCE] Apache Groovy 3.0.0-alpha-2 released

2018-04-19 Thread Daniel Sun
`pom` is not required. FYI: http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> 4.0.0 me.sunlan try-groovy-via-mvn

Re: [ANNOUNCE] Apache Groovy 3.0.0-alpha-2 released

2018-04-19 Thread Daniel Sun
For gradle user: group 'me.sunlan' version '1.0-SNAPSHOT' apply plugin: 'java' sourceCompatibility = 1.8 repositories { mavenCentral() } dependencies { compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '3.0.0-alpha-2' } Cheers, Daniel.Sun -- Sent from:

Re: Groov 3.0 - nested code blocks - block/eval

2018-03-20 Thread Daniel Sun
Hi mg, Parrot is smart enough to distinguish closure and code block, so `block` is not necessary. BTW, new keywords may break existing code ;) As for `eval`, we can use `{ /* do something here */ }()` instead, e.g. `{ 'abc' }()` P.S. I am open to any proposal for grammar ;-) Cheers,

Re: ConcurrentModificationException with use of memoize

2018-03-02 Thread Daniel Sun
Hi Don, The issue should be fixed in 2.5.0+(NOT included in 2.5.0-beta-3), please reference the thread about jitpack to give it a try: http://groovy.329449.n5.nabble.com/JitPack-for-Groovy-tp5747625.html Cheers, Daniel.Sun -- Sent from:

Re: [ANNOUNCE] Apache Groovy 2.4.14 released

2018-03-02 Thread Daniel Sun
That's great! 2.6.0-alpha-3 and 3.0.0-alpha-2 are coming soon ;-) Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: [ANNOUNCE] Apache Groovy 2.5.4 released

2018-11-11 Thread Daniel Sun
Nice work, Paul. Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: [ANNOUNCE] Groovy 2.5.4 Windows Installer Released

2018-11-11 Thread Daniel Sun
Nice work! Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: GraalVM with Groovy and Grape

2019-01-16 Thread Daniel Sun
Nice post. I've read it. Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: [PROPOSAL]About creating open collective for Groovy programming language in the name of Groovy Community

2019-01-08 Thread Daniel Sun
Hi Paul, > (1) Since we don't use the "groovy/groovy-core" repo any longer, I don't > think that is the correct one to use but rather "apache/groovy". As you said in (2), `According to official Apache policy, the ASF doesn't accept "cash for code"`, I am not sure we can create open

Re: [PROPOSAL]About creating open collective for Groovy programming language in the name of Groovy Community

2019-01-08 Thread Daniel Sun
Here is the introduction of Open Source Collective 501c6 (Non Profit): https://opencollective.com/opensourcecollective Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: Groovy closure $v

2019-04-02 Thread Daniel Sun
My pleasure ;-) -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: Groovy file associations on Windows

2019-02-11 Thread Daniel Sun
Yep. e.g. banks usually does not allow employees access Internet. Luckily some of them will setup maven server. Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: Which issue do you MOST want to fix

2019-02-20 Thread Daniel Sun
Hi Mauro, The issue you most want to fix is fixed: https://github.com/apache/groovy/commit/f9ebd615cb5d5f766a30b2a6e904084acece Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: GMavenPlus 1.7.0 Released

2019-05-06 Thread Daniel Sun
Nice work, Keegan. Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: groovysh and long input

2020-10-19 Thread Daniel Sun
Please try 3.0.6+, we have tuned the performance a lot. Cheers, Daniel Sun On 2020/10/16 18:58:28, Stephen Mallette wrote: > Hello, > > I happened to be testing some issues related to this pull request I > submitted the other day: > > https://github.com/apach

Re: groovysh and long input

2020-10-19 Thread Daniel Sun
nc. OS: Windows 10 ``` Cheers, Daniel Sun [1] my script: ``` def begin = System.currentTimeMillis() // 500 lines of "1 + 10 +" def result = new GroovyShell().evaluate ''' 1 + 10 + 1 + 10 + 1 + 10 + 1 + 10 + 1 + 10 + 1 + 10 + 1 + 10 + 1 + 10 + 1 + 10 + 1 + 10 + 1 + 10 + 1 + 10 +

Re: Omitting parentheses on .size() ?

2020-07-31 Thread Daniel Sun
The parentheses of methods without parameters could not be ommitted. `[1, 2, 3].size` is accessing the private field `size` of `ArrayList`, so illegal reflective access warning will be thrown. Cheers, Daniel Sun On 2020/08/01 00:49:54, paul wrote: > Hi all, > > (on latest gro

Re: What projects use Groovy as its main development language ?

2020-06-27 Thread Daniel Sun
MIP(aka Murex Interface Platform) of BEA is developed with Groovy 3. There are about tens of thousands LOC in groovy files. P.S. I am not able to provide accurate LOC because I do not work for BEA any more... Cheers, Daniel Sun On 2020/06/26 22:24:24, MG wrote: > A quick survey:

Re: GMavenPlus 1.9.1 Released

2020-07-26 Thread Daniel Sun
Nice work, Keegan. Cheers, Daniel Sun On 2020/07/26 20:01:21, Keegan Witt wrote: > Bugs > > None > Enhancements > >- Add a property to skip script execution (#162 ><https://github.com/groovy/GMavenPlus/issues/162>) > > Potentially breaking changesNon

Re: [ANNOUNCE] Groovy 2.4.21, 2.5.14, and 3.0.7 Windows installers released

2020-12-04 Thread Daniel Sun
Nice work, Keegan. Cheers, Daniel Sun On 2020/12/04 04:48:06 Keegan Witt wrote: > Windows installers for the latest Groovy releases are now available. > > 2.4.21: > https://bintray.com/groovy/Distributions/download_file?file_path=groovy-2.4.21.msi > 2.5.14: > https://

Re: GMavenPlus 1.11.1 Released

2020-11-30 Thread Daniel Sun
Nice work! Cheers, Daniel Sun On 2020/12/01 04:22:54, Keegan Witt wrote: > Bugs > >- Fixes IllegalArgumentException when consoleScript parameter was loaded >from POM rather than command line property. > > Enhancements > None > Potentially breaking changes

Re: Groovy with JDK 16

2021-06-14 Thread Daniel Sun
ues were found when running on JDK16 too, see http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html P.S. sorry for the late reply. I'm too busy recently to look into issues... [1] https://github.com/apache/groovy/pull/1598 Cheers, Daniel Sun On 2021/05/01 18:53:19, Graeme Rocher wrote: >

Re: Groovy with JDK 16

2021-06-19 Thread Daniel Sun
JDK16 should be supported fully if the PR is accepted: https://github.com/apache/groovy/pull/1598 Cheers, Daniel Sun On 2021/06/15 02:35:18, Daniel Sun wrote: > Hi Graeme, > > > is there an issue report to track this or should I file one? > > The issue reports were created

Re: Groovy with JDK 16

2021-04-25 Thread Daniel Sun
hub.com/apache/groovy/blob/master/src/main/java/org/codehaus/groovy/reflection/stdclasses/CachedSAMClass.java#L69-L91 Cheers, Daniel Sun On 2021/04/22 12:24:39, Graeme Rocher wrote: > Hi all, > > We are close to getting Micronaut's JDK 16 builds passing however some > tests are failin

Re: [ANNOUNCE] Groovy 3.0.8 and 4.0.0-alpha-3 Windows installers released

2021-04-19 Thread Daniel Sun
Nice work, Keegan! Cheers, Daniel Sun On 2021/04/19 22:50:19, Keegan Witt wrote: > Windows installers for the latest Groovy releases are now available. These > are the first releases to be on our Bintray replacement, now that it's been > sunset > <https://jfrog.com/blog/into-the

Re: [ANNOUNCE] Apache Groovy 4.0.0-alpha-3 released

2021-04-16 Thread Daniel Sun
Nice work, Paul! Cheers, Daniel Sun On 2021/04/16 05:57:30, Paul King wrote: > Dear community, > > The Apache Groovy team is pleased to announce version 4.0.0-alpha-3 of > Apache Groovy. > Apache Groovy is a multi-faceted programming language for the JVM. > Further de

Re: recognise empty closure?

2021-02-17 Thread Daniel Sun
Groovy does not support checking empty closure at runtime AFAIK, but we could check and set some property to closure while compiling, then get the property at runtime. It will be an new improvement, not sure if others like it or not. Cheers, Daniel Sun On 2021/02/17 15:06:47, OCsite wrote

Re: Groovy code generation from AST

2021-10-24 Thread Daniel Sun
, Daniel Sun On 2021/10/22 15:02:16, Max Lynch wrote: > I'm building a tool for making modifications against Groovy/Gradle files. > I've successfully built an AST using AstBuilder, but I'm not sure how to > generate Groovy code from the modified AST I have. > > I found the AstNodeToScrip

Re: Class file version problem on Java 17

2021-11-29 Thread Daniel Sun
Please submit a JIRA ticket to track the issue[1], and it's better to provide us a standalone runnable script to reproduce the issue. Cheers, Daniel Sun [1] https://issues.apache.org/jira/projects/GROOVY/summary On 2021/11/28 19:07:47 Jochen Wiedmann wrote: > Hi, > > I've got a Groo

Re: Unsupported class file major version 65 when running on java 21

2024-05-16 Thread Daniel Sun
Could you try the latest stable version, i.e. 4.0.21. As the following configuration shows, Java 21 is supported by Groovy 4.0.21. https://github.com/apache/groovy/blob/c4615cec66ed07c7f0d9c8c73ee9a6dbda147952/.github/workflows/groovy-build-test-ea.yml#L32 Cheers, Daniel Sun On 2024/05/16 10