Yes, I think it makes sense to continue with the general discussion in the
meantime:) It could also help make sure that I don't develop Gremlint in a
direction which will impose unnecessary restrictions in the future. I've
included some of my thoughts to your questions below:

1.
Gremlint is currently an installable JavaScript package, so for all
JavaScript projects using npm it can already be installed and called as a
function. I imagine it would also be easy to set up a Gremlint-as-a-service
API with Node.js to work with non-JavaScript projects.

2 & 4.
I think Gremlint as a translator could make sense. Currently it essentially
just translates Groovy-Gremlin to an (almost) language-agnostic syntax
tree, adds formatting information based on a config object and then
recreates a Groovy Gremlin query. But it could just as well recreate the
query as a JavaScript or Python Gremlin query. I think it would be
relatively easy to make Gremlint translate from any Groovy-esque Gremlin
implementation to another Gremlin implementation by simply replacing the
function which is currently used to recreate the query from the formatted
syntax tree.

3.
I've already tried to keep Gremlint a bit language agnostic by leaving all
non-Gremlin code around and between queries unaltered. In most cases, any
code Gremlint doesn't understand inside a query is just handled as if it
was a single word, and left as is. I'm not too familiar with
language-specific differences between different Gremlin-implementations,
but it is my impression that it should already handle JavaScript Gremlin
quite well. For .NET I assume I would need to add support for more than
just single-quote strings (this would come in handy for all languages), and
for Python Gremlin it would need to handle backslashes between each new
line of the query. Gremlin for Clojure would probably be more challenging
(fun fact: The Gremlint parser is actually based on a Clojure parser I
wrote earlier).

Food for thought:
One thing I've been a bit back and forth on is whether it would be
preferable if Gremlint is super-robust and accepts and formats any language
you pass it with minimal configuration, or if it should only accept one
Gremlin implementation "at once" and require the user to manually specify
the language of their input.

fre. 20. nov. 2020 kl. 14:53 skrev Stephen Mallette <[email protected]>:

> Thanks for another update. Nice to know you're still moving along with
> improvements there. Perhaps we could continue with general discussions
> about Gremlint while we wait for legal issues to settle? For instance, one
> of the things on my mind is how to make gremlint functionality as available
> as possible to the various use cases we say each day. Obviously, it
> currently handles the most common one of providing a place to paste some
> Gremlin in a UI and get back formatted Gremlin. What about other things:
>
> 1. there are many Gremlin "development environments (e.g. gremlify, Gremlin
> Console, notebooks, etc) - how can gremlint be available to them?
> 2. we are working on Gremlin translators in all languages - which might
> actually allow us to generate documentation using a single source for
> Gremlin with translation to all the others. But, that can only work if we
> have something like Gremlint to format those translations. How would
> gremlint fit in there?
> 3. gremlint (i think) is generally good at formatting the Groovy/Java
> syntax - what will it entail to make it so that it's capable of dealing
> with other languages like Python, .NET etc.
> 4. thinking more about 2, I wonder how gremlint fits with translators. the
> two seem quite related to me, but i'm not sure what that means. it seems
> cool if you could take a bit of Gremlin Groovy, paste it into gremlint then
> translate/lint to Gremlin Javascript.
>
> I'm just posing questions here for us to discuss a bit. Answers are great
> but more questions would also be welcome if anyone has any.
>
>
>
> On Fri, Nov 20, 2020 at 2:11 AM Øyvind Sæbø <[email protected]> wrote:
>
> > Hello everyone and happy November.
> >
> > I requested another update on when the Gremlint paperwork process would
> be
> > done yesterday. It seems like it has been pushed back once again, the new
> > estimate being two weeks from now.
> >
> > I figured I should give some context on why this is taking longer than
> > expected. After all, filling out the ICLA and CCLA shouldn't take more
> than
> > a day. Since I developed Gremlint in my spare time, and we want to donate
> > it on behalf of Ardoq, where I work, we have an internal IP transfer
> > process as well, and this is what has been dragging out.
> >
> > In the meantime I've been trying to make the best of the situation by
> > working my way through the remaining Gremlint issues on GitHub. As part
> of
> > that I've rewritten Gremlint <https://github.com/OyvindSabo/gremlint> to
> > be
> > a separate package which can be imported in the Gremlint.com website,
> which
> > now resides in a different repository
> > <https://github.com/OyvindSabo/gremlint.com>.
> >
> > Let's hope I can report on more progress next time.
> >
>

Reply via email to