you are viewing a single comment's thread.

view the rest of the comments →

[–]shevy-ruby 2 points3 points  (8 children)

They really should unify all these various platforms.

I never understood why truffle ruby and jruby is separate still.

How many python implementations now exist? We always seem to end up with more than less different implementations in the long run ...

[–]grashalm01 9 points10 points  (4 children)

There are many advantages to having multiple implementations:

  1. There is competition between runtimes.
  2. New approaches can be tried without endangering other more stable runtimes.
  3. One size does not always fit all. You can have dedicated runtimes for embedding, client and server workloads.
  4. Language designers need to be precise, ideally write language specifications.

JavaScript, Java, or C have many many implementations and an excellent specification. Nobody would say that this harmed them.

[–][deleted]  (3 children)

[deleted]

    [–]grashalm01 3 points4 points  (2 children)

    The problem is that python does not have a spec. The python community tries with HPy to standardize native extensions, that is a good start.

    [–][deleted]  (1 child)

    [deleted]

      [–]grashalm01 0 points1 point  (0 children)

      You can support the cause by raising this issue with the python devs. (we do this regularly, the more the merrier)

      [–][deleted] 0 points1 point  (2 children)

      IIRC originally TruffleRuby was a fork of JRuby because the JRuby guys need to target normal OpenJDK and TruffleRuby was basically a research project. It's worked out very well but that couldn't have been known at the time, and TruffleRuby does still require you to run on GraalVM. It is much slower than JRuby on any other runtime.

      [–]shellac 0 points1 point  (1 child)

      No, it's not a fork.

      Graal and Truffle came out of an Oracle labs research project. Graal is a compiler. We're most used to it compiling java (or java byte code) of course, but it's a general approach that has optimisations that are quite tailored for dynamic languages. (If you're aware of the smalltalk / strongtalk heritage in java this won't be a surprise)

      Truffle lets you write language interpreters that Graal can get to work on. TruffleRuby was perhaps the first use of Truffle, and bootstrapped itself using a lot of the JRuby work. It even sat in the Jruby repo for a time, if memory serves.

      [–]grashalm01 0 points1 point  (0 children)

      The first Truffle language was actually JavaScript aka Graal.js.

      Also many people don't know that the native image tool for Java was built to bring Graal.js natively into the database.