Josh @ Dreamland
|
|
Posted on: January 18, 2009, 12:00:36 am |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
It's not bragging if you can back it up, right?
Ism and I implemented a syntax checker. Yay. Now you can test if your code will compile (or at least, SHOULD compile) before you press the actual button, and have to go digging, yay.
Right now, Ism just displays my results in a message box. I'm hoping she makes it highlight the line soon, but that's not what I'm here to brag about.
I repeated the line if a do if a=0 b=0 else c=d until x=0 else d=e f=0.1 about 2800 times, followed by a b at the very end.
I ran syntax check in LGM. Finished in about 3.3 seconds. I then ran the same code through... another program that some of you may be familiar with. It took about 15.1 seconds.
So I am in a pretty decent mood, considering that even accounting for the overhead from passing files back and forth between ENIGMA and LGM, we're still outperforming other editors by... a lot.
With less nested things, the times are closer. Like 2 seconds vs 2.5. But ENIGMA's always ahead.
I guess that's the beauty of not generating a token tree every time you need to check syntax.
Also, ENIGMA not only gives line number, but an absolute index. Say you have draw_line(1,2,3,4,5,6,7). It'll return the position of the comma following the 4. That way it's less confusing. I want Ism to highlight that, too, but again, we'll see.
Anyway, I'm tired. It's like... Not Saturday anymore. Gnight.
|
|
« Last Edit: January 18, 2009, 12:06:00 am by Josh @ Dreamland »
|
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
|
|
|
|
score_under
|
|
Reply #2 Posted on: January 18, 2009, 07:57:50 am |
|
|
Joined: Aug 2008
Posts: 308
|
I then ran the same code through... another program that some of you may be familiar with. It took about 15.1 seconds.
Is that the obfuscator, or is it GCC? EDIT: Oh, GM7 >.< why do I always overlook the obvious? OH, and I have an amazing idea... Compile Enigma games in Visual C++ for debugging (Have you ever used that debugger? Even a 5-year-old could fix a bug in their program with that).
|
|
« Last Edit: January 18, 2009, 08:00:40 am by score_under »
|
Logged
|
|
|
|
Josh @ Dreamland
|
|
Reply #3 Posted on: January 18, 2009, 08:14:13 am |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
score_under-- That'd be great for me, but not for anyone else. (I happen to use GDB, which comes with Code::Blocks and Dev-C++) For actual users, I want to have a full featured debug window. I have plans for it that are so big, I'ma keep them to myself for fear of sounding stupid.
|
|
|
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
|
|
|
|
score_under
|
|
Reply #5 Posted on: January 18, 2009, 09:01:47 am |
|
|
Joined: Aug 2008
Posts: 308
|
... Visual C++ for debugging ...
I'm upset now. ENIGMA should never be tied to proprietary applications, especially Microsoft ones. Microsoft's idea of a C++ implementation is a nonstandard, unpredictable mess and any legitimate code will probably fail to compile. VC++ will probably be somehow corrupted with WinAPI too.
You've never used VC++, have you? And as I said... for debugging. Not for the game's debug mode (different) or for the actual game.
|
|
|
Logged
|
|
|
|
Josh @ Dreamland
|
|
Reply #6 Posted on: January 18, 2009, 09:18:54 am |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Either way, I wanna stay with GCC and GDB.
Oh, and Game_Boy, what did you mean with the syntax trace? That shouldn't be needed, since you check each individual file. If you mean check the outputted code, it should never be syntactically incorrect.
|
|
|
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
|
|
|
Game_boy
|
|
Reply #7 Posted on: January 18, 2009, 09:39:18 am |
|
|
Joined: Apr 2008
Posts: 228
|
... Visual C++ for debugging ...
I'm upset now. ENIGMA should never be tied to proprietary applications, especially Microsoft ones. Microsoft's idea of a C++ implementation is a nonstandard, unpredictable mess and any legitimate code will probably fail to compile. VC++ will probably be somehow corrupted with WinAPI too.
You've never used VC++, have you? And as I said... for debugging. Not for the game's debug mode (different) or for the actual game.
You are proposing to compile an ENIGMA source file with VC++ for debugging purposes, yes? (If not, what do you mean?) I doubt it would work straight off, and I don't want any level of official dependency even for debugging purposes. If you can get it to compile with VC++, then great. -- Oh, and Game_Boy, what did you mean with the syntax trace? That shouldn't be needed, since you check each individual file. If you mean check the outputted code, it should never be syntactically incorrect.
Sorry. Got confused between syntax and other errors. What I meant was the Game Maker thing where it says: Error in action number 1 of obj_something in script scr_process in script scr_get_value
<<Actual Error here>> Except it should show exactly which line of code in obj_something called scr_process, and which line of scr_process called scr_get_value. In Game Maker, it's annoying trying to find which specific line caused it if there are multiple calls to one script in another.
|
|
|
Logged
|
|
|
|
Josh @ Dreamland
|
|
Reply #8 Posted on: January 18, 2009, 11:12:39 am |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Ah, okay. ENIGMA has been doing that during compile since... R3, for sure. Maybe R2. It does that for the few runtime errors, too.
|
|
|
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 #10 Posted on: January 18, 2009, 12:35:32 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Retro-- Compile time has been cut at least in half since R3.
And nice.
|
|
|
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 #13 Posted on: January 19, 2009, 09:52:08 am |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
I haven't released anything since. XD But yeah, I did cut it by amazing proportions. It used to take 15 seconds, now it takes seven or so.
|
|
|
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
|
|
|
|
|