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 Slide

  2. Principal Software Engineer
    ( )
    @jponge

    View Slide

  3. View Slide

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

    View Slide


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

    View Slide

  6. JooFlux
    Dynamic AOP using invokedynamic
    April 2012

    View Slide

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

  8. July 2012
    Summer hack for fun…

    View Slide

  9. August 2012
    Fibonacci… no way back!

    View Slide

  10. May 2013
    My 1st PR: readln

    View Slide

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

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

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

    View Slide

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

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

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

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

    View Slide

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

    View Slide