|
Josh @ Dreamland
|
|
Reply #46 Posted on: March 15, 2010, 08:59:34 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Didn't want to bring up that difference in example code of another difference.
|
|
|
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
|
|
|
The 11th plague of Egypt
|
|
Reply #47 Posted on: March 16, 2010, 04:53:00 am |
|
|
Joined: Dec 2009
Posts: 274
|
Doesn't really matter if it should or shouldn't be used - someone uses it in some game, and they expect to convert said game directly to C++ with Enigma, which is a fairly reasonable expectation.
Directly converting GML to C++ is impossible. They should not expect it. IMHO we are just trying to make C++ and GML live togheter.
|
|
« Last Edit: March 16, 2010, 04:56:28 am by The 11th plague of Egypt »
|
Logged
|
|
|
|
|
polygone
|
|
Reply #49 Posted on: March 16, 2010, 10:49:41 am |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
I completely agree with keeping everything compatible with gml but something like that is not a normal scenario, it's irrelevant, noone uses it and noone is supposed to use it.
It's like actively making Enigma return the previous script return value for a non-returning script like GM does. I'm not sure whether it does or not but actively making it do so would be pointless and a hindrance if that functionality is not desired in Enigma. Though it is a feature in GM and someone may perhaps use it stupidly the scenario is just not worth considering.
Will Enigma also include any bugs within GM so it is compatible?
|
|
« Last Edit: March 16, 2010, 10:58:02 am by polygone »
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
Game_boy
|
|
Reply #50 Posted on: March 16, 2010, 11:20:30 am |
|
|
Joined: Apr 2008
Posts: 228
|
I completely agree with keeping everything compatible with gml but something like that is not a normal scenario, it's irrelevant, noone uses it and noone is supposed to use it.
It's like actively making Enigma return the previous script return value for a non-returning script like GM does. I'm not sure whether it does or not but actively making it do so would be pointless and a hindrance if that functionality is not desired in Enigma. Though it is a feature in GM and someone may perhaps use it stupidly the scenario is just not worth considering.
Will Enigma also include any bugs within GM so it is compatible?
@last part - If they affect visible functionality in any way, I hope so. If actively returning a script value changed any behaviour I'd expect that too. But I doubt it does, even in the worst-written GM code, so it can be removed. I know it's not a 'normal' scenario, but which is easier - convincing all possible GM -> Enigma converts to code properly and recode all their old stuff properly, or just make Enigma work with it?
|
|
|
Logged
|
|
|
|
polygone
|
|
Reply #51 Posted on: March 16, 2010, 11:52:29 am |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
Replicating bugs would be retarded. I believe all the bugs left in GM7 occur in highly rare scenarios and actually replicating some of them (especially the ones regarding instance_deactivation) it would be an absolute nightmare to the verge of impossible to replicate them. The only real incompatibilities would be that any written workarounds for the bugs might not work and to replicate bugs for the program so any written workarounds are still compatible is just about one of the most retarded concepts I can possibly conceive. :/ I know it's not a 'normal' scenario, but which is easier - convincing all possible GM -> Enigma converts to code properly and recode all their old stuff properly, or just make Enigma work with it? You don't need to convince anyone as it's not going to affect anyone.
|
|
« Last Edit: March 16, 2010, 12:02:27 pm by polygone »
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
Josh @ Dreamland
|
|
Reply #52 Posted on: March 16, 2010, 12:33:34 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Directly converting GML to C++ is impossible. They should not expect it.
IMHO we are just trying to make C++ and GML live togheter. Call me a philosopher, but I'm not sure what you mean by "impossible" or "directly converting." ENIGMA's purpose is to convert GML to C++. I started the project because I noticed enough similarities in syntax that doing so would be relatively easy, in fact. Some things will obviously never work in plain C++, the first of those being with() {}. @miky as well: Including a C++ compiler is certainly unnecessary for implementing execute_string() for backwards compatibility with GM, and is not really necessary for interpreting most C++ features, either. Yes, there are projects that can interpret C++, but I'm reasonably certain such projects are bloody massive. A smaller alternative is to do a bit more parsing and pass strings to Google V8 (A damn nice JavaScript JIT compiler). With V8, I can link in globals at runtime, and write a variable accessor class called Cthis, which will be appended before all locals (or all variables in general). So, the user's code will be for example, x = 0; y = 0;. It'll be passed to V8 as Cthis.x = 0; Cthis.y = 0;. V8 will call Cthis's accessor for "x," which is a C++ function I register. It'll behave just like GM's interpreter, only, sad as it may be, probably faster. The work for me would be so small as to be laughable. a = 0; var a; a = 3; Would work just like GM, because after they declare var, I just remove it and stop adding Cthis before the variable. This can be done entirely linearly, and without buffer resize as I can just space out "var" (as in, replace it with " "). The only things that may require a new buffer is adding semicolons to the code, which isn't always necessary in JavaScript, either; only when no newline is given. Hell, I might even be able to edit V8 to not require newline either, if I really wanted. Though, that's quite unlikely. Did I mention it's JIT compiled? As for scripts returning the value of the last-called script... Heh, that's kind of neat, I was unaware it did that; that's usually a behavior defined in interpreted language. I can't replicate that, as far as I know, simply by not providing a return value in lieu of the user's... I could if the last reference were left in EAX, which is unlikely. I don't think I'll be replicating any useless GM bugs.
|
|
|
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
|
|
|
|
Josh @ Dreamland
|
|
Reply #54 Posted on: March 16, 2010, 01:13:42 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Would be too big and slow to include GCC with everything. I'll need to write a fifty-some line parser to make GML look like JavaScript, then presto.
|
|
|
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
|
|
|
The 11th plague of Egypt
|
|
Reply #55 Posted on: March 16, 2010, 02:14:18 pm |
|
|
Joined: Dec 2009
Posts: 274
|
Directly converting GML to C++ is impossible. They should not expect it.
IMHO we are just trying to make C++ and GML live togheter. Call me a philosopher, but I'm not sure what you mean by "impossible" or "directly converting." ENIGMA's purpose is to convert GML to C++. I started the project because I noticed enough similarities in syntax that doing so would be relatively easy, in fact. Some things will obviously never work in plain C++, the first of those being with() {}.
By converting I mean translating, you are not going to convert GML into C++ like you convert English into French. The conversion only happens under the table, but the user won't see their GML turned into C++. Users will not use Enigma to convert their GML to C++, they'll use it so in order to take advantage of GML and C++. No one wants to get rid of GML here. Also, breaking one of the most idiotic features of GML in order to save one of the smartest features of C++ seems a good trade to me.
|
|
|
Logged
|
|
|
|
|
Josh @ Dreamland
|
|
Reply #57 Posted on: March 16, 2010, 05:41:32 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
@miky Oh, you're right. I should just include the GCC with it like you first said; wouldn't want to risk the project looking "stupid" to someone.
Also, I'd really like to see an English->French translator hard coded over the two languages' twelve similarities.
@The 11th plague of Egypt It's actually probable that the majority of users will try their best to avoid LGM, doing major development in Game Maker then bitching when they've used something ENIGMA doesn't support yet a month later when they're ready to compile.
"Also, breaking one of the most idiotic features of GML in order to save one of the smartest features of C++ seems a good trade to me." Now this, I like.
|
|
|
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
|
|
|
|
|
|