[ 
https://issues.apache.org/jira/browse/TINKERPOP-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16035459#comment-16035459
 ] 

ASF GitHub Bot commented on TINKERPOP-1489:
-------------------------------------------

Github user jbmusso commented on the issue:

    https://github.com/apache/tinkerpop/pull/450
  
    @jorgebay I'd be happy to help with the work on this. I recently [added 
partial JavaScript-GLV support to 
gremlin-javascript](https://github.com/jbmusso/gremlin-javascript/tree/3bdb154f41c08d5adfc65e83250eee6d57a5cab5#experimental-javascript-gremlin-language-variant).
 The library generates Groovy strings using 
[zer](https://github.com/jbmusso/zer) which is now stable/tested enough that I 
decided to add it as a dependency to the client. I'll soon tinker with gremlin 
bytecode support in zer and I think support for lambdas is easy with 
`Function.prototype.toString()` (ref: 
[mdn](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString)).
    
    We could maybe add Babel dependency with nashorn/ES5 presets, then 
parse/transpile lambdas at runtime so people can use ES2015/2016+ lambdas in 
their Node.js/browsers environments (though transpilation performance could be 
an issue, but client-side caching/memoization could certainly help).


> Provide a Javascript Gremlin Language Variant
> ---------------------------------------------
>
>                 Key: TINKERPOP-1489
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: language-variant
>            Reporter: Jorge Bay
>
> It would be nice to have a Javascript Gremlin Language Variant that could 
> work with any ES5 runtime, specially the ones that support 
> [CommonJs|http://requirejs.org/docs/commonjs.html], like Node.js.
> Nashorn, the engine shipped with JDK 8+, does not implement CommonJs but 
> provides [additional 
> extensions|https://wiki.openjdk.java.net/display/Nashorn/Nashorn+extensions] 
> making modular JavaScript possible. Nashorn should be supported in order to 
> run glv tests under the same infrastructure (JDK8).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to