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

    View full-size slide

  2. Principal Software Engineer
    ( )
    @jponge

    View full-size slide

  3. Technical Account Manager
    ( )
    @k33g_org
    Customer
    Success Team

    View full-size slide


  4. Jamais édité (oss)
    https://github.com/3monkeys/play.rules

    View full-size slide

  5. JooFlux
    Dynamic AOP using invokedynamic
    April 2012

    View full-size slide

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

    View full-size slide

  7. July 2012
    Summer hack for fun…

    View full-size slide

  8. August 2012
    Fibonacci… no way back!

    View full-size slide

  9. May 2013
    My 1st PR: readln

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  12. println("http://google.com": toURL(): getContent(): readFully())
    Augmentation on String
    Augmentation on InputStream

    View full-size slide

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

    View full-size slide

  14. https://unsplash.com/photos/i2KibvLYjqk
    Golo explorations
    (+ with Vert.x)

    View full-size slide

  15. https://unsplash.com/photos/sb7RUrRMaC4
    Let’s talk about
    benchmarks…

    View full-size slide

  16. Baseline Java
    Clojure
    Golo
    Groovy
    JRuby
    Jython
    Nashorn
    ops/s
    0 75000 150000 225000 300000
    Zulu 1.8 GraalVM
    Trimorphic dispatch

    View full-size slide

  17. Baseline Java
    Clojure
    Golo
    Groovy
    JRuby
    Jython
    Nashorn
    ms/op
    0 400 800 1200 1600
    Zulu 1.8 GraalVM
    GCD (euclidian)

    View full-size slide

  18. Baseline Java
    Clojure
    Golo
    Groovy
    0 75 150 225 300
    Zulu 1.8 GraalVM

    View full-size slide

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

    View full-size slide

  20. Baseline Java (copy)
    Baseline Java (streams)
    Golo
    0 15 30 45 60
    GraalVM

    View full-size slide

  21. https://golo-lang.org/
    Julien Ponge Philippe Charrière

    View full-size slide