On 2013-02-28, kramer65 kram...@gmail.com wrote:
I'm using Python for a while now and I love it. There is just one
thing I cannot understand. There are compilers for languages like C
and C++. why is it impossible to create a compiler that can compile
Python code to machinecode?
The main
The main issue is that python has dynamic typing. The type of object
that is referenced by a particular name can vary, and there's no way
(in general) to know at compile time what the type of object foo is.
That makes generating object code to manipulate foo very difficult.
Could you help
On Tuesday, March 5, 2013 6:55:06 AM UTC+8, CM wrote:
The main issue is that python has dynamic typing. The type of object
that is referenced by a particular name can vary, and there's no way
(in general) to know at compile time what the type of object foo is.
That makes
On 3/4/2013 5:55 PM, CM wrote:
Could you help me understand this better? For example, if you
have this line in the Python program:
foo = 'some text'
bar = {'apple':'fruit'}
If the interpreter can determine at runtime that foo is a string
and bar is a dict, why can't the compiler figure that
On Tue, Mar 5, 2013 at 9:55 AM, CM cmpyt...@gmail.com wrote:
The main issue is that python has dynamic typing. The type of object
that is referenced by a particular name can vary, and there's no way
(in general) to know at compile time what the type of object foo is.
That makes generating
On Mar 4, 2013 3:02 PM, CM cmpyt...@gmail.com wrote:
The main issue is that python has dynamic typing. The type of object
that is referenced by a particular name can vary, and there's no way
(in general) to know at compile time what the type of object foo is.
That makes generating
On Mon, 04 Mar 2013 16:36:36 +, Grant Edwards wrote:
On 2013-02-28, kramer65 kram...@gmail.com wrote:
I'm using Python for a while now and I love it. There is just one thing
I cannot understand. There are compilers for languages like C and C++.
why is it impossible to create a compiler
On Fri, 01 Mar 2013 08:48:34 +0100, Stefan Behnel wrote:
Steven D'Aprano, 01.03.2013 04:47:
On Thu, 28 Feb 2013 22:03:09 +0100, Stefan Behnel wrote:
The most widely used static Python compiler is Cython
Cython is not a Python compiler. Cython code will not run in a vanilla
Python
Hello,
I'm using Python for a while now and I love it. There is just one thing I
cannot understand. There are compilers for languages like C and C++. why is it
impossible to create a compiler that can compile Python code to machinecode?
My reasoning is as follows:
When GCC compiles a program
Python is an interpreted language, not a compiled language. This is
actually a good thing! What it means is that there is a scripting engine
(we just call it the interpreter) that actually executes everything for
you. That means that any operating system that has an interpreter written
for it is
kramer65, 28.02.2013 21:25:
I'm using Python for a while now and I love it. There is just one thing
I cannot understand. There are compilers for languages like C and C++.
why is it impossible to create a compiler that can compile Python code
to machinecode?
All projects that implement such
On Fri, Mar 1, 2013 at 7:50 AM, Matty Sarro msa...@gmail.com wrote:
C (your example) was intended for very low level programming, things like
operating systems, device drivers, networking stacks, where the speed of a
compiled executable and direct access to hardware was a necessity. That's
Stefan Behnel, 28.02.2013 22:03:
there are also a couple of projects that do
dynamic runtime compilation, most notably PyPy and Numba.
Oh, and HotPy, I keep forgetting about that.
You may want to take a look at the Python implementations page,
specifically the list of Python compilers:
On 02/28/2013 03:25 PM, kramer65 wrote:
Hello,
I'm using Python for a while now and I love it. There is just one thing I
cannot understand. There are compilers for languages like C and C++. why is it
impossible to create a compiler that can compile Python code to machinecode?
My reasoning is
I'm using Python for a while now and I love it. There is just one thing I
cannot understand. There are compilers for languages like C and C++. why is
it impossible to create a compiler that can compile Python code to
machinecode?
Not exactly what you describe, but have you checked out PyPy?
On do, feb 28, 2013 at 12:25:07pm -0800, kramer65 wrote:
Hello,
I'm using Python for a while now and I love it. There is just one thing I
cannot understand. There are compilers for languages like C and C++. why is
it impossible to create a compiler that can compile Python code to
The subject line is wrong. There are multiple compilers. Someone just
listed some of them today in another post.
On 2/28/2013 3:50 PM, Matty Sarro wrote:
Python is an interpreted language, not a compiled language.
A language is just a language. Implementations are implementations*.
That
On Thu, 28 Feb 2013 12:25:07 -0800, kramer65 wrote:
I'm using Python for a while now and I love it. There is just one thing
I cannot understand. There are compilers for languages like C and C++.
why is it impossible to create a compiler that can compile Python code
to machinecode?
It's not
On Thu, 28 Feb 2013 15:50:00 -0500, Matty Sarro wrote:
Python is an interpreted language, not a compiled language.
Actually, *languages* are neither interpreted nor compiled. A language is
an abstract description of behaviour and syntax. Whether something is
interpreted or compiled or a
On Thu, 28 Feb 2013 22:03:09 +0100, Stefan Behnel wrote:
The most widely used static Python compiler is Cython
Cython is not a Python compiler. Cython code will not run in a vanilla
Python implementation. It has different keywords and syntax, e.g.:
cdef inline int func(double num):
...
On Thu, 28 Feb 2013 12:25:07 -0800, kramer65 wrote:
Hello,
I'm using Python for a while now and I love it. There is just one thing
I cannot understand. There are compilers for languages like C and C++.
why is it impossible to create a compiler that can compile Python code
to machinecode?
On Mar 1, 1:47 pm, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:
Cython is not a Python compiler. Cython code will not run in a vanilla
Python implementation. It has different keywords and syntax, e.g.:
cdef inline int func(double num):
...
which gives SyntaxError in a
On Mar 1, 6:25 am, kramer65 kram...@gmail.com wrote:
There are compilers for languages like C and C++. why
is it impossible to create a compiler that can compile
Python code to machinecode?
This is a nice site list a lot of current approaches to that subject:
http://compilers.pydata.org/
--
kramer65於 2013年3月1日星期五UTC+8上午4時25分07秒寫道:
Hello,
I'm using Python for a while now and I love it. There is just one thing I
cannot understand. There are compilers for languages like C and C++. why is
it impossible to create a compiler that can compile Python code to
machinecode?
Steven D'Aprano, 01.03.2013 04:47:
On Thu, 28 Feb 2013 22:03:09 +0100, Stefan Behnel wrote:
The most widely used static Python compiler is Cython
Cython is not a Python compiler. Cython code will not run in a vanilla
Python implementation. It has different keywords and syntax, e.g.:
25 matches
Mail list logo