Alex Shneyderman | 10 Feb 08:33
Picon
Gravatar

[groovy-user] Is there a groovy port of webmachine?

googling for it does not turn up anything, so I wonder if anyone came
across it somewhere?

Cheers,
Alex.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Jamie Echlin | 9 Feb 22:50
Picon
Gravatar

[groovy-user] good quality example code?

Evening,


I've been writing low quality groovy code for several years, and for ten years prior to that I wrote a lot of bad perl, although I did it rather well.

I think it's time I upped my game, and I want to look at a reasonably sized groovy project to try and learn something. Most of groovy itself seems to be java. Anyone got any suggestions? Preferably something I can run myself, or hook into something I can run.

cheers, jamie
Guillaume Laforge | 9 Feb 19:09
Picon
Gravatar

[groovy-user] [ANN] Groovy 1.8.6 released

Hi all,

The Groovy development team is pleased to announce the release of Groovy 1.8.6.

Groovy 1.8.6 is a maintenance release essentially, with a few minor improvements and new features.
You can see the details in the JIRA release notes here: 
http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=10242&version=18245

You can download Groovy 1.8.6 in the Download section of the Groovy website: 
http://groovy.codehaus.org/Download

Thanks a lot to all those who contributed to this release!

Next in line should be a new beta of Groovy 2.0 ;-)

--
Guillaume Laforge
Groovy Project Manager
SpringSource, a division of VMware


Guillaume Laforge | 9 Feb 11:45
Picon
Gravatar

[groovy-user] [Reminder] GR8Conf call for papers

Hi all,


The GR8Conf conference series, conferences dedicated to the Groovy ecosystem, is ending its Call for Papers in less than a week.

So if you haven't yet submitted your proposals, to speak about the latest news on your projects, how you are using Groovy-based solutions in your companies, etc, it's time you head over to the GR8Conf websites to submit something!

http://docs.codehaus.org/display/GROOVY/2012/02/09/Less+than+a+week+for+GR8Conf+Call+for+Papers

I'm looking forward to seeing you there!

--
Guillaume Laforge
Groovy Project Manager
SpringSource, a division of VMware


Russel Winder | 9 Feb 10:17
Picon
Gravatar

[groovy-user] The Canonical Groovy Way?

I have a collection of scripts all of which do the same thing.  This
implies doing "system testing" (run the script, capture output, test) as
well as unit testing (test the functions in the scripts separately).
Clearly the overall algorithm is to find all the scripts and then
dynamically construct the tests then execute them.  This has to be
straightforward in any dynamic programming language.

The question is has anyone got a collection of examples of doing this?

What is the most Groovy way of doing this sort of thing in Groovy.

From a Python background the two obvious ways of doing this are: a.
write a string with the relevant class, compile it and then execute it;
and b. write string for the test methods compile them, attach them to
the test class and then execute the tests.  I bet neither of these are
really Groovy?

--

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder <at> ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@...
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
Skeptic . | 8 Feb 22:56
Picon
Gravatar

[groovy-user] swingbuilder status


Hi,

How much SwingBuilder can be considered in active development ? Is there a roadmap/issues list somewhere ? 

Also, is there DSLD for SwingBuilder ?

Thanks.

Jamie Echlin | 8 Feb 00:03
Picon
Gravatar

[groovy-user] GroovyClassLoader.loadClass(...) slow

Hi All,


In my "app" I do GroovyClassLoader.loadClass(classname, false, true) on a bunch of uncompiled .groovy files.

In comparison to say the speed of compilation of groovy classes, loading them seems pretty slow, about 1s per class. I use a GroovyResourceLoader to do some redirecting, for instance if it trieds to load a.b.Foo, the resource loader might return the url for a/b/FooV2.groovy. I don't think the resource loader is the cause of the problem though.

Adding some logging to the resource loader, I see that it tries to load for example, a.b.Foo.String, a.b.Foo.Map etc. Are these "misses" expensive?

I presume that it wouldn't try to load these classes if I didn't statically type stuff, which I don't all the time, but I tend to do it to get help from the IDE. If removing the static typing would make things faster, how I can still get IDE-help if I have a method:

doSomething (String a, Map m, ...) ?

Any other tips to make classloading faster or is it as fast as it's going to get? 

cheers, jamie
Sudhir N | 7 Feb 10:33
Picon
Favicon
Gravatar

[groovy-user] Replace methods of an existing java class !


How do I replace methods of an existing java class (GrailsDataBinder in my case).
I read that method calls for java classes doesnt go through invokeMethod, and hence it doesn't work

I just tried this

GrailsDataBinder.class.metaClass.'static'.registerCustomEditors = {PropertyEditorRegistry registry, Locale locale ->
throw new RuntimeException()
}

But that did not seem to have replaced the method, as my closure isn't being invoked.

So what's the solution for replacing methods of existing java classes ? 
   
Sudhir 
 
Ronny Løvtangen | 6 Feb 14:54

[groovy-user] Good Groovy tutorial

What is the best Groovy tutorial for programmers already familiar with Java?

We're having a Grails course on wednesday, and some of the participants have limited or no previous
experience with Groovy. I wan't to send them a link to a Groovy tutorial they can run through to get a basic
understanding of Groovy.

Ronny

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Federico Pedemonte | 6 Feb 10:10
Picon
Gravatar

[groovy-user] issue with custom log Formatter

I have a problem setting a custom log Formatter for Groovy classes
using a properties file.

I've setup a test scenario with: a Java class, a Groovy class, a
custom log Formatter and a properties file (which I've included at the
bottom of the mail)

this is how I run the classes:

java -Djava.util.logging.config.file=logging.properties A
groovy -Djava.util.logging.config.file=logging.properties B.groovy

the problem: the Java class works perfectly with both the standards
formatter (SimpleFormatter and XMLFormatter) and with the custom one.

Groovy on the other side, refuses to works with the custom one (and
works as expected with the standard ones), or better, it fallback
using SimpleFormatter.

Any hints on what could be wrong?

Thanks,
Federico

# --------- file: A.java ---------
import java.util.logging.Level;
import java.util.logging.Logger;

public class A {
	public static void main(String[] args) {
		Logger log = Logger.getLogger(A.class.getName());
		log.warning("Java warning");
	}
}

# --------- file: B.groovy ---------
import groovy.util.logging.Log

@Log
public class B {
    public static void main(String[] args) {
        log.warning("Groovy warning")
    }
}

# --------- file: CustomFormatter.java ---------
import java.text.*;
import java.util.logging.*;

public class CustomFormatter extends Formatter {

    public CustomFormatter() {
        super();
    }

    @Override
    public String format(LogRecord record) {
        return ("==> " + formatMessage(record) + "\n");
    }
}

# --------- file: logging.properties ---------
handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level=ALL
.level=FINEST

# FORMATTERS

#java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
#java.util.logging.ConsoleHandler.formatter=java.util.logging.XMLFormatter
java.util.logging.ConsoleHandler.formatter=CustomFormatter

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

arnie_k1 | 6 Feb 09:57
Picon
Gravatar

[groovy-user] DSL and DSLD

I want to write my own DSL and I have some questions about it.
I am using Grails, so everything I write should be done for this framework.

1. Do I have to write wy own DSLD or I can do it directly in Groovy, what is
a different
between DSLD and Groovy way? Is DSLD faster than Groovy?
2. Can DSL implementation do remote things. For example, let's say
that I am writing chat application and I want to send message to all
chat's participants. I want to do this by writing:

send "new" ChatMessage chatId "Message"

All logic associated with sending chat message should be done:
- reading from Db
- writing to Db
- interested users notification (Atmosphere plugin)

Is it possible with DSL?

--
View this message in context: http://groovy.329449.n5.nabble.com/DSL-and-DSLD-tp5459600p5459600.html
Sent from the groovy - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Gmane