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.

It's still to be decided which is going to be the version number of the release containing the new "parrot" parser, but you can already play with this syntax today. As I'm the kind of guy living on the edge of Groovy, I always use Groovy from the firehose, using the master branch with the latest and greatest changes. But I always forget about the right parameters or environment variable to use to build Groovy with the new parser, and to activate it... although it's clearly explained in the documentation. So as a note to self, to know where to look at, I decided to write it down in this post!

Build Apache Groovy from the master branch with the Antlr4 parser:

./gradlew -PuseAntlr4=true installGroovy

It's going to build an installation of Groovy that you can point SDKman at:

$ sdk install groovy target/install/ dev
$ sdk use groovy dev

That way, you can use this "dev" version of Groovy in your shell. However, you still need to enable the Antlr4 parser, and you can do so with the following exported environment variable:

$ export JAVA_OPTS=-Dgroovy.antlr4=true

Then, when running groovyConsole or groovysh, you'll be able to try the new syntax. 

To learn more about the new parser, you can have a look at my presentation with some of the novelties provided by the "parrot" parser here:


And you can read Sergio's translation of Daniel's article on the new features here.

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).



Thursday 1st, I'll visit Crédit Agricole CIB, for a brown-bag lunch about Machine Learning. They did a fun survey to decide which topics I should cover! And funnily, this is in this office that is maintained and developed a banking project on which I worked more than ten years before!


Then, it's Voxxed Days Singapore time! I'll talk again about the Machine Learning APIs offered by Google Cloud, as well as a few words about TensorFlow and Cloud Machine Learning Engine.


Then, on Saturday 3rd, two events, one organized by the GDG Singapore, which will be a workshop on building chatbots, using API.AI and Cloud Functions, and covering the Google Home and Assistant too.


And the last event will be held in Google's offices, on the theme of data science, where I'll will also give a presentation on chatbots, the Google Assistant with Google Home, with API.AI for the conversational interface, and Cloud Functions for the business logic.

It's gonna be a pretty busy week, and I'm looking forward to meeting tons of developers in Singapore, as well as reconnect with some of my friends & former colleagues living in the area!

JAX 2017: Machine Learning and scaling web APIs

The JAX conference, in Mainz, Germany, is coming to an end. I was there with my colleagues Mete and Robert, and had the chance to cover two topics: Machine Learning and Scaling Web APIs. It's a pleasure to come back to this conference where the audience is always very focused, eager to learn, and is engaging in great and interesting conversations.

My first presentation was about Machine Learning, and in particular with the Google Cloud APIs, including Vision, Speech, Natural Language, Translate, and Video Intelligence. Although I'm not an expert in TensorFlow and the Cloud Machine Learning Engine, I got a chance to say a few words about these. I guess I'll have to play with both at some point to be able to tell even more!

Title: Machine Intelligence at Google Scale

Abstract: The biggest challenge of Deep Learning technology is the scalability. As long as using single GPU server, you have to wait for hours or days to get the result of your work. This doesn’t scale for production service, so you need a Distributed Training on the cloud eventually. Google has been building infrastructure for training the large scale neural network on the cloud for years, and now started to share the technology with external developers. In this session, we will introduce new pre-trained ML services such as Cloud Vision API and Speech API that works without any training. Also, we will look how TensorFlow and Cloud Machine Learning will accelerate custom model training for 10x – 40x with Google’s distributed training infrastructure.


My second session was about scaling web APIs, defined using the Open API specification, thanks to Kubernetes and Google Container Engine, for the scaling part of the story, and managing those APIs thanks to Google Cloud Endpoints.

TitleScale a Swagger-based Web API with Google Cloud Endpoints

AbstractWeb APIs are more often specified with API definition languages like Swagger (now named OpenAPI Spec), as it can help you generate nice interactive documentation, server skeletons, and client SDKs, mocks, and more, making it simpler to get started both producing and consuming an API. In this session, Guillaume will demonstrate how to define a Web API with Swagger/OpenAPI Spec, and scale it using Cloud Endpoints, on the Google Cloud Platform.


Videos (EN+FR): analyzing Groovy / Grails / Gradle source files from Github with BigQuery

Wether you're an English or a French speaker, 2 recent videos of my talk on the analysis of Groovy / Grails / Gradle source files from Github, thanks to BigQuery, have been released. The first one was recorded during Devoxx US, while the other was from BreizhCamp.

I've written several times about this topic, you can have a deeper look through the following articles:
And now... the videos!

In English, from Devoxx US:


And in French, from BreizhCamp:


A chatbox for the Devoxx conference agenda, with API.AI and Cloud Functions

That's Devoxx France this week, and I've had the pleasure of delivering today another talk on the theme of chatbots, using Cloud Functions for the business logic, API.AI for the bot cleverness, with a bonus of a demo through Google Home and the Google Assistant platform.

I'll post the YouTube video recording once it's online, but in the meantime, I wanted to share my slides here:



 
© 2012 Guillaume Laforge | The views and opinions expressed here are mine and don't reflect the ones from my employer.