❯ Guillaume Laforge

Java

JavaOne — How languages influence each other: Reflections on 14 years of Apache Groovy

Last week, I was in San Francisco for my tenth JavaOne! I had two sessions: one on the past / present / future of Java Platform-as-a-Service offerings, and one on programming language influences, and particularly how was Apache Groovy influenced, and how it also inspired other languages. Here’s the abstract: Languages have been influencing one another since the dawn of computer programming. There are families of languages: from Algol descendants with begin/end code blocks to those with curly braces such as C. Read more...

Apache Groovy and Google App Engine at JavaOne

I’ll be back at JavaOne in San Francisco in October to speak about Apache Groovy and Google App Engine. Apache Groovy I’ve been involved with the Apache Groovy project for 14 years now, it’s a long time, and it’s interesting to see how the language has evolved over time, how it was influenced by other languages, but also how it influenced those other languages itself! Let’s see which operators or syntax constructs evolved and moved from one to the other. Read more...

Trying out Apache Groovy's new Antlr4 parser with Java 8 support

Apache Groovy is coming up with a new parser, that supports the Java 8 syntax elements, as well as some new notation and operators of its own (like !in, !instanceof or ?[] for safe navigation with collections, or with ?= for Elvis assignment). I blogged recently about the fact that you can try this new flavor online on this forked Groovy Web Console version, without the need of installing everything. But today I’ll tell you how to build it for yourself in order to run it on your machine. Read more...

Flying East to Singapore

In two weeks, I’ll be flying east, much further east than I’ve ever been! I’ll visit Singapore! And I’ll have a pretty busy week with several events: conference, meetup, user groups, brown bag lunch… and I’ll talk about Groovy, Machine Learning, and chatbots! First of all, on Wednesday 31st, I’ll participate to the Singapore Java User Group, where I’ll give an update on Apache Groovy (the latest improvements, new features, the roadmap). Read more...

Testing Java 8 Snippets on the new App Engine Java 8 runtime

A new Java 8 runtime for Google App Engine standard is coming soon, and is currently in alpha testing. You can request to join the alpha program, if you want to try it out for yourself. But I wanted to let anyone play with it, easily, to see how well the Java 8 APIs work, but also to try some Java 8 syntax too. So here’s a web console where you can do just that! Read more...

Back from JavaOne

After some trouble getting to San Francisco because of strikes, transportation issues, burnt control tower, and more… I managed to land to JavaOne! I missed my own first talk and I was glad and grateful that Cédric could present it for me. At JavaOne, the Groovy project received the award from ZeroTurnaround / RebelLabs, for the “Best Tech - Geek Choice Award” : Youpi mon projet a reçu un prix de l’innovation ! Read more...

How to remove accents from a String

My little puzzle of the day is to find how to remove accents from a String. There are different alternatives, different strategies, but none really suits my needs – or my taste. The naive approach is to use String.replace() to replace manually all characters, with a correspondance table, like “é” should be replaced with “e”, etc. That’s fine for some languages I know, like French or German, or even some latin languages, since we share the same alphabet. Read more...

Castor tip: generating Java classes for XSD simple types

At work, I’m using Castor XML to Java binding to marshall/unmarshall messages in my Web Services, inside a custom framework (Struts, OJB, JAXM, etc). I have defined my messages as XSD Schemas, and I’m using Castor’s Maven plugin to auto-generate my Java classes at build time. All is good and well… Hmm, almost! Castor’s SourceGenerator generates Java classes for complex types and elements, but not for simple types, and unfortunately, I badly needed to marshall those simple types as well. Read more...

First OSS-Get Together in Paris

For the first time in Paris, an Open Source Software Get-Together was organized by Vincent Massol of Cactus fame and author of JUnit in Action book. It was a lot of fun to meet him and other French OSS developers. I though we weren’t numerous to work on Open Source projects in France, but after all, it seems I was wrong. Moreover, I was stunned to meet someone working for the same company as myself, and I didn’t even know him! Read more...

Groovy-JDK doc: Parsing Java with QDox

Perhaps you noticed recently that there’s a new interesting page on Groovy’s website ? Well, all pages are interesting of course! But there’s a new page describing the Groovy methods enhancing the core JDK classes. In groovy, you have additional methods that you can call on standard Java classes. For instance, you can use the eachLine() method on java.io.File. With this method, you’ll be able to easily read a text file line after line, and do whatever with this line inside a closure without having to care about things like closing streams. Read more...