Thread overview
http://www.graalvm.org
Apr 22, 2018
Robert M. Münch
Apr 22, 2018
jmh530
Apr 23, 2018
jmh530
Nov 12, 2018
Laeeth Isharc
Nov 12, 2018
jmh530
Apr 23, 2018
Void-995
Nov 15, 2018
Chris
April 22, 2018
"GraalVM is a universal virtual machine for running applications written in JavaScript, Python 3, Ruby, R, JVM-based languages like Java, Scala, Kotlin, and LLVM-based languages such as C and C++."

They use a special protocol to make data access from different languages transparent and very low cost. Perhaps worth an experiment to see if D can benefit of it.

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster

April 22, 2018
On Sunday, 22 April 2018 at 15:13:18 UTC, Robert M. Münch wrote:
> "GraalVM is a universal virtual machine for running applications written in JavaScript, Python 3, Ruby, R, JVM-based languages like Java, Scala, Kotlin, and LLVM-based languages such as C and C++."
>
> They use a special protocol to make data access from different languages transparent and very low cost. Perhaps worth an experiment to see if D can benefit of it.

I think there's an option so that LLVM bitcode can be used on it. So conceivably, you could compile with LDC to LLVM bitcode and then run that on Graal.
April 23, 2018
On Sunday, 22 April 2018 at 23:16:53 UTC, jmh530 wrote:
>
> I think there's an option so that LLVM bitcode can be used on it. So conceivably, you could compile with LDC to LLVM bitcode and then run that on Graal.

Here is the documentation [1] for this feature. There is some discussion about linking standard libraries in Rust/C++ that might be relevant.

[1] http://www.graalvm.org/docs/reference-manual/languages/llvm/
April 23, 2018
On Sunday, 22 April 2018 at 15:13:18 UTC, Robert M. Münch wrote:
> "GraalVM is a universal virtual machine for running applications written in JavaScript, Python 3, Ruby, R, JVM-based languages like Java, Scala, Kotlin, and LLVM-based languages such as C and C++."
>
> They use a special protocol to make data access from different languages transparent and very low cost. Perhaps worth an experiment to see if D can benefit of it.

How can D benefit from JVM JIT Extension?
November 12, 2018
On Sunday, 22 April 2018 at 23:16:53 UTC, jmh530 wrote:
> On Sunday, 22 April 2018 at 15:13:18 UTC, Robert M. Münch wrote:
>> "GraalVM is a universal virtual machine for running applications written in JavaScript, Python 3, Ruby, R, JVM-based languages like Java, Scala, Kotlin, and LLVM-based languages such as C and C++."
>>
>> They use a special protocol to make data access from different languages transparent and very low cost. Perhaps worth an experiment to see if D can benefit of it.
>
> I think there's an option so that LLVM bitcode can be used on it. So conceivably, you could compile with LDC to LLVM bitcode and then run that on Graal.

In case anyone wondered.

It works with betterC mode using dpp to translate polyglot.h.  I guess I need to build druntime and Phobos bitcode libraries.

A higher level wrapper around polyglot wouldn't be so much work.

One more thing.  This makes it pretty easy to compile Java libraries as native code libraries that you could link to from D.  Not everything will work because of reflection and dynamic class loading restrictions.  But being able to use Java libraries might be quite useful for D.



November 12, 2018
On Monday, 12 November 2018 at 02:20:41 UTC, Laeeth Isharc wrote:
> [snip]
>
> In case anyone wondered.
>
> It works with betterC mode using dpp to translate polyglot.h.  I guess I need to build druntime and Phobos bitcode libraries.
>
> A higher level wrapper around polyglot wouldn't be so much work.
>
> One more thing.  This makes it pretty easy to compile Java libraries as native code libraries that you could link to from D.
>  Not everything will work because of reflection and dynamic class loading restrictions.  But being able to use Java libraries might be quite useful for D.

Cool.
November 15, 2018
On Sunday, 22 April 2018 at 15:13:18 UTC, Robert M. Münch wrote:
> "GraalVM is a universal virtual machine for running applications written in JavaScript, Python 3, Ruby, R, JVM-based languages like Java, Scala, Kotlin, and LLVM-based languages such as C and C++."
>
> They use a special protocol to make data access from different languages transparent and very low cost. Perhaps worth an experiment to see if D can benefit of it.

This might be of interest:

http://www.graalvm.org/docs/graalvm-as-a-platform/

The JVM world is catching up...it was about time!