www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - http://www.graalvm.org

reply =?iso-8859-1?Q?Robert_M._M=FCnch?= <robert.muench saphirion.com> writes:
"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
Apr 22 2018
next sibling parent reply jmh530 <john.michael.hall gmail.com> writes:
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.
Apr 22 2018
next sibling parent jmh530 <john.michael.hall gmail.com> writes:
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/
Apr 23 2018
prev sibling parent reply Laeeth Isharc <Laeeth laeeth.com> writes:
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.
Nov 11 2018
parent jmh530 <john.michael.hall gmail.com> writes:
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.
Nov 12 2018
prev sibling next sibling parent Void-995 <void995 gmail.com> writes:
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?
Apr 23 2018
prev sibling parent Chris <wendlec tcd.ie> writes:
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!
Nov 15 2018