Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Fabio Niephaus
    @fniephaus
    How do I support multiple overloads correctly in my language? I'm currently getting "Multiple applicable overloads found for method name toString" errors
    Fabio Niephaus
    @fniephaus
    I guess there is no way to support it? JS Example:
    Java.type('java.util.Arrays').toString([1,2,3,4])
    TypeError: invokeMember (toString) on JavaClass[java.util.Arrays] failed due to: Multiple applicable overloads found for method name toString (candidates: [Method[public static java.lang.String java.util.Arrays.toString(boolean[])], Method[public static java.lang.String java.util.Arrays.toString(byte[])], Method[public static java.lang.String
    ...
    Fabio Niephaus
    @fniephaus
    I understand the ambiguity issue, but is there any way a future version of GraalVM could allow the user to resolve it somehow (e.g. Java.type('java.util.Arrays').toString['Object[]']([1,2,3,4]))?
    Ghost
    @ghost~5377c1e9048862e761fa1c25
    Can the user 'resolve' it by converting themselves to a more concrete type?
    But it might be nice to be able to bind like you're suggesting yes. Have you looked at JRuby? I'm sure they've thought about these problems for general dynamic-language-to-Java interop and might have some ideas
    Fabio Niephaus
    @fniephaus

    @chrisseaton I believe this could even be a bug, see:
    Java.type('java.util.Arrays').toString(new Float64Array(2))

    Interop only checks for the length of the array, but it could/should? check for the type of it's contents, too. Maybe arrays need something like fitsIntoLong, e.g. holdsValuesFittingIntoLong. This should allow support for typed arrays

    Fabio Niephaus
    @fniephaus
    Is there any way to enable nfi on openjdk8? Do I need to add it as a dependency somewhere?
    Fabio Niephaus
    @fniephaus
    Of course, I need to add TRUFFLE_NFI as a dependency, but how do I provide truffle.nfi.library correctly?
    Fabio Niephaus
    @fniephaus
    I was hoping it would work automatically considering TRUFFLE_NFI has defined javaProperties.

    Hardcoding truffle.nfi.library seems to trigger a segfault:

    Stack: [0x000070000f1a8000,0x00007000131a8000],  sp=0x00007000131a0360,  free space=65504k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V  [libjvm.dylib+0x2d991c]
    C  [libtrufflenfi.dylib+0x2eef]  cacheFFIType+0x6f
    C  [libtrufflenfi.dylib+0x2c26]  Java_com_oracle_truffle_nfi_impl_NFIContext_initializeNativeContext+0x616
    j  com.oracle.truffle.nfi.impl.NFIContext.initializeNativeContext()J+0
    j  com.oracle.truffle.nfi.impl.NFIContext.initialize()V+8
    j  com.oracle.truffle.nfi.impl.NFILanguageImpl.initializeContext(Lcom/oracle/truffle/nfi/impl/NFIContext;)V+1
    j  com.oracle.truffle.nfi.impl.NFILanguageImpl.initializeContext(Ljava/lang/Object;)V+5
    j  com.oracle.truffle.api.TruffleLanguage$Env.postInit()V+8
    j  com.oracle.truffle.api.LanguageAccessor$LanguageImpl.postInitEnv(Lcom/oracle/truffle/api/TruffleLanguage$Env;)V+1

    What am I doing wrong here?

    Alina Yurenko
    @alina-yur
    Hi everyone. Due to popular demand we’re moving GraalVM channels to a GraalVM community Slack workspace.
    It has been set up and has the same channels as here (and more). To join the workspace, use this link: https://join.slack.com/t/graalvm/shared_invite/enQtNzk0NTc5MzUyNzg5LTAwY2YyODQ4MzJjMGJjZGQzMWY2ZDA3NWI3YzEzNDRlNGQ1MTZkYzkzM2JkYjIxMTY2NGQzNjUxOGQzZGExZmU
    We hope this transition wouldn’t be too much trouble and will help to make our communication easier.
    Paulo Simoes
    @pasimoes_twitter
    Great 👏🏻👏🏻
    Alexander Bonin
    @alex4o
    Hello in the simple lang implementation where does SLReadLocalVariableNodeGen gets generated
    Fabio Niephaus
    @fniephaus
    @alex4o please move over to the new Slack channel...anyway, SLReadLocalVariableNodeGen is generated by the DSL annotation processor from SLReadLocalVariableNode. Hope that answers your question
    Achrouf Abdenour
    @achabdo
    why there is no LLVM backend for graal?I think if graal already used LLVM as a backend it would be great specially for embedded you could port your app to many embedded systems as embedded systems have many processors ,LLVM support many architecture currently x86 PowerPC ARM mips sparc ppc hexagon xcore etc .. it would be great if we combine LLVM and graal ,the graal team may have to rewrite the compiler using LLVM and use SVM as a runtime?
    Oleg Šelajev
    @shelajev

    @achabdo please move to the slack channel above.

    LLVM backend is being worked on.

    Achrouf Abdenour
    @achabdo
    ok
    @shelajev
    Alina Yurenko
    @alina-yur
    Hi everyone, the previous Slack invitation link expired, please use this one if you want to join: https://join.slack.com/t/graalvm/shared_invite/enQtODM1NTQzNDIyMjk0LTNlYjBhNTdiNDQxNTdkNDE0ZmFlNzMwNDcyOWZjOTEzN2UyMTM5MTk5YjY1ZDgwMWU2NGQwNjVhZWVhOWRiOGQ
    It should last longer:) Thank you!
    Ciprian Khlud
    @ciplogic
    Later: found it! Sorry, yes, as written, GraalVM will support JDK 11, great job guys!
    Matthew Tovbin
    @tovbinm
    Indeed. Thank you for Java 11 support!!
    How do I set it on my mac, btw? regular uzip & mv to /Library/Java/JavaVirtualMachines/ does not seem to work and GraalVM Java11 version is not being detected.
    Matthew Tovbin
    @tovbinm
    Exporting JAVA_HOME worked, i.e. export JAVA_HOME=/Library/Java/JavaVirtualMachines/graalvm-ce-java11-19.3.0/Contents/Home/
    Guido Chari
    @charig
    Hey, I am trying to port my implementations to use graal with java 11 and when finally trying to run the vm I got stucked here:
    Exception in thread "main" java.lang.InternalError: JDK specific overlay for com.oracle.truffle.api.impl.TruffleJDKServices missing
        at com.oracle.truffle.api.impl.TruffleJDKServices.shouldNotReachHere(TruffleJDKServices.java:54)
        at com.oracle.truffle.api.impl.TruffleJDKServices.getTruffleRuntimeLoaders(TruffleJDKServices.java:83)
        at com.oracle.truffle.api.Truffle$1.run(Truffle.java:121)
        at com.oracle.truffle.api.Truffle$1.run(Truffle.java:107)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at com.oracle.truffle.api.Truffle.initRuntime(Truffle.java:107)
        at com.oracle.truffle.api.Truffle.<clinit>(Truffle.java:62)
        at com.oracle.truffle.api.impl.Accessor.<clinit>(Accessor.java:696)
        at com.oracle.truffle.api.source.Source.<clinit>(Source.java:1029)
        at som.vm.Universe.<clinit>(Universe.java:607)
    seems like I am using a wrong jdk for sth but I could not find it, any pointers?
    Romain DEP.
    @rom1dep
    Hi there! Is this the right place to ask for help about native-image?
    Maarten Mulders
    @mthmulders

    Hi everyone, the previous Slack invitation link expired, please use this one if you want to join: https://join.slack.com/t/graalvm/shared_invite/enQtODM1NTQzNDIyMjk0LTNlYjBhNTdiNDQxNTdkNDE0ZmFlNzMwNDcyOWZjOTEzN2UyMTM5MTk5YjY1ZDgwMWU2NGQwNjVhZWVhOWRiOGQ
    It should last longer:) Thank you!

    @rom1dep You'll have more luck on Slack

    Romain DEP.
    @rom1dep
    @mthmulders hey :) clicked on github's slack link, found it dead, ended-up here as a result, thanks!
    Federico Tomassetti
    @ftomassetti
    Hi everyone, I just started playing with Truffle. I have a little interpreter and I was trying to get the inspector in Chrome. According to this (https://www.graalvm.org/docs/reference-manual/tools/) I was expecting to set up my context with a few options and get the inspector running. However I get java.lang.IllegalArgumentException: Could not find option with name inspect.Path
    am I fundamentally wrong in thinking the inspector should work for any new language?
    Federico Tomassetti
    @ftomassetti
    ok, I did not include the chromeinspector dependency
    now I have the inspector running in chrome, but I cannot see anything useful. I cannot see internal values
    Federico Tomassetti
    @ftomassetti
    I am looking into providing some actions for the chrome inspector for my language. I am looking at the TruffleInstrument examples but so far nothing is working
    Dimitri Vorona
    @alendit
    Hi guys, I'm playing around with the embedding of LLVM bytecode into Java code. I can execute bytecode file, but I can't find an option to link external shared libraries (something like lli --lib). Any pointers are appreciated!
    Dimitri Vorona
    @alendit
    Ok, found it, just give "llvm.libraries" option to the context (with llvm.libraryPath pointing to where your libraries are)
    Ali Shirvani
    @alishir
    Hi all, I just started to use graal to embed javascript in java
    I want to register a global function that I can call from javascript, but I couldn't do it without registering object from java
    I put "global" member to "js" context and call the "global.doIt" from javascript, but I want to call just "doIt" from script without using global, how should I register "doIt" function?
    Brian Demers
    @bdemers
    My Google-fu has failed me.
    Is there a wiki page on setting up Graalvm with Intellij ?
    Type completion (and compiling) isn't working correctly, for example import org.graalvm.polyglot.Context; shows up as missing (polyglot is red).
    it looks like with previous versions 19.0 this was just a jar that you could just add to the classpath.
    This doesn't cause a problem when building directly (for example with a maven compile)
    Varun Krishnamurthy
    @varunblaze
    Is it possible to built a universal app server based this VM to deploy polygot apps?
    Guido Chari
    @charig
    I'm getting this error when compiling release 19.3 using Java 11.0.5ea in Ubuntu: Error: Hash of jdk.management.jfr (92cf663a8f08f6d9da88393433b117d2163d7efdaa2fa9d8a4b7c2a0070a1540) differs to expected hash (39974049b9f1763730d83ba0dc2422fa2c11b2845f8096d05c3986af5b1c21c0) recorded in java.base
    Adam Kovari
    @akovari
    As of 19.3, I started getting "org.graalvm.polyglot.PolyglotException: java.lang.AssertionError: Invalid library usage. Cached library must be adopted by a RootNode before it is executed.". I'm having hard time find out what that means. It is coming from org.graalvm.truffle/com.oracle.truffle.api.interop.InteropLibrary.assertAdoptedImpl(InteropLibrary.java:1200), and the only documentation I was able to find states "Utility for libraries to require adoption before cached versions of nodes can be executed.". I am not able to find any documentation regarding "adoption". What does it mean to "require adoption"?
    Oleg Šelajev
    @shelajev
    please ask questions on slack - www.graalvm.org/slack-invitation
    Adam Kovari
    @akovari
    ok, thanks
    Yuri Setiantoko
    @zerosign
    hi just want to ask about new language integration, currently, what is the minimal dependencies when creating new language runtime that targets graal that can be interoperable with Java ? Does it really need truffle-api dependencies ?