News for hackers. Stuff that matters.
Re:Rise and fall of JVM languages by Insanity on Monday August 21, 2017 @05:32AM (#15063168)
I'm surprised to see that Groovy slightly beats Kotlin in on that graph. I really underestimated Groovy popularity, or overestimated Kotlin.

I've yet to work with Kotlin but did like Groovy some years ago. Never used it professionaly though, only for play-projects.

Re:Rise and fall of JVM languages by izacus on Monday August 21, 2017 @05:53AM (#15063270)
Is it possible that it's skewed because Gradle (build system used for pretty much all Android applications and many standard Java applications) uses Groovy as it's configuration file language? Causing a misdetection (e.g. most Android Kotlin projects would show up as Groovy as well) ?
Re:Rise and fall of JVM languages by nilidah on Monday August 21, 2017 @08:11AM (#15063948)
It always blows my mind when everyone seems to forget Groovy. Especially since Kotlin is very very similar (well, syntactically anyway). The difference of course is that Groovy has full Spring support, Gradle, Spock etc.
Re:Rise and fall of JVM languages by m12k on Monday August 21, 2017 @05:56AM (#15063278)
Maybe Gradle is the 'killer app' that keeps Groovy popular? I've heard from people with tricky build tool requirements that it's one of the best options out there.
Re:Rise and fall of JVM languages by aweiland on Monday August 21, 2017 @11:19AM (#15065182)
I see Groovy in 3 places: Gradle files (a Kotlin alternative is coming), Jenkins pipeline build scripts, and the Spock testing framework.

I don't have a good read on how popular Grails is anymore. I liked it a lot in the past but I don't need it anymore with Kotlin and Spring Boot.

Re:Rise and fall of JVM languages by vorg on Monday August 21, 2017 @02:42PM (#15066666)
> Gradle files (a Kotlin alternative is coming)

Gradle's been able to use Kotlin for build files since Gradle 3.0 which was released last year.

For Jenkins, only a subset of Apache Groovy can be used. None of the functional methods will work when used.

Grails 2.x is still around, but virtually no-one's converting their projects to version 3, or starting new Grails projects in version 3.

Groovy development has come to a standstill, and even contributions from outside developers just sit there, such as the new Antlr 4-based parser which someone contributed a whole year ago.

Re:Rise and fall of JVM languages by cutler on Monday August 21, 2017 @10:19PM (#15069252)
Kotlin has its own build system - Kobalt.
Re:Rise and fall of JVM languages by joemccall86 on Monday August 21, 2017 @11:51AM (#15065424)
We've stuck with Grails for a few years now and I still prefer it over vanilla Spring Boot. Things like JSON views and GORM are still really nice to have.
Re:Rise and fall of JVM languages by chii on Monday August 21, 2017 @05:43AM (#15063219)
groovy is great. It doesn't have much marketing behind it, so it's seems to be a bit of a quiet achiever. But for dsl makin', groovy is such a good language.!
Re:Rise and fall of JVM languages by olavgg on Monday August 21, 2017 @05:59AM (#15063298)
We use Groovy in production, working with SQL, Transactions or JSON is much easier than Java. Meta programming and Traits are other advantages. The biggest advantage is that it is so similar to Java code, that any Java developer can pick it up and understand it immediately.

We still love and use Java a lot and they both complement each other very well.

Re:Rise and fall of JVM languages by vorg on Monday August 21, 2017 @02:55PM (#15066773)
> it is so similar to Java code, that any Java developer can pick it up

Perhaps Java 7, but Apache Groovy doesn't have the lambda syntax from Java 8. Development on Groovy has stagnated -- someone even contributed a fully working Antlr-4 based parser to replace their outdated Antlr-2 based one last year, but it's been sitting in their development repository at Github going nowhere ever since.

Re:Rise and fall of JVM languages by crazypyro on Monday August 21, 2017 @11:37AM (#15065320)
We use Groovy at my work in a majority of our projects as well. I love traits and some of the other shortcuts and I don't feel like I'm too far away from Java that I couldn't work in it immediately.
Re:Rise and fall of JVM languages by Insanity on Monday August 21, 2017 @05:47AM (#15063244)
I should perhaps check it out again. It's been years since I've used it, but did enjoy it when I did.
Re:Rise and fall of JVM languages by fithisux on Monday August 21, 2017 @01:03PM (#15065937)
Groovy deserves better. But its tight couple with JVM eliminate the possibility of native or JS.
Re:Rise and fall of JVM languages by tigershark on Monday August 21, 2017 @06:49AM (#15063533)
Groovy has the best testing framework that I have ever used, Spock. When I write .Net code I really miss it, there is nothing that I found as powerful, even using F#.
Re:Rise and fall of JVM languages by dvlsg on Monday August 21, 2017 @12:26PM (#15065680)
What do you miss that's not in F#? Legitimately curious, since F# is the language I miss (or wish to use, I suppose) the most at the moment.
Re:Rise and fall of JVM languages by tigershark on Monday August 21, 2017 @11:56PM (#15069574)
It's the overall experience that is great. Creating a stub or a mock with just: IMyService myService = Stub() // Mock()

Returning something from the stub:

myService.getData() >> data

verifying the returned value without explicit assert:

result == expected (This will show a very informative error in case of mismatch and gives you the ability to see the differences in a diff style window)

Interaction based testing is a breeze with this:

3 * myService.getData()

1 * myOtherService.getData()

And finally the data driven testing is the most natural that I have ever seen. You just need to literally create a table and use the column name in your test or even in your test title. Writing tests becomes a joy with Spock.

In F# I have looked at expecto, fsunit and some other library, but I can't find anything remotely equivalent.

Re:Rise and fall of JVM languages by fithisux on Monday August 21, 2017 @12:58PM (#15065901)
The killer feature of Groovy is Spock tests. It really shines there.
Re:Rise and fall of JVM languages by sorokod on Monday August 21, 2017 @02:27PM (#15066527)
sincerest form of flattery?

http://spekframework.org

Re:Rise and fall of JVM languages by vorg on Monday August 21, 2017 @02:47PM (#15066709)
Kotlin-based Spek uses standard lambdas for defining specs, whereas Spock digs into the Apache Groovy parser to change the meaning of labels in the syntax, as well as uses operator overloading. One's elegantly functional, the other's a cheap hack.