Re: Foreign language chars as map keys

2023-02-22 Thread Rachel Greenham
Are you sure you’re not comparing Strings to Characters at some point? Going @TypeChecked might reveal if and where that’s happening... -- Rachel Greenham rac...@merus.eu > On 22 Feb 2023, at 11:58, James McMahon wrote: > > I have a Groovy list that holds the unicode representation

Re: Using Groovy 4.0.1 and want to use Groovys JsonSlurper or whatever it might be called in version 4.

2022-07-11 Thread Rachel Greenham
Just to roughly endorse this approach; in one of our applications we already had an in-house JSON parsing/writing API, which isn’t going to be very feature complete but majors in being very fast and efficient and meets the use-cases we’ve hit so far. My first instinct in integrating Groovy was

Re: Groovy 4 compiler seems to leave behind Threads

2022-02-03 Thread Rachel Greenham
for instance, as well as monitoring what it’s doing. -- Rachel Greenham rac...@merus.eu

Re: Running a Groovy script with a compiled Java class

2021-11-22 Thread Rachel Greenham
the class boilerplate in the groovy source. -- Rachel Greenham rac...@merus.eu > On 22 Nov 2021, at 12:09, Blake McBride wrote: > > Hi Paul, > > That worked great. Thank you! > > However, it would be very convenient if I could specify the -cp using the > &q

Re: Checking directory state using Groovy

2021-10-21 Thread Rachel Greenham
e seems to be that you can use categories to access static methods of a category class as if they're methods of your given type (ie: static methods where the first parameter is Path, as methods on Path, minus that parameter), but property-style access doesn't appear to work in that case. Only method c

Re: Checking directory state using Groovy

2021-10-20 Thread Rachel Greenham
ah sadly i did think of that when i was writing it but it didn't work. Not 100% sure why, but i think mostly that many of those methods in Files take a varargs of stuff like LinkOption... OpenOption... and the groovy category support isn't resolving properties past that. -- Rachel Greenham

Re: Checking directory state using Groovy

2021-10-15 Thread Rachel Greenham
rachel [OWNER_WRITE, OTHERS_READ, OWNER_EXECUTE, GROUP_READ, GROUP_EXECUTE, OTHERS_EXECUTE, OWNER_READ] src/groovy/bootstrap: rachel [OWNER_WRITE, OTHERS_READ, OWNER_EXECUTE, GROUP_READ, GROUP_EXECUTE, OTHERS_EXECUTE, OWNER_READ] src/groovy/LICENSE: rachel [OWNER_WRITE, OTHERS_READ, GROUP_READ, OW

Re: Groovy equivalent to python urllib.quote?

2021-09-23 Thread Rachel Greenham
Look at URLEncoder/URLDecoder. They're Java APIs but you can use them from Groovy. -- Rachel Greenham rac...@merus.eu > On 23 Sep 2021, at 13:32, James McMahon wrote: > > Addendum, these examples illustrate what the use of encode and quote is doing > for us in the legacy python.

Re: Determine whether a text string is valid JSON representation

2021-09-21 Thread Rachel Greenham
determine the current character, it is not a string, number, array, or object line number 1 index number 0 }{ ^ -- Rachel Greenham rac...@merus.eu

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

2021-08-26 Thread Rachel Greenham
...) The library has to be a bit unfussy about the originating classloader of course... -- Rachel Greenham rac...@merus.eu > On 26 Aug 2021, at 15:34, o...@ocs.cz wrote: > > Rachel, > > yes, I use the metaclass stuff heavily; but I am often bumping into problems > with library c

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

2021-08-26 Thread Rachel Greenham
it does with metaclasses. But if you're all in groovy, you can add methods dynamically using expando i think and then they're findable through *Groovy's* metaclass apis... but no, they won't be findable/reflectable by Java code. -- Rachel Greenham rac...@merus.eu > On 26 Aug 2021, at 14