Posts tagged 'groovy'

Matrix calculations with Groovy, Apache Commons Ma...

This blogs looks at performing matrix calculations with Groovy using various libraries:  Apache Commons Math , ojAlgo , EJML , and Nd4j  (part of Eclipse Deeplearning4j ). We'll also take a quick look at using the incubating Vector API for matrix calculations (JEPs  338 , 414 ,  417 ,  426 ). Fibonacci The Fibonacci... [Read more...]

Life on Mars: Units of Measurement systems, Groovy...

The Mars Climate Orbiter was launched in 1998 as part of a multi-faceted Mars exploration program. It was lost due to a trajectory calculation error when nearing Mars. An investigation attributed the failure to a measurement mismatch between two software systems: metric units were used by NASA and US customary units were used by spacecraft builder... [Read more...]

Natural Language Processing with Groovy, OpenNLP, ...

Natural Language Processing is certainly a large and sometimes complex topic with many aspects. Some of those aspects deserve entire blogs in their own right. For this blog, we will briefly look at a few simple use cases illustrating where you might be able to use NLP technology in your own project. Language Detection Knowing what language some... [Read more...]

Detecting objects with Groovy, the Deep Java Libra...

This blog posts looks at using Apache Groovy with the Deep Java Library (DJL) and backed by the Apache MXNet engine to detect objects within an image. (Apache MXNet is an incubating project at the ASF .) Deep Learning Deep learning falls under the branches of machine learning and artificial intelligence . It involves multiple layers... [Read more...]

Working with SQL databases with Groovy and GraalVM

During the week, there was an interesting video and blog post on the latest GraalVM 22.2 Release. The release has numerous new features and improvements including: smaller native executables the ability to generate heap dumps in native executables experimental native image debugging within IntelliJ IDEA the ability to embed a Software Bill of... [Read more...]

Reading and Writing CSV files with Groovy

In this post, we'll look at reading and writing CSV files using Groovy. Aren't CSV files just text files? For simple cases, we can treat CSV files no differently than we would other text files. Suppose we have the following data that we would like to write to a CSV file: def data = [ [ 'place' , 'firstname' , ... [Read more...]

Groovy release train: 4.0.4, 3.0.12, 2.5.18

It's been a productive time for the Apache Groovy project recently. We recently released versions 4.0.4, 3.0.12 and 2.5.18 with 42, 21 and 15 fixes and improvements respectively. Two quick highlights for the 4.0.4 release before getting into more details about the release. Eric Milles has been interacting for many months with the team from the ... [Read more...]

Comparators and Sorting in Groovy

This blog post is inspired by the Comparator examples in the excellent Collections Refuelled talk and blog by Stuart Marks. That blog from 2017 highlights improvements in the Java collections library in Java 8 and 9 including numerous Comparator improvements. It is now 5 years old but still highly recommended for anyone using the Java collections... [Read more...]

Testing your Java with Groovy, Spock, JUnit5, Jaco...

This blog post covers a common scenario seen in the Groovy community which is projects which use Java for their production code and Groovy for their tests. This can be a low risk way for Java shops to try out and become more familiar with Groovy. We'll write our initial tests using the Spock testing framework  and we'll use JUnit5 later with... [Read more...]

Parsing JSON with Groovy

Groovy has excellent support for processing a range of structured data formats like JSON, TOML, YAML, etc. This blog post looks at JSON . There is quite good documentation on this topic as part of the Groovy documentation . There are also numerous online sources for more details including Groovy - JSON tutorial , Working with JSON in Groovy , and ... [Read more...]

Classifying Iris Flowers with Deep Learning, Groov...

A classic data science dataset captures flower characteristics of Iris flowers. It captures the width and length of the sepals and petals for three species ( Setosa , Versicolor , and Virginica ). The Iris project in the groovy-data-science repo is dedicated to this example. It includes a number of Groovy scripts and a Jupyter/BeakerX... [Read more...]

Using Groovy with Apache Wayang and Apache Spark

Apache Wayang  (incubating) is an API for big data cross-platform processing. It provides an abstraction over other platforms like Apache Spark  and Apache Flink as well as a default built-in stream-based "platform". The goal is to provide a consistent developer experience when writing code regardless of whether a light-weight or... [Read more...]

GPars meets Virtual Threads

An exciting preview feature coming in JDK19 is Virtual Threads ( JEP 425 ). In my experiments so far, virtual threads work well with my favourite Groovy parallel and concurrency library GPars . GPars has been around a while (since Java 5 and Groovy 1.8 days) but still has many useful features. Let's have a look at a few examples. If you want to try... [Read more...]

Groovy 4.0.3 Released

Dear community, The Apache Groovy team is pleased to announce version 4.0.3 of Apache Groovy. Apache Groovy is a multi-faceted programming language for the JVM. Further details can be found at the  website. This release is a maintenance release of the GROOVY_4_0_X branch. It is strongly encouraged that all... [Read more...]


Today's active blogs

Popular blog tags

Related sites