| View previous topic :: View next topic |
| Author |
Message |
Kopilman
Joined: 25 May 2006 Posts: 162
|
| Hello, what langauge is the python interpreter written in? like it interprets python programs to binary? like i dont get it, wouldnt it have to have been programmed in another language? |
| |
|
|
|
|
Gladis
Joined: 24 May 2006 Posts: 108
|
| Kopilman, it's written in C |
| |
|
|
Kopilman
Joined: 25 May 2006 Posts: 162
|
| Gladis, okay thanks |
| |
|
|
Jackil
Joined: 24 May 2006 Posts: 97
|
Kopilman, which one?
there are python interpreters written in C, C++, Java, and even in Python itself.
Oh, and in C# |
| |
|
|
Kopilman
Joined: 25 May 2006 Posts: 162
|
| Jackil, but how could an interpreter be written in python, the interpret interprets python, python isnt computer understandable, so it has to be converted to binary right? to make one that was purely python wouldnt the perosn who made it have to knwo binary in order to have it give the proper output? |
| |
|
|
Gladis
Joined: 24 May 2006 Posts: 108
|
| Kopilman, the interpreter is very slow :) |
| |
|
|
Jackil
Joined: 24 May 2006 Posts: 97
|
| Kopilman, how can i C compiler be written in C? |
| |
|
|
Gladis
Joined: 24 May 2006 Posts: 108
|
Kopilman, it's more of a compiler written in python, that compiles python to something else (like native code or LLVM), and that compiler compiles itself then runs python
that natively-compiled compiler can interpret python without actually compiling it, but it's literally 2000 times slower |
| |
|
|
Kopilman
Joined: 25 May 2006 Posts: 162
|
| Does ntaive code == binary? like langauges have to become binary for the comp to do something right? so does that mean that the people who create the languages have to sit down and figure out all the proper binary, i don tget it |
| |
|
|
Gladis
Joined: 24 May 2006 Posts: 108
|
| Kopilman, yah you can consider them the same. underneath it all has to become machine code eventually |
| |
|
|
| Page 1 of 2 |
Goto page 1, 2 Next |
|