ENIGMA Forums

General fluff => Announcements => Topic started by: Josh @ Dreamland on June 16, 2012, 06:14:10 pm

Title: Parser Progress
Post by: Josh @ Dreamland on June 16, 2012, 06:14:10 pm
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: (CPP) [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.
Title: Re: Parser Progress
Post by: TheExDeus on June 16, 2012, 06:36:15 pm
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.
Title: Re: Parser Progress
Post by: IsmAvatar on June 17, 2012, 02:46:50 am
Hope you don't mind, I've added my own little update onto the end of the post.
Title: Re: Parser Progress
Post by: TheExDeus on June 17, 2012, 08:42:12 am
That sucks, as there is almost no one here who knows LGM insides at all.
Title: Re: Parser Progress
Post by: cheeseboy on June 26, 2012, 07:20:07 am
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: (CPP) [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
Title: Re: Parser Progress
Post by: Fede-lasse on June 29, 2012, 06:20:25 am
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: (CPP) [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
I feel like we should be making a pyramid.
Title: Re: Parser Progress
Post by: Josh @ Dreamland on June 29, 2012, 09:12:55 am
I feel like I should just ban cheeseshit and be done with it.
Title: Re: Parser Progress
Post by: Fede-lasse on June 30, 2012, 04:40:58 am
I feel like you should make ENIGMA.
Title: Re: Parser Progress
Post by: IsmAvatar on July 03, 2012, 11:15:08 am
I feel like we talk about feelings too much.
Title: Re: Parser Progress
Post by: DarkAceZ on July 03, 2012, 06:05:25 pm
I feel like we talk about feelings too much.
Yes and no. If we could all just BELIEVE that the parser is done...