pcsx2 in firefox!!!!!!!
#21
The Java compilers are better than the C and C++ compilers (the GNU versions at least)

With the Sun java compiler if you get a null pointer exception error it will tell you what line of code the problem occured. You can then trace back your function calls, debug, and whatnot and at least have an idea where the problem starts.

For C and C++ you will just get Segmentation fault in the command window. Thats it.

Really sucks when you get it while coding a compiler for an advanced programming class and you don't know if the seg fault is because of the current batch of code you just made to build a parse tree or if it came from previous code like the code to parse the input file, build data structures, etc.

Mad props to the PCSX2 team if they can code in C languages without seg faults. Damn pointers.

Sponsored links

#22
(07-21-2009, 03:01 AM)Dadaluma83 Wrote: The Java compilers are better than the C and C++ compilers (the GNU versions at least)

With the Sun java compiler if you get a null pointer exception error it will tell you what line of code the problem occured. You can then trace back your function calls, debug, and whatnot and at least have an idea where the problem starts.

For C and C++ you will just get Segmentation fault in the command window. Thats it.

Really sucks when you get it while coding a compiler for an advanced programming class and you don't know if the seg fault is because of the current batch of code you just made to build a parse tree or if it came from previous code like the code to parse the input file, build data structures, etc.

Mad props to the PCSX2 team if they can code in C languages without seg faults. Damn pointers.

You do know there are such things as C/C++ debuggers, correct? Any IDE worth mentioning does all the things you've listed for Java.

Shouldn't be dereferencing pointers that may be null without checking them first, either Tongue
"This thread should be closed immediately, it causes parallel imagination and multiprocess hallucination" --ardhi
#23
Yeah all the Java VM/JIT compiled code does is check pointers before dereferencing them, which is one of the reasons Java/C# code tends to be slower than C/C++ code. The other major reason is due to array index validation. For example:

C#/Java:
Code:
int[] joe = new int[25];
for( i=0; i<25; ++i ) joe[i] += 10;

... and equiv version on C/C++ actually looks like this:
Code:
int joe[25];
for( i=0; i<25; ++i )
{
    if( i < 0 || i >= 25 ) throw OutOfBoundsException();
    joe[i] += 10;
}

Granted if you're actually using constants in your loop like the specific example above, then the compiler can optimize out the bounds check. But 99% of the time such loops in real code aren't using constants, it's just too complicated to make an example without constants here. In C# you can pin arrays and use unsafe pointers to bypass the bounds checking. I used that to more than triple the speed of tight-loop array iterators like the example above; putting the resulting C# code in line with C/C++ code.
Jake Stine (Air) - Programmer - PCSX2 Dev Team
#24
(07-21-2009, 03:39 AM)echosierra Wrote: You do know there are such things as C/C++ debuggers, correct? Any IDE worth mentioning does all the things you've listed for Java.

Shouldn't be dereferencing pointers that may be null without checking them first, either Tongue

Show me a c++ IDE that looks and feels sexier than netbeans Tongue
#25
(07-21-2009, 04:27 AM)xacidmetalx Wrote:
(07-21-2009, 03:39 AM)echosierra Wrote: You do know there are such things as C/C++ debuggers, correct? Any IDE worth mentioning does all the things you've listed for Java.

Shouldn't be dereferencing pointers that may be null without checking them first, either Tongue

Show me a c++ IDE that looks and feels sexier than netbeans Tongue

As I have never used netbeans before, I had to look at screenshots to gauge how sexy I had to make another IDE look with a liberal amount of photoshop.

But if you can't beat 'em, join 'em.
"This thread should be closed immediately, it causes parallel imagination and multiprocess hallucination" --ardhi
#26
(07-20-2009, 09:46 PM)zero29 Wrote:
(07-20-2009, 06:50 PM)xboxflyer Wrote: would u not think about playing in a beautiful interface?

pcsx2 gui: i'm not beautiful? ;_;

ya beautiful but alone and mechanical,pcsx2 gui:u would more beautiful
in firefox.
#27
Comrades! IDE for programming is nonsense, GUI is useless puzzle for finding right mouse clicks to do a simple task, programs is writing in plain text mode and such tasks as debugging and profiling require only knowledge. Segfault is usefull info if programm was compiled with debug information -- at such case core contains line number and call stack. Or, at least memory address and dump of compiled part (for obvious reason compiled code does not have "lines" and function calls).
#28
(07-21-2009, 07:46 AM)Zeydlitz Wrote: Comrades! IDE for programming is nonsense, GUI is useless puzzle for finding right mouse clicks to do a simple task, programs is writing in plain text mode and such tasks as debugging and profiling require only knowledge.

Comrades? That's commie talk.

Real men debug exclusively with cout statements and, if absolutely necessary, an assembly-level debugger such as OllyDbg or GDB. Seeing the source code is a weakness of programmers who rely on skill.
"This thread should be closed immediately, it causes parallel imagination and multiprocess hallucination" --ardhi
#29
if you have quite finished flexing your programming e-penises on who can use the least efficient tools, i think this thread is pretty much at a conclusion, so im closing.
[Image: ref-sig-anim.gif]





Users browsing this thread: 1 Guest(s)