472,143 Members | 1,808 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,143 software developers and data experts.

Why not a Python compiler?


( Surely if this question has been asked for a zillion of times... )
( and sorry for my english! )

I'm impressed with python. I'm very happy with the language and I
find Python+Pygame a very powerful and productive way of writing 2D
games. I'm not, at this moment, worried about execution speed of the
small game I'm working on (it runs at full 60 fps even in an old AMD-
K6 450 Laptop computer), but I continue asking me the same question:

Why not a Python COMPILER?

It would be very nice to be able to output Linux, MAC or Windows
binaries of compiled (not bytecompiled) code. It would run faster, it
will be smaller in size (I think) and it will be easy to distribute to
people not having python installed. Yes, I know about py2exe, but I'm
not sure if that's the right aproach.

So, what's wrong with compiling python?

Maybe is not possible due to nature of the language? Is just a
decision?

What do you think about this?
Feb 5 '08 #1
68 2515
On Feb 5, 9:19 am, Santiago Romero <srom...@gmail.comwrote:
( Surely if this question has been asked for a zillion of times... )
( and sorry for my english! )

I'm impressed with python. I'm very happy with the language and I
find Python+Pygame a very powerful and productive way of writing 2D
games. I'm not, at this moment, worried about execution speed of the
small game I'm working on (it runs at full 60 fps even in an old AMD-
K6 450 Laptop computer), but I continue asking me the same question:

Why not a Python COMPILER?

It would be very nice to be able to output Linux, MAC or Windows
binaries of compiled (not bytecompiled) code. It would run faster, it
will be smaller in size (I think) and it will be easy to distribute to
people not having python installed. Yes, I know about py2exe, but I'm
not sure if that's the right aproach.

So, what's wrong with compiling python?

Maybe is not possible due to nature of the language? Is just a
decision?

What do you think about this?
I don't know the exact details but I think the issue is the dynamic
nature of Python makes it impossible to correctly store the various
types and changes into compiled code. Someone else will probably be
able to provide a good reason as to why it isn't very feasible, nor a
good idea. If you want to speed up your python look at Psyco.
http://psyco.sourceforge.net/
Feb 5 '08 #2
-On [20080205 09:22], Santiago Romero (sr*****@gmail.com) wrote:
Why not a Python COMPILER?
A lot of things within Python are very run-time dependent so creating a
compiler is not trivial work.

There are, however, endeavours underway like shed skin:

http://code.google.com/p/shedskin/

This provides a Python to C++ compiler, but it enforces some restrictions on
Python's code.

--
Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org/ asmodai
イェルーン ラウフãƒ*ック ヴァン デル ウェルヴェン
http://www.in-nomine.org/ | http://www.rangaku.org/
We have met the enemy and they are ours...
Feb 5 '08 #3
On Feb 5, 9:19 am, Santiago Romero <srom...@gmail.comwrote:
( Surely if this question has been asked for a zillion of times... )
Sure. You can access comp.lang.python via google.google.com. It has a
search function.

Feb 5 '08 #4
On Feb 5, 2:37 am, Kay Schluehr <kay.schlu...@gmx.netwrote:
On Feb 5, 9:19 am, Santiago Romero <srom...@gmail.comwrote:
( Surely if this question has been asked for a zillion of times... )

Sure. You can access comp.lang.python via
groups
.google.com.
It has a
search function.
Feb 5 '08 #5
Santiago Romero a écrit :
( Surely if this question has been asked for a zillion of times... )
Why not checking this by yourself ? google is down ?-)
I'm impressed with python. I'm very happy with the language and I
find Python+Pygame a very powerful and productive way of writing 2D
games. I'm not, at this moment, worried about execution speed of the
small game I'm working on (it runs at full 60 fps even in an old AMD-
K6 450 Laptop computer), but I continue asking me the same question:

Why not a Python COMPILER?
http://docs.python.org/lib/module-compiler.html
It would be very nice to be able to output Linux, MAC or Windows
binaries of compiled (not bytecompiled) code.
Ah, sorry.
It would run faster, it
will be smaller in size (I think)
These two points are very questionnable given Python's dynamicity. IIRC,
some guru already made the point, a couple or more years ago, that it
would be a lot of effort and buy *very* few wrt/ execution speed since
everything still have to happens at runtime. IOW, a JIT compiler seems a
far better solution, but this (so far) still impose some (serious)
limitations to be of any help.

Feb 5 '08 #6
Why not a Python COMPILER?
What about a Python JIT hardware chip, so the CPU doesn't have to
translate. Although it seems to me that with today's dual and quad
core processors that this might be a mute point because you could just
use one of the cores.

Feb 5 '08 #7
Ri*******@gmail.com wrote:
> Why not a Python COMPILER?

What about a Python JIT hardware chip, so the CPU doesn't have to
translate. Although it seems to me that with today's dual and quad
core processors that this might be a mute point because you could just
use one of the cores.
What about a chip that reads your mind and does what you want it to?

I am sure that would be popular with all the frustrated computer users
there are in the world.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Feb 5 '08 #8
Steve Holden wrote:
Ri*******@gmail.com wrote:
>> Why not a Python COMPILER?

What about a Python JIT hardware chip, so the CPU doesn't have to
translate. Although it seems to me that with today's dual and quad
core processors that this might be a mute point because you could just
use one of the cores.
What about a chip that reads your mind and does what you want it to?
+1!
I am sure that would be popular with all the frustrated computer users
there are in the world.
I'll take two. (Chips, not frustrated users).

--
"I sold the cow for these magic ICs," said Jack.
Feb 5 '08 #9
Steve Holden wrote:
Ri*******@gmail.com wrote:
>> Why not a Python COMPILER?

What about a Python JIT hardware chip, so the CPU doesn't have to
translate. Although it seems to me that with today's dual and quad
core processors that this might be a mute point because you could just
use one of the cores.
What about a chip that reads your mind and does what you want it to?
+1!
I am sure that would be popular with all the frustrated computer users
there are in the world.
I'll take two. (Chips, not frustrated users).

--
"I sold the cow for these magic ICs," said Jack.
Feb 5 '08 #10
I'm surprised no one has mentioned Pyrex. It can be used to write
stand-alone C programs using near-Python syntax:

Pyrex: http://www.cosc.canterbury.ac.nz/gre.../python/Pyrex/
Stand-alone how-to: http://www.freenet.org.nz/python/embeddingpyrex/
Pyrex how-to: http://ldots.org/pyrex-guide/,
http://www.artfulcode.net/articles/e...-python-pyrex/ (shameless
plug, I know)
Feb 5 '08 #11
On Feb 5, 11:44 am, Steve Holden <st...@holdenweb.comwrote:
Ripter...@gmail.com wrote:
Why not a Python COMPILER?
What about a Python JIT hardware chip, so the CPU doesn't have to
translate. Although it seems to me that with today's dual and quad
core processors that this might be a mute point because you could just
use one of the cores.

What about a chip that reads your mind and does what you want it to?

I am sure that would be popular with all the frustrated computer users
there are in the world.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
I'm not sure where that came from. Microsoft had talked about a
hardware JIT for .NET a few years back. I was just wondering if anyone
had thought of it for python or anything like that.
Feb 5 '08 #12
On Tue, 05 Feb 2008 13:22:13 -0800, Ri*******@gmail.com wrote:
On Feb 5, 11:44 am, Steve Holden <st...@holdenweb.comwrote:
>Ripter...@gmail.com wrote:
> Why not a Python COMPILER?
What about a Python JIT hardware chip, so the CPU doesn't have to
translate. Although it seems to me that with today's dual and quad
core processors that this might be a mute point because you could
just use one of the cores.

What about a chip that reads your mind and does what you want it to?

I am sure that would be popular with all the frustrated computer users
there are in the world.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC
http://www.holdenweb.com/

I'm not sure where that came from. Microsoft had talked about a hardware
JIT for .NET a few years back. I was just wondering if anyone had
thought of it for python or anything like that.

Okay, you know how hard it is to create a software JIT compiler for a
language as dynamic as Python? It's REALLY HARD, which is why it hasn't
already been done[1]. Now you want that done in *hardware*, which is much
harder. Who's going to spend the money on R&D?

I'm sure there are thousands of l33t hax0rs out there who have thought
"Wouldn't it be c00l if there was a chip I could put into my PC to make
Python run a million times faster!!!". When I was younger and more
stupi^W innocent I had a mad fegairy for Forth and Lisp chips, but their
lack of financial viability and their unfortunate habit of actually being
*slower* than running the language in software put a big dent in the
idea. As general purpose CPUs got faster, the idea of making a specialist
language chip is now pretty much dead. Even if you could find a niche
market prepared to pay for it, "people who run Python programs" is
probably not that market.


[1] Apart from some specializing compilers like Pysco
http://psyco.sourceforge.net/introduction.html
--
Steven
Feb 5 '08 #13
Steven D'Aprano wrote:
On Tue, 05 Feb 2008 13:22:13 -0800, Ri*******@gmail.com wrote:
>On Feb 5, 11:44 am, Steve Holden <st...@holdenweb.comwrote:
>>Ripter...@gmail.com wrote:
Why not a Python COMPILER?
What about a Python JIT hardware chip, so the CPU doesn't have to
translate. Although it seems to me that with today's dual and quad
core processors that this might be a mute point because you could
just use one of the cores.
What about a chip that reads your mind and does what you want it to?

I am sure that would be popular with all the frustrated computer users
there are in the world.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC
http://www.holdenweb.com/
I'm not sure where that came from. Microsoft had talked about a hardware
JIT for .NET a few years back. I was just wondering if anyone had
thought of it for python or anything like that.


Okay, you know how hard it is to create a software JIT compiler for a
language as dynamic as Python? It's REALLY HARD, which is why it hasn't
already been done[1]. Now you want that done in *hardware*, which is much
harder. Who's going to spend the money on R&D?

I'm sure there are thousands of l33t hax0rs out there who have thought
"Wouldn't it be c00l if there was a chip I could put into my PC to make
Python run a million times faster!!!". When I was younger and more
stupi^W innocent I had a mad fegairy for Forth and Lisp chips, but their
lack of financial viability and their unfortunate habit of actually being
*slower* than running the language in software put a big dent in the
idea. As general purpose CPUs got faster, the idea of making a specialist
language chip is now pretty much dead. Even if you could find a niche
market prepared to pay for it, "people who run Python programs" is
probably not that market.

[1] Apart from some specializing compilers like Pysco
http://psyco.sourceforge.net/introduction.html

Quite.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Feb 5 '08 #14
On 5 feb, 05:19, Santiago Romero <srom...@gmail.comwrote:
( Surely if this question has been asked for a zillion of times... )
( and sorry for my english! )

I'm impressed with python. I'm very happy with the language and I
find Python+Pygame a very powerful and productive way of writing 2D
games. I'm not, at this moment, worried about execution speed of the
small game I'm working on (it runs at full 60 fps even in an old AMD-
K6 450 Laptop computer), but I continue asking me the same question:

Why not a Python COMPILER?

It would be very nice to be able to output Linux, MAC or Windows
binaries of compiled (not bytecompiled) code. It would run faster, it
will be smaller in size (I think) and it will be easy to distribute to
people not having python installed. Yes, I know about py2exe, but I'm
not sure if that's the right aproach.

So, what's wrong with compiling python?

Maybe is not possible due to nature of the language? Is just a
decision?

What do you think about this?

There are some projects aimed to speed up Python by a large margin.
Right now you can use psyco, which is considered to be feature
complete, and whose future relies on the Pypy project.

Pypy is a very ambitious project and it aims, amongst many other
goals, to provide a fast just-in-time python implementation.
They even say that the "secret goal is being faster than c, which is
nonsense, isn´t it?" (I still didn´t get the joke though...).

And finally, you have ShedSkin, a project developed by one lonely and
heroic coder (Mark Dufour).
Shedskin aims at being a static python compiler, which can translate a
subset of python to stand alone executables.
It also can compile extension modules for cpython.
It works by translating python to c++ and then to machine code.
The python code must be done in a static way (getting rid of dynamic
features like, for example, not asigning different types to the same
variable).

Luis
Feb 5 '08 #15
Reedick, Andrew wrote:
>-----Original Message-----
From: py********************************@python.org [mailto:python-
li*************************@python.org] On Behalf Of Luis M. González
Sent: Tuesday, February 05, 2008 6:44 PM
To: py*********@python.org
Subject: Re: Why not a Python compiler?
Pypy is a very ambitious project and it aims, amongst many other
goals, to provide a fast just-in-time python implementation.
They even say that the "secret goal is being faster than c, which is
nonsense, isn´t it?" (I still didn´t get the joke though...).

'c' is also the speed of light. And since nothing can travel faster than light...
nice theory, but wrong: The PyPy home page uses a capital letter C:

http://codespeak.net/pypy/dist/pypy/doc/home.html

Cheers,

Carl Friedrich Bolz
Feb 6 '08 #16
Reedick, Andrew wrote:
>-----Original Message-----
From: py********************************@python.org [mailto:python-
li*************************@python.org] On Behalf Of Luis M. González
Sent: Tuesday, February 05, 2008 6:44 PM
To: py*********@python.org
Subject: Re: Why not a Python compiler?
Pypy is a very ambitious project and it aims, amongst many other
goals, to provide a fast just-in-time python implementation.
They even say that the "secret goal is being faster than c, which is
nonsense, isn´t it?" (I still didn´t get the joke though...).

'c' is also the speed of light. And since nothing can travel faster than light...
nice theory, but wrong: The PyPy home page uses a capital letter C:

http://codespeak.net/pypy/dist/pypy/doc/home.html

Cheers,

Carl Friedrich Bolz

Feb 6 '08 #17
Hi Luis,

Luis M. Gonzalez wrote:
Well, lets suppose that being faster than C is the real goal...
How about we call it a very long-term dream?
Are you confident that it will be reached?
We have ideas how to get there, but it is really rather long-term. There
will be a lot of research needed to achieve that for sure.
How far is it at this moment?
Since a year already we have a JIT that makes quite fast code for purely
integer-type operations. Quite fast meaning about the speed of gcc -O0.
So far it is not faster than Psyco (it supports generators, though). We
are confident that the JIT will get substantially better this year
(probably better than Psyco). Where exactly this will leave us we don't
know.
I've been following the project but the scarcity of news is getting me
anxious...
Read the blog: morepypy.blogspot.com :-)

Cheers,

Carl Friedrich

Feb 6 '08 #18
Hi Luis,

Luis M. Gonzalez wrote:
Well, lets suppose that being faster than C is the real goal...
How about we call it a very long-term dream?
Are you confident that it will be reached?
We have ideas how to get there, but it is really rather long-term. There
will be a lot of research needed to achieve that for sure.
How far is it at this moment?
Since a year already we have a JIT that makes quite fast code for purely
integer-type operations. Quite fast meaning about the speed of gcc -O0.
So far it is not faster than Psyco (it supports generators, though). We
are confident that the JIT will get substantially better this year
(probably better than Psyco). Where exactly this will leave us we don't
know.
I've been following the project but the scarcity of news is getting me
anxious...
Read the blog: morepypy.blogspot.com :-)

Cheers,

Carl Friedrich
Feb 6 '08 #19
Reedick, Andrew wrote:
>-----Original Message-----
From: py********************************@python.org [mailto:python-
li*************************@python.org] On Behalf Of Grant Edwards

Nothing can travel faster than the speed of light
_in_a_vacuum_. There are situtaitons where things can (and
regularly do) travel faster than light:
http://en.wikipedia.org/wiki/Cherenkov_radiation


Nope. It propagates, not travels, faster than light. Go ask a physicist
to explain it. It's odd...
So let me see if I understood this correctly: C travels, C++ propagates? :-)
Feb 6 '08 #20
Santiago Romero wrote:
I'm impressed with python. I'm very happy with the language and I
find Python+Pygame a very powerful and productive way of writing 2D
games. I'm not, at this moment, worried about execution speed of the
small game I'm working on (it runs at full 60 fps even in an old AMD-
K6 450 Laptop computer), but I continue asking me the same question:

Why not a Python COMPILER?

It would be very nice to be able to output Linux, MAC or Windows
binaries of compiled (not bytecompiled) code. It would run faster, it
will be smaller in size (I think)
Take a look at Cython. It's an optimising Python-to-C compiler for writing
Python extensions. So you can basically take a Python module and compile it to
C code that runs against the CPython runtime.

http://cython.org/

and it will be easy to distribute to
people not having python installed. Yes, I know about py2exe, but I'm
not sure if that's the right aproach.
That's a different focus, but then, there's "portable Python".

http://www.portablepython.com/

Stefan
Feb 7 '08 #21
Ryszard Szopa wrote:
On Feb 5, 9:30 am, cokofree...@gmail.com wrote:
>I don't know the exact details but I think the issue is the dynamic
nature of Python makes it impossible to correctly store the various
types and changes into compiled code. Someone else will probably be
able to provide a good reason as to why it isn't very feasible, nor a
good idea. If you want to speed up your python look at Psyco. http://psyco.sourceforge.net/

Yeah, but exactly what features make it so hard to write a compiler
for Python?
[...]
a. People tell me writing a compiler for Python is hard.

b. It's certainly way to hard for me.

c. But hey, I've heard about this neat language called Common Lisp that
has a compiler. It looks a lot like Python.

d. So why can't you brainboxes write a compiler for Python?

Please tell me if I'm missing anything from this summary of your thought
processes.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Feb 7 '08 #22
Ryszard Szopa wrote:
Of course, when writing Python extensions in C is fairly easy and
when rewriting just the critical part of the code is enough to get
acceptable performance, I really doubt I will see anybody willing
to invest serious amounts of money and time into writing a native
compiler for Python. Learning C cannot be so hard ;-).
Sure! Learning English also is not too hard. So everyone should be
capable of writing poetry of Shakespeare niveau.

Regards,
Björn

--
BOFH excuse #69:

knot in cables caused data stream to become twisted and kinked

Feb 7 '08 #23
Bjoern Schliessmann wrote:
Learning English also is not too hard. So everyone should be
capable of writing poetry of Shakespeare niveau.
You're lucky that you can infer anything from a wrong statement.

http://www.mipmip.org/tidbits/pronunciation.shtml

Stefan
Feb 7 '08 #24
In article <87************@physik.rwth-aachen.de>,
Torsten Bronger <br*****@physik.rwth-aachen.dewrote:
a parsec was a unit of time.

The latter because it was corrected in the novelization.

Tschö,
Torsten.
Sounds like one. The reverse of light year that sounds like a unit of
time, but isn't. I've heard it used seriously like time in some movie.

--
-- Lou Pecora
Feb 7 '08 #25
On Thu, 07 Feb 2008 09:06:32 -0500, Steve Holden wrote:
Ryszard Szopa wrote:
>On Feb 5, 9:30 am, cokofree...@gmail.com wrote:
>>I don't know the exact details but I think the issue is the dynamic
nature of Python makes it impossible to correctly store the various
types and changes into compiled code. Someone else will probably be
able to provide a good reason as to why it isn't very feasible, nor a
good idea. If you want to speed up your python look at Psyco.
http://psyco.sourceforge.net/

Yeah, but exactly what features make it so hard to write a compiler for
Python?
[...]

a. People tell me writing a compiler for Python is hard.

b. It's certainly way to hard for me.

c. But hey, I've heard about this neat language called Common Lisp that
has a compiler. It looks a lot like Python.

d. So why can't you brainboxes write a compiler for Python?

Please tell me if I'm missing anything from this summary of your thought
processes.

Be fair -- he's asking what specific features of Python make it hard.
That's a reasonable question.
--
Steven
Feb 7 '08 #26
Steven D'Aprano wrote:
On Thu, 07 Feb 2008 09:06:32 -0500, Steve Holden wrote:
>Ryszard Szopa wrote:
>>On Feb 5, 9:30 am, cokofree...@gmail.com wrote:

I don't know the exact details but I think the issue is the dynamic
nature of Python makes it impossible to correctly store the various
types and changes into compiled code. Someone else will probably be
able to provide a good reason as to why it isn't very feasible, nor a
good idea. If you want to speed up your python look at Psyco.
http://psyco.sourceforge.net/
Yeah, but exactly what features make it so hard to write a compiler for
Python?
[...]
a. People tell me writing a compiler for Python is hard.

b. It's certainly way to hard for me.

c. But hey, I've heard about this neat language called Common Lisp that
has a compiler. It looks a lot like Python.

d. So why can't you brainboxes write a compiler for Python?

Please tell me if I'm missing anything from this summary of your thought
processes.


Be fair -- he's asking what specific features of Python make it hard.
That's a reasonable question.

Bah, humbug. Maybe I should be getting more sleep ...

Fortunately someone less grumpy provided quite a decent answer.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Feb 7 '08 #27
On Feb 7, 11:25*pm, Hrvoje Niksic <hnik...@xemacs.orgwrote:
Steven D'Aprano <st...@REMOVE-THIS-cybersource.com.auwrites:
Be fair -- he's asking what specific features of Python make it
hard. *That's a reasonable question.

Indeed. *The best explanation I've seen explained goes something like
this: imagine a hypothetical Python compiler that achieves native
compilation by compiling to Common Lisp and using the CL's compiler to
produce native code. *Upon encountering the expression such as:

a + b

the compiler could do little else except translate it to something
like:

(python:add a b)
[snip more interesting considerations about compiling python]

Please get back on topic. This discussion is about parsecs and
wookies now.

--
Arnaud

Feb 8 '08 #28
Hallöchen!

Reedick, Andrew writes:
>-----Original Message-----
From: py********************************@python.org [mailto:python-
li*************************@python.org] On Behalf Of Torsten Bronger
Sent: Thursday, February 07, 2008 3:32 PM
To: py*********@python.org
Subject: Re: Why not a Python compiler?
>>I wonder if George Lucas intended it as a joke or if he thought
a parsec was a unit of time.

The latter because it was corrected in the novelization.

Errr... didn't one of the novels explain it away by describing the
kessel run as a region of space warped by black holes or other
objects? Bragging rights for crossing such a field thus centered
on shortest distance instead of time.
Well, in the link that Grant provided, it says

In the A New Hope novelization, Han says "standard time units"
rather than "parsecs". Therefore, the reduced distance of Solo's
Kessel Run is most likely a retcon to explain George Lucas's
confusion of time and distance units.

Tschö,
Torsten.

--
Torsten Bronger, aquisgrana, europa vetus
Jabber ID: br*****@jabber.org
(See http://ime.webhop.org for further contact info.)
Feb 8 '08 #29
On 2008-02-08, Dennis Lee Bieber <wl*****@ix.netcom.comwrote:
A Parsec is a fixed value (which, admittedly, presumes the culture
developed a 360degree circle broken into degrees =minutes =>
seconds... or, at least, some units compatible with the concept of an
"arc second", like 400 grads of, say, 100 "minutes", each of 100
"seconds")
It also presumes a standard diamter of that circle.

--
Grant Edwards grante Yow! Are you the
at self-frying president?
visi.com
Feb 8 '08 #30
On 2008-02-08, Arnaud Delobelle <ar*****@googlemail.comwrote:
>the compiler could do little else except translate it to something
like:

(python:add a b)
[snip more interesting considerations about compiling python]

Please get back on topic. This discussion is about parsecs and
wookies now.
What's a "wookie" a unit of?

--
Grant Edwards grante Yow! Am I accompanied by a
at PARENT or GUARDIAN?
visi.com
Feb 8 '08 #31
Grant Edwards wrote:
On 2008-02-08, Arnaud Delobelle <ar*****@googlemail.comwrote:
>>the compiler could do little else except translate it to something
like:

(python:add a b)
[snip more interesting considerations about compiling python]

Please get back on topic. This discussion is about parsecs and
wookies now.

What's a "wookie" a unit of?
Fur.
Feb 8 '08 #32
In article <13*************@corp.supernews.com>,
Grant Edwards <gr****@visi.comwrote:
On 2008-02-08, Dennis Lee Bieber <wl*****@ix.netcom.comwrote:
A Parsec is a fixed value (which, admittedly, presumes the culture
developed a 360degree circle broken into degrees =minutes =>
seconds... or, at least, some units compatible with the concept of an
"arc second", like 400 grads of, say, 100 "minutes", each of 100
"seconds")

It also presumes a standard diamter of that circle.
Which is the Earth's orbit. So, long, long ago in a galaxy far, far
away did they know about the Earth and decide to use it as the basis for
length in the universe? Even before people on earth defined it?

Or (ominous music builds here, switch to low voice) is it as some now
contend? We are the decendents of a long, lost civilization who
colonized Earth and used it as a base for their operations to the point
of adopting it as their own home?

.... You Betcha!

:-)

--
-- Lou Pecora
Feb 8 '08 #33
Grant Edwards wrote:
On 2008-02-08, Arnaud Delobelle <ar*****@googlemail.comwrote:
>>the compiler could do little else except translate it to something
like:

(python:add a b)
[snip more interesting considerations about compiling python]

Please get back on topic. This discussion is about parsecs and
wookies now.

What's a "wookie" a unit of?
A wookie is someone who's onwy just joined a team and hasn't pwayed vewy
much.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Feb 9 '08 #34
On Fri, 08 Feb 2008 05:12:29 -0800, Ryszard Szopa wrote:
Expressing simple loops as C for loops...
You mean simple loops like ``for i in xrange(1000):``? How should the
compiler know what object is bound to the name `xrange` when that loop is
executed?

Ciao,
Marc 'BlackJack' Rintsch
Feb 9 '08 #35
On Fri, 08 Feb 2008 17:45:36 +0000, Grant Edwards wrote:
On 2008-02-08, Arnaud Delobelle <ar*****@googlemail.comwrote:
>Please get back on topic. This discussion is about parsecs and
wookies now.

What's a "wookie" a unit of?
The degree of confusion among the jury when using the Chewbacca defense. :-)

http://en.wikipedia.org/wiki/Chewbacca_defense

Ciao,
Marc 'BlackJack' Rintsch
Feb 9 '08 #36
On 8 feb, 22:15, Marc 'BlackJack' Rintsch <bj_...@gmx.netwrote:
On Fri, 08 Feb 2008 17:45:36 +0000, Grant Edwards wrote:
On 2008-02-08, Arnaud Delobelle <arno...@googlemail.comwrote:
Please get back on topic. This discussion is about parsecs and
wookies now.
What's a "wookie" a unit of?

The degree of confusion among the jury when using the Chewbacca defense. :-)

http://en.wikipedia.org/wiki/Chewbacca_defense

Ciao,
Marc 'BlackJack' Rintsch

You are all a bunch of pathetic geeks with your nerdy lingo.
All of you should be frozen in carbonite and sold to a Hutt...
Feb 9 '08 #37
Luis M. González wrote:
On 8 feb, 22:15, Marc 'BlackJack' Rintsch <bj_...@gmx.netwrote:
>On Fri, 08 Feb 2008 17:45:36 +0000, Grant Edwards wrote:
>>On 2008-02-08, Arnaud Delobelle <arno...@googlemail.comwrote:
Please get back on topic. This discussion is about parsecs and
wookies now.
What's a "wookie" a unit of?
The degree of confusion among the jury when using the Chewbacca defense. :-)

http://en.wikipedia.org/wiki/Chewbacca_defense

Ciao,
Marc 'BlackJack' Rintsch


You are all a bunch of pathetic geeks with your nerdy lingo.
All of you should be frozen in carbonite and sold to a Hutt...
Ahhh, *you* must be the one who found time to write that Wikipedia
article on the Chewbacca defense.
Feb 9 '08 #38
Steven D'Aprano wrote:
On Wed, 06 Feb 2008 10:14:10 -0600, Reedick, Andrew wrote:
>>>'c' is also the speed of light.
'c' is the speed of light _in_a_vacuum_.
True.

>>>And since nothing can travel faster than light...
Nothing can travel faster than the speed of light _in_a_vacuum_. There
are situtaitons where things can (and regularly do) travel faster than
light: http://en.wikipedia.org/wiki/Cherenkov_radiation

Nope. It propagates, not travels, faster than light. Go ask a
physicist to explain it. It's odd...

Propagate, travel, what's the difference?
Unfortunately, I didn't study any of this but I sure do remember the
answer one drunk physic said to me in a bar when I ask him the question:
"Does light travel or propagate?"
He answered: "Depends on how you see light."
He must have studied philosophy too :-)
<cut rest>
--
mph
Feb 9 '08 #39

On Sat, 2008-02-09 at 14:56 +0100, Martin P. Hellwig wrote:
Propagate, travel, what's the difference?
Unfortunately, I didn't study any of this but I sure do remember the
answer one drunk physic said to me in a bar when I ask him the question:
"Does light travel or propagate?"
He answered: "Depends on how you see light."
He must have studied philosophy too :-)
Quantum mechanics are closely related to philosophy.

--
Best Regards,
Med Venlig Hilsen,
Thomas

Feb 9 '08 #40
So, showing of my physics ignorance: I presume then that this means that
light, say from the sun, is actually sending particles to the earth, since the
space between is mostly vacuum? Or is there enough material in the
near-vacuum of space for propogation to occur?
On Sat, 09 Feb 2008 12:25:51 -0800, Dennis Lee Bieber <wl*****@ix.netcom.com>
wrote:
...
Or just the old particle/wave dichotomy... particles travel, waves
propagate (that is, the wave form -- crest/dip -- changes position, but
the material of the medium it is in just jiggles in place).
Feb 9 '08 #41
Grant Edwards wrote:
On 2008-02-09, Thomas Dybdahl Ahle <lo****@gmail.comwrote:
>On Sat, 2008-02-09 at 14:56 +0100, Martin P. Hellwig wrote:
>>>Propagate, travel, what's the difference?

Unfortunately, I didn't study any of this but I sure do remember the
answer one drunk physic said to me in a bar when I ask him the question:
"Does light travel or propagate?"
He answered: "Depends on how you see light."
He must have studied philosophy too :-)
Quantum mechanics are closely related to philosophy.

I've never understood that claim. You can philosophize about
anything: biology, math, weather, the stars, the moon, and so
on. I don't see how QM is any more related to philosophy than
any other field in science.
Any science with sufficient room for uncertainty (no pun) will
immediately be claimed as evidence for every pseudo-theory ever imagined
over a bowl of bad weed. "Particles can tunnel anywhere? Ahh, that
must be how the telepaths are doing it."
Feb 9 '08 #42
Lou Pecora wrote:
[parsecs]
Which is the Earth's orbit. So, long, long ago in a galaxy far,
far away did they know about the Earth and decide to use it as the
basis for length in the universe? Even before people on earth
defined it?
No, even simpler: In the Star Wars galaxy, parsec is a time unit. We
on earth just accidentally defined a unit with exactly the same
name -- which is a distance unit instead. :)

Regards,
Björn

--
BOFH excuse #167:

excessive collisions & not enough packet ambulances

Feb 9 '08 #43
On Feb 8, 2:53�pm, Lou Pecora <pec...@anvil.nrl.navy.milwrote:
In article <13qotf2mgpvk...@corp.supernews.com>,
�Grant Edwards <gra...@visi.comwrote:
On 2008-02-08, Dennis Lee Bieber <wlfr...@ix.netcom.comwrote:
� � � A Parsec is a fixed value (which, admittedly, presumes the culture
developed a 360degree circle broken into degrees =minutes =>
seconds... or, at least, some units compatible with the concept of an
"arc second", like 400 grads of, say, 100 "minutes", each of 100
"seconds")
It also presumes a standard diamter of that circle.

Which is the Earth's orbit. �So, long, long ago in a galaxy far, far
away did they know about the Earth and decide to use it as the basis for
length in the universe? �Even before people on earth defined it? �

Or (ominous music builds here, switch to low voice) is it as some now
contend? �We are the decendents of a long, lost civilization who
colonized Earth and used it as a base for their operations to the point
of adopting it as their own home?

... �You Betcha!

:-)
How come they spoke English?
>
--
-- Lou Pecora
Feb 10 '08 #44
On Feb 6, 2:43 am, "Luis M. González" <luis...@gmail.comwrote:
On 5 feb, 05:19, Santiago Romero <srom...@gmail.comwrote:
( Surely if this question has been asked for a zillion of times... )
( and sorry for my english! )
I'm impressed with python. I'm very happy with the language and I
find Python+Pygame a very powerful and productive way of writing 2D
games. I'm not, at this moment, worried about execution speed of the
small game I'm working on (it runs at full 60 fps even in an old AMD-
K6 450 Laptop computer), but I continue asking me the same question:
Why not a Python COMPILER?
It would be very nice to be able to output Linux, MAC or Windows
binaries of compiled (not bytecompiled) code. It would run faster, it
will be smaller in size (I think) and it will be easy to distribute to
people not having python installed. Yes, I know about py2exe, but I'm
not sure if that's the right aproach.
So, what's wrong with compiling python?
Maybe is not possible due to nature of the language? Is just a
decision?
What do you think about this?

There are some projects aimed to speed up Python by a large margin.
Right now you can use psyco, which is considered to be feature
complete, and whose future relies on the Pypy project.

Pypy is a very ambitious project and it aims, amongst many other
goals, to provide a fast just-in-time python implementation.
They even say that the "secret goal is being faster than c, which is
nonsense, isn´t it?" (I still didn´t get the joke though...).

And finally, you have ShedSkin, a project developed by one lonely and
heroic coder (Mark Dufour).
Shedskin aims at being a static python compiler, which can translate a
subset of python to stand alone executables.
It also can compile extension modules for cpython.
It works by translating python to c++ and then to machine code.
The python code must be done in a static way (getting rid of dynamic
features like, for example, not asigning different types to the same
variable).

Luis
and Take a look at this page if you look for a plan to develop a fast
python program, you wont regret it.
http://ondrej.certik.cz/development/

Mani
Feb 10 '08 #45
On 2008-02-09, Doug Morse <mo***@edoug.orgwrote:
> Or just the old particle/wave dichotomy... particles
travel, waves propagate (that is, the wave form -- crest/dip
-- changes position, but the material of the medium it is in
just jiggles in place).
So, showing of my physics ignorance: I presume then that this
means that light, say from the sun, is actually sending
particles to the earth, since the space between is mostly
vacuum? Or is there enough material in the near-vacuum of
space for propogation to occur?
They act like both waves and as particles depending on what
experiment you do. Though even if you consider them as waves
they don't depend on "jiggling" of a medium. That medium was
called the "luminiferous aether" (aka ether), and in the 19th
century experiments showed conclusively that it doesn't exist:

http://en.wikipedia.org/wiki/Luminiferous_aether

--
Grant Edwards grante Yow! .. I think I'd
at better go back to my DESK
visi.com and toy with a few common
MISAPPREHENSIONS...
Feb 10 '08 #46
Bjoern Schliessmann wrote:
No, even simpler: In the Star Wars galaxy, parsec is a time unit.
Yep, it's the Paradoxical Second, defined as the average length of
time it takes a person to figure out that the pilot they've
hired is feeding them a load of bull for the purpose of finding
out how long it takes them to notice they're being fed a load
of bull.

--
Greg
Feb 11 '08 #47
On Mon, 11 Feb 2008 19:54:30 +1300, greg wrote:
>Until DeBroglie formulated
its hypothesis of dual nature of matter (and light): wave and particle
at the same time.

Really it's neither waves nor particles, but something else for which
there isn't a good word in everyday English. Physicists seem to have got
around that by redefining the word "particle" to mean that new thing.
I like the term "wavical" to describe that. We're all made of wavicals,
it's just that the wave-like fuzziness is usually too small to notice.

Unless you drink too much tequila.
--
Steven
Feb 11 '08 #48
On 2008-02-11, Steve Holden <st***@holdenweb.comwrote:
Well the history of physics for at least two hundred years has
been a migration away from the intuitive.
Starting at least as far back as Newtonian mechanics. I once
read a very interesting article about some experiments that
showed that even simple newtonian physics is counter-intuitive.
Two of the experiments I remember vividly. One of them showed
that the human brain expects objects constrained to travel in a
curved path will continue to travel in a curved path when
released. The other showed that the human brain expects that
when an object is dropped it will land on a spot immediately
below the drop point -- regardless of whether or not the ojbect
was in motion horizontally when released.

After repeated attempts at the tasks set for them in the
experiments, the subjects would learn strategies that would
work in a Newtonian world, but the initial intuitive reactions
were very non-Newtonian (regardless of how educated they were
in physics).
In strict linguistic terms the word "subatomic" is a fine
oxymoron. I suspect it's really "turtles all the way down".
--
Grant Edwards grante Yow! Yes, but will I
at see the EASTER BUNNY in
visi.com skintight leather at an
IRON MAIDEN concert?
Feb 11 '08 #49
Grant Edwards wrote:
On 2008-02-11, Steve Holden <st***@holdenweb.comwrote:

>Well the history of physics for at least two hundred years has
been a migration away from the intuitive.

Starting at least as far back as Newtonian mechanics. I once
read a very interesting article about some experiments that
showed that even simple newtonian physics is counter-intuitive.
Two of the experiments I remember vividly. One of them showed
that the human brain expects objects constrained to travel in a
curved path will continue to travel in a curved path when
released. The other showed that the human brain expects that
when an object is dropped it will land on a spot immediately
below the drop point -- regardless of whether or not the ojbect
was in motion horizontally when released.

After repeated attempts at the tasks set for them in the
experiments, the subjects would learn strategies that would
work in a Newtonian world, but the initial intuitive reactions
were very non-Newtonian (regardless of how educated they were
in physics).
I'm pretty sure we can still hear educated people say that free fall
speed depends on the weight of the object without realizing it's a
double mistake.

Cheers,
RB
Feb 11 '08 #50

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

58 posts views Thread by Svein Ove Aas | last post: by
118 posts views Thread by 63q2o4i02 | last post: by
reply views Thread by Kurt B. Kaiser | last post: by
16 posts views Thread by per9000 | last post: by
53 posts views Thread by Vicent Giner | last post: by
reply views Thread by Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.