Pages: « 1 2 3 4 5 »
  Print  
Author Topic: Pride  (Read 7899 times)
Offline (Male) RetroX
Reply #15 Posted on: March 04, 2010, 06:33:57 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
To be honest, I've completely forgotten about goto. :/
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) The 11th plague of Egypt
Reply #16 Posted on: March 05, 2010, 01:54:34 AM
Member
Joined: Dec 2009
Posts: 284

View Profile
Why should you add such an hack? There is no switch for arrays in C++ and there is no switch in Gm at all,
so neither users will feel a need for it. Using a switch for this kind of things means writing bad code.
Don't even bother wasting time.
Logged
Offline (Male) Josh @ Dreamland
Reply #17 Posted on: March 05, 2010, 10:34:32 AM

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

View Profile Email
It's by no means a hack. GML does support switch(); it will let you switch either a real or string. Switching an array switches its first value.
Just because a code uses goto doesn't mean it's a hack. Goto was excommunicated from use in high level code due to it making said code difficult to read when misused. Case labels are just that: labels. The compiler writes the hash map instead of me doing it. The same will apply to ENIGMA.
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) retep998
Reply #18 Posted on: March 05, 2010, 05:05:01 PM

Member
Location: Where else?
Joined: Jan 2010
Posts: 248
MSN Messenger - retep998@charter.net AOL Instant Messenger - retep998 Yahoo Instant Messenger - retep998
View Profile Email
Quote from: Ace Ventura
Oh, and Fede Lasse: Many people use primitives for circle-related effects. Think ripples or rings. Especially awesome with surfaces.
Yeah, I concidered that after some time, but I was like "meh, really?". But then again, when you mention it, I guess people do.
But you'd have to remember that it's not 360 vertices, it's 361 since you need the center vertex.
Logged
Offline (Unknown gender) The 11th plague of Egypt
Reply #19 Posted on: March 05, 2010, 06:23:04 PM
Member
Joined: Dec 2009
Posts: 284

View Profile
It's by no means a hack. GML does support switch(); it will let you switch either a real or string. Switching an array switches its first value.
Just because a code uses goto doesn't mean it's a hack. Goto was excommunicated from use in high level code due to it making said code difficult to read when misused. Case labels are just that: labels. The compiler writes the hash map instead of me doing it. The same will apply to ENIGMA.
Hell, I didn't know GM had such a statement. Really, I saw no one using it in the GMC.
The first time I heard about it was studying C++

BTW I really hope you aren't using gotos in the rest of your code as well, unless you aim at being a sole developer
« Last Edit: March 05, 2010, 06:26:44 PM by The 11th plague of Egypt » Logged
Offline (Unknown gender) score_under
Reply #20 Posted on: March 05, 2010, 06:44:04 PM

Member
Joined: Aug 2008
Posts: 308

View Profile
BTW I really hope you aren't using gotos in the rest of your code as well, unless you aim at being a sole developer
My goodness, it's like we haven't invented ctrl+f and multitasking yet.
Logged
Offline (Male) Josh @ Dreamland
Reply #21 Posted on: March 05, 2010, 07:24:18 PM

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

View Profile Email
I use a goto roughly four times in the C parser. My labels are usually descriptive and located nearby. Usually.
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 #22 Posted on: March 06, 2010, 01:26:49 PM

Resident Troll
Joined: May 2008
Posts: 129

View Profile
Now if you had used recursive descent and operator precedence or some other decent method for writing a parser, it would actually be readable and you probably wouldn't ever have had felt the need to use gotos.

Not to mention that it would have been working and done quite a while ago.
« Last Edit: March 06, 2010, 01:31:56 PM by miky » Logged
Offline (Male) Josh @ Dreamland
Reply #23 Posted on: March 06, 2010, 01:39:35 PM

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

View Profile Email
All right, that's finally starting to bother me. If any of those things were the case, where the hell was anyone that was going to prove that? Hm?
I was the only one doing fuck-anything on this project. I expressed countless times that I hate the recursive decent method. I don't care if you'd rather study one of those methods than learn mine; mine's faster. And no, using recursive-descent would not have made the project finish faster, because I would have given up. Or needed an entire fucking team to help me.

I'm getting sick of your cynical opposition at every turn. If you think you can do this job better than me, feel free. It's even open source. Until that time, stop pretending that because you can read about a method that you can understand it and replicate it faster than I can.

I scarcely think you understand some of the things my parser can read. Let me tell you, I wrote the parser, and there were things it parsed that I didn't understand.
« Last Edit: March 06, 2010, 01:44:35 PM 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
Offline (Male) Rusky
Reply #24 Posted on: March 06, 2010, 02:39:10 PM

Resident Troll
Joined: Feb 2008
Posts: 960
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
I have written recursive descent parsers. Yes, by myself, and yes, in less time than however many years you've been working on this one. I read about recursive descent after figuring them out, so I am not pretending anything. I believe you have a case of not-invented-here syndrome, not a magical new faster method for parsing.
Logged
Offline (Male) Josh @ Dreamland
Reply #25 Posted on: March 06, 2010, 02:43:50 PM

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

View Profile Email
Feel free to read it over and discern what has been reinvented.

...Also, writing a parser for one language does not imply that you can write one for any language. Especially not C++.
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) Rusky
Reply #26 Posted on: March 06, 2010, 03:54:02 PM

Resident Troll
Joined: Feb 2008
Posts: 960
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
The reason I don't work on the Enigma parser is that I don't really care. I'm interested in how it turns out and I might use it, but I would rather spend my time on a better-designed system. I have no interest in torturing a good design into backwards compatibility with GM's.

GCC and Clang are for sure recursive descent. I'm sure other C++ compilers are recursive descent. It's not a question of how complicated it is, because recursive descent already has an established way to parse complicated things. Your GML parser needs new logic for every little change that recursive descent would handle the same way as everything else.
Logged
Offline (Male) Josh @ Dreamland
Reply #27 Posted on: March 06, 2010, 08:53:00 PM

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

View Profile Email
What good design would you be torturing with GM's?

Also, the only thing which would require a complete change in the logic of my parsers is a complete change in the language itself. New keywords can be added to the GML parser by changing one line, and to the C++ parser (more comprehensive) by adding in roughly three places (The switch of keywords, the list of token codes, and the handler for each under the semicolon/comma handler).
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) notachair
Reply #28 Posted on: March 06, 2010, 09:17:05 PM

Definitely not a chair
Contributor
Joined: Feb 2008
Posts: 299

View Profile
The reason I don't work on the Enigma parser is that I don't really care. I'm interested in how it turns out and I might use it, but I would rather spend my time on a better-designed system. I have no interest in torturing a good design into backwards compatibility with GM's.

GCC and Clang are for sure recursive descent. I'm sure other C++ compilers are recursive descent. It's not a question of how complicated it is, because recursive descent already has an established way to parse complicated things. Your GML parser needs new logic for every little change that recursive descent would handle the same way as everything else.

If you don't care why are you caring about it
« Last Edit: March 06, 2010, 09:26:02 PM by a2h » Logged
Offline (Unknown gender) Micah
Reply #29 Posted on: March 06, 2010, 09:28:46 PM

Resident Troll
Joined: May 2008
Posts: 129

View Profile
Good design = something much, much better than Game Maker. Although it's not perfect, Construct is an example.
Logged
Pages: « 1 2 3 4 5 »
  Print