Pages: 1
  Print  
Author Topic: Parser Progress  (Read 3834 times)
Offline (Male) Josh @ Dreamland
Posted on: June 16, 2012, 06:14:10 PM

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

View Profile Email
I've been out of school now for a week, and have finally been able to work on ENIGMA again. In that time, I have made some significant progress on the upgraded C parser.

Given the following input code:
Code: (C++) [Select]
#include <GL/gl.h>
#include <GL/glu.h>
#include <ncurses.h>
#include <X11/Xlib.h>
#include <AL/al.h>
#include <zlib.h>

#include <stdio.h> //printf, NULL
#include <stdlib.h> //malloc
#include <unistd.h> //usleep
#include <time.h> //clock

#include <stdio.h>
#include <stdlib.h>

#include <errno.h>
#include <float.h>
#include <iso646.h>
#include <math.h>
#include <locale.h>
#include <stdarg.h>
#include <wchar.h>
#include <string.h>
#include <stdbool.h>
#include <stddef.h>
#include <malloc.h>

#include <cpio.h>
#include <dirent.h>
#include <grp.h>
#include <pwd.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <tar.h>
#include <termios.h>
#include <utime.h>

#include <unistd.h>
#include <stdint.h>

#include <time.h>

#include <fcntl.h>
#include <sys/sem.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
#include <setjmp.h>
#include <inttypes.h>
#include <sys/utsname.h>

// Once affected by lack of '?' operator token
#include <ctype.h>
#include <wctype.h>
#include <limits.h>
#include <assert.h>

// Once affected by lack of support for public/private/protected, and by lack of support for constructors.
#include <pthread.h>

#include <sys/stat.h>
#include <sys/time.h>

#include <fenv.h>
#include <tgmath.h>
#include <complex.h>
The parse finished in 34348101 microseconds, 0 errors, 0 warnings.

Pretty great, right? No. Not pretty great. That's 34 seconds, you ding-dong.

The good news is, without Valgrind (a very awesome debugger) attached, it runs a bit faster: Parse finished in 325934 microseconds.

So, about 300 milliseconds. Not bad, really. Better news is, without rendering all parsed trees to SVG files, it operates faster still:
Parse finished in 219077 microseconds.

So about 219 milliseconds. Basically happy with that? Well, if not, you can use the parser in release mode without it tossing around debug information and with optimizations turned on: Parse finished in 97204 microseconds.

Just under 100 milliseconds. Which is where I call it "Good enough." Maybe I'll do some profiling later.

Anyway, all this is pretty good news; you might be asking, where's the bad news? Bad news is, only one of those headers had any C++ in it, and that'd be pthread.h. The parser's C++ support is only just now being filled in, and I don't have a reasonably accurate ETA on that functionality. I'm thinking it'll be working sooner than later, but only time (and further work) will tell. Fortunately, only Linux users are affected by bugs in the old parser (which would probably cause parse to fail on some of the above headers).

Anyway, I'm going to get back to work. Just a heads-up, and an "I'm still alive" deal.

PS: Millisecond times are estimates, only. Given varying processors, YMMV, not to mention that times fluctuate to ±5 milliseconds even locally on consecutive runs. The release mode time actually varies from about 93 milliseconds to 102 milliseconds here.



IsmAvatar also has some less happy news (in her words):
When one door closes, another door opens. In this case, there's a bit of reversal.
I have started a full-time programming job (I enjoy it, in case you were wondering). I will not be able to spend nearly as much time with LateralGM and the Plugin as I have in the past, and am taking a major step back away from this project. I will still be watching intently and giving my feedback, and periodically helping out with various projects (like some refactoring of the channel bots), and I will continue to fulfill my administrative duties and oversee the LateralGM side of the project (and gladly assisting anyone wishing to learn the internals or develop for it), but I will scarcely be developing. My major roles are complete at this point. I've given you a working product. Now it's time for other people to step in and polish it off.
Again, I'll be glad to help anyone who's trying to learn the internals or develop for it or whatever. Catch me on IRC, email me, or whatever.
Also, in about a month's time, my boyfriend and I will be moving in together. This will add another clamp on my free time, as I understandably like spending time with him.
I would say that I wish you guys good luck, but unfortunately you can't shake me that easily. I'm still sticking around and will continue to serve as the administrative cheerleader and GM Format gatekeeper. So I guess I'll just say: carry on.
« Last Edit: June 17, 2012, 02:45:56 AM by IsmAvatar » 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) TheExDeus
Reply #1 Posted on: June 16, 2012, 06:36:15 PM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
Good to hear. I would want to work on ENIGMA as well, but I need to present my thesis next week, so I will not be able to do anything until that is finished. I was thinking maybe fixing some window problems, like full screen while switching rooms.

Also, tried gource'ing the ENIGMA GIT and it was pretty funny seeing how since 2009 this project has been rewritten from scratch a bazillion times.
Logged
Offline (Female) IsmAvatar
Reply #2 Posted on: June 17, 2012, 02:46:50 AM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 886

View Profile Email
Hope you don't mind, I've added my own little update onto the end of the post.
Logged
Offline (Unknown gender) TheExDeus
Reply #3 Posted on: June 17, 2012, 08:42:12 AM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
That sucks, as there is almost no one here who knows LGM insides at all.
Logged
Offline (Male) cheeseboy
Reply #4 Posted on: June 26, 2012, 07:20:07 AM

Member
Location: The internet
Joined: Mar 2011
Posts: 106

View Profile
I've been out of school now for a week, and have finally been able to work on ENIGMA again. In that time, I have made some significant progress on the upgraded C parser.

Given the following input code:
Code: (C++) [Select]
#include <GL/gl.h>
#include <GL/glu.h>
#include <ncurses.h>
#include <X11/Xlib.h>
#include <AL/al.h>
#include <zlib.h>

#include <stdio.h> //printf, NULL
#include <stdlib.h> //malloc
#include <unistd.h> //usleep
#include <time.h> //clock

#include <stdio.h>
#include <stdlib.h>

#include <errno.h>
#include <float.h>
#include <iso646.h>
#include <math.h>
#include <locale.h>
#include <stdarg.h>
#include <wchar.h>
#include <string.h>
#include <stdbool.h>
#include <stddef.h>
#include <malloc.h>

#include <cpio.h>
#include <dirent.h>
#include <grp.h>
#include <pwd.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <tar.h>
#include <termios.h>
#include <utime.h>

#include <unistd.h>
#include <stdint.h>

#include <time.h>

#include <fcntl.h>
#include <sys/sem.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
#include <setjmp.h>
#include <inttypes.h>
#include <sys/utsname.h>

// Once affected by lack of '?' operator token
#include <ctype.h>
#include <wctype.h>
#include <limits.h>
#include <assert.h>

// Once affected by lack of support for public/private/protected, and by lack of support for constructors.
#include <pthread.h>

#include <sys/stat.h>
#include <sys/time.h>

#include <fenv.h>
#include <tgmath.h>
#include <complex.h>
The parse finished in 34348101 microseconds, 0 errors, 0 warnings.

Pretty great, right? No. Not pretty great. That's 34 seconds, you ding-dong.

The good news is, without Valgrind (a very awesome debugger) attached, it runs a bit faster: Parse finished in 325934 microseconds.

So, about 300 milliseconds. Not bad, really. Better news is, without rendering all parsed trees to SVG files, it operates faster still:
Parse finished in 219077 microseconds.

So about 219 milliseconds. Basically happy with that? Well, if not, you can use the parser in release mode without it tossing around debug information and with optimizations turned on: Parse finished in 97204 microseconds.

Just under 100 milliseconds. Which is where I call it "Good enough." Maybe I'll do some profiling later.

Anyway, all this is pretty good news; you might be asking, where's the bad news? Bad news is, only one of those headers had any C++ in it, and that'd be pthread.h. The parser's C++ support is only just now being filled in, and I don't have a reasonably accurate ETA on that functionality. I'm thinking it'll be working sooner than later, but only time (and further work) will tell. Fortunately, only Linux users are affected by bugs in the old parser (which would probably cause parse to fail on some of the above headers).

Anyway, I'm going to get back to work. Just a heads-up, and an "I'm still alive" deal.

PS: Millisecond times are estimates, only. Given varying processors, YMMV, not to mention that times fluctuate to ±5 milliseconds even locally on consecutive runs. The release mode time actually varies from about 93 milliseconds to 102 milliseconds here.


Noone cares josh
Logged
Post made June 29, 2012, 06:20:25 AM was deleted at the author's request.
Offline (Male) Josh @ Dreamland
Reply #6 Posted on: June 29, 2012, 09:12:55 AM

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

View Profile Email
I feel like I should just ban cheeseshit and be done with it.
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
Post made June 30, 2012, 04:40:58 AM was deleted at the author's request.
Offline (Female) IsmAvatar
Reply #8 Posted on: July 03, 2012, 11:15:08 AM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 886

View Profile Email
I feel like we talk about feelings too much.
Logged
Offline (Male) DarkAceZ
Reply #9 Posted on: July 03, 2012, 06:05:25 PM

Member
Location: United States
Joined: Dec 2011
Posts: 75

View Profile
I feel like we talk about feelings too much.
Yes and no. If we could all just BELIEVE that the parser is done...
Logged
My Goodness! Is it 4:30? I'm supposed to be having a back, sack and crack!

[edit]
Pages: 1
  Print