[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2018-01-25 Thread Jorge Bay (JIRA)

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

Jorge Bay commented on TINKERPOP-1489:
--

Test suite for gremlin-javascript on master branch is passing on TravisCI: 
https://travis-ci.org/apache/tinkerpop/jobs/333214591#L1164-L1170

> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>Reporter: Jorge Bay
>Priority: Major
> Fix For: 3.2.8, 3.3.2
>
>
> 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
(v7.6.3#76005)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2018-01-25 Thread ASF GitHub Bot (JIRA)

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

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

Github user asfgit closed the pull request at:

https://github.com/apache/tinkerpop/pull/695


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>Reporter: Jorge Bay
>Priority: Major
>
> 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
(v7.6.3#76005)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2018-01-24 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
All tests pass with `docker/build.sh -t -n -i`

VOTE +1


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>Reporter: Jorge Bay
>Priority: Major
>
> 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
(v7.6.3#76005)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2018-01-19 Thread ASF GitHub Bot (JIRA)

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

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

Github user jbmusso commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
According to https://github.com/petkaantonov/bluebird/issues/1026, users 
should be able to just patch the global `Promise` object in their application 
with:
```javascript
global.Promise = require("bluebird");
```
I am unsure about other Promise libraries but I believe this approach 
should work as long as they're Promise/A+ standard compliant. Maybe we could 
also give it more thoughts and see for other ways to handle this in a future 
release, but I think it's worth making the code simpler at this point. I also 
feel it can/should be done at the application level.


For Traversal methods, I didn't think about IDEs and you're absolutely 
right about code completion. I think your proposed approach with 
`callOnEmptyTraversal` works best. This makes me think that I'm pretty sure 
people will want typed traversals with TypeScript or FlowType soon (thinking 
about https://github.com/DefinitelyTyped/DefinitelyTyped here for example).




> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>Reporter: Jorge Bay
>Priority: Major
>
> 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
(v7.6.3#76005)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2018-01-19 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
Rebased.


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>Reporter: Jorge Bay
>Priority: Major
>
> 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
(v7.6.3#76005)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2018-01-18 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
I'm posting this to all open PRs of current relevance - this PR needs to be 
rebased against the branch it is targeted against given a broken python 
dependency that was published to pypi a day or so ago. I've pushed a fix on 
tp32 and master at this point and David Brown is working on getting an issue 
raised with the project that initiated the problem. 


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>Reporter: Jorge Bay
>Priority: Major
>
> 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
(v7.6.3#76005)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2018-01-17 Thread ASF GitHub Bot (JIRA)

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

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

Github user jbmusso commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
Finally found some time. Wew.

Well, this PR is very well crafted - well done! My comments are only minor:
* About `utils.toPromise` - if I understand you well, you want a dual 
callback/promise API for most async functions?
* In `graph-traversal.js`, most methods of `GraphTraversalSource` and 
`GraphTraversal` and function attached to `statics` could maybe be dynamically 
created from an array of method names and dynamically added to these 
classes/object. I don’t know what would be the performance implication of this, 
but I don’t think there should be any unless V8 really can’t figure out what’s 
going on when parsing that file. Hopefully it's smart and figures out that the 
class is not changing. That’d lower the file size and help maintainability a 
lot.
* ES6, most likely friendlier for more recent versions of V8 and supported 
by Node.js v4+ (see [Node green](http://node.green)):
* `arguments` is deprecated and is replaced by `...args` for variadic 
functions
* most `function` keywords could be replaced by arrow functions 
(lexical scoping and/or concise syntax). I tend to keep `function` for 
top-level functions, and use fat arrows everywhere even when `this` binding 
isn't needed (ie. callback w/o `this`)
* `array.splice(0)` could be replaced by `const copy = [...original]`
* `func.apply(null, arguments)` could be replaced by `func(...args)` 
when first argument `this` value is indeed meant to be `null`
* `package.json`: `./node_modules/.bin` is added to the `$PATH` by `npm` or 
`yarn`, so we could just use `"test": "mocha test/unit test/integration -t 
5000"`. Yay npm!

I can fork and push 4 distinct commits for this if you want, so this can be 
cherry-picked.

A more major update would be to author in ES6/7/8 and add a transpilation 
step, so all runtime could use code that they can optimize best. Using babel 
with [babel-preset-env](https://www.npmjs.com/package/babel-preset-env) 
combined with 
[postinstall-build](https://www.npmjs.com/package/postinstall-build) is an 
option. This will ensure that latest versions of Node.js use mostly 
non-transpiled code, while older versions automatically transpile what is 
strictly needed. That would make things more performant for latest versions of 
Node.js, since V8 optimizes a lot for new syntax, while still making the GLV 
compatible for older versions of Node.js. The nice thing is that the build step 
is automatically handled at install time by npm, so no extra maven coding 
should be required. I think such approach could be added in future releases and 
is out of scope today.

Also, I'm ok to transfer/donate the "gremlin" package name to Apache 
TinkerPop so this can be published under this name.


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>Reporter: Jorge Bay
>Priority: Major
>
> 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
(v7.6.3#76005)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2018-01-17 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
Thanks @dkuppitz for looking into the maven issue!

I'll rebase it and add a `g:T` deserializer.


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>Reporter: Jorge Bay
>Priority: Major
>
> 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
(v7.6.3#76005)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2018-01-16 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
I've just noticed that there isn't a `g:T` deserializer, I'll add it in the 
next days.


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>Reporter: Jorge Bay
>Priority: Major
>
> 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
(v7.6.3#76005)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2018-01-11 Thread ASF GitHub Bot (JIRA)

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

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

Github user jbmusso commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
Quick update - I plan to check this PR this weekend.


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2018-01-10 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
I'm getting the same failure, but I don't understand where the requirement 
to a newer maven is coming from within `frontend-maven-plugin`.


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2018-01-09 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
gremlin-javascript seems to build ok for me locally, but not on docker. 
claims it needs a maven upgrade to 3.1.0 for the npm plugin to work. do you see 
the same thing @jorgebay ?


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2018-01-08 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/695#discussion_r160120074
  
--- Diff: 
gremlin-javascript/src/main/javascript/gremlin-javascript/package.json ---
@@ -0,0 +1,39 @@
+{
+  "name": "gremlin-javascript",
+  "version": "3.2.7-alpha1",
--- End diff --

I've used `alpha` to avoid messing up in case it was accidentally pushed 
while testing the pull request.
The version suffix is added in the `determineVersion()` method of the 
`generation.groovy` file.


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2018-01-08 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
I've addressed the comments made by @spmallette:

- I've included sections on the `development-environment.asciidoc` file for 
js environment and info for the release managers.
- Moved generation to a groovy file.



> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2018-01-04 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/695#discussion_r159677279
  
--- Diff: gremlin-javascript/pom.xml ---
@@ -0,0 +1,366 @@
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.tinkerpop
+tinkerpop
+3.2.7-SNAPSHOT
+
+gremlin-javascript
+Apache TinkerPop :: Gremlin Javascript
+
+
+org.apache.tinkerpop
+gremlin-core
+${project.version}
+
+
+org.apache.tinkerpop
+tinkergraph-gremlin
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-test
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-server
+${project.version}
+test
+
+
+org.slf4j
+slf4j-log4j12
+test
+
+
+
+false
+${maven.test.skip}
+
${project.parent.basedir}/gremlin-server
+
+
+${basedir}/target
+${project.artifactId}-${project.version}
+
+
+org.apache.maven.plugins
+maven-install-plugin
+
+true
+
+
+
+
+org.codehaus.gmavenplus
+gmavenplus-plugin
+
+
+log4j
+log4j
+1.2.17
+runtime
+
+
+org.apache.tinkerpop
+gremlin-server
+${project.version}
+runtime
+
+
+org.codehaus.groovy
+groovy-ant
+${groovy.version}
+
+
+
+
+generate-javascript
+generate-sources
+
+execute
+
+
+
+ toJsMap.getOrDefault(symbol, symbol) }
+
+def decapitalize = {
+String string = it;
+if (string == null || string.length() == 0) {
+return string;
+}
+def c = string.toCharArray();
+c[0] = Character.toLowerCase(c[0]);
+return new String(c);
+}
+
+def determineVersion = {
+def env = System.getenv()
+def mavenVersion = env.containsKey("TP_RELEASE_VERSION") ? 
env.get("JS_RELEASE_VERSION") : '${project.version}'
+return mavenVersion.replace("-SNAPSHOT", "-alpha1")
+}
+
+def binding = ["enums": CoreImports.getClassImports()
+ .findAll { 
Enum.class.isAssignableFrom(it) }
+ .sort { a, b -> a.getSimpleName() <=> 
b.getSimpleName() },
+   "pmethods": P.class.getMethods().
+ findAll { 
Modifier.isStatic(it.getModifiers()) }.
+ findAll { 
P.class.isAssignableFrom(it.returnType) }.
+ collect { it.name }.
+ unique().
+ sort { a, b -> a 

[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2018-01-04 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/695#discussion_r159676150
  
--- Diff: gremlin-javascript/pom.xml ---
@@ -0,0 +1,366 @@
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.tinkerpop
+tinkerpop
+3.2.7-SNAPSHOT
+
+gremlin-javascript
+Apache TinkerPop :: Gremlin Javascript
+
+
+org.apache.tinkerpop
+gremlin-core
+${project.version}
+
+
+org.apache.tinkerpop
+tinkergraph-gremlin
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-test
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-server
+${project.version}
+test
+
+
+org.slf4j
+slf4j-log4j12
+test
+
+
+
+false
+${maven.test.skip}
+
${project.parent.basedir}/gremlin-server
+
+
+${basedir}/target
+${project.artifactId}-${project.version}
+
+
+org.apache.maven.plugins
+maven-install-plugin
+
+true
+
+
+
+
+org.codehaus.gmavenplus
+gmavenplus-plugin
+
+
+log4j
+log4j
+1.2.17
+runtime
+
+
+org.apache.tinkerpop
+gremlin-server
+${project.version}
+runtime
+
+
+org.codehaus.groovy
+groovy-ant
+${groovy.version}
+
+
+
+
+generate-javascript
+generate-sources
+
+execute
+
+
+
+

[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2018-01-04 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/695#discussion_r159675592
  
--- Diff: gremlin-javascript/pom.xml ---
@@ -0,0 +1,366 @@
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.tinkerpop
+tinkerpop
+3.2.7-SNAPSHOT
--- End diff --

should be 3.2.8-SNAPSHOT at this point


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2018-01-04 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
What a great time of the year to review this pr!  


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-11-30 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
this is excellent.  i agree that we should look to merge this for 
3.2.8/3.3.2. as we hopefully release 3.2.7/3.3.1 we should see gremlin-js come 
into an official state in the first few months of 2018. 


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-11-30 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
I've implemented the support files for the gherkin test suite.
Thanks to the test suite, I've found and fixed some bugs that were part of 
the original implementation.

`mvn clean install -pl :gremlin-javascript -DskipIntegrationTests=false` 
run the mocha based tests and the cucumber-based tests. I've included it on 
TravisCI also.

```
328 scenarios (22 skipped, 306 passed)
```

It's ready to be reviewed!

I would like the JavaScript GLV to be part of the next release cycle (3.2.8 
/ 3.3.2). This GLV have been sidelined several times since the original pull 
request #450 (Oct 2016!)...


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-11-22 Thread Jorge Bay (JIRA)

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

Jorge Bay commented on TINKERPOP-1489:
--

I'm adding support for the Gherkin-based test suite in js.

> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-09-25 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
Just a note for those following this ticket's progress. I'm in the process 
of doing TINKERPOP-1784 which will add a language agnostic test suite using 
gherkin defined feature files. That should allow us to test all GLVs in a nice 
way. 


> Provide a Javascript Gremlin Language Variant
> -
>
> Key: TINKERPOP-1489
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
> Project: TinkerPop
>  Issue Type: Improvement
>  Components: javascript
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-09-08 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
I mostly cared about nashorn to achieve testing as we did in python. I 
sense that most folks won't want to run on nashorn itself, so perhaps direct 
support of nashorn doesn't really matter especially if we come up with a better 
way to test. I'd rather not complicate gremlin-javascript with multiple 
runtimes - GLVs require enough effort to support as it is.  

btw, i felt like this lib got me pretty far in making npm work on nashorn:

https://github.com/nodyn/jvm-npm

wasn't too bad, but got tripped up on the pathing as it didn't seem to want 
to run in a context that didn't have the js files in the same root directory as 
where you were running the scriptengine from. I couldn't quite figure out how 
to make that work. Again, it probably doesn't make sense to chase that angle 
anymore though. I'd rather just get testing figured out for GLVs in general.

> We can define a set of given-when-then statements (in doc), which we can 
make sure each GLV implements in actual tests.

if we can write them in a doc, then it would seem we could write them as 
cucumber tests ( https://cucumber.io/ ) that could actually be executed 
somehow. that's been the general plan i've had anyway. if you have any other 
ideas, please let me know - i'll probably start playing around with this idea 
today or get started on it fresh next week.


> 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
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-09-08 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
I've removed support for Nashorn as part of #626 (see first comment). 
JavaScript engines don't provide a standard way to deal with and import 
modules, so supporting with multiple runtimes is usually a pain (unlike other 
languages like Python that has the `import` system built-in).

If to support `GremlinJavaScriptScriptEngine` we need to support Nashorn on 
the GLV, we should try to split the GLV and the JS script engine in 2 separate 
tickets and try to tackle those separately.

Having a JavaScript GLV would enable users to write their traversals in js, 
making it easier for users from the js community to use Gremlin. On the other 
side, supporting js lambdas is a more marginal use case.

> I think the need to figure out the language agnostic way to test GLVs is 
becoming more important

I think testing a GLV (bytecode generation, websocket connection, type 
mapping, ...) can't be implemented in a runtime agnostic way because the whole 
concepts are defined by the runtime. I think we can define a set of behaviours 
that the GLV must adhere. We can define a set of given-when-then statements (in 
doc), which we can make sure each GLV implements in actual tests.

On the other hand, I think testing a script engine can be generalized into 
a common suite  (like ScriptEngineLambdaTest) plus specialized behaviour tests 
per language. 


> 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
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-09-07 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
I think the need to figure out the language agnostic way to test GLVs is 
becoming more important.  I was pretty close to getting nashorn to execute 
gremlin-javascript natively, but there's weird pathing issue and npm 
integration issues that just aren't making it easy (possible). I tried to hack 
my way around the pathing problems and while i was making progress it was just 
getting ugly. I'll need to think about the language agnostic approach a bit 
before I worry about trying to go any further in this direction.


> 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
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-09-06 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
Great! It would be really nice to have a working 
`GremlinJavaScriptScriptEngine`!


> 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
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-09-05 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
I rebased this today and added the nashorn scriptengine implementation for 
`GremlinScriptEngine`. I'd like to get us running tests with js the way we do 
with python since it's jsr223 compliant.  I guess I'll keep working toward that 
goal this week - i'd propose to hold-off on merging this until that is done. 


> 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
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-09-01 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
Hi @jorgebay - sorry - i just haven't had time to focus on this yet. I'll 
try to dig into it next week. Thanks for jamming on this and getting it ready 
for merging. 


> 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
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-08-29 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/695
  
VOTE +1

`mvn clean install -DskipIntegrationTests=false` passes.

API summary:
- All methods are generated using groovy template files.
- Naming conventions for js are very similar to java, so no significant 
changes there from the java one (except `in() and `from()` which are reserved 
keywords).
- `toList()` and `next()` are used, in the same way as the rest of the 
GLVs, except that it causes async execution (no blocking API is provided, as it 
won't be usable in Node.js): `next()` returns an async iterator and `toList()` 
a promise that gets fulfilled with an `Array`.

Usage samples: 

```js
const vertices = await g.V().toList();
```

```js
for await (const vertex of g.V()) {
  console.log(vertex.label);
}
```



> 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
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-08-17 Thread ASF GitHub Bot (JIRA)

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

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

GitHub user jorgebay opened a pull request:

https://github.com/apache/tinkerpop/pull/695

TINKERPOP-1489 JavaScript GLV

https://issues.apache.org/jira/browse/TINKERPOP-1489

Submitting the JavaScript for review to merge into tp32 after 3.2.6 code 
freeze and release.

Changes since #626:
- Rebased.
- Adapted code generation to use groovy templates (similar to #608 for 
Python).

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apache/tinkerpop TINKERPOP-1489

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/tinkerpop/pull/695.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #695


commit fbeae06cad99e4d3f5ce1f3f3fbe02641cb783d1
Author: Jorge Bay Gondra 
Date:   2016-10-05T14:14:46Z

Javascript GLV

commit ba0f0ac56c936ba848f7bbe460ae9772128f3ae1
Author: Jorge Bay Gondra 
Date:   2016-10-07T10:01:30Z

Export enums and fix TraversalStrategies#applyStrategies()

commit 673040d5d50e4619c375b1cbcc59e65c344a98c0
Author: Jorge Bay Gondra 
Date:   2016-10-18T14:22:23Z

Graph, traversalStrategies and graph as Traversal properties

Expose those properties as in the Python GLV and the Java implementation. 
Previously, those properties where exposed using the private notation (ie: 
_graph).

commit 29f43b0344116d05e4d9b38a85acc73c203642a8
Author: Jorge Bay Gondra 
Date:   2016-10-19T14:03:45Z

Filter out __() static method

commit 3769fdd11a635894a53de53b16f32d164ca38c0d
Author: Jorge Bay Gondra 
Date:   2016-11-03T13:34:28Z

Use null as empty result

commit 14c0209a514993ba706c30daccc3ea09527c014a
Author: Jorge Bay Gondra 
Date:   2016-11-16T12:41:46Z

Parse Edge and VertexProperty properties

To follow the decision around TINKERPOP-1474 for the GLV to parse 
properties.

commit eab70fdc0433ba540fc3a71afd4e651e43d92875
Author: Stephen Mallette 
Date:   2017-05-18T16:47:48Z

TINKERPOP-1489 Cleaned up pom

Removed some weird characters in license and bumped version to 
3.2.5-SNAPSHOT

commit fdcc5affc37fae38c695439f2e973d9fcf436acb
Author: Stephen Mallette 
Date:   2017-05-18T16:48:27Z

TINKERPOP-1489 Regenerated traversal.js

which added Pick.

commit dfcb46f859c6b66e9a5f56a210a8148147de762e
Author: Jorge Bay Gondra 
Date:   2017-06-06T13:05:14Z

Update Javascript GLV

Address feedback and provide maven integration:
- Reorganize gremlin-javascript into node.js project
- Simplify javascript code generators
- Generate package.json to match project version
- Introduce Promise factory for third-party promise library integration 
(ie: bluebird)
- Use toList() and next() traversal methods
- Include Remote connection implementation
- Fix enum casing
- Use Maven nodejs plugin
- .gitignore and .npmignore at gremlin-javascript level
- Run integration tests using a gremlin-server instance
- Add gremlin-javascript doc in gremlin-variants.asciidoc

commit 887d3ae9208eb62d5e9940d0b5976abceddd7271
Author: Jorge Bay Gondra 
Date:   2017-08-17T11:35:47Z

Bump to 3.2.6 in gremlin-javascript

commit 043be33f5ca878c94b6ad551b55bd9d280706024
Author: Jorge Bay Gondra 
Date:   2017-08-17T15:28:32Z

Js GLV: Use Groovy templates for generation




> 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
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-08-17 Thread Jorge Bay (JIRA)

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

Jorge Bay commented on TINKERPOP-1489:
--

I see that the changes applied to gremlin-python generation in TINKERPOP-1618 
(then applied to Gremlin.Net) have not been applied in this GLV, I'll do that 
before submitting a pull request.

> 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
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-08-17 Thread Jorge Bay (JIRA)

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

Jorge Bay commented on TINKERPOP-1489:
--

I would like to start moving this forward. I'll rebase this against tp32 and 
submit a pull request for a final review.

> 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
>Affects Versions: 3.2.5
>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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-07-18 Thread stephen mallette (JIRA)

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

stephen mallette commented on TINKERPOP-1489:
-

Just rebased on tp32 (now that gremlin-dotnet has merged) and force pushed.. 
going to kill the tp32-glv branch.

> 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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-06-19 Thread stephen mallette (JIRA)

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

stephen mallette commented on TINKERPOP-1489:
-

About to rebase tp32-glv and this branch on the latest from tp32 now that the 
release is done. Should be in shortly.

> 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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-06-19 Thread Jorge Bay (JIRA)

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

Jorge Bay commented on TINKERPOP-1489:
--

Nice! I see it on npm under the url: https://www.npmjs.com/org/tinkerpop

To grant access to the gremlin-javascript package, I need a team to be created 
under tinkerpop, like "developers" (with just the admin user as part of that 
team should be enough), maybe there is already a team created but I can not see 
it. That way, I could [grant access to the org's 
team|https://www.npmjs.com/docs/orgs/managing-package-access.html#managing-package-access]:

{code}
npm access grant read-write tinkerpop:developers
{code}

Afterwards, you can revoke access to my user.

> 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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-06-17 Thread stephen mallette (JIRA)

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

stephen mallette commented on TINKERPOP-1489:
-

I've created a "tinkerpop" organization in npm in preparation for future 
releases of this GLV. 

> 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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-06-15 Thread ASF GitHub Bot (JIRA)

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

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

Github user asfgit closed the pull request at:

https://github.com/apache/tinkerpop/pull/626


> 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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-06-15 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/626
  
Merged - very cool. Tests work wonderfully. 


> 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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-06-13 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/626
  
You can run the Node.js tests using `mvn clean install 
-DskipIntegrationTests=false`


> 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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-06-13 Thread Jorge Bay (JIRA)

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

Jorge Bay commented on TINKERPOP-1489:
--

I've forgot to add the JIRA ticket key in the pull request title and it messed 
the JIRA-GitHub integration up.
Anyway...here it is: https://github.com/apache/tinkerpop/pull/626

> 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.4.14#64029)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-06-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TINKERPOP-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-05-26 Thread stephen mallette (JIRA)

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

stephen mallette commented on TINKERPOP-1489:
-

Just rebased this on tp32-glv which was also just rebased on tp32.

> 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)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-05-18 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/450
  
sorry - changed this up. i created TINKERPOP-1489 branch for js work and 
TINKERPOP-1552 for c# work. both branches extend from tp32-glv. in this way, 
the GLVs are not coupled together to be forced to be merged together. they can 
be developed at their own pace. note that tp32-glv can house changes useful to 
both of these GLVs (stuff like the revised testing framework).


> 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)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-05-18 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/450
  
ok thanks!
I hope I'll get some time soon to work on the JavaScript GLV to leverage 
the new async execution introduced in TINKERPOP-1490.


> 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)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-05-18 Thread ASF GitHub Bot (JIRA)

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

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

Github user asfgit closed the pull request at:

https://github.com/apache/tinkerpop/pull/450


> 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)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2017-05-18 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/450
  
I've cherry picked this PR to this branch:

https://github.com/apache/tinkerpop/tree/tp32-glv

and made a commit or two to get it to compile against the tp32 branch. It's 
in there with #600 as well. This will allow others to more easily collaborate 
on the GLVs so that we can actually get these ready for merge to the release 
branches. We'll keep the JIRA issue open until tp32-glv is solid. In the mean 
time I think we can close this PR.


> 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)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2016-11-11 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/450
  
> Note that there is a proposal for adding async iterator to JavaScript.

Nice! I wasn't aware of that, I really like the syntax!
I think the destiny of `next()` for async ops is also linked to 
TINKERPOP-1490, how state is managed and implemented: there are 2 possible 
routes for async iteration:
- We asynchronously submit the query on the first iteration and for the 
following iterations it just goes through the buffered results on the submitted 
query.
- We implement some kind of server side paging.

I think we can continue discussing this on TINKERPOP-1490.

In any case, I agree that the best approach for Javascript would be to use 
the async iterator protocol like you propose +1.

> [...] we could swap `var` for `let` and `const` unless we want to target 
earlier versions of Java8

I targeted EcmaScript 5.1 because any modern js runtime supports it, 
including browsers. Making the js GLV portable can be an useful feature.
Maybe we can revisit this topic when Nashorn has full ES2015 support (and 
probably more and more old runtimes will be deprecated).



> 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.4#6332)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2016-10-31 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/450
  
I can take a shot at TINKERPOP-1490. I think we have community consensus on 
the approach if I remember correctly. I will work on it this week.


> 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.4#6332)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2016-10-31 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/450
  
I've added some fixes during the past weeks.

I'll try to summarize the open issues with this patch to try to unblock it:

A) Currently, the javascript GLV exposes `list()` instead of `toList()`. As 
it takes a callback as a parameter, having the method start with a `toX()` 
didn't feel natural to me.
Maybe it makes more sense to follow the existing naming (`toList()`). 
Exposing something uniform across all GLVs, whenever possible, can be more 
important (in the same way as Python GLV used mixedCase to be more close to 
gremlin).
The same applies to `next()`. To avoid confusions, we could document that 
`traversal.next()` is not an iterator and returns the first result.

B) Promise-based API.
We can include a promise-based method overloads when supported by the js 
engine, like [proposed above][1]. We can do it now, before merging it or as a 
next step after merging.

Can we try to reach a conclusion on these issues?
After that I can send a draft documentation for `gremlin-variants.asciidoc`.

I've been using the Javascript GLV for a while now and it feels good to 
have code completion for Traversal methods on the IDE!

[1]: https://github.com/apache/tinkerpop/pull/450#issuecomment-252911095


> 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.4#6332)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2016-10-08 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/450
  
ha +1 for a promise style api - i just wrote the exact same suggestion for 
the java side:


https://issues.apache.org/jira/browse/TINKERPOP-1490?focusedCommentId=15557840=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15557840


> 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.4#6332)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2016-10-06 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/450#discussion_r82168010
  
--- Diff: gremlin-javascript/pom.xml ---
@@ -0,0 +1,132 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.tinkerpop
+tinkerpop
+3.2.3-SNAPSHOT
+
+gremlin-javascript
+Apache TinkerPop :: Gremlin Javascript
+
+
+org.apache.tinkerpop
+gremlin-core
+${project.version}
+
+
+org.codehaus.groovy
+groovy
+${groovy.version}
+indy
+
+
+org.apache.tinkerpop
+tinkergraph-gremlin
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-test
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-server
+${project.version}
+test
+
+
+org.slf4j
+slf4j-log4j12
+${slf4j.version}
+test
+
+
+
+
+false
+${maven.test.skip}
+
${project.parent.basedir}/gremlin-server
+
+
+${basedir}/target
+${project.artifactId}-${project.version}
+
+
+org.codehaus.mojo
+exec-maven-plugin
+1.2.1
+
+
+generate-javascript
+generate-test-resources
+
+java
+
+
+
org.apache.tinkerpop.gremlin.javascript.GenerateGremlinJavascript
+
+
${basedir}/src/main/javascript/gremlin-javascript/process/traversal.js
+
${basedir}/src/main/javascript/gremlin-javascript/process/graph-traversal.js
+
+
+
+
+js-tests
--- End diff --

:) mocha is nice: https://mochajs.org/


> 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.4#6332)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2016-10-06 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/450#discussion_r82163673
  
--- Diff: gremlin-javascript/pom.xml ---
@@ -0,0 +1,132 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.tinkerpop
+tinkerpop
+3.2.3-SNAPSHOT
+
+gremlin-javascript
+Apache TinkerPop :: Gremlin Javascript
+
+
+org.apache.tinkerpop
+gremlin-core
+${project.version}
+
+
+org.codehaus.groovy
+groovy
+${groovy.version}
+indy
+
+
+org.apache.tinkerpop
+tinkergraph-gremlin
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-test
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-server
+${project.version}
+test
+
+
+org.slf4j
+slf4j-log4j12
+${slf4j.version}
+test
+
+
+
+
+false
+${maven.test.skip}
+
${project.parent.basedir}/gremlin-server
+
+
+${basedir}/target
+${project.artifactId}-${project.version}
+
+
+org.codehaus.mojo
+exec-maven-plugin
+1.2.1
+
+
+generate-javascript
+generate-test-resources
+
+java
+
+
+
org.apache.tinkerpop.gremlin.javascript.GenerateGremlinJavascript
+
+
${basedir}/src/main/javascript/gremlin-javascript/process/traversal.js
+
${basedir}/src/main/javascript/gremlin-javascript/process/graph-traversal.js
+
+
+
+
+js-tests
--- End diff --

It uses JDK `jjs` tool to run the test contained in the 3 test files below 
(see `arguments`).
Currently it does not produce any output if succeeds, but it fails the 
build if any test fail with the stack trace and error. 


> 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.4#6332)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2016-10-06 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/450#discussion_r82161973
  
--- Diff: gremlin-javascript/pom.xml ---
@@ -0,0 +1,132 @@
+
+
+http://maven.apache.org/POM/4.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+4.0.0
+
+org.apache.tinkerpop
+tinkerpop
+3.2.3-SNAPSHOT
+
+gremlin-javascript
+Apache TinkerPop :: Gremlin Javascript
+
+
+org.apache.tinkerpop
+gremlin-core
+${project.version}
+
+
+org.codehaus.groovy
+groovy
+${groovy.version}
+indy
+
+
+org.apache.tinkerpop
+tinkergraph-gremlin
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-test
+${project.version}
+test
+
+
+org.apache.tinkerpop
+gremlin-server
+${project.version}
+test
+
+
+org.slf4j
+slf4j-log4j12
+${slf4j.version}
+test
+
+
+
+
+false
+${maven.test.skip}
+
${project.parent.basedir}/gremlin-server
+
+
+${basedir}/target
+${project.artifactId}-${project.version}
+
+
+org.codehaus.mojo
+exec-maven-plugin
+1.2.1
+
+
+generate-javascript
+generate-test-resources
+
+java
+
+
+
org.apache.tinkerpop.gremlin.javascript.GenerateGremlinJavascript
+
+
${basedir}/src/main/javascript/gremlin-javascript/process/traversal.js
+
${basedir}/src/main/javascript/gremlin-javascript/process/graph-traversal.js
+
+
+
+
+js-tests
--- End diff --

@jorgebay can you explain the nature of this test execution? Does maven 
fail the build if these test fail? what kind of output does it produce? 


> 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.4#6332)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2016-10-06 Thread ASF GitHub Bot (JIRA)

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

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

Github user jorgebay commented on the issue:

https://github.com/apache/tinkerpop/pull/450
  
1: I mentioned the difficulty of delivering a `RemoteConnection` 
implementation inside the TinkerPop repository above.
2: I commented in TINKERPOP-1490 that `async` is a reserved keyword, in 
this case, in Javascript. We could use for the Javascript GLV the method names 
that comes from the discussion in that ticket.
3: I will need more time and guidance to deliver 
GremlinJavascriptScriptEngine. Things like 
`org.apache.tinkerpop.gremlin.util['function'].Lambda.ZeroArgLambda` are 
failing under nashorn because ZeroArgLambda is being identified as a package 
but not as a class (js constructor).
4: I can send some notes and code samples your way.


> 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.4#6332)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2016-10-05 Thread ASF GitHub Bot (JIRA)

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

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

Github user okram commented on the issue:

https://github.com/apache/tinkerpop/pull/450
  
I just created this ticket: 
https://issues.apache.org/jira/browse/TINKERPOP-1490

@jorgebay -- can you review that ticket in terms of the `one()`, `list()` 
callback model you are using here to see if we can get rid of `one()` and 
`list()` and supplant it with an `async()`. 


> 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.4#6332)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2016-10-05 Thread ASF GitHub Bot (JIRA)

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

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

Github user okram commented on the issue:

https://github.com/apache/tinkerpop/pull/450
  
I did a preliminary review of the code and it looks good. Primarily because 
it mimics the structure and content of Gremlin-Python. Ensuring consistency 
between all variants is important from a maintainability standpoint.

Here are some concerns:

1. I think we need a `RemoteConnection` implementation. From what I'm 
reading, it seems we don't have one.
2. @mbroecheler was pushing for async methods in Gremlin-Java (thus, 
"Gremlin"). The idea was to have `Future 
Traversal.async(Function)`. Thus, to do a "future" `toList()` in 
Java, you would do `result = g.V().out().async(Traversal::toList)`. I think we 
should do this in Gremlin-Java and then have this same "callback" model used by 
Gremlin-JS and thus, not have `one()` and `list()` with callbacks. Does that 
make sense?
3. I don't see the Gremlin `ProcessTestSuite` being run. We will need 
`Providers` to do so. Please see how this works in Gremlin-Python. 
https://github.com/apache/tinkerpop/tree/master/gremlin-python/src/test/java/org/apache/tinkerpop/gremlin/python/jsr223.
4. We will need documentation in `gremlin-variants.asciidoc`.

I suspect we will want to merge this first into an Apache TinkerPop branch 
and can nit pick things as I see them before an ultimate merge into `master/`. 
For instance, I can do 3 and 4 above if perhaps @jorgebay provides some notes 
so I get the important aspects in the documentation.


> 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.4#6332)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2016-10-05 Thread ASF GitHub Bot (JIRA)

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

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

Github user spmallette commented on the issue:

https://github.com/apache/tinkerpop/pull/450
  
@jorgebay thanks for this. I have a feeling it will take a some time to 
review this work and get community input. hopefully @jbmusso will have time to 
get involved.

in the mean time could you please rename your pull request to include the 
JIRA number as the prefix - something like: "TINKERPOP-1489 Javascript GLV" 
Apache automation will then be able to do it's work with JIRA.


> 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.4#6332)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2016-10-05 Thread ASF GitHub Bot (JIRA)

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

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

GitHub user jorgebay opened a pull request:

https://github.com/apache/tinkerpop/pull/450

Javascript GLV

For [TINKERPOP-1489](https://issues.apache.org/jira/browse/TINKERPOP-1489).
- Should work with any ES5 engine that supports CommonJs: tested with 
Nashorn and Node.js.
- Maintained the same structure as the Python GLV.
- Used groovy classes to generate all the traversal methods.
- Javascript tests run in the test maven phase (JS test names are not 
printed though...)
- Javascript engines are designed to run user code in a single thread, IO 
libraries (like libuv on Node.js) are async only. With that in mind, there 
isn't sync IO methods exposed in the Traversal (ie: `#next()`, `#toList()`). 
Instead I exposed `#list()` and `one()` that take a callback as a parameter:

```javascript
g.V().hasLabel('software').list((err, vertices) => { 
  vertices.forEach(console.log);
});

g.V().has('name','marko').one((err, vertex) => { 
  console.log(vertex.label); // person
});
```

This patch is focused in providing a Javascript GLV that would be useful 
for most runtimes, most notably Node.js. It implements a Graph, GraphTraversal 
and GraphTraversalSource, along with GraphSONReader and GraphSONWriter.
It includes base classes for RemoteConnection, RemoteTraversal and 
RemoteStrategy, but doesn't include DriverRemoteConnection implementation as 
Javascript engines does not provide a standard IO library.

As a first step, the idea is to include in the TinkerPop project the 
specification for the language variant, the serialization functionality and the 
execution methods (currently named `list()` and `one()`).

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jorgebay/tinkerpop javascript-glv

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/tinkerpop/pull/450.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #450


commit 5f7a670bceedd0c65f5c1b8e00a06f4d8cdac912
Author: Jorge Bay Gondra 
Date:   2016-10-05T14:14:46Z

Javascript GLV




> 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.4#6332)


[jira] [Commented] (TINKERPOP-1489) Provide a Javascript Gremlin Language Variant

2016-10-05 Thread Jorge Bay (JIRA)

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

Jorge Bay commented on TINKERPOP-1489:
--

I'll submit a pull request shortly for a Javascript GLV, using the same 
approach as the Python GLV (generating methods in groovy; similar structure; 
...) 

> 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.4#6332)