1. tiffanyh 5 hours ago
    > Starting from v25 GraalVM added support for WASM

    GraalVM is so amazing technically, but gets so little love by HN.

    1. hardwaresofton 53 minutes ago
      Does it have to do with the somewhat complicated licensing?
    2. sureglymop 5 hours ago
      When I tried it it was great but also not easy to use. Things become hard quickly, e.g. If your jvm code uses something like reflection.
      1. perrygeo 2 hours ago
        Clojure code ends up using a lot of reflection if you're doing generic Java interop. Most code destined for the GraalVM will add `(set! warn-on-reflection true)` and get repl warnings and you can set type hints accordingly.
      2. 90s_dev 5 hours ago
        I vaguely remember using it about 10 years ago for work, can't remember what for, or anything about that situation, but the one takeaway that I do remember is that it was neat and innovative, but ultimately not good enough to overthrow whatever we were using instead.
  2. nzoschke 4 hours ago
    GraalVM is neat.

    I used it to make a program that logs all activity happening on the Pioneer CDJs. The best reverse engineering of the Pioneer protocols is a Java project, but I wanted to write the rest of my application in Go.

    GraalVM plus a GitHub action spits out native binaries that I can exec and interact with over stdio from Go.

    If/when the WASM backend supports UDP networking and threads I'd love to run it as WASM instead of a binary.

    - https://github.com/nzoschke/vizlink

    - https://github.com/nzoschke/vizlink/blob/main/.github/workfl...

  3. croemer 3 hours ago
    The analysis of the benchmark is wrong. Native is faster than JVM for 2 out of 4 operations. The 2-3x vs 5-12x are hence not correct.
  4. dlachausse 6 hours ago
    > The output WASM of this simple program is 5.6MB binary, which can be pruned a bit via wasm-opt tool, just make sure that it doesn't break anything for you. Luckily when compressed (gzip, brotli, etc) the binary becomes just ~2.5MB in size.

    That’s much better than I expected! Very impressive work here. It actually looks viable for certain applications.

    1. sjrd 6 hours ago
      It's acceptable. Meanwhile 5.6MB of Wasm is about the size of the entire test suite of Scala.js. :-p

      GraalVM is excellent technology, but when it comes to targeting Wasm, I believe the core language compilers will always have an edge.

  5. rgyams 6 hours ago
    Nice, I will revisit closure to try this out
    1. millerm 6 hours ago
      Clojure. ;)
      1. tomjakubowski 6 hours ago
        For quite some time (maybe even still today?), ClojureScript was compiled to JS using the Google Closure Compiler. I felt sympathy for anyone who had to discuss that out loud.
        1. sjrd 5 hours ago
          The trick is to call the latter GCC. Much less confusing. ;-)
          1. tonyarkles 4 hours ago
            And now I've got coffee in my sinus. Thanks for that :D
        2. shawn_w 4 hours ago
          Imagine the pain of talking about Clozure Common Lisp.
      2. 90s_dev 6 hours ago
        You have no idea how many times I typed clojure when I meant to type closure throughout my career. Bizarrely backwards.
  6. zusammen 4 hours ago
    [dead]