‹ BackHN Continuity

Thread

Turbo Haskell

213 points · 62 comments · pjmlp

  1. kitd · · focus · HN ↗
    Odd that the FFI list didn't include Java given the JVM target. Typo or oversight?
    1. gf000 · · focus · HN ↗
      I believe it's just not FFI towards Java byte code, since it's the "native".

      But of course as a Truffle language it gets "free" java interop

    2. edwardkmett · · focus · HN ↗
      Java FFI can be done, it is just on the messier end of the spectrum. I do a little bit of it as needed, but I've focused in on Polyglot languages for now, and deferred a lot of the hooks for nicely handling it to later work.

      Talking about Java FFI invites you to say 'well then smart-ass how do you extend this Java class/interface over here with code written in your language' and frankly, that has never had a satisfying answer for any language that isn't Java.

      But today you can pass Haskell Data.Text out through the FFI binding framework and it shows up on the other side as a valid TruffleString, in UTF-8 with zero copy semantics and if any Truffle language passes in a TruffleString that is UTF-8 encoded it gets unwrapped into Data.Text using the same.

      That and some array support is pretty much enough to talk to everybody else.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.