Poll
Question: How should an object-local and a script-local integer be defined?
local int, int - 12 (63.2%)
int, var int - 6 (31.6%)
localv int, int - 0 (0%)
Special Event - 1 (5.3%)
Total Members Voted: 19

Pages: « 1 2 3 4 5 »
  Print  
Author Topic: Another choice.  (Read 9892 times)
Offline (Male) RetroX
Reply #45 Posted on: March 15, 2010, 08:48:42 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Why not use ++ and -- instead of +=1 and -=1?
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 #46 Posted on: March 15, 2010, 08:59:34 PM

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

View Profile Email
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
Offline (Unknown gender) The 11th plague of Egypt
Reply #47 Posted on: March 16, 2010, 04:53:00 AM
Member
Joined: Dec 2009
Posts: 276

View Profile
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
Offline (Unknown gender) Micah
Reply #48 Posted on: March 16, 2010, 08:49:45 AM

Resident Troll
Joined: May 2008
Posts: 129

View Profile
How so? You can completely replicate every tiny bit of functionality of GML in C++. Even execute_string, although that would require packaging a C compiler with every program and would be stupid.
Logged
Offline (Male) polygone
Reply #49 Posted on: March 16, 2010, 10:49:41 AM

Contributor
Location: England
Joined: Mar 2009
Posts: 803

View Profile
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.
Offline (Unknown gender) Game_boy
Reply #50 Posted on: March 16, 2010, 11:20:30 AM
Member
Joined: Apr 2008
Posts: 228

View Profile
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
Offline (Male) polygone
Reply #51 Posted on: March 16, 2010, 11:52:29 AM

Contributor
Location: England
Joined: Mar 2009
Posts: 803

View Profile
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. :/

Quote
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.
Offline (Male) Josh @ Dreamland
Reply #52 Posted on: March 16, 2010, 12:33:34 PM

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

View Profile Email
Quote
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
Offline (Unknown gender) Micah
Reply #53 Posted on: March 16, 2010, 12:44:25 PM

Resident Troll
Joined: May 2008
Posts: 129

View Profile
So...you're planning to compile to C++ and JavaScript for the same executable if they use `execute_string`? Really?
Logged
Offline (Male) Josh @ Dreamland
Reply #54 Posted on: March 16, 2010, 01:13:42 PM

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

View Profile Email
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
Offline (Unknown gender) The 11th plague of Egypt
Reply #55 Posted on: March 16, 2010, 02:14:18 PM
Member
Joined: Dec 2009
Posts: 276

View Profile
Quote
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
Offline (Unknown gender) Micah
Reply #56 Posted on: March 16, 2010, 04:45:31 PM

Resident Troll
Joined: May 2008
Posts: 129

View Profile
You'd think that, but Josh is actually hard-coding his parser around the syntactical similarities between GML and C++. So yes, he is converting GML into C++ like you convert English into French.

@Josh: Having two different runners for the same scripting language running in the same engine is stupid on many levels.
Logged
Offline (Male) Josh @ Dreamland
Reply #57 Posted on: March 16, 2010, 05:41:32 PM

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

View Profile Email
@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
Offline (Male) RetroX
Reply #58 Posted on: March 16, 2010, 06:51:20 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Also, I'd really like to see an English->French translator hard coded over the two languages' twelve similarities.
You mean not like Google translator!?!?

Where one person can suggest a translation and it becomes completely inaccurate!?
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 (Unknown gender) Game_boy
Reply #59 Posted on: March 17, 2010, 12:25:41 PM
Member
Joined: Apr 2008
Posts: 228

View Profile
Wrong thread, sorry.
« Last Edit: March 17, 2010, 12:27:12 PM by Game_boy » Logged
Pages: « 1 2 3 4 5 »
  Print