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: Apache Groovy and language influences

2017-10-04 Thread Søren Berg Glasius
Hi G-man!

Nice slidedeck. Thank you for sharing!


/Søren

On Thu, 5 Oct 2017 at 02:44 Guillaume Laforge  wrote:

> Hi all,
>
> Earlier today at the JavaOne conference in San Francisco, I did a
> presentation on the cross influences between languages, where I'm showing
> some of the languages that we were inspired from when we created Groovy,
> and also how Groovy influenced other languages as well.
>
> Thought you might be interested in some of the background and history :-)
>
>
> https://speakerdeck.com/glaforge/how-languages-influence-each-other-reflections-on-14-years-of-apache-groovy
>
> Guillaume
>
> --
> Guillaume Laforge
> Apache Groovy committer & PMC Vice-President
> Developer Advocate @ Google Cloud Platform
>
> Blog: http://glaforge.appspot.com/
> Social: @glaforge  / Google+
> 
>
-- 
Best regards / Med venlig hilsen,
Søren Berg Glasius

Hedevej 1, Gl. Rye, 8680 Ry, Denmark
Mobile: +45 40 44 91 88, Skype: sbglasius
--- Press ESC once to quit - twice to save the changes.


Apache Groovy and language influences

2017-10-04 Thread Guillaume Laforge
Hi all,

Earlier today at the JavaOne conference in San Francisco, I did a
presentation on the cross influences between languages, where I'm showing
some of the languages that we were inspired from when we created Groovy,
and also how Groovy influenced other languages as well.

Thought you might be interested in some of the background and history :-)

https://speakerdeck.com/glaforge/how-languages-influence-each-other-reflections-on-14-years-of-apache-groovy

Guillaume

-- 
Guillaume Laforge
Apache Groovy committer & PMC Vice-President
Developer Advocate @ Google Cloud Platform

Blog: http://glaforge.appspot.com/
Social: @glaforge  / Google+



Re: Cache parsed classes

2017-10-04 Thread Francesco Chicchiriccò
On 2017-10-03 18:38, Jochen Theodorou  wrote: 
> 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 buildGroovy(final String classBody) throws 
> > InstantiationException, IllegalAccessException {
> >  Class clazz = GROOVY_CLASSLOADER.parseClass(classBody);
> >  return (T) ApplicationContextProvider.getBeanFactory().
> >  createBean(clazz, AbstractBeanDefinition.AUTOWIRE_BY_TYPE, 
> > false);
> >  }
> > 
> > I am happy to say that this works just fine.
> > 
> > Now I was wondering what is the best approach to cache such information, to 
> > avoid Groovy parsing the class source text at every execution request.
> 
> If classBody across requests for the live time of the session, then you 
> can save the bean in the session scope. If there is no real session, 
> then I need to know how the different classbody differ. And that aspect 
> would be for me a key for a map, that has the clazz as value.

Thanks for your answer.

No, there is no session that can be involved here.

The classBody string is expected to vary frequently during the development 
phase, and rarely when the system is in production.

Managing the cache with an in-memory Map is fine to me, I just want to avoid 
duplicating any existing mechanism already implemented in Groovy. 

Regards.