Forum

Define Most Annoying Task?

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Re: Define Most Annoying Task?

Postby mh » Tue Jul 28, 2015 12:47 pm

This error?

Image

In theory that's probably the best that the error message can be, owing to the internal format of .dsp and .dsw files where line-endings are actually important.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Define Most Annoying Task?

Postby frag.machine » Tue Jul 28, 2015 1:48 pm

Yes, this is the message. Welp, shame on me... :oops:
In my defense, when I searched the error on Google I was led to believe it was something more serious, and the only sane way to fix would be to recreate the projects from scratch.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2077
Joined: Sat Nov 25, 2006 1:49 pm

Re: Define Most Annoying Task?

Postby mh » Tue Jul 28, 2015 7:52 pm

In fairness that is totally understandable.

I have no idea what I did to realise it was just line-endings; it happened years ago, and while I've been aware of it for a long time, it never actually registered with me that others might not be.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Define Most Annoying Task?

Postby revelator » Wed Jul 29, 2015 12:51 pm

Well atleast it was usefull to people not aware of this :) the fix is running unix2dos on the project files.
You can do that from msys cygwin msys2 or if you dont want those just snag the windows version from gnuwin32 (remember to get the dependencies for it as well).
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2542
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Define Most Annoying Task?

Postby frag.machine » Wed Jul 29, 2015 12:53 pm

I suppose Notepad++ could handle this, too.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2077
Joined: Sat Nov 25, 2006 1:49 pm

Re: Define Most Annoying Task?

Postby mh » Wed Jul 29, 2015 11:09 pm

I just open in Wordpad (I keep a shortcut to it in my SendTo menu) then save back; handles the job fine.

Strictly speaking VS 2008 should be able to detect this and handle it properly. It does it for .sln files OK, and does it for actual source files too, so it's probably a VS bug that it can't do it for old vc6 project files too. But at least it's easy to fix things up yourself once you know.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Define Most Annoying Task?

Postby revelator » Thu Jul 30, 2015 1:26 pm

was not aware wordpad could convert the line endings nice to know :)
notepad++ can i found out, and vice versa besides supporting a wealth of document types.
Since i use git heavily myself i guess i got lucky most of the times since i mostly checkout the sources via git ;).
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2542
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Define Most Annoying Task?

Postby Baker » Tue Mar 22, 2016 8:35 am

Parsing expressions like "6 + 7 * (9 * 8 + 3 ) + 4" sucks.

It's not super-horrible if you do some research into how expression trees work. Then it just becomes annoyingly horrible.

On the plus side: owning expression trees comes with a nice set of knowledge benefits. Even more fun if you write it such a way that you can backtrack any element to its text origin as-is for crystal-clear user-feedback instead of "gee, there was an error of [blah] on line X".

Extra fun if you mentally plan in advance for some optimizations like detecting constant parts of an expression if it support variables. Some of working on this felt like one the QuakeC parts of the engine and I admit I took a peek at the QuakeC compiler just to see if any quick and easy hint might be gleaned.

But really, parsing expressions is the kind of barrier that breaking down leads to "greater things".
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Define Most Annoying Task?

Postby qbism » Sun Mar 27, 2016 12:17 pm

Writing a parser from scratch? I would assume a recursive function based on discovery of open brackets and secondary recursion based on operator priority. Someone has probably written this in 12 lines of code :lol: Minus another 12 lines of warning and error messages.

When stumped, I increase granularity of warning, error, or debug messages (developer mode) as appropriate. Eventually it may reveal the underlying typo, syntax error or limitation. An example would be sending a string from a calling function that provides a name or other info to be reported in a warning message.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: Define Most Annoying Task?

Postby Baker » Sun Mar 27, 2016 8:26 pm

qbism wrote:Writing a parser from scratch? I would assume a recursive function based on discovery of open brackets and secondary recursion based on operator priority. Someone has probably written this in 12 lines of code :lol: Minus another 12 lines of warning and error messages.

Well, I'm not sure what a logical response to that is really. You have to use nodes to do it right and node up based on precedence. At least to do it right.

And then work up from the bottom. This also allows operator short circuiting and reduction to constants.

Then again, I am specifically interested in this from the compiler/optimization/speed angle.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Define Most Annoying Task?

Postby qbism » Mon Mar 28, 2016 4:17 pm

Baker wrote:Well, I'm not sure what a logical response to that is really. You have to use nodes to do it right and node up based on precedence. At least to do it right.

Frankly I'm clueless, but interested. I had to look up nodes. Are the overhead and features of general language processing needed for math parsing? Such as the ability to revisit nodes. In terms of recursion, this project phrases it 'recursive decent style': https://github.com/jamesgregson/expression_parser
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: Define Most Annoying Task?

Postby Baker » Mon Mar 28, 2016 7:17 pm

http://www.difranco.net/compsci/C_Opera ... _Table.htm

(That guy's code looks a little overly indirect to me instead of jumping right in --- operator actions could be handled by a switch statement instead of making a function for each one.)

Image
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Define Most Annoying Task?

Postby revelator » Tue May 03, 2016 11:45 am

Having to rebuild 99% of my packages whenever msys2 updates ... damn this is some time consuming stuff.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2542
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Previous

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest