Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Golo LyonJUG 2019

Golo LyonJUG 2019

Presented with Philippe Charrière at the Lyon JUG January 2019 session on JVM languages. Other sessions featured Kotlin, Scala and Clojure.

In this talk we presented some elements of Golo, its history, and a binding on top of Vert.x.

Julien Ponge

January 23, 2019
Tweet

More Decks by Julien Ponge

Other Decks in Programming

Transcript

  1. Le petit langage fonctionnel (mais pas que) made in Lyon

    que vous pouvez modifier vous-mêmes. Julien Ponge Philippe Charrière
  2. public static java.lang.Object foo(java.lang.Object); Code: 0: ldc #19 2: invokedynamic

    #29, 0 7: pop 8: aconst_null 9: areturn runtime-bound call site method handles + combinators (type, logic, ...)
  3. module hello function main = |args| { let message =

    "Hello, LyonJUG!” var a = 1 a = a + 1 display(message) display(">>> " + a) } local function display = |what| -> println(what)
  4. let data = [ [1, 2, 3], tuple[1, 2, 3],

    array[1, 2, 3], set[1, 2, 3, 3, 1], map[ ["a", 10], ["b", 20] ], vector[1, 2, 3], list[1, 2, 3] ] Tuples Arrays (JVM) LinkedHashSet LinkedHashMap ArrayList LinkedList
  5. struct Point = { x, y } augment Point {

    function moveBy = |this, dx, dy| { this: x(this: x() + dx) this: y(this: y() + dy) return this } } # struct Point{x=11, y=-4} println(Point(1, 1): moveBy(10, -5)) + toString, equals, hashCode
  6. Baseline Java Clojure Golo Groovy JRuby Jython Nashorn ops/s 0

    75000 150000 225000 300000 Zulu 1.8 GraalVM Trimorphic dispatch
  7. Baseline Java Clojure Golo Groovy JRuby Jython Nashorn ms/op 0

    400 800 1200 1600 Zulu 1.8 GraalVM GCD (euclidian)
  8. Baseline Java (copy) Baseline Java (streams) Clojure Golo Groovy JRuby

    Nashorn us/s 0 175 350 525 700 Zulu 1.8 GraalVM filter/map/reduce