Pages: 1
  Print  
Author Topic: GM Compatibility Resolver  (Read 1557 times)
Offline (Male) polygone
Posted on: August 14, 2011, 10:54:33 AM

Contributor
Location: England
Joined: Mar 2009
Posts: 803

View Profile
There has been a lot of discussion on this but I have not seen an actual topic in place to get a full spec for it. A compatibility resolver should ideally check for any possibility incompatibilities in a file that may have been inherited from a GM file then offer the user a convenient way to resolve them, so the ease of transition from GM files to ENIGMA is quick and simple.

The questions then that need to be answered are:
  • When should the resolver will be run?
  • What things should the resolver check for?
  • How will the resolver check for them?
  • How will the resolver solve these issues and how should the user interface for it work?
Logged
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
Offline (Male) Josh @ Dreamland
Reply #1 Posted on: August 14, 2011, 11:01:49 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2960

View Profile Email
    When should the resolver will be run?
Every morning at 7:00 and every night at 9:30.
...When they load a GM6 and press ENIGMA->Fix compatibility.

    What things should the resolver check for?
It should have two parts. The first should play on ENIGMA's new syntax checker, which is capable of proposing corrections, such as replacing `something (100001).x = 10` with `something; (100001).x`. The mechanism is incomplete, but has shown ability.
The other half should be entirely regex and should in fact be run first. It'll make replacements such as `};` -> `}` and `;)` -> `)`.

    How will the resolver check for them?
See above. The syntax checker has some capability for correction, and regex can float the rest.

    How will the resolver solve these issues and how should the user interface for it work?
See above.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) polygone
Reply #2 Posted on: August 14, 2011, 11:11:29 AM

Contributor
Location: England
Joined: Mar 2009
Posts: 803

View Profile
OK but will these things be done automatically? Because some users may not work all their code to be automatically changed and want to view what the changes will be and accept them before they are made. This is how most programs handle corrections like this.

Also is just adding an option for 'Fix compatibility' the best that can be done? Because likely some people will not know about it and then when compiling shit will still go wrong. I think there should preferably be some sort of message given to users when either compiling from GM files or loading them, of course if it was just on loading people can still copy/paste incompatible gml into their games or add incompatible gml themselves without realising so there should preferably also be some sort of check in the script editor alongside it.
« Last Edit: August 14, 2011, 11:19:17 AM by polygone » Logged
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
Offline (Male) RetroX
Reply #3 Posted on: August 14, 2011, 11:18:19 AM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
IMO, whenever that you load a GM project instead of an ENIGMA project, it should ask to fix it for compatibility, noting that if you save, the changes can't be reverted.

And in addition, if you try to save as a GM project, add a warning that says that it might not work in GM.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) Josh @ Dreamland
Reply #4 Posted on: August 14, 2011, 11:38:48 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2960

View Profile Email
The regexp replacements will probably never cause issue with GM, since 90% of them add commas (which GM usually ignores) or remove semicolons (which GM always ignores, except after var).

We could have it step through at least the syntax checker's proposals, asking for confirmation on each.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Pages: 1
  Print