Re: Deadlock in Java9.getDefaultImportClasses() ?

2024-04-08 Thread Jochen Theodorou
On 08.04.24 16:48, Mutter, Florian wrote: After updating Kubernetes from 1.27 to 1.28 one of our applications is not working anymore. The application uses thymeleaf templating engine that uses groove under the hood. The application does not respond to request that require a template to be

Re: Small survey on the usage of the metaclass system and MOP

2024-01-10 Thread Jochen Theodorou
On 09.01.24 22:53, MG wrote: Hi Jochen, we do not use any of these Groovy features - why is that information relevant to you ? I was playing around with some thoughts for me the biggest problem are per instance meta classes really. If you are gauging if you can remove some potentially

Re: Small survey on the usage of the metaclass system and MOP

2024-01-08 Thread Jochen Theodorou
On 08.01.24 20:42, OCsite wrote: [...]> - the extension class list is collected compile-time and (eventually when my build script creates the application) automatically added to the /org.codehaus.groovy.runtime.ExtensionModule/ manifest, so that they just-work without any extra ado. So your

Small survey on the usage of the metaclass system and MOP

2024-01-08 Thread Jochen Theodorou
Hi all, I would like to know from users on this list mostly if they are using specific features of the meta class system and MOP, but especially what for. (1) categories https://blog.mrhaki.com/2009/09/groovy-goodness-use-categories-to-add.html shows an example. Basically you have use

Re: Static typing question

2024-01-03 Thread Jochen Theodorou
On 02.01.24 08:59, Agile Developer wrote: [...] >  @CompileStatic predecessor Groovy++ (which later afaik gave birth to Kotlin). I totally agree here. In a sense Kotlin is a statically-typed Groovy. In a sense yes. Though the focus is different. Groovy sees itself as a multiparadigm

Re: Static typing question

2024-01-01 Thread Jochen Theodorou
On 01.01.24 00:57, MG wrote: [...] **Alas that is not the case for JVM invoke dynamic, which is much slower when generating a really large number of objects, which recently required us to make a part of our SQL generation code less user friendly, to make Groovy 3/4 with invoke dynamic as fast as

Re: Static typing question

2023-12-31 Thread Jochen Theodorou
On 30.12.23 19:17, Agile Developer wrote: Hi, I was a  4 years user of Grails/Groovy (last year mostly Python). With the general trend of people moving to static languages, is there any reason that Groovy needs to stay dynamic? I see Python having the mypy approach, I see gradle moving to

Re: Static typing question

2023-12-31 Thread Jochen Theodorou
On 31.12.23 16:21, Agile Developer wrote: Thank you very much Jochen for the answer. I agree that Typescript can be misused, but do you prefer a 10K LOC in Javascript or Typescript? Does really not matter much. What is more maintainable given best practices are respected in each language?

Re: Static typing question

2023-12-31 Thread Jochen Theodorou
On 31.12.23 05:20, Agile Developer wrote: Hi, Edmond can you give me a case not covered by a typed language? I'm  really curious, because the more I think the more I see modern PL practice/research has uncovered typed language strengths. These days, typed languages solve more and more issues

Re: Groovy issue with GraalVM native-image for a large number of consecutive method calls

2023-12-25 Thread Jochen Theodorou
I think we have two different issues to deal with here. (1) graal native does not allow us to set the callsite target again. (2) static compiled code relies on dynamic code via ConvertedClosure. If we fix (2) then (1) is no issue for static code. But even for dynamic code we should maybe have

Re: Groovy issue with GraalVM native-image for a large number of consecutive method calls

2023-12-24 Thread Jochen Theodorou
On 24.12.23 18:36, Damir Murat wrote: [...] So, back to the problem. In the native image built with GraalVM, when executing some methods repeatedly for a huge number of times (more than 1 to be exact), Groovy can cause the following exception:   

Re: Generics question

2023-08-28 Thread Jochen Theodorou
On 28.08.23 02:25, Saravanan Palanichamy wrote: [...] I think I understand a bit better now... [...] The problem I run into however is when I use lists of mutable with immutables. For example, This entire code should be valid void fn(@ReadOnly Person me) { List myList = [] myList << me

Re: Generics question

2023-08-27 Thread Jochen Theodorou
On 27.08.23 16:36, Saravanan Palanichamy wrote: Jochen, Thank you for your quick response. I did consider this, but I want to be able to use a mutable where-ever immutable is allowed. For example, if a function can take all immutable parameters, I want to be able to call it with mutable types

Re: Generics question

2023-08-27 Thread Jochen Theodorou
hi, Basically you want to use an AST transform to bypass the type system? I don't have enough data, but I wonder if you cannot solve the problem without this. I mean... why does Mutable extend Immutable? How about... interface Entity {} class Mutable implement Entity [} class Immutable

Re: Indy churning through LambdaForm classes

2023-08-10 Thread Jochen Theodorou
On 10.08.23 13:49, Gillespie, Oli wrote: Thanks Jochen. Not sure if I fully understood, are you suggesting that the current LRU cache which is keyed only on receiver could be effectively extended with a more complex key based on arguments and other guards? That seems reasonable to me. not a

Re: Indy churning through LambdaForm classes

2023-08-08 Thread Jochen Theodorou
On 07.08.23 15:15, Gillespie, Oli wrote: Hi Jochen, Thanks for looking, and for the findings - interesting! Actually I think my reproducer was not a good representation of the real issue I saw in production. I added the getName() call in my first repro as a random thing to do with the

Re: Indy churning through LambdaForm classes

2023-08-06 Thread Jochen Theodorou
Hi Oli, from looking at our invokdedynamic code for a while I realized there are actually two potential bugs in there for this case. I am not yet sure it is related to what you see. The bug I found is the following: ``` def foo(x) { x.getName() } foo(String) foo(Integer) ``` The callsite in

Re: Existing resources to seek date patterns from raw data and normalize them

2023-06-13 Thread Jochen Theodorou
On 13.06.23 16:52, James McMahon wrote: Hello.  I have a task to parse dates out of incoming raw content. Of course the date patterns can assume any number of forms -   -MM-DD, /MM/DD, MMDD, MMDD, etc etc etc. I can build myself a robust regex to match a broad set of such

Re: Improving JaCoCo's branch coverage of a Groovy assert statement

2022-12-11 Thread Jochen Theodorou
On 09.12.22 11:51, Damir Murat wrote: [...] simple assert statement like     assert firstName != null Groovy generates something like     ValueRecorder var1 = new ValueRecorder();     try {       String var1 = this.firstName;       var1.record(var1, 8);       

Re: Groovy 4 and Parrot Parser performances

2022-07-24 Thread Jochen Theodorou
On 23.07.22 20:35, Jérémie wrote: Thanks, By precompilation, I was thinking of a real ".class" or an intermediary format I can persist in my jars with by example a maven plugin. I have groovy scripts that I compile/cache the first time the script is used. This process takes minutes with the

Re: Groovy 4 and Parrot Parser performances

2022-07-24 Thread Jochen Theodorou
On 23.07.22 15:02, Jérémie wrote: Hello, I am using Groovy 3 in my project, but I had to turn off the new parser because of its performance. In my benchmark, the loading time of most of my scripts are multiplied by 12. I didn't succeed in reducing this time by using the system properties, so I

Re: Fwd: maven Uncompilable code

2022-05-04 Thread Jochen Theodorou
On 04.05.22 15:28, Chad Preisler wrote: Hello, [...maven surefire, groovy 4.0.2, JDK 17...] [ERROR] Errors: [ERROR]   BundleProcessorTest.testBundleFilesMissingPdfFiles:54 » Runtime Uncompilable code - cannot find symbol   symbol:   class BundleUtil [...] - I compile the project

Re: Running groovy programs

2022-03-24 Thread Jochen Theodorou
could be smart enough to detect: if I am running src/pkg1/main.groovy and there's "package pkg1" in that script that we need to add src/ to classpath. But I guess for that groovy would have to compile it first so it's a chicken and egg problem Andriy On Mon, Mar 21, 2022 at 3:41

Re: Running groovy programs

2022-03-21 Thread Jochen Theodorou
On 21.03.22 15:26, Andriy Rysin wrote: Ah, sorry I didn't get it at first. Technically if we need extra wrapper to start a program I could probably do a shell/bat scripts. I was hoping we could use the same command (I have other tools that are invoked by their groovy file, so I was trying to

Re: Running groovy programs

2022-03-18 Thread Jochen Theodorou
On 18.03.22 15:32, Andriy Rysin wrote: This approach may work well for simple file include but if I have packages (and import statements, which is inevitable if program grows) it does not compile. Let me explain my suggestion in more detail. you want to start a script Loader.groovy with

Re: Compiling several groovy files together

2022-03-11 Thread Jochen Theodorou
n On Fri, Mar 4, 2022 at 5:44 PM Jochen Theodorou mailto:blackd...@gmx.org>> wrote: On 15.02.22 05:20, Saravanan Palanichamy wrote: > Hello Groovy users > > I am using Groovy 3.0.5 > >   * I have a file A.groovy and B.groovy. B depends on A &

Re: Running groovy programs

2022-03-09 Thread Jochen Theodorou
On 08.03.22 19:08, Andriy Rysin wrote: So it looks like groovy picks up groovy scripts from the current directory by default. So the users can't just do "/path/to/scripts/TagText.groovy " any more. They would have to do: cd /path/to/scripts/ ./TagText.groovy or they would have to invoke groovy

Re: Compiling several groovy files together

2022-03-04 Thread Jochen Theodorou
On 15.02.22 05:20, Saravanan Palanichamy wrote: Hello Groovy users I am using Groovy 3.0.5 * I have a file A.groovy and B.groovy. B depends on A * I have ast transformations that add annotations to methods in A (specifically an annotation with a list expression that contains other

Re: Running groovy programs

2022-03-04 Thread Jochen Theodorou
On 12.02.22 17:03, Andriy Rysin wrote: Hi all I have a question about running/packaging groovy programs. I have a small suite of (commandline) NLP tools (https://github.com/brown-uk/nlp_uk ) that is often used by non-developers (NLP students, researches etc).

Re: What is proper use of `break labelid`?

2022-02-01 Thread Jochen Theodorou
On 01.02.22 07:36, Paul King wrote: Hi Fred, I think you have discovered a potential short-coming in the compiler. The intention is to mostly follow Java behavior. mostly, yes A "break someLabel" statement should break out of an enclosed statement having label "someLabel" (A) or the current

Re: dynamically install a method/property to be visible through reflexion?

2021-08-30 Thread Jochen Theodorou
On 31.08.21 04:58, OCsite wrote: [...]>> ... Of course you can also redefine the class on loading, then you can basically do whatever. redefine is the wrong word here I guess... Yup, I guess conceptually, there is not much difference between (a) creating a subclass containing methods I need

Re: dynamically install a method/property to be visible through reflexion?

2021-08-29 Thread Jochen Theodorou
On 28.08.21 14:46, OCsite wrote: Rachel, Paul, thanks a lot! Pity not even today's Java supports something like Objective-C runtime support for managing the methods in a class :( Anyway, I might try to create my (sub)classes dynamically at runtime — this is an idea which did not occur to me

Re: Update the Groovy color used on github.

2021-06-15 Thread Jochen Theodorou
On 11.06.21 07:24, Michael Bailey wrote: I opened a PR to get the Groovy color on Github updated to the blue from the logo. See https://github.com/github/linguist/pull/5418 If you would like to see Github use the color from the Groovy logo, please reply with a +1 to this thread and give a

Re: Default values for parameters in interface methods

2021-01-05 Thread Jochen Theodorou
Hi Paul, wouldn't it be possible to implement the default parameter now with default methods? On 05.01.21 05:39, Paul King wrote: You could potentially use a trait? trait MyTrait {     abstract myFunction(String parameter1 = "1234") } class MyClass implements MyTrait {     def

Re: Groovy as expression parser

2020-10-31 Thread Jochen Theodorou
On 31.10.20 04:32, Winnebeck, Jason wrote: Yep, in this case, it is true. We used to use a rules engine, IBM JRules, we retired it years ago and converted all of the rules into Groovy. It cost 6-figures annual support, forced us to use Oracle Weblogic, was extremely slow, took a huge effort to

Re: Groovy as expression parser

2020-10-28 Thread Jochen Theodorou
On 27.10.20 22:00, Winnebeck, Jason wrote: Thanks Edmond for the feedback, and Alessio as well who replied also. I know all of the expressions at once, although they can change as the application runs, so it is possible to combine them into one class, but I would then be constructing source

Re: Defining a global variable

2020-10-15 Thread Jochen Theodorou
On 15.10.20 12:16, Anton Shepelev wrote: Jochen Theodorou to Anton Shepelev: Jochen Theodorou: Frankly... for years we have been defending this position, but now, with so much distance I actually really wonder why we keep this. Perhaps it would have helped if you had documented not only

Re: Defining a global variable

2020-10-14 Thread Jochen Theodorou
On 14.10.20 17:01, Anton Shepelev wrote: Jochen Theodorou to Anton Shepelev: [...] Frankly... for years we have been defending this position, but now, with so much distance I actually really wonder why we keep this. Perhaps it would have helped if you had documented not only language

Re: Defining a global variable

2020-10-14 Thread Jochen Theodorou
On 14.10.20 13:45, Anton Shepelev wrote: [...] String test defienes a string property `test' or a string variable `test', depending on context. the context here is that of a method, so it is a local variable I was now stuck and resorted to an internet search, which brought up the

Re: Deleting files locked by a Java application on Windows

2020-09-07 Thread Jochen Theodorou
On 07.09.20 19:23, Manuel Souto Pico wrote: Thanks, Jochen. I'll share this thread (and your comments) with the Java developers that work on OmegaT (the application). which seems to be open source and the code is available... I located the plugin loading code, but I think I do not have the

Re: Deleting files locked by a Java application on Windows

2020-09-07 Thread Jochen Theodorou
answers inline On 07.09.20 13:48, Manuel Souto Pico wrote: [...] My Groovy script runs within a Java application (called OmegaT). This application extends its functionality by loading the jar files it finds in the /plugins folder of the installation. Even though they are optional and

Re: Deleting files locked by a Java application on Windows

2020-09-07 Thread Jochen Theodorou
Hi Manuel, I must say, I find this all a little bit confusing. True certainly is that Java has a general problem with keeping files open on the windows platform, if these are kept open by some objects. ClassLoaders keeping jars open is a prime example for this and was reason for a many bug

Re: Omitting parentheses on .size() ?

2020-08-05 Thread Jochen Theodorou
On 05.08.20 16:26, MG wrote: Thank you, Jochen - that's actually a Groovy feature that has been around for a long time, that I completely forgot about :-) ;) https://groovy-lang.org/metaprogramming.html#_extension_modules

Re: Omitting parentheses on .size() ?

2020-08-05 Thread Jochen Theodorou
On 04.08.20 16:13, MG wrote: On 04/08/2020 15:16, Basurita wrote: On 8/1/20 14:41, MG wrote: Hmmm, I am for consistency, but at least I use very few maps as compared to lists, and rarely ever output the size of a map, but constantly for lists, so having getSize() on List would still be

Re: Omitting parentheses on .size() ?

2020-08-01 Thread Jochen Theodorou
On 01.08.20 19:41, MG wrote: Hmmm, I am for consistency, but at least I use very few maps as compared to lists, and rarely ever output the size of a map, but constantly for lists, so having getSize() on List would still be beneficial. This has of course been discussed many times before - maybe

Re: Reflection problem with varargs

2020-07-14 Thread Jochen Theodorou
On 14.07.20 19:55, Blake McBride wrote: [...] static Object myMethod(Object ... args) { [...] Method methp = groovyClass.getMethod("myMethod", ca); Object r = methp.invoke(null,4,5); // Here is where the error occurs int x =1;// place for a breakpoint [...] At the

Re: do I miss something here, or is this a Groovy bug?

2020-06-05 Thread Jochen Theodorou
On 05.06.20 13:33, OCsite wrote: And another thing which I don't understand and seems highly suspicious — do I just miss something of importance, or is it a bug? === 127 ocs*/tmp>* * /usr/local/groovy-3.0.4/bin/groovy q Caught: java.lang.VerifyError: Bad type on operand stack every

Re: GroovySunClassLoader and SunClassLoader appear to be broken

2020-05-29 Thread Jochen Theodorou
On 29.05.20 03:39, harada.tomokazu@jp.nssol.nipponsteel.com wrote: Dear All, I noticed that GroovySunClassLoader and SunClassLoader are broken. I tried to use a Groovy script in Java and noticed that GroovySunClassLoader.sunVM was null. I'm using OpenJDK 8u252 and it has

Re: How to test and deploy without groovy-all?

2020-05-18 Thread Jochen Theodorou
On 19.05.20 03:53, OCsite wrote: Well, thanks, I'll check the thing, though at the first look it rather seems to be a tool for a Gradle project owner who wants to move his projects into Xcode. Me, I'm precisely the opposite case — I've got Xcode projects which I /possibly might/ want to move

Re: IntelliJ IDEA Groovy 2.5/3.0 - Vote for Indiviudal Issues

2020-03-11 Thread Jochen Theodorou
On 11.03.20 19:36, Blake McBride wrote: [...] I've always thought that NetBeans was the most intuitive IDE.  Anytime I want to do something I guess at where it is and - boom - there it is!  I also see they're really making an effort to upgrade it.  I'll be watching them. Always had that with

Re: Groovy branches and Docker images

2020-03-09 Thread Jochen Theodorou
On 04.03.20 15:09, Keegan Witt wrote: When Groovy 3.0.0 was released, I stopped maintaining 2 branches in docker-groovy and have kept just the latest stable branch.  I'm wondering now if folks have a need for me to maintain Docker images for both 2.5 and

Re: The groovy documentation page is too large to quickly open and browse

2020-02-21 Thread Jochen Theodorou
On 21.02.20 07:39, 杨波 wrote: The groovy documentation page (http://docs.groovy-lang.org/latest/html/documentation/) is too large to quickly open and browse. There are huge content in one single page, if the network is slow then read document is very inconvenient. That will be great for user to

Re: Static imports seem to win over a method in closure's delegate

2019-04-12 Thread Jochen Theodorou
On 12.04.19 11:15, sterg wrote: Hi all, I tried to use in GroovyLab ?(https://github.com/sterglee/GroovyLab) the ND4j Java scientific library (https://github.com/deeplearning4j/deeplearning4j) , by placing the corresponding .jar file at the classpath of GroovyShell. Unfortunately, it has

Re: Static imports seem to win over a method in closure's delegate

2019-04-12 Thread Jochen Theodorou
On 10.04.19 16:05, Herrendorf Johannes wrote: Hi Groovy users, I’m currently building a DSL in groovy and found some strange behaviour I have no explanation for: If a method pointer with name "myMethod" is imported as static import and a closure has a delegate with a method "myMethod" and it's

Re: The most popular JVM-based language is #groovylang with #21 and 1.016%

2019-01-20 Thread Jochen Theodorou
On 20.01.19 04:33, Daniel.Sun wrote: Hi all, As TIOBE Index for January 2019 shows[1], the most popular JVM-based language is #groovylang with #21 and 1.016%  It is really a Groovy beginning of 2019! Cheers, Daniel.Sun [1] https://www.tiobe.com/tiobe-index/ not only almost

Re: Breakpoints aren't working on NetBeans for dynamically loaded Groovy

2018-11-22 Thread Jochen Theodorou
On 17.11.18 20:30, Blake McBride wrote: Greetings, I am using Groovy 2.4.15 under NetBeans 8.2 and Java 8 on a 64 bit Linux box. I am dynamically loading Groovy with the following code: if (groovyLoader == null) groovyLoader = new GroovyClassLoader(GroovyClass.class.getClassLoader());

Aw: Re: Calling 'each' on org.eclipse.emf.common.util.TreeIterator

2018-10-17 Thread Jochen Theodorou
If it is chosen random it is wrong. It should be either always the same or fail. This sounds like a bug   Gesendet: Dienstag, 16. Oktober 2018 um 23:36 Uhr Von: "Felix Dorner" An: users@groovy.apache.org Betreff: Re: Calling 'each' on org.eclipse.emf.common.util.TreeIterator Ok so to

Re: @Immutable backwards compatibility

2018-09-27 Thread Jochen Theodorou
Am 27.09.2018 um 01:24 schrieb Paul King: The String check for "groovy.transform.Immutable" would work fine if the 2.4 compiled class was actually loaded with it;s annotations but AnnotationCollector changes any meta-annotation to no longer be an annotation but a class to store the

Re: @Immutable backwards compatibility

2018-09-26 Thread Jochen Theodorou
On 26.09.2018 12:58, Paul King wrote: I shouldn't try to respond to emails while rushing between conference sessions. Refreshed my memory and yes, the current provisions for 2.4 compatibility don't really help. I'll see if Jochen has some ideas on how we could improve that. I guess we have

Re: @CompileStatic void method returns null ?

2018-09-03 Thread Jochen Theodorou
On 03.09.2018 17:13, mg wrote: But in what scenario does the dynamic behavior make sense ? for a static compiler? none other than being compatible bye Jochen

Re: @CompileStatic void method returns null ?

2018-08-28 Thread Jochen Theodorou
On 28.08.2018 19:45, mg wrote: Since I just stumbled across this behavior while helping a junior developer debug his code: Why does statically compiled Groovy (2.5.2) return null from void methods, instead of raising a compile error ? i was actually not aware we kept this logic for static

Re: About the groovy code style

2018-07-03 Thread Jochen Theodorou
Am 03.07.2018 um 04:44 schrieb Daniel.Sun: Hi all, The following code is supported in the older parser, but I propose to stop supporting the ugly code style in the new Parrot parser. Any thoughts? 1) import statement ( https://issues.apache.org/jira/browse/GROOVY-8642 ) ``` import

Re: [Poll] About supporting Java-like array

2018-05-01 Thread Jochen Theodorou
On 01.05.2018 19:27, Daniel Sun wrote: 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

Re: [Poll] About supporting Java-like array

2018-05-01 Thread Jochen Theodorou
Oh,and one important point... I really don't think Groovy has to support everything from Java. On 01.05.2018 17:20, Jochen Theodorou wrote: On 01.05.2018 16:26, MG wrote: I think we should do this, for cases where the rewards of adhering to idiomatic Groovy are less obvious or it might

Re: [Poll] About supporting Java-like array

2018-05-01 Thread Jochen Theodorou
On 01.05.2018 16:26, MG wrote: I think we should do this, for cases where the rewards of adhering to idiomatic Groovy are less obvious or it might be missed that there even _is_ an idiomatic Groovy way to do things (I have heard some people were not aware that array initialization without "as"

Re: Re-entrant and multi-entrant Groovy calls

2018-04-20 Thread Jochen Theodorou
Am 20.04.2018 um 11:21 schrieb Blake McBride: Greetings, Does Groovy safely support re-entrant and multi-entrant calls?  What I mean by that is the following: Re-entrant:  on a single OS thread - my Java program calls into Groovy, then Groovy calls into my Java application, and then the

Re: Groovy 3.0: Multiline list/map arguments

2018-04-06 Thread Jochen Theodorou
On 06.04.2018 21:21, MG wrote: My suggestion was not to consider allowing any whitespace to break syntax ambiguity here, but only a newline after the opening square bracket, i.e.: whitespace in terms of the groovy grammar includes newline usually. // Still does not compile final result =

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

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

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`

Re: Start a forum - continued

2018-01-03 Thread Jochen Theodorou
On 02.01.2018 04:45, Nathan Harvey wrote: Once again I would like to bring up the idea of starting a forum using Discourse. In particular, I would like to highlight some of the features Discourse offers that are relevant to the mailing list, for those concerned about making the switch: -

Re: @CompileStatic null iteration

2017-12-15 Thread Jochen Theodorou
On 15.12.2017 16:44, mg wrote: "If we want to keep static Groovy near Java as much as possible..." - who wants that ? ;-) ok, scratch the "as possible". As required form a performance and integration point of view. Doing method calls not the Java way will hurt performance. Would I for

Re: @CompileStatic null iteration

2017-12-15 Thread Jochen Theodorou
Am 15.12.2017 um 14:35 schrieb Winnebeck, Jason: It’s been like this for as long as I’ve been using compile static in Groovy. I assumed that was expected behavior and I make sure to point it out to all new developers in our project as one of the Groovy gotchas. Is it not supposed to be that

Re: Is it possible to add GroovyObject methods via a category?

2017-12-08 Thread Jochen Theodorou
On 07.12.2017 13:44, Ruben Laguna wrote: There was a typo in my previous mail missingMethod -> methodMissing. It still doesn not work, a.method1() throws MissingMethodException after adding the methodMissing via category. yes, just tested myself. if you add the method through the meta class it

Re: Is it possible to add GroovyObject methods via a category?

2017-12-07 Thread Jochen Theodorou
Am 07.12.2017 um 10:31 schrieb Ruben Laguna: In the Groovy in Action book, chapter 8.4.5 says "Category method names can well take the form of property accessors (pretending property access), operator methods, and GroovyObject methods. MOP hook methods cannot be added through a category class.

Re: Loading groovy as a Jigsaw auto-module

2017-12-04 Thread Jochen Theodorou
was with Maven itself. I think Maven over-interprets the spec. It's not because you find a file in `META-INF/services` that it *must* be a service descriptor. Now for the extension mechanism, for sure we need to check what it means for us. 2017-12-04 10:23 GMT+01:00 Jochen Theodorou <bla

Re: Loading groovy as a Jigsaw auto-module

2017-12-04 Thread Jochen Theodorou
Just to clarify things... This is a maven plugin complaining, not JDK9, as I see it. Afaik the plugin tries to create a module configuration for groovy and cannot interpret the services provided in those directories. JDK9 would not care, unless you say your module is providing a certain

Re: help understanding methodMissing on non-Groovy classes

2017-11-10 Thread Jochen Theodorou
Am 10.11.2017 um 10:33 schrieb Jeremy Heiner: Thank you, Jochen! Changing open class Kt to import groovy.lang.GroovyObjectSupport open class Kt : GroovyObjectSupport() makes everything work as expected. -- Jeremy ok, I was already guessing this would be the case. There are some

Re: help understanding methodMissing on non-Groovy classes

2017-11-10 Thread Jochen Theodorou
Am 09.11.2017 um 21:07 schrieb Jeremy Heiner: [...] open class Kt { open fun propertyMissing( name:String ):Any { System.out.print( "${this}.pM($name)" ) return "Kt.pM:$name" } open fun methodMissing( name:String, args:Any ):Any { System.out.print( "${this}.mM($name )" )

Re: Unexpected byte[] parameter conversion when calling java method

2017-10-20 Thread Jochen Theodorou
Am 20.10.2017 um 09:51 schrieb Michael Kunz: Hello, I'm having problems calling a Java method call(byte[]... data) from groovy 2.4.12. I'm trying to call it with a single byte[] value from groovy like this: byte[] data = [0,1,2,3,4,5,6,7] TestJava.call(data) I was expecting to receive a

Re: Cache parsed classes

2017-10-03 Thread Jochen Theodorou
On 03.10.2017 10:52, Francesco Chicchiriccò wrote: [...] When one of available implementations is requested, we do something as follows: private static final GroovyClassLoader GROOVY_CLASSLOADER = new GroovyClassLoader(); @SuppressWarnings("unchecked") private static T

Re: Possible New Groovy Features... - var Keyword

2017-08-27 Thread Jochen Theodorou
On 27.08.2017 04:41, MG wrote: [...] Flow typing is cool, and I would gather much harder to implement than a "var" keyword (btw, I actually just used the name used by C#, even though picking a different name might be a better choice, to avoid confusion with e.g. Javascript). flow typing is

Re: Possible New Groovy Features... - Deduce the type of final fields from their assigned value

2017-08-25 Thread Jochen Theodorou
for me that is a feature likely to go. If you define a dynamic ctor, it should return an object of at least the type that the ctor is for. I do not care about subclasses or such, but I don't like Date result = new Date() to fail. On 25.08.2017 04:28, Paul King wrote: I've only seen it used

Re: Possible New Groovy Features... - var Keyword

2017-08-25 Thread Jochen Theodorou
On 23.08.2017 00:52, MG wrote: Hi Paul, On 21.08.2017 04:30, Paul King wrote: Introduce a "var" (o.s.) keyword that allows deduction of type through assignment: var device = new PrinterDevice(...) // device variable will have type PrinterDevice without the need to explictely

Re: Possible New Groovy Features... - Auto final-ize

2017-08-25 Thread Jochen Theodorou
On 23.08.2017 00:32, MG wrote: [...] Apart from making the code easier to read & safer, it also allows compiler optimizations (and in the absence of a true const-keyword, at least for fundamental data types it has the same effect). Something I want to mention here: The Groovy compiler

Re: Lock contention in Groovy Shell interpreter under high load

2017-08-10 Thread Jochen Theodorou
On 10.08.2017 20:40, Aman Jain wrote: Thank you, Jochen! It is very helpful. So, what I understand is that I can cache either the Script (evalScript) *or* Script Class (evalScript.getClass()) instances in my application code and reuse them. well, since you put the "or" in bold I tend to

Re: Lock contention in Groovy Shell interpreter under high load

2017-08-10 Thread Jochen Theodorou
Just for reference...this seems to be https://stackoverflow.com/questions/45578426/lock-contention-in-groovy-shell-interpreter-under-high-load more inline On 09.08.2017 18:58, Aman Jain wrote: Hello, We are evaluating GroovyShell interpreter (v2.4) in

Re: MissingPropertyException - class DUMMY

2017-08-09 Thread Jochen Theodorou
This here: https://stackoverflow.com/questions/20734719/no-such-property-springsecurityservice-for-class-dummy looks a lot like what you have seen. Does it fit your case? bye Jochen On 08.08.2017 19:24, Les Hartzman wrote: I'm getting an error on startup of a Spring Boot app when a properties

Re: Followup: java.lang.IllegalArgumentException, Groovy 2.4.7, _might_ be caused by Java 8

2017-08-01 Thread Jochen Theodorou
On 30.07.2017 23:26, OC wrote: Hi there again, On 30. 7. 2017, at 21:16, o...@ocs.cz wrote: I have got the following code (part of a big project): === class AuctionTable extends SecureComponent { public AuctionTable(WOContext context) { super(context) showClosedAuctions=...

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

2017-07-24 Thread Jochen Theodorou
On 23.07.2017 17:21, Guillaume Laforge wrote: [...] Speaking of pattern matching, there's Brian Goetz' proposal here, for pattern matching for Java: http://cr.openjdk.java.net/~briangoetz/amber/pattern-match.html We should also avoid offering a different syntax as to what might come up in the

Re: more help with an AST

2017-07-12 Thread Jochen Theodorou
On 11.07.2017 22:07, Ed Clark wrote: [...] the browser shows a post-xform output of: sum = myCtx.multiply( le, re) <--- this executes sum = myCtx.multiply( le, re) <--- this doesn't But, when run, the first line works while the second one results in a

  1   2   >