Re: GROOVY-8527: Enhance import aliasing to an alias with a package name

2018-04-04 Thread Jochen Theodorou
Am 04.04.2018 um 12:55 schrieb Guillaume Laforge: See Paul's description in the JIRA issue for the motivation: "My use case is around JDK9+ modules. We might move the package for, e.g. groovy.util.XmlSlurper to something like groovy.xml.parsers.XmlSlurper (or whatever) but we might like to

Re: GROOVY-8527: Enhance import aliasing to an alias with a package name

2018-04-04 Thread Jochen Theodorou
Am 04.04.2018 um 06:58 schrieb Daniel Sun: Hi all, Paul proposed to enhance import aliasing to an alias with a package name(see GROOVY-8527[2]), which I think is useful sometimes, so I have implemented in groovy-parser project[1]. If no one rejects it, I will sync it to

[jira] [Commented] (GROOVY-8301) break/return/continue support in "Appended Block Closures"

2018-04-03 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16424731#comment-16424731 ] Jochen Theodorou commented on GROOVY-8301: -- Maybe Kotlin does it like that, I honestly do

Re: Avoiding sun.misc.Unsafe and embracing modules in Java libraries: missing links

2018-04-03 Thread Jochen Theodorou
On 03.04.2018 21:26, Henri Tremblay wrote: [...] For completeness, there are 4 ways to create a class without calling a constructor right now that I'm aware of: - Unsafe.allocateInstance which is supposed to go away at some point -

Re: Groovy 3.0 Java Lambda

2018-04-03 Thread Jochen Theodorou
On 03.04.2018 19:17, mg wrote: With regards to Groovy 3.0 Java lambda support: Is it practically doable to turn a Groovy closure into a Groovy Java lambda if only effectively final variables are used inside the closure ? And if yes, might that be a future Groovy feature ? My idea is to have

Re: new MOP under Java9 module system findings

2018-04-02 Thread Jochen Theodorou
On 02.04.2018 12:11, Uwe Schindler wrote: [...] Yes, that script language was designed from scratch with only invokedynamic and MethodHandles in mind. which I guess means no mop at all, or nothing beyond a missing method It also uses a pure whitelist-approach (explicit whitelisting what you

Re: new MOP under Java9 module system findings

2018-04-01 Thread Jochen Theodorou
On 01.04.2018 19:58, MG wrote: Hi Jochen, I just thought about some post by another project I read some time back (alas I can no longer remember which project exactly) which used Groovy as its scripting language, but switched to a lesser, more restrictive scripting option, because they

new MOP under Java9 module system findings

2018-04-01 Thread Jochen Theodorou
Hi all, yesterday I was playing around with java modules and tried to implement some pseudo mops based on what we have and I'd like to share my impressions. Please do not wonder that I only mention method invocation, I only played around with that. missingMethod seems to be easy to do, also

Re: MethodHandle accessing private method of outer class

2018-04-01 Thread Jochen Theodorou
On 01.04.2018 05:00, David Holmes wrote: On 1/04/2018 11:13 AM, Jochen Theodorou wrote: On 01.04.2018 01:51, David Holmes wrote: [... Anonymous inner class able to call private method in enclosing class directly using method handles and no helper methods ...] But MethodHandles went to a lot

apache at bintray

2018-04-01 Thread Jochen Theodorou
Hi all, I was pointed at https://bintray.com/apache. Is that an "official" bintray account for apache? Are projects publishing convenience artifacts on bintray supposed to use that? bye Jochen - To unsubscribe, e-mail:

Re: MethodHandle accessing private method of outer class

2018-03-31 Thread Jochen Theodorou
On 01.04.2018 01:51, David Holmes wrote: [... Anonymous inner class able to call private method in enclosing class directly using method handles and no helper methods ...] But MethodHandles went to a lot of trouble to allow the same accesses as the language permits (though sometimes needing

MethodHandle accessing private method of outer class

2018-03-31 Thread Jochen Theodorou
Hi all, I just noticed something I would like to know if that is correct and as specified (before I start using that in my application logic) using java 9.0.4 public class Application { public Lookup foo() { Supplier s = new Supplier() { public Lookup get() { return

Re: About triple quoted string

2018-03-30 Thread Jochen Theodorou
On 30.03.2018 15:03, Daniel.Sun wrote: Hi all, The old parser does not support code like '''str='abc and """str="abc and goes wrong, but the new parser Parrot supports them now. The improvement conforms to "Least Surprise" principle IMO. Any thoughts? nice bye Jochen

[jira] [Commented] (GROOVY-8523) Static type checking instanceof

2018-03-29 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16418670#comment-16418670 ] Jochen Theodorou commented on GROOVY-8523: -- ah copyy error, thanks. If that works too, then very

[jira] [Comment Edited] (GROOVY-8523) Static type checking instanceof

2018-03-28 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16418239#comment-16418239 ] Jochen Theodorou edited comment on GROOVY-8523 at 3/28/18 11:26 PM

[jira] [Commented] (GROOVY-8523) Static type checking instanceof

2018-03-28 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16418239#comment-16418239 ] Jochen Theodorou commented on GROOVY-8523: -- does your fix also handle this? {code

Re: Await/ async?

2018-03-26 Thread Jochen Theodorou
On 26.03.2018 08:34, David Dawson wrote: Hi, I do a load of async programming, in the JVM world, mostly using RxJava and CompleteableFuture). Not so much GPars or Reactor these days, but the principles are fairly portable. I've noticed that since I started using typescript on the front end,

[jira] [Commented] (GROOVY-8485) PropertyHandler support producing errors when supplied class loader is not in loader chain of PropertyLoder.class

2018-03-25 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16413172#comment-16413172 ] Jochen Theodorou commented on GROOVY-8485: -- I think you do not have it 100%. The transformLoader

Re: Upgrade Groovy jar - can't start tomcat

2018-03-23 Thread Jochen Theodorou
Am 21.03.2018 um 14:39 schrieb Cédric Champeau: Thanks for the explanation, Paul, it makes sense. Long story short: do not upgrade major libraries in bugfix releases ;) then you will not be able to call Stream.of bye Jochen

Re: [VOTE] Release Apache Groovy 2.4.15

2018-03-23 Thread Jochen Theodorou
Am 23.03.2018 um 12:47 schrieb Paul King: We temporarily reverted the ASM change but that ended up not being the problem, so I put it back the same as in 2.4.14. The problem was that there was no Java8 plugin for 2_4_X so neither the code fixes from GROOVY-8338 nor the respective test ran -

Re: [VOTE] Release Apache Groovy 2.4.15

2018-03-23 Thread Jochen Theodorou
Am 23.03.2018 um 08:04 schrieb Paul King: Dear development community, I am happy to start the VOTE thread for a Groovy 2.4.15 release! This is mainly to fix a regression in calling static methods in interfaces. We were trying to improve the JDK9 experience but on the 2.4 branch it caused

Re: Upgrade Groovy jar - can't start tomcat

2018-03-21 Thread Jochen Theodorou
Am 21.03.2018 um 12:34 schrieb Blake McBride: Thanks!  Turns out, this is a known problem with older versions of tomcat.  I don't think any changes in groovy are necessary. just in case you are somebody else wants to know more Unable to process Jar entry [module-info.class] from Jar

Re: [RFE] Methods as expressions

2018-03-21 Thread Jochen Theodorou
Am 21.03.2018 um 09:27 schrieb Cédric Champeau: [...] In any case, I was doubtful as you are here before actually using it in Kotlin. After a few weeks, it became clear to me this syntax was both more concise and more self-explanatory. For me {} was always very clear, for {} starts a new

Re: next generation CliBuilder?

2018-03-21 Thread Jochen Theodorou
Am 21.03.2018 um 02:11 schrieb Paul King: Picocli has always looked like a nice alternative. It wasn't an option for me before it had the api but picocli 3 seems to have that covered. can you refresh my memory about the position of JCommander in this? I see some overlap. And if we go with

Re: Fund Groovy Development - Jira Task

2018-03-15 Thread Jochen Theodorou
Just randomly using a post of this thread for the topic. I just stumbled over https://www.bountysource.com/. Wouldn't that be an interesting platform for this kind of idea Am 11.03.2018 um 19:43 schrieb mg: Sure :-) Ursprüngliche Nachricht Von: "Daniel.Sun"

Re: Synthetic GroovyObject methods

2018-03-12 Thread Jochen Theodorou
agreed Am 12.03.2018 um 13:07 schrieb Paul King: I think we probably have to. It's an integration point that we haven't really seen a lot of call for in the past but with @CompileStatic becoming more popular, I can see more use of this style of integration. Keen to hear if anyone can see an

Re: Fwd: About supporting `var` of Java10+

2018-03-12 Thread Jochen Theodorou
On 11.03.2018 17:29, MG wrote: On 11.03.2018 14:58, Jochen Theodorou wrote: On 10.03.2018 20:33, MG wrote: Hi Jochen, I was not aware that Groovy is so sophisticated in its expression analysis, that it actually uses intersection types you actually do not have much of a choice

Re: Fwd: About supporting `var` of Java10+

2018-03-11 Thread Jochen Theodorou
On 10.03.2018 20:33, MG wrote: Hi Jochen, I was not aware that Groovy is so sophisticated in its expression analysis, that it actually uses intersection types you actually do not have much of a choice. It is an AST-only representation only though. [...] 3. It would, on the other hand,

Re: Fwd: About supporting `var` of Java10+

2018-03-10 Thread Jochen Theodorou
On 10.03.2018 03:51, Paul King wrote: Hi, sorry I meant to respond to the list too. Messages included below. -- Forwarded message -- From: *MG* > Date: Sat, Mar 10, 2018 at 7:19 AM Subject: Re: About supporting `var` of Java10+ To:

Re: Synthetic GroovyObject methods

2018-03-09 Thread Jochen Theodorou
On 09.03.2018 17:19, Daniel.Sun wrote: Hi Daniil, Maybe Jochen can tell us the reason. Ping Jochen ;-) Checking Verifier I see: if (!node.hasMethod("getProperty", GET_PROPERTY_PARAMS)) { MethodNode methodNode = addMethod(node,

Re: [GEP] Switch expressions syntax from Java 11 or 12 (perhaps)

2018-03-09 Thread Jochen Theodorou
On 08.03.2018 20:52, Remi Forax wrote: [...] using break here is ugly, i agree with you but we (the amber EG) are not able to find a better solution, if you know a better way to handle local return of a value in the case of a switch, please help us. should inspiration strike me I will let

Re: [GEP] Switch expressions syntax from Java 11 or 12 (perhaps)

2018-03-09 Thread Jochen Theodorou
On 09.03.2018 21:48, fo...@univ-mlv.fr wrote: [...] but in a switch, you can not delay the creation of a case (technically you can because you can always do weird thing but, it's not what people will expect), so disallowing int i = 0; switch(foo) { case 0 -> { i++; } } make little

Re: [GEP] Switch expressions syntax from Java 11 or 12 (perhaps)

2018-03-08 Thread Jochen Theodorou
On 08.03.2018 17:34, Remi Forax wrote: [...] int accumulator = 0 LOOP: for (T element : someList) { accumulator += switch (element.type) { case PLUS_ONE -> +1; case MINUS_ONE -> -1; case ERROR: break LOOP; case default -> 0 } } with the idea that element.type

Re: About supporting `var` of Java10+

2018-03-08 Thread Jochen Theodorou
Am 08.03.2018 um 12:45 schrieb mg: Maybe I am missing your point, but what I meant was: When I use var x = new Foo() I indicate that x will be reassigned further down in the scope, otherwise I use final x = new Foo() That's what I understood. But the later variant is not part of the

Re: About supporting `var` of Java10+

2018-03-08 Thread Jochen Theodorou
Am 08.03.2018 um 09:44 schrieb mg: @unless you reassign, you would not notice the difference between current def and the Java var: 1) If I don't need to reassign, I would use final instead of var :-) 2) Supporting var for fields that get initialized during declaration, also would feel very

Re: About supporting `var` of Java10+

2018-03-07 Thread Jochen Theodorou
On 08.03.2018 02:23, MG wrote: Hi Daniel, I agree that it does not make much sense to closely mirror the details of the Java specifications in Groovy, but I still think that simply treating var the same as def looses some potential for the static compilation case, e.g.: var myVar = new

Re: Unexpected compilation error with 2.4.14

2018-03-06 Thread Jochen Theodorou
On 06.03.2018 13:23, Andres Almiray wrote: Hello everyone, I'm in the process of updating the Griffon build to use Groovy 2.4.14 and encountered a weird problem in one of the tests

Re: GPars and versions of Groovy

2018-03-06 Thread Jochen Theodorou
On 06.03.2018 16:51, Russel Winder wrote: Hi, Currently the GPars build system assumes one and only one version of Groovy. Currently we have four, most likely incompatible, versions of Groovy on the boil: 2.4.14, 2.5.0-beta-3, 2.6.0-alpha-3, 3.0.0-alpha-1. Should GPars be build specially for

Re: [VOTE] Release Groovy 2.6.0-alpha-3

2018-03-05 Thread Jochen Theodorou
+1 On 02.03.2018 17:21, Daniel.Sun wrote: Dear development community, I am happy to start the VOTE thread for a Groovy 2.6.0-alpha-3 release! This release includes 18 bug fixes/improvements as outlined in the changelog:

Re: modules and resources [ was: suggested document enhancement]

2018-03-02 Thread Jochen Theodorou
Am 02.03.2018 um 15:14 schrieb Bernard Amade: [...] 2) then what is the simplest way to deploy jars if clicking on a jar does not work anymore with modules? (scripts are platform dependent, so are Jlink images ,...and what happens with jars delivered through java webstart? should we

Re: Groovy Champions proposal feedback

2018-03-02 Thread Jochen Theodorou
hi all, I was thinking a while about all this and all the problems involved here and I want to show an alternative. Apache Groovy Community Award Name surely to be changed. The idea is to give a nominal award for what they did in the past. Somebody getting this award will get this for a

Re: [GEP] Concatenative Method Calls

2018-03-01 Thread Jochen Theodorou
On 26.02.2018 00:53, Daniel Sun wrote: Hi Jochen, To be honest, I have no complex examples in my mind. Maybe it will be good for DSL(We can think `|>` as a big arrow drawn by | and >): ``` clothes |> clean |> dry |> notify ``` In my experience the less grammar elements a DSL has

Re: [GEP] Concatenative Method Calls

2018-02-25 Thread Jochen Theodorou
On 25.02.2018 14:38, Daniel.Sun wrote: Hi all, I propose to introduce Concatenative Method Calls to Groovy. It can make code more readable, for example: Currently we write method calls like: y = foo(x) z = bar(y) w = baz(z) OR w = baz(bar(foo(x))) Concatenative Method Calls(inspired by

[jira] [Commented] (GROOVY-8339) Fix warning "An illegal reflective access operation has occurred"

2018-02-24 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16375677#comment-16375677 ] Jochen Theodorou commented on GROOVY-8339: -- [~benrobot] the message is annoying, but that´s

Re: Thread contention on GroovyClassLoader sourceCache

2018-02-24 Thread Jochen Theodorou
On 24.02.2018 07:14, Daniel Sun wrote: Hi Jochen, As a Groovy user, I prefer higher level API, e.g. `GroovyShell`, `GroovyClassLoader` ;-) This kind of functionality can be in a higher API of course, but I think GCL needs to be split instead of having another "mode". I think

Re: Thread contention on GroovyClassLoader sourceCache

2018-02-23 Thread Jochen Theodorou
On 23.02.2018 23:24, Divij Vaidya wrote: Hello, My name is Divij and I am working on an application which requires concurrent script compilation with a high throughput. I am using version 2.4.12 and currently, I am not able to achieve high throughput because the threads are waiting at the

Re: Java raw string literals

2018-02-23 Thread Jochen Theodorou
On 23.02.2018 21:31, Paolo Di Tommaso wrote: Hi people, I was wondering if there any plan to include in the new parrot parser the support the new Java raw string literals. http://openjdk.java.net/jeps/8196004 Thoughts? we have """ and we have ''', so there is no functional gap to close

Re: Loading groovy as a Jigsaw auto-module

2018-02-22 Thread Jochen Theodorou
, Jochen Theodorou <blackd...@gmx.org <mailto:blackd...@gmx.org>> wrote: Am 14.02.2018 um 03:34 schrieb Paul King: Any objections if I look into moving the Extensions file from META-INF/services to META-INF/groovy (with a fallback to the current one). But n

Re: [VOTE] Release Groovy 2.5.0-beta-3

2018-02-21 Thread Jochen Theodorou
+1 Am 21.02.2018 um 14:56 schrieb John Wagenleitner: +1 (binding) On Feb 19, 2018 9:36 PM, "Paul King" > wrote: Dear development community, I am happy to start the VOTE thread for a Groovy 2.5.0-beta-3 release! There are still a

Re: Why is LambdaMetafactory 10% slower than a static MethodHandle but 80% faster than a non-static MethodHandle?

2018-02-19 Thread Jochen Theodorou
On 20.02.2018 00:14, Vladimir Ivanov wrote: Sorry if it's a dumb question, but why nonStaticMethodHandle cannot get inlined here? -- In the benchmark it's always the same line with the same final MethodHandle variable, can JIT based on some profiling info to inline it (similar to the

Re: Why is LambdaMetafactory 10% slower than a static MethodHandle but 80% faster than a non-static MethodHandle?

2018-02-19 Thread Jochen Theodorou
On 19.02.2018 14:31, Vladimir Ivanov wrote: [...] CallSites are the best you can get (JITs treat CallSite.target as constant and aggressively inlines through them), but you have to bind CallSite instance either to invokedynamic call site or put it into static final field. And that really

Re: Why is LambdaMetafactory 10% slower than a static MethodHandle but 80% faster than a non-static MethodHandle?

2018-02-19 Thread Jochen Theodorou
Am 19.02.2018 um 13:00 schrieb Vladimir Ivanov: Geoffrey, In both staticMethodHandle & lambdaMetafactory Dog::getName is inlined, but using different mechanisms. In staticMethodHandle target method is statically known [1], but in case of lambdaMetafactory [2] compiler has to rely on

Re: @Groovy Champions: Groovy Development Funding ?

2018-02-16 Thread Jochen Theodorou
Am 16.02.2018 um 03:27 schrieb Paul King: Actually, Apache also accept donations but I think the standard policy is that it isn't then directed back to a specific project. I actually am of the impression that this is the only policy... might be wrong here. I think in general we would be

Re: Groovy Champions proposal feedback

2018-02-15 Thread Jochen Theodorou
On 15.02.2018 06:04, MG wrote: One other thing from the no-brainers section that Kotlin does better than Groovy: Ctors can be called without the new keyword. (Groovy's offer in this regard is alas severly lacking, hence nobody uses it...) I know this from Scala, how is the usage of this in

Re: Groovy Champions proposal feedback

2018-02-15 Thread Jochen Theodorou
On 14.02.2018 22:50, MG wrote: [...] but these are no-brainers, e.g. the semantics of inline closures, or that final variables with no explicit type are not of type Object, but of the type they were assigned, or named parameters support which does not try to force-map the problem to a (non

Re: Groovy Champions proposal feedback

2018-02-15 Thread Jochen Theodorou
On 14.02.2018 22:38, MG wrote: [...] Would you suggest we also honor Groovy inventor James Strachan, who wrote in 2009 in his Blog "I can honestly say if someone had shown me the Programming in Scala book by by Martin Odersky, Lex Spoon & Bill Venners back in 2003 I'd probably have never

Re: @Groovy Champions: Groovy Development Funding ?

2018-02-15 Thread Jochen Theodorou
On 14.02.2018 22:58, MG wrote: I have asked this before but have not received any reply, so with regards to Groovy Champions: What are thoughts on crowd funding (at least) some part of Groovy development ? Giving someone honors is good, but giving someone money is also nice. It would not

Re: Loading groovy as a Jigsaw auto-module

2018-02-14 Thread Jochen Theodorou
Am 14.02.2018 um 03:34 schrieb Paul King: Any objections if I look into moving the Extensions file from META-INF/services to META-INF/groovy (with a fallback to the current one). But not for 2.4.x. in the meantime I know that META-INF/services has been reserved for the normal purposes and

[jira] [Commented] (GROOVY-8474) 'Unexpected super property set for:' when accessing super class property via super.propertyName

2018-02-08 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16357132#comment-16357132 ] Jochen Theodorou commented on GROOVY-8474: -- [~paulk] you are right, it only got moved

[jira] [Commented] (GROOVY-8474) 'Unexpected super property set for:' when accessing super class property via super.propertyName

2018-02-08 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16356713#comment-16356713 ] Jochen Theodorou commented on GROOVY-8474: -- git blame says this was added because of GROOVY-7924

[jira] [Commented] (GROOVY-8467) IOGroovyMethods class readLine method works unexpected in

2018-02-07 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16356042#comment-16356042 ] Jochen Theodorou commented on GROOVY-8467: -- I might be wrong, but Java readLine swallows any

Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy

2018-02-07 Thread Jochen Theodorou
On 07.02.2018 07:12, Ken Lam wrote: Dear Jochen, Then why do I have to set encoding="utf-8" in groovyc commands in the build.xml to force it to UTF-8, If no encoding is set, the system encoding is used and that could be for example GB2312 or Big5 or even only ASCII while the official

[jira] [Commented] (GROOVY-8469) org.codehaus.groovy.runtime.typehandling.GroovyCastException:

2018-02-06 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16354863#comment-16354863 ] Jochen Theodorou commented on GROOVY-8469: -- Most likely the classloader setup was different

[jira] [Commented] (GROOVY-8472) Final variable analysis doesn't account for early exit

2018-02-06 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16354862#comment-16354862 ] Jochen Theodorou commented on GROOVY-8472: -- to bad that the issue does not really describe

Re: Need to get help: Building Groovy 1.7.5 from source gives encoding error for ReadLineTest.groovy

2018-02-06 Thread Jochen Theodorou
Am 06.02.2018 um 12:27 schrieb Ken Lam: Dear all, This is the first time for me to use a mailing list, so sorry for sending my question to this address users@groovy.apache.org because I am not sure how to ask question here (the FAQ doesn't mention whether sending email to

[jira] [Commented] (GROOVY-8467) IOGroovyMethods class readLine method works unexpected in

2018-02-06 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16353786#comment-16353786 ] Jochen Theodorou commented on GROOVY-8467: -- I think I see the problem now. If we read A\r\nB\r\n

[jira] [Commented] (GROOVY-5249) Avoid unnecessary locking in ClassInfo.getMetaClass

2018-02-06 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-5249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16353751#comment-16353751 ] Jochen Theodorou commented on GROOVY-5249: -- I think just cherry-picking them and not having

[jira] [Commented] (GROOVY-8467) IOGroovyMethods class readLine method works unexpected in

2018-02-02 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16350213#comment-16350213 ] Jochen Theodorou commented on GROOVY-8467: -- I think this behaves then similar to the readLine

Re: About the callable native lambda

2018-02-01 Thread Jochen Theodorou
Am 01.02.2018 um 12:50 schrieb Jesper Steen Møller: [...] class R implements Runnable { void run(){}} def m(Runnable r1, R r2, r3) { r1() r2() r3() } m(new R(), new R(), new R()) Currently, in the 'native-lambda' branch, r1() succeeds, whereas the latter two fail to

[jira] [Commented] (GROOVY-8458) File leak in Eclipse Plugin

2018-01-26 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16341457#comment-16341457 ] Jochen Theodorou commented on GROOVY-8458

[jira] [Comment Edited] (GROOVY-8458) File leak in Eclipse Plugin

2018-01-26 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16341103#comment-16341103 ] Jochen Theodorou edited comment on GROOVY-8458 at 1/26/18 2:24 PM

[jira] [Commented] (GROOVY-8458) File leak in Eclipse Plugin

2018-01-26 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16341103#comment-16341103 ] Jochen Theodorou commented on GROOVY-8458: -- The question is when exactly is it valid to call

Re: groovy git commit: Increase the possible size of value in GString instance

2018-01-25 Thread Jochen Theodorou
On 25.01.2018 07:32, sun...@apache.org wrote: Repository: groovy Updated Branches: refs/heads/master 031fc238f -> 7be5f2f82 Increase the possible size of value in GString instance [...] -initialCapacity += values.length * Math.max(initialCapacity / strings.length, 1); +

Re: About extracting common methods to reduce the size of class files

2018-01-23 Thread Jochen Theodorou
Am 23.01.2018 um 12:42 schrieb Jochen Theodorou: Am 23.01.2018 um 01:18 schrieb Daniel Sun: Hi Jochen $getStaticMetaClass can I think not be put in an interface. It needs static information about the exact class this method is in and there is supposed to be one for each Groovy class we

Re: About extracting common methods to reduce the size of class files

2018-01-23 Thread Jochen Theodorou
Am 23.01.2018 um 01:18 schrieb Daniel Sun: Hi Jochen $getStaticMetaClass can I think not be put in an interface. It needs static information about the exact class this method is in and there is supposed to be one for each Groovy class we create... While I investigated the implementation of

Re: About extracting common methods to reduce the size of class files

2018-01-22 Thread Jochen Theodorou
And now with Jochen's feedback ;) $getStaticMetaClass can I think not be put in an interface. It needs static information about the exact class this method is in and there is supposed to be one for each Groovy class we create... if memory serves me right. Moving the others to GroovyObject

Re: [VOTE] Release Apache NetBeans 9.0 Beta (incubating) rc2

2018-01-22 Thread Jochen Theodorou
Am 22.01.2018 um 11:01 schrieb Geertjan Wielenga: I am not sure what the point is of spending time on putting rat exclusions together if they’re simply going to be ignored when it comes to IPMC members evaluating a release. Yes, we can of course discuss those rat exclusions. No, they cannot

[jira] [Resolved] (GROOVY-8454) Method with wrong argument typed is called when passing 'null'

2018-01-20 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jochen Theodorou resolved GROOVY-8454. -- Resolution: Not A Problem > Method with wrong argument typed is called when pass

[jira] [Assigned] (GROOVY-8454) Method with wrong argument typed is called when passing 'null'

2018-01-20 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jochen Theodorou reassigned GROOVY-8454: Assignee: Jochen Theodorou > Method with wrong argument typed is called w

[jira] [Commented] (GROOVY-8454) Method with wrong argument typed is called when passing 'null'

2018-01-20 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1656#comment-1656 ] Jochen Theodorou commented on GROOVY-8454: -- [~paulk] undefined is not correct. It is the most

Re: Unsafe and JPMS

2018-01-19 Thread Jochen Theodorou
On 19.01.2018 19:31, Jeremy Manson wrote: [...] I generally agree with the principle of making real APIs to do what we need to do with Unsafe and migrating. My concern is not the removal of Unsafe, it's that the replacement won't be equivalent if it doesn't let you cross module boundaries. It

Re: How does one handle a java method which returns a non-public sub-type via reflection?

2018-01-18 Thread Jochen Theodorou
Am 18.01.2018 um 14:59 schrieb jeffrey kutcher: In this example, if I can access and execute the method vbox.getChildren().add() with no warnings or errors, which is accessing a non-public class In Java the static type is the important one. Of course you can do VBox vbox = //

Re: About the native-lambda branch

2018-01-15 Thread Jochen Theodorou
Am 15.01.2018 um 10:53 schrieb Daniel Sun: Hi Jochen, `ArrayIndexOutOfBoundsException` is fixed. I encounter another problem(i.e. How to load arguments according to some specified order): I want to load local variables[1] according to the order in which the local variables appear in

Re: How does one handle a java method which returns a non-public sub-type via reflection?

2018-01-15 Thread Jochen Theodorou
Am 12.01.2018 um 22:49 schrieb Michał Zegan: well you rather know what getChildren returns, so you know what the returned object is, like generally. but as soon as the method you want to call is not on the statically declared type, nor within a set of known statically types you are having

Re: About the native-lambda branch

2018-01-15 Thread Jochen Theodorou
Am 15.01.2018 um 15:21 schrieb Daniel Sun: Hi Jesper, Thanks for your advice :-) That's much easier than making the order dependent on the usage. Actually javac makes the order dependent on the local variables usage in the lambda body. I'll follow its way for the time being

Re: About the native-lambda branch

2018-01-14 Thread Jochen Theodorou
On 14.01.2018 01:10, Daniel Sun wrote: Hi Jochen, What I wish for in a static compile lambda is the following: * bar is a parameter to the method generated for the lambda I am trying to make native lambda support sharing local variables, but ASM reports the following error[1]: Caused by:

[jira] [Commented] (GROOVY-8338) Calling Stream.of from groovy class in JDK 9 fails

2018-01-13 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16325122#comment-16325122 ] Jochen Theodorou commented on GROOVY-8338: -- What I fixed is the proxy generator callsite

Re: About the native-lambda branch

2018-01-13 Thread Jochen Theodorou
On 13.01.2018 04:07, Nathan Harvey wrote: Sure thing. Here's a Java example: void sample(Function fn) { System.out.println("fn"); } void sample(Supplier sp) { System.out.println("sp"); } These methods can exist side

[jira] [Updated] (GROOVY-8338) Calling Stream.of from groovy class in JDK 9 fails

2018-01-12 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jochen Theodorou updated GROOVY-8338: - Fix Version/s: (was: 2.4.14) > Calling Stream.of from groovy class in JDK 9 fa

[jira] [Commented] (GROOVY-8338) Calling Stream.of from groovy class in JDK 9 fails

2018-01-12 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16324567#comment-16324567 ] Jochen Theodorou commented on GROOVY-8338: -- then most likely somebody else has to solve

[jira] [Reopened] (GROOVY-8338) Calling Stream.of from groovy class in JDK 9 fails

2018-01-12 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jochen Theodorou reopened GROOVY-8338: -- > Calling Stream.of from groovy class in JDK 9 fa

[jira] [Assigned] (GROOVY-8338) Calling Stream.of from groovy class in JDK 9 fails

2018-01-12 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jochen Theodorou reassigned GROOVY-8338: Assignee: (was: Jochen Theodorou) > Calling Stream.of from groovy cl

Re: About the native-lambda branch

2018-01-12 Thread Jochen Theodorou
Am 12.01.2018 um 18:54 schrieb Russel Winder: On Fri, 2018-01-12 at 05:54 -0700, Daniel.Sun wrote: […] As you see, the latest implementation is to generate method for lambda at the class generation stage, in addition new inner classes will be generated for each lambda. […] I

Re: About the native-lambda branch

2018-01-12 Thread Jochen Theodorou
Am 12.01.2018 um 15:00 schrieb Daniel Sun: Hi Jochen, but I think you should then not use the closure inner class mechanism. I remain the implementation for non-native lambda[1] to make lambda work in legacy code, where closures are widely used. For example, `[1, 2, 3].collect(e -> e + 1)`

Re: About the native-lambda branch

2018-01-12 Thread Jochen Theodorou
Am 12.01.2018 um 14:13 schrieb Daniel.Sun: Hi Jesper, The bytecode generation for lambda of the current implementation should be somehow same with javac does, because I reference the ASM code, which is decomplied from bytecode generated by javac. If you have some spare time to

Re: About the native-lambda branch

2018-01-12 Thread Jochen Theodorou
Am 12.01.2018 um 04:05 schrieb Daniel Sun: Hi Nathan, What's will the differences be between closures and lambdas? The native lambda will have better performance than closure. In addition, native lambda, which conforms to Java specification, is less versatile than closure, which is really

Re: Lack of a wild card in DefaultGroovyMethods

2018-01-11 Thread Jochen Theodorou
On 11.01.2018 23:23, Nathan Harvey wrote: Hi guys, working on this, but I'm not sure how we should be handling arrays. For example, take the following two methods: public static Collection plus(Collection left, Collection right) { ... } public static T[] plus(T[] left, T[] right) { ... } The

[jira] [Commented] (GROOVY-6864) Stub generation doesn't generate constructors added by @TupleConstructor

2018-01-11 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-6864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16322678#comment-16322678 ] Jochen Theodorou commented on GROOVY-6864: -- To solve this you require a compiler that can

[jira] [Commented] (GROOVY-8442) java.lang.VerifyError: Bad method call from inside of a branch

2018-01-11 Thread Jochen Theodorou (JIRA)
[ https://issues.apache.org/jira/browse/GROOVY-8442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16322656#comment-16322656 ] Jochen Theodorou commented on GROOVY-8442: -- (1) with static compilation this example should

Re: Catch clause difference

2018-01-09 Thread Jochen Theodorou
Am 09.01.2018 um 16:38 schrieb Dinko Srkoč: On 9 January 2018 at 13:26, Mohan Radhakrishnan wrote: I don't see java.util.NoSuchElementException anywhere. From the line: }catch( NoSuchElementException nse ){ we don't know which `NoSuchElementException`

<    2   3   4   5   6   7   8   9   10   11   >