Author Topic: General Programming Megathread - New OP  (Read 28851 times)

Ruby and Python are both interpreted languages, which mean they don't compile to machine code. I believe a few people did make third party compilers for them, but I'm unsure.
I'm sorry for being stupid, but how are languages like Python and Java processed when they aren't translated for the processor?

Ruby and Python are both interpreted languages, which mean they don't compile to machine code. I believe a few people did make third party compilers for them, but I'm unsure.
Yeah however interestingly enough you can compile Ruby to java VM bytecode through JRuby.

But it has broken functionality.

Well, Python and Java both work in completely different ways.

Python is interpreted as it goes, which means there's a program that reads through the code line-by-line and converts it into machine code in real time. The benefit to this is that you don't have to bother with compiling the program every time you make an edit (same with TorqueScript) but the negative is that you lose a lot of speed.

Java compiles directly to machine code, but this machine code runs in a virtual machine. This is also converted into machine code in real time, but it's much easier converted because it's already in a format nearly identical to the one it's being converted into, and it's pretty much a direct translation which makes it much speedier than reading each line and interpreting it, then converting it to machine code.

Ok thank you.

Oh BTW, C++ would be the best language for games, PC and Video Games?

C++ is the second fastest language in existence, right after C. C is good for hardware programming, but not for software programming (in comparison to C++). So, this makes C++ the fastest programming language that is viable for programming games. This doesn't necessarily make it the 'best,' because it can be hard to grip so if you have difficulty programming in it you could end up making a slower product than in, say, Java, but it has the highest potential for the fastest game.

I want to learn.

I was horrible at teaching myself C++ and Java.

Help.

check out codeacademy.com, i learned some java there

Well, Python and Java both work in completely different ways.

Python is interpreted as it goes, which means there's a program that reads through the code line-by-line and converts it into machine code in real time. The benefit to this is that you don't have to bother with compiling the program every time you make an edit (same with TorqueScript) but the negative is that you lose a lot of speed.

Java compiles directly to machine code, but this machine code runs in a virtual machine. This is also converted into machine code in real time, but it's much easier converted because it's already in a format nearly identical to the one it's being converted into, and it's pretty much a direct translation which makes it much speedier than reading each line and interpreting it, then converting it to machine code.
Not completely true, Python caches all imported libraries (not the script itself) as bytecode.

Ruby and Python are both interpreted languages, which mean they don't compile to machine code. I believe a few people did make third party compilers for them, but I'm unsure.
Not sure about Ruby, but Python has Cython which compiles libraries written in almost-Python code to C (while iirc you can't make it runnable directly, you can add a simple two-liner bootstrap script).



Silly bot. Sucks that "aludane" is lowercase but that's just a part of the way it's built.

Would you guys recommend SDL for writing a game engine in C++?

Seems like a pretty good choice to me.

from my personal experience, SDL was absolute hell and it required way too much

but hey, i only spent a couple days with it, if that