❯ Guillaume Laforge

Groovy

Machine learning APIs with Apache Groovy

At GR8Conf Europe last year, I talked  about how to take advantage of the Google Cloud machine learning APIs  using Apache Groovy.

With Groovy, you can call the Vision API that recognises what’s in your pictures, or reads text.

You can invoke the Natural Language API to understand the structure of your text.

With the Speech-To-Text API, you can get transcriptions of what’s been said in an audio stream, or with Text-To-Spech, you can also generate human-like voices from your own text.

Read more...

Putting a Groovy Twist on Cloud Vision

Powerful machine learning APIs are at your fingertips if you’re developing with Google Cloud Platform, as client libraries are available for various programming languages. Today, we’re investigating the Cloud Vision API and its Java SDK, using the Apache Groovy programming language—a multi-faceted language for the Java platform that aims to improve developer productivity thanks to a concise, familiar and easy to learn syntax.

At GR8Conf Europe, in Denmark, the conference dedicated to the Apache Groovy ecosystem, I spoke about the machine learning APIs provided by Google Cloud Platform: Vision, Natural Language, Translate, and Speech (both recognition and synthesis). Since it’s a groovy conference, we presented samples and demos using a pretty Groovy language. I wanted to share the underlying examples with a wider audience, so here’s the first of a series of blog posts covering the demos I presented. I’ll start with the Google Cloud Vision API, and I will cover the other APIs in future posts.

Read more...

Vision recognition with a Groovy twist

Last week at GR8Conf Europe, I spoke about the machine learning APIs provided by  Google Cloud Platform: Vision, Natural Language, Speech recognition and synthesis, etc. Since it’s GR8Conf, that means showing samples and demos using a pretty Groovy language, and I promised to share my code afterwards. So here’s a series of blog posts covering the demos I’ve presented. We’ll start with the Vision API.

The Vision API allows you to:

  • Get labels of what appears in your pictures,
  • Detect faces, with precise location of face features,
  • Tell you if the picture is a particular landmark,
  • Check for inappropriate content,
  • Give you some image attributes information,
  • Find if the picture is already available on the net,
  • Detects brand logos,
  • Or extract text that appears in your images (OCR).

You can try out those features online directly from the Cloud Vision API product page:

Read more...

Getting started with Groovy technologies on Google Cloud Platform

Back to GR8Conf Europe in Denmark, for the yearly Groovy community reunion! I had the chance to present two talks.

The first one on Google’s Machine Learning APIs, with samples in Groovy using vision recognition, speech recognition & generation, natural language analysis. I’ll come back on ML in Groovy in forthcoming articles.

And the second talk was an overview of Google Cloud Platform, focusing on the compute and storage options, with demos using Groovy frameworks (RatpackGaelyk, and the newly released Micronaut) and how to deploy apps on Compute Engine, Kubernetes Engine, App Engine. I’ll also come back in further articles on those demos, but in the meantime, I wanted to share my slide deck with you all! Without further ado, here’s what I presented:

Read more...

Ten years of App Engine with a Groovy twist

The venerable Google App Engine platform celebrated its 10th anniversary!

Back in 2008, it started with Python, as its first runtime, but I got way more interested in App Engine when the Java runtime would launch the following year. It’s a bit of a special story for me, as I’ve always been a fan of App Engine, since the beginning.

Over the years, I’ve built several apps running on App Engine. For instance, this blog you’re reading now is running on App Engine, as well as my personal picture / video sharing app, some Github post-commit webhook for the Apache Groovy project, or the Groovy Web Console to share / edit / run Groovy scripts in the cloud.

Read more...

What can we learn from millions of (groovy) source files in Github

What can you learn from millions of (Groovy) source files stored on Github? In this presentation, I analized source files in the Github archives stored on BigQuery, and in particular Groovy source file, but also Gradle build files, or Grails controllers and services.

What kind of questions can we answer

  • How many Groovy files are there on Github?
  • What are the most popular Groovy file names?
  • How many lines of Groovy source code are there?
  • What’s the distribution of size of source files?
  • What are the most frequent imported packages?
  • What are the most popular Groovy APIs used?
  • What are the most used AST transformations?
  • Do people use import aliases much?
  • Did developers adopt traits?

For Gradle, here are the questions that I answered:

Read more...

Gradle vs Maven and Gradle in Kotlin or Groovy

Once in a while, when talking about Gradle with developers, at conferences or within the Groovy community (but with the wider Java community as well), I hear questions about Gradle. In particular Gradle vs Maven, or whether developers adopt the Kotlin DSL for Gradle builds.

In the past, I blogged several times about using BigQuery and the Github dataset to analyze open source projects hosted on Github, by running some SQL queries against that dataset. You might want to have a look at this past article on some Gradle analysis with BigQuery. Considering those questions popped up recently, I decided to do a quick run through those questions with some simple queries.

Read more...

The JDK built-in web server with Apache Groovy

In my timeline, I saw a tweet from Joe Walnes about the built-in HTTP server available in the JDK since Java 6. It’s super convenient, starts super fast, easy to use, but I often forget about it. I’d probably not use it for serving planet-wide load, but it’s very useful when you need to create a quick service, a little mock for testing some web or micro-service.

Here’s a little hello world for the fun.

Read more...

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. Languages are not invented in a vacuum but are inspired by their predecessors. This session’s speaker, who has been working on Apache Groovy for the past 14 years, reflects on the influences that have driven the design of programming languages. In particular, Groovy’s base syntax was directly derived from Java’s but quickly developed its own flavor, adding closures, type inference, and operators from Ruby. Groovy also inspired other languages: C#, Swift, and JavaScript adopted Groovy’s null-safe navigation operator and the famous Elvis operator.

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