Maptool: Create MTScript 2 parser

Created on 14 Feb 2019  Â·  10Comments  Â·  Source: RPTools/maptool

Create a new parser to handle MTScript 2, this will eventually become the default macro script parser for MapTool while MTScript 1 will be deprecated (but remain for some time for compatibility).

feature

All 10 comments

Suggestion for candidate MTScript 2: Jython with Jinja2.
These two will provide a high-performance and widely used templating engine for MT, enjoying wide support even outside the MT community, and conserve MT development resources for other things. Jython is a Python interpreter written in Java and should be pretty straight-forward to integrate into MT.
True, this is not backward-compatible with current MTScript, but well worth the switch, IMHO, as everything current MTScript can do, can be done in Python with Jinja templates.

I thought Jython was essentially a dead tool? It only supports Python 2.7 and last I heard, the devs were not going to be updating it to Python 3.

It would be really cool to be able to use whatever language one wished (Python, Groovy, JavaScript, etc) but the workload for that is pretty high.

It's still Python 2.7 but a recent release has brought it up to Java 11.

I agree that things were looking pretty grim for Jython for a number of years. But with the move to GitHub and the 2.7.2 beta release with slim jars distributed via Maven Central, things are looking up again.
The GitHub move also enables a wider community collaboration even if the current team fizzles.

Everything I've ever seen for Jython seems to indicate that it is no longer
a maintained project. I've used it in the past, and loved it, but I would
not want to bring an unmaintained project as a dependency for MapTool.
Especially when it is already using an obsolete, unsupported version of
python.

On Thu, Nov 28, 2019, 15:36 Mike Henry notifications@github.com wrote:

I agree that things were looking pretty grim for Jython for a number of
years. But with the move to GitHub and the 2.7.2 beta release with slim
jars distributed via Maven Central, things are looking up again.
The GitHub move also enables a wider community collaboration even if the
current team fizzles.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/RPTools/maptool/issues/245?email_source=notifications&email_token=AAHB4M6CVSMCVYJNEMBILRLQWATVBA5CNFSM4GXLKU4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFNM35I#issuecomment-559599093,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAHB4MYO3TK2MBGP3ZJTUCLQWATVBANCNFSM4GXLKU4A
.

Again, for accuracy's sake, Jython had two releases this year. Python 2.7.17 was released 10/19/2019.

Doesn’t matter if Jython has had releases, the main contributor has said they _want_ a Python 3 build, but they said that 8 years ago. And Python 2.7 is end of life in June 2020, so it’s essentially dead (as @kayila says, not a good addition at this time).

There are two things that could change this: if a release came out for Python 3 (and had a few months to settle down), or if MT had a language bindings layer that could support any language.

(The ability to write in Python and generate Java .class files is cool, but ultimately not that useful right now. Maybe later.)

Hmm.. If Python 3 is a requirement then maybe GraalVM's GraalPython could do the trick. Moving to the GraalVM also give's a lot of other opportunities as well for MT2 as a whole, such as support for languages besides Python - e.g. Node and Javascript support for dynamic frames and dialogs, etc.

Seems like more work than "merely" dropping in Jython 2.7, but maybe much more worth it in the long run?

Yes, GraalVM is the current plan.

Just to be clear though, there is no plan to support any language anyone wants though. It's been discussed many times before and we don't want have to support conversion between arbitrary data types in any language people want to use and what ever anyone else is using

Was this page helpful?
0 / 5 - 0 ratings