py-backwards - Python to python compiler that allows you to use Python 3.6 features in older versions.
Hi folks, I've no idea if you could be interested in this beastie https://github.com/nvbn/py-backwards but if you don't know about it, you can't be :) Kindest regards. Mark Lawrence. -- https://mail.python.org/mailman/listinfo/python-list
Re: Multiline parsing of python compiler demistification needed
On Thursday, June 16, 2016 at 8:34:46 PM UTC+12, Yubin Ruan wrote: > print "A test case" + \ >"str_1[%s] " + \ >"str_2[%s] " % (str_1, str_2) Try this: print \ ( "A test case" "str_1[%s] " "str_2[%s] " % (str_1, str_2) ) Python takes this nifty feature from C where multiple string literals in a row are implicitly concatenated into a single string. If you come from a Java or C# background, you probably didn’t know about this, because those languages neglected to include this facility. -- https://mail.python.org/mailman/listinfo/python-list
Re: Multiline parsing of python compiler demistification needed
"Yubin Ruan" wrote in message news:930753e3-4c9c-45e9-9117-d340c033a...@googlegroups.com... Hi, everyone, I have some problem understand the rule which the python compiler use to parsing the multiline string. Consider this snippet: str_1 = "foo" str_2 = "bar" print "A test case" + \ "str_1[%s] " + \ "str_2[%s] " % (str_1, str_2) Why would the snippet above give me an "TypeError: not all arguments converted during string formatting" while the one below not ? This has nothing to do with multi-line strings. Try that as a single line - print "A test case " + "str_1[%s] " + "str_2[%s]" % (str_1, str_2) You will get the same error message. The reason is that the use of the '+' sign to concatenate strings requires that each sub-string is a valid string in its own right. The correct way to write it is - print "A test case " + "str_1[%s] " % (str_1) + "str_2[%s]" % (str_2) If you wrote it without the '+' signs, the answer would be different. Python treats contiguous strings as a single string, so you could write it like this - print "A test case " "str_1[%s] " "str_2[%s]" % (str_1, str_2) Frank Millman -- https://mail.python.org/mailman/listinfo/python-list
Re: Multiline parsing of python compiler demistification needed
Yubin Ruan writes: > Hi, everyone, I have some problem understand the rule which the python > compiler use to parsing the multiline string. > > Consider this snippet: > > str_1 = "foo" > str_2 = "bar" > > print "A test case" + \ >"str_1[%s] " + \ >"str_2[%s] " % (str_1, str_2) > > Why would the snippet above give me an "TypeError: not all arguments > converted during string formatting" while the one below not ? > > print "A test case" + \ >"str_1[%s] " % str1 > > Obviously the first snippet have just one more line and one more > argument to format than the second one. Isn't that unreasonable ? I > couldn't find any clue about that. Anyone help ? Multiline is irrelevant. What is happening is that % binds more tightly (has a higher precedence) than +. print "foo" + "bar %s" % "baz" ==> foobar baz print "foo %s" + "bar %s" % ("baz", "baz") ==> Traceback (most recent call last): File "", line 1, in TypeError: not all arguments converted during string formatting print ("foo %s" + "bar %s") % ("baz", "baz") ==> foo bazbar baz -- https://mail.python.org/mailman/listinfo/python-list
Re: Multiline parsing of python compiler demistification needed
Yubin Ruan wrote: > Hi, everyone, I have some problem understand the rule which the python > compiler use to parsing the multiline string. > > Consider this snippet: > > str_1 = "foo" > str_2 = "bar" > > print "A test case" + \ >"str_1[%s] " + \ >"str_2[%s] " % (str_1, str_2) > > Why would the snippet above give me an "TypeError: not all arguments > converted during string formatting" while the one below not ? > > print "A test case" + \ >"str_1[%s] " % str1 > > Obviously the first snippet have just one more line and one more argument > to format than the second one. Isn't that unreasonable ? I couldn't find > any clue about that. Anyone help ? > > I am using python 2.7.6 > It doesn't matter into how many lines you break your statement. The % operator has higher precedence than +, so a + b % c is evaluated as a + (b % c). When c is a 2-tuple and b contains only one "%s" that inevitably fails: >>> "%s" + "%s" % (1, 2) Traceback (most recent call last): File "", line 1, in TypeError: not all arguments converted during string formatting > Also, I know the **Pythonic** way to play with multiline, which would be > using triple quote or a pair of parenthesis to surround the multiline > string to make it a **online** string. You don't have to show code in that > respect. Did you know that adjacent string literals are merged into one? Compare: >>> print "foo" + \ ... "%s" + \ ... "%s" % (1, 2) Traceback (most recent call last): File "", line 3, in TypeError: not all arguments converted during string formatting >>> print "foo" \ ... "%s" \ ... "%s" % (1, 2) foo12 -- https://mail.python.org/mailman/listinfo/python-list
Multiline parsing of python compiler demistification needed
Hi, everyone, I have some problem understand the rule which the python compiler use to parsing the multiline string. Consider this snippet: str_1 = "foo" str_2 = "bar" print "A test case" + \ "str_1[%s] " + \ "str_2[%s] " % (str_1, str_2) Why would the snippet above give me an "TypeError: not all arguments converted during string formatting" while the one below not ? print "A test case" + \ "str_1[%s] " % str1 Obviously the first snippet have just one more line and one more argument to format than the second one. Isn't that unreasonable ? I couldn't find any clue about that. Anyone help ? I am using python 2.7.6 Also, I know the **Pythonic** way to play with multiline, which would be using triple quote or a pair of parenthesis to surround the multiline string to make it a **online** string. You don't have to show code in that respect. Thanks in advance! Ruan. -- https://mail.python.org/mailman/listinfo/python-list
Re: Snowball to Python compiler
Terry Reedy, 22.04.2011 05:48: On 4/21/2011 8:25 PM, Paul Rubin wrote: Matt Chaput writes: I'm looking for some code that will take a Snowball program and compile it into a Python script. Or, less ideally, a Snowball interpreter written in Python. (http://snowball.tartarus.org/) Anyone heard of such a thing? I never saw snowball before, it looks kind of interesting, and it looks like it already has a way to compile to C. If you're using it for IR on any scale, you're surely much better off using the C routines with a C API wrapper, If the C routines are in a shared library, you should be able to write the interface in Python with ctypes. Since it appears that the code has to get compiled anyway, Cython is likely a better option, as it makes it easier to write a fast and Pythonic wrapper. From a quick look, Snowball also has a "-widechar" option that could allow interfacing directly with Python's Unicode strings in 16-bit Unicode builds (but not 32-bit builds!). That would provide for really fast wrappers that do not even need an intermediate encoding step. And PEP 393 would eventually allow to include both a UTF-8 and a 16-bit version of the (prefixed) Snowball code, and to use them alternatively, depending on the internal layout of the processed string, with the obvious fallback to UTF-8 encoding only for strings that really exceed the lower 16-bit Unicode range. That sounds like a really nice project. Stefan -- http://mail.python.org/mailman/listinfo/python-list
Re: Snowball to Python compiler
On 4/21/2011 8:25 PM, Paul Rubin wrote: Matt Chaput writes: I'm looking for some code that will take a Snowball program and compile it into a Python script. Or, less ideally, a Snowball interpreter written in Python. (http://snowball.tartarus.org/) Anyone heard of such a thing? I never saw snowball before, it looks kind of interesting, and it looks like it already has a way to compile to C. If you're using it for IR on any scale, you're surely much better off using the C routines with a C API wrapper, If the C routines are in a shared library, you should be able to write the interface in Python with ctypes. than translating snowball to Python, which will be dog slow to interpret. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list
Re: Snowball to Python compiler
Matt Chaput writes: > I'm looking for some code that will take a Snowball program and > compile it into a Python script. Or, less ideally, a Snowball > interpreter written in Python. > > (http://snowball.tartarus.org/) > > Anyone heard of such a thing? I never saw snowball before, it looks kind of interesting, and it looks like it already has a way to compile to C. If you're using it for IR on any scale, you're surely much better off using the C routines with a C API wrapper, than translating snowball to Python, which will be dog slow to interpret. -- http://mail.python.org/mailman/listinfo/python-list
Re: Snowball to Python compiler
A third (more-than-) possible solution: google("python snowball"); the first page of results has at least 3 hits referring to Python wrappers for Snowball. There are quite a few wrappers for the C-compiled snowball stemmers, but I'm looking for a pure-Python solution. It doesn't seem like there is such a thing, but I figured I'd take a shot here before I think about doing it myself :/ Matt -- http://mail.python.org/mailman/listinfo/python-list
Re: Snowball to Python compiler
On Friday, April 22, 2011 8:05:37 AM UTC+10, Matt Chaput wrote: > I'm looking for some code that will take a Snowball program and compile > it into a Python script. Or, less ideally, a Snowball interpreter > written in Python. > > (http://snowball.tartarus.org/) If anyone has done such things they are not advertising them in the usual places. A third (more-than-) possible solution: google("python snowball"); the first page of results has at least 3 hits referring to Python wrappers for Snowball. -- http://mail.python.org/mailman/listinfo/python-list
Snowball to Python compiler
On the slim chance that (a) somebody worked on something like this but never uploaded it to PyPI, and (b) the person who did (a) or heard about it is reading this list ;) -- I'm looking for some code that will take a Snowball program and compile it into a Python script. Or, less ideally, a Snowball interpreter written in Python. (http://snowball.tartarus.org/) Anyone heard of such a thing? Thanks! Matt -- http://mail.python.org/mailman/listinfo/python-list
Re: search for a python compiler program whose name is jingle
On 2008-10-20, oyster <[EMAIL PROTECTED]> wrote: > I don't remember its name very clear, it may be 'jingle' or > not this program runs on windows and can compile a python > program into exe file without gcc it has no webspace but is > announced on the author's blog when I find it some times ago. > I can't find the link now. I there anybody else know it and > tell me? Thanx in advance Is "Jungle" what you're looking for? http://www.suda-chen.biz/?page_id=21 -- Grant Edwards grante Yow! Civilization is fun! at Anyway, it keeps me busy!! visi.com -- http://mail.python.org/mailman/listinfo/python-list
Re: search for a python compiler program whose name is jingle
On Oct 20, 3:46 pm, oyster <[EMAIL PROTECTED]> wrote: > I don't remember its name very clear, it may be 'jingle' or not > this program runs on windows and can compile a python program into exe > file without gcc I haven't heard of 'jingle' but there are a number of tools for achieving this: http://effbot.org/pyfaq/how-can-i-create-a-stand-alone-binary-from-a-python-script.htm -- http://mail.python.org/mailman/listinfo/python-list
Re: search for a python compiler program whose name is jingle
> I don't remember its name very clear, it may be 'jingle' or not this > program runs on windows and can compile a python program into exe file > without gcc > it has no webspace but is announced on the author's blog when I find it > some times ago. > I can't find the link now. I there anybody else know it and tell me? > Thanx in advance I don't know where you're getting the name "Jingle", but I think there's a similar program called "Shedskin" that translates Python to C++. -- http://mail.python.org/mailman/listinfo/python-list
search for a python compiler program whose name is jingle
I don't remember its name very clear, it may be 'jingle' or not this program runs on windows and can compile a python program into exe file without gcc it has no webspace but is announced on the author's blog when I find it some times ago. I can't find the link now. I there anybody else know it and tell me? Thanx in advance -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
On 14/02/2008, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Thu, 14 Feb 2008 10:35:09 +0200, Dotan Cohen wrote: > > >> If they asked an archer to fire an arrow through a distant window, he'd > >> aim slightly above it. You can't spend dozens of hours every week > >> shooting arrows at targets without learning to compensate for gravity. > > > > > You are forgetting two importance things here. One, the archer does not > > have a crosshair that he puts slightly above the window. He is going > > mostly by feel and experience. I shot quite a few arrows when I was of > > the age that does that, and as skill builds, the arrows know to find > > their target. The archer is not moving dials or crosshairs. > > > So what? He's still *aiming*. > > I don't know if you did proper archery, as I have, or just played around > with a toy bow with rubber arrows, but it's only in fairy tales that > there are magic arrows that "know to find their target". The archer may > not be able to articulate all the factors involved, but you can damn well > bet that "aim a little bit higher than the target" is one of the factors > that he could consciously say. > > ("A little bit" is naturally dependent on how distant the target is.) > > They weren't idiots, and even in the Middle Ages if you aimed directly at > a distant target your arrow would drop below where you were aiming. I did some archery at summer camp for maybe four years, that would be two months each year. Not a lot, but although I don't remember the specifics of distance and equipment, I was one of the better kids on the range. I knew well enough that aim was different at distance than at close range, but it was more than just "aiming higher". > > The second thing that you are forgetting is that archery skills are a > > classified military information. Should one develop a system for > > improving accuracy, he would not tell it to everyone. > > > What a load of bollocks. > > Far from archery skills being a "military secret", archery was a common > skill amongst both the nobility and the commoners. Nobles hunted game; > even ladies sometimes hunted small game like rabbits. Professional > hunters used the bow to feed themselves and their families. People > learned to use the bow from childhood. > > In 1363, England's King Edward III declared that every able-bodied man in > the kingdom, rich and poor alike, must practice archery at holidays and > other opportunities. Archery skills weren't a secret known by a few, they > were extremely common. In modern terms, don't think "knows the codes to > launch the nuclear missiles", think "knowing how to aim your rifle at a > target and pull the trigger": even the guys sitting out the war behind a > desk are expected to know how to shoot a rifle. In some battles, English > armies were made up of up to nine archers out of every ten fighting men. > A skill that common was no secret. > > The overwhelming military advantage England had over the French was the > hardware and tactics: the Welsh longbow was a formidable weapon, far more > powerful than the European bows, and the English nobility relied on it > while the French treated their peasant soldiers with contempt. The > English lords might have been just as contemptuous of their archers' > social class as the French were, but they had nothing but respect for the > power of their weapon. The French archers were simply outgunned, or > outbowed if you prefer, and the French knights were brave but stupid. > I was unaware of the popularity of the sport. I should have checked my facts and not posted my opinions. Thank you for the history lesson, and more importantly, the etiquite lesson. Dotan Cohen http://what-is-what.com http://gibberish.co.il א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
On Thu, 14 Feb 2008 10:35:09 +0200, Dotan Cohen wrote: >> If they asked an archer to fire an arrow through a distant window, he'd >> aim slightly above it. You can't spend dozens of hours every week >> shooting arrows at targets without learning to compensate for gravity. > > You are forgetting two importance things here. One, the archer does not > have a crosshair that he puts slightly above the window. He is going > mostly by feel and experience. I shot quite a few arrows when I was of > the age that does that, and as skill builds, the arrows know to find > their target. The archer is not moving dials or crosshairs. So what? He's still *aiming*. I don't know if you did proper archery, as I have, or just played around with a toy bow with rubber arrows, but it's only in fairy tales that there are magic arrows that "know to find their target". The archer may not be able to articulate all the factors involved, but you can damn well bet that "aim a little bit higher than the target" is one of the factors that he could consciously say. ("A little bit" is naturally dependent on how distant the target is.) They weren't idiots, and even in the Middle Ages if you aimed directly at a distant target your arrow would drop below where you were aiming. > The second thing that you are forgetting is that archery skills are a > classified military information. Should one develop a system for > improving accuracy, he would not tell it to everyone. What a load of bollocks. Far from archery skills being a "military secret", archery was a common skill amongst both the nobility and the commoners. Nobles hunted game; even ladies sometimes hunted small game like rabbits. Professional hunters used the bow to feed themselves and their families. People learned to use the bow from childhood. In 1363, England's King Edward III declared that every able-bodied man in the kingdom, rich and poor alike, must practice archery at holidays and other opportunities. Archery skills weren't a secret known by a few, they were extremely common. In modern terms, don't think "knows the codes to launch the nuclear missiles", think "knowing how to aim your rifle at a target and pull the trigger": even the guys sitting out the war behind a desk are expected to know how to shoot a rifle. In some battles, English armies were made up of up to nine archers out of every ten fighting men. A skill that common was no secret. The overwhelming military advantage England had over the French was the hardware and tactics: the Welsh longbow was a formidable weapon, far more powerful than the European bows, and the English nobility relied on it while the French treated their peasant soldiers with contempt. The English lords might have been just as contemptuous of their archers' social class as the French were, but they had nothing but respect for the power of their weapon. The French archers were simply outgunned, or outbowed if you prefer, and the French knights were brave but stupid. -- Steven -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
On 14/02/2008, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Wed, 13 Feb 2008 22:13:51 +, I V wrote: > > > On Mon, 11 Feb 2008 14:07:49 -0800, Erik Max Francis wrote: > >> experience. The notion of impetus -- where an object throw moves in a > >> straight line until it runs out of impetus, then falls straight down -- > >> is clearly contrary to everyday experience of watching two people throw > >> a ball back and forth from a distance, since the path of the ball is > >> clearly curved. > > > > It's clear _to us_ because when we think about such things, we think in > > Newtonian terms. I'm not at all sure it would have been clear to people > > in the middle ages; when you throw a ball, it whizzes by so fast, it's > > hard to be sure how it's actually moving. > > > If they asked an archer to fire an arrow through a distant window, he'd > aim slightly above it. You can't spend dozens of hours every week > shooting arrows at targets without learning to compensate for gravity. You are forgetting two importance things here. One, the archer does not have a crosshair that he puts slightly above the window. He is going mostly by feel and experience. I shot quite a few arrows when I was of the age that does that, and as skill builds, the arrows know to find their target. The archer is not moving dials or crosshairs. The second thing that you are forgetting is that archery skills are a classified military information. Should one develop a system for improving accuracy, he would not tell it to everyone. Thus, unless the medieval version of the physicist was an archer himself (actually likely, if he took an interest in both, but then he would be military as well) then he would not know the archer's secrets. Dotan Cohen http://what-is-what.com http://gibberish.co.il א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
On Wed, 13 Feb 2008 22:13:51 +, I V wrote: > On Mon, 11 Feb 2008 14:07:49 -0800, Erik Max Francis wrote: >> experience. The notion of impetus -- where an object throw moves in a >> straight line until it runs out of impetus, then falls straight down -- >> is clearly contrary to everyday experience of watching two people throw >> a ball back and forth from a distance, since the path of the ball is >> clearly curved. > > It's clear _to us_ because when we think about such things, we think in > Newtonian terms. I'm not at all sure it would have been clear to people > in the middle ages; when you throw a ball, it whizzes by so fast, it's > hard to be sure how it's actually moving. If they asked an archer to fire an arrow through a distant window, he'd aim slightly above it. You can't spend dozens of hours every week shooting arrows at targets without learning to compensate for gravity. The theory of impetus went through a number of variations over the millennia. Despite the unsourced diagrams on the Wikipedia article (see the Talk page for more details) the usual medieval view of impetus was in the context of ballistics: an arrow or other projectile was fired up at an arrow, it traveled mostly in a straight line, then slowly curved away as the impetus was lost and gravity took hold, and then finally dropped straight down. http://en.wikipedia.org/wiki/Theory_of_impetus While it isn't a good model for arrows and cannon balls, it's actually not too far off the real-world case of a light projectile in the face of air resistance. We can be sure that Aristotle was not a juggler, or spent much time watching jugglers. If he was, he never would have come up with the impetus theory in the first place. -- Steven -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
I V wrote: > On Mon, 11 Feb 2008 14:07:49 -0800, Erik Max Francis wrote: >> experience. The notion of impetus -- where an object throw moves in a >> straight line until it runs out of impetus, then falls straight down -- >> is clearly contrary to everyday experience of watching two people throw >> a ball back and forth from a distance, since the path of the ball is >> clearly curved. > > It's clear _to us_ because when we think about such things, we think in > Newtonian terms. I'm not at all sure it would have been clear to people > in the middle ages; when you throw a ball, it whizzes by so fast, it's > hard to be sure how it's actually moving. Hence why I suggested standing back from two people throwing it back and forth. If they lob it high, it's hard to miss that the pass is curved. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis Man has wrested from nature the power to make the world a desert or to make deserts bloom. -- Adlai Stevenson, 1952 -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Grant Edwards wrote: > A slug is 14.593903 kg according to the trysty old Unix "units" > program. Hmm, I always thought a slug weighed exactly 32 lbs, > but I see it's 32.174049. Learn something new every day... It's defined so that 1 slug times the acceleration due to gravity is a pound. The acceleration due to gravity is only approximately 32 ft/s^2, so you were just remembering the short-hand approximation for 1 gee. Let's hear it for incoherent unit systems ... -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis Man has wrested from nature the power to make the world a desert or to make deserts bloom. -- Adlai Stevenson, 1952 -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
On Mon, 11 Feb 2008 14:07:49 -0800, Erik Max Francis wrote: > experience. The notion of impetus -- where an object throw moves in a > straight line until it runs out of impetus, then falls straight down -- > is clearly contrary to everyday experience of watching two people throw > a ball back and forth from a distance, since the path of the ball is > clearly curved. It's clear _to us_ because when we think about such things, we think in Newtonian terms. I'm not at all sure it would have been clear to people in the middle ages; when you throw a ball, it whizzes by so fast, it's hard to be sure how it's actually moving. -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
On 2008-02-13, Jeff Schwab <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: >> On 2008-02-13, Jeff Schwab <[EMAIL PROTECTED]> wrote: >> Eh? Last I checked both pound and kilogram are units of mass, so where is the incompatibility? >>> I've never heard of "pound" as a unit of mass. At least where I went to >>> school (Boston, MA), "pound" is the English unit of force, "slug" is the >>> (rarely used) English unit of mass, >> >> Back in the day, I was once working on a fire control system >> for the Navy. All the units in the calculations were purely >> metric except for one: air density was in slugs/m3. I always >> suspected that was somebody's attempt at humor. > > So what is the mass of a slug, anyway? (I assume this is slug as in > bullet, not slimy, creeping thing.) A slug is 14.593903 kg according to the trysty old Unix "units" program. Hmm, I always thought a slug weighed exactly 32 lbs, but I see it's 32.174049. Learn something new every day... -- Grant Edwards grante Yow! I feel better about at world problems now! visi.com -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
-On [20080213 20:16], Jeff Schwab ([EMAIL PROTECTED]) wrote: >So what is the mass of a slug, anyway? (I assume this is slug as in >bullet, not slimy, creeping thing.) http://en.wikipedia.org/wiki/Slug_(mass) would be my guess. -- Jeroen Ruigrok van der Werven / asmodai イェルーン ラウフロック ヴァン デル ウェルヴェン http://www.in-nomine.org/ | http://www.rangaku.org/ Cum angelis et pueris, fideles inveniamur. Quis est iste Rex gloriae..? -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
-On [20080213 18:46], Jeff Schwab ([EMAIL PROTECTED]) wrote: >I've never heard of "pound" as a unit of mass. Then please correct/fix: http://en.wikipedia.org/wiki/Pound_(mass) Me being mainland European I know not this silly system called imperial. [Yes, partially in good jest...] -- Jeroen Ruigrok van der Werven / asmodai イェルーン ラウフロック ヴァン デル ウェルヴェン http://www.in-nomine.org/ | http://www.rangaku.org/ Sometimes I wonder why are we so blind to face... -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Grant Edwards wrote: > On 2008-02-13, Jeff Schwab <[EMAIL PROTECTED]> wrote: > >>> Eh? Last I checked both pound and kilogram are units of mass, so where is >>> the incompatibility? >> I've never heard of "pound" as a unit of mass. At least where I went to >> school (Boston, MA), "pound" is the English unit of force, "slug" is the >> (rarely used) English unit of mass, > > Back in the day, I was once working on a fire control system > for the Navy. All the units in the calculations were purely > metric except for one: air density was in slugs/m3. I always > suspected that was somebody's attempt at humor. So what is the mass of a slug, anyway? (I assume this is slug as in bullet, not slimy, creeping thing.) -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
On 2008-02-13, Jeff Schwab <[EMAIL PROTECTED]> wrote: >> Eh? Last I checked both pound and kilogram are units of mass, so where is >> the incompatibility? > > I've never heard of "pound" as a unit of mass. At least where I went to > school (Boston, MA), "pound" is the English unit of force, "slug" is the > (rarely used) English unit of mass, Back in the day, I was once working on a fire control system for the Navy. All the units in the calculations were purely metric except for one: air density was in slugs/m3. I always suspected that was somebody's attempt at humor. -- Grant Edwards grante Yow! Where does it go when at you flush? visi.com -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Jeroen Ruigrok van der Werven wrote: > -On [20080212 22:15], Dotan Cohen ([EMAIL PROTECTED]) wrote: >> Note that Google will give a calculator result for "1 kilogram in >> pounds", but not for "1 kilogram in inches". I wonder why not? After >> all, both are conversions of incompatible measurements, ie, they >> measure different things. > > Eh? Last I checked both pound and kilogram are units of mass, so where is > the incompatibility? I've never heard of "pound" as a unit of mass. At least where I went to school (Boston, MA), "pound" is the English unit of force, "slug" is the (rarely used) English unit of mass, and "kilogram" is the SI unit of mass. ("English" in this context does not refer to the charming isle at the Western edge of Europe, but to the system of non-metric units used by most Americans.) -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
On 13/02/2008, Jeroen Ruigrok van der Werven <[EMAIL PROTECTED]> wrote: > -On [20080212 22:15], Dotan Cohen ([EMAIL PROTECTED]) wrote: > >Note that Google will give a calculator result for "1 kilogram in > >pounds", but not for "1 kilogram in inches". I wonder why not? After > >all, both are conversions of incompatible measurements, ie, they > >measure different things. > > > Eh? Last I checked both pound and kilogram are units of mass, so where is > the incompatibility? > Pound is a unit of force. That's why people like to say that you will weigh 1/6th on the moon. If here you are 75 kilo, 165 pound, on the moon you should be 75 kilo, 28 pound. Dotan Cohen http://what-is-what.com http://gibberish.co.il א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Dotan Cohen wrote: > On 13/02/2008, Erik Max Francis <[EMAIL PROTECTED]> wrote: >> And the rest of us just use SI. (And if you bring up the >> _kilogram-force_, I'll just cry.) > > Don't cry, I just want to say that I've hated the kilogram-force > almost as much as I've hated the electron-volt. Who is the lazy who > comes up with these things? The electron-volt is a weird little miscreant that ended up becoming popular. The kilogram-force is a unit that could only demonstrate that its inventors completely missed the freakin' point. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis Sit loosely in the saddle of life. -- Robert Louis Stevenson -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
> And the rest of us just use SI. (And if you bring up the > _kilogram-force_, I'll just cry.) SI = Super Incredible? Awesome name for Force/Mass / NewItemOfClothing2050! -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
On 13/02/2008, Erik Max Francis <[EMAIL PROTECTED]> wrote: > And the rest of us just use SI. (And if you bring up the > _kilogram-force_, I'll just cry.) Don't cry, I just want to say that I've hated the kilogram-force almost as much as I've hated the electron-volt. Who is the lazy who comes up with these things? Dotan Cohen http://what-is-what.com http://gibberish.co.il א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Jeroen Ruigrok van der Werven wrote: > -On [20080212 22:15], Dotan Cohen ([EMAIL PROTECTED]) wrote: >> Note that Google will give a calculator result for "1 kilogram in >> pounds", but not for "1 kilogram in inches". I wonder why not? After >> all, both are conversions of incompatible measurements, ie, they >> measure different things. > > Eh? Last I checked both pound and kilogram are units of mass, so where is > the incompatibility? He's saying something that's conditionally true depending on the system of units you're using, hence your (quite understandable) confusion. Once upon a time there were no physicists. In this happy-go-lucky era, certain people living in a certain area of the world had a unit of measurement for how hard gravity pushed something into the ground, and how hard it was to push something along the ground. The figure was called "weight," and in the particular area we're talking about, the unit associated with it was called the _pound_. Then physicists came along and pointed out that those two things aren't quite the same thing, though no one had really noticed it before. If you lived on a lower-gravity world, for instance, like the Moon or Mars, then it would be easier to lift something, but it would still resist being pushed just as much. If you were floating in space, far away from any gravitating bodies, then that something wouldn't be being pushed into any ground at all, but still would have just the same resistance to being pushed (these bastard "somethings" don't like being shoved around, you see). The names of those two notions ended up being called "weight" (or "force") and "mass." But what to do about the lowly pound? It's kind of both, as we already discussed, but in proper physics it can't be. So you have to split it into two units -- one for mass, one for weight. For brand new metric systems (in all their variants), their units were made up from scratch and so this didn't present a problem. So how did they do it? The answer is that different subgroups of those who used the pound did it differently. Some accepted pound as the unit of mass, and invented a unit of weight, called the _poundal_. Some took the pound as being a unit of weight, and invented the _slug_ as the corresponding mass unit. Some went so far as to effectively invent two new units: the _pound-mass_ and the _pound-force_, and because of their names I don't have to tell you which is which. So there's a hodge podge of different rationalized unit systems for dealing with the pound and its brethren, and different people are taught different things and are perpetually confused. And not much good comes of it. And the rest of us just use SI. (And if you bring up the _kilogram-force_, I'll just cry.) -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis To be refutable is not the least charm of a theory. -- Friedrich Nietzsche -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
greg wrote: > Erik Max Francis wrote: >> My point was, and still is, that if this question without further >> context is posed to a generally educated laymen, the supposedly wrong >> answer that was given is actually _correct_. > > Except that they probably don't understand exactly how and > why it's correct. E.g. they will likely expect a 2kg hammer > to fall to the floor twice as fast as a 1kg hammer, which > isn't anywhere near to being true. Well, sure. But if the point of the question is to just point at ignorance of physics concepts among the general population to make people feel like jackasses, then that's not very hard to do. It's also not very constructive. The bigger picture is that if the sole purpose is to shame people without physics knowledge (because really, what other point is there for asking such trick questions), the fact that the questioner phrased the question poorly enough and had to know that the context would be misinterpreted -- so that, oops, the naive answer is actually _correct_ in context -- that he's the only person who should be ashamed. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis To be refutable is not the least charm of a theory. -- Friedrich Nietzsche -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
-On [20080212 22:15], Dotan Cohen ([EMAIL PROTECTED]) wrote: >Note that Google will give a calculator result for "1 kilogram in >pounds", but not for "1 kilogram in inches". I wonder why not? After >all, both are conversions of incompatible measurements, ie, they >measure different things. Eh? Last I checked both pound and kilogram are units of mass, so where is the incompatibility? -- Jeroen Ruigrok van der Werven / asmodai イェルーン ラウフロック ヴァン デル ウェルヴェン http://www.in-nomine.org/ | http://www.rangaku.org/ To fight and conquer in one hundred battles is not the highest skill. To subdue the enemy with no fight at all, that's the highest skill... -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Erik Max Francis wrote: > My point was, and still is, that if this question without further > context is posed to a generally educated laymen, the supposedly wrong > answer that was given is actually _correct_. Except that they probably don't understand exactly how and why it's correct. E.g. they will likely expect a 2kg hammer to fall to the floor twice as fast as a 1kg hammer, which isn't anywhere near to being true. -- Greg -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
On 12/02/2008, Erik Max Francis <[EMAIL PROTECTED]> wrote: > Dennis Lee Bieber wrote: > > > On Tue, 12 Feb 2008 00:18:38 -0800, Erik Max Francis <[EMAIL PROTECTED]> > > declaimed the following in comp.lang.python: > > > >> equivalence for everyday usage and make no requirement of using the > >> "proper" units for mass (kg) vs. weight (N) for, say, buying things at > > > > Ah, but in the US, the unwashed masses (as in "lots of people") > > don't even know that there is a difference between lb-force and lb-mass > > (okay, all they know of is a simple "lb" which is based upon force of > > gravity at point of measurement, while lb-mass is a sort of artificial > > unit... don't mention slugs ) > > > Yes, exactly; you started with another word game and then in the process > dismissed it with a half-joke at the end. Pounds came first, and > rationalized systems (lbm/lbf, slug/lb, and even ridiculous retrofits > like kg/kgf, completely turning the apple cart upside down) came > afterwards. The point is, the difference between the two is _totally > irrelevant_ to those "unwashed masses" (and in the contexts we've been > talking about). Even NIST (among other) SI guidelines acknowledge that > because, well, it's blatantly obvious. > > That actually feeds right back into my earlier port about physics > subsuming terminology to its own ends. Making the distinction between > mass and weight is critical for understanding physics, but not for > everyday behavior involving measuring things in pounds; after all, in > extending the popular concept of a "pound," different physicists made a > distinction between mass and weight differently (i.e., the rationalized > systems above) such that there is no accepted standard. Of _course_ > physicists have to make a distinction between mass and weight, and to do > so with Imperial or American systems of units requires deciding which > one a "pound" is, and what to do with the other unit. But that's a > physicist making distinctions that do not exist in the more general > language, just the same as a physicist meaning something different by > "free fall" than a layman. > > But (say) dinging some Joe Schmo because he doesn't know that a pound is > really a unit of force (or mass) is really just playing pointless word > games. As I said earlier, there are better ways to teach physics. I recently had to tell my mother how to convert kilograms to pounds. I told her that near the Earth's surface, she should multiply by 2.2. Knowing me, she didn't even bother to ask about the "near the Earth's surface" part. We've already established that that's where she and all her friends live in other conversations. Note that Google will give a calculator result for "1 kilogram in pounds", but not for "1 kilogram in inches". I wonder why not? After all, both are conversions of incompatible measurements, ie, they measure different things. Dotan Cohen http://what-is-what.com http://gibberish.co.il א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
On 2008-02-12, Jeff Schwab <[EMAIL PROTECTED]> wrote: > Forgive the cliché, but there's already too much road rage on the > information superhighway. I've had limited access to Usenet for the > last couple of years, and coming back, I find myself shocked at how many > people seem to be mean and argumentative just for the heck of it. Was > it really always this hostile? It varies from group to group. Some of them were just as bad 15 years ago. -- Grant Edwards grante Yow! Did something bad at happen or am I in a visi.comdrive-in movie?? -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Dennis Lee Bieber wrote: > On Tue, 12 Feb 2008 00:18:38 -0800, Erik Max Francis <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> equivalence for everyday usage and make no requirement of using the >> "proper" units for mass (kg) vs. weight (N) for, say, buying things at > > Ah, but in the US, the unwashed masses (as in "lots of people") > don't even know that there is a difference between lb-force and lb-mass > (okay, all they know of is a simple "lb" which is based upon force of > gravity at point of measurement, while lb-mass is a sort of artificial > unit... don't mention slugs ) Shouldn't that be "the unwashed weights"? determined-to-misunderstand-ly y'rs - steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Dennis Lee Bieber wrote: > On Tue, 12 Feb 2008 00:18:38 -0800, Erik Max Francis <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> equivalence for everyday usage and make no requirement of using the >> "proper" units for mass (kg) vs. weight (N) for, say, buying things at > > Ah, but in the US, the unwashed masses (as in "lots of people") > don't even know that there is a difference between lb-force and lb-mass > (okay, all they know of is a simple "lb" which is based upon force of > gravity at point of measurement, while lb-mass is a sort of artificial > unit... don't mention slugs ) Yes, exactly; you started with another word game and then in the process dismissed it with a half-joke at the end. Pounds came first, and rationalized systems (lbm/lbf, slug/lb, and even ridiculous retrofits like kg/kgf, completely turning the apple cart upside down) came afterwards. The point is, the difference between the two is _totally irrelevant_ to those "unwashed masses" (and in the contexts we've been talking about). Even NIST (among other) SI guidelines acknowledge that because, well, it's blatantly obvious. That actually feeds right back into my earlier port about physics subsuming terminology to its own ends. Making the distinction between mass and weight is critical for understanding physics, but not for everyday behavior involving measuring things in pounds; after all, in extending the popular concept of a "pound," different physicists made a distinction between mass and weight differently (i.e., the rationalized systems above) such that there is no accepted standard. Of _course_ physicists have to make a distinction between mass and weight, and to do so with Imperial or American systems of units requires deciding which one a "pound" is, and what to do with the other unit. But that's a physicist making distinctions that do not exist in the more general language, just the same as a physicist meaning something different by "free fall" than a layman. But (say) dinging some Joe Schmo because he doesn't know that a pound is really a unit of force (or mass) is really just playing pointless word games. As I said earlier, there are better ways to teach physics. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis Don't ever get discouraged / There's always / A better day -- TLC -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Robert Bossy wrote: > In my mind, the second mistake was the confusion between weight and mass. I see. If so, then that sounds like another terminology gotcha. The distinction between weight and mass is all but irrelevant for everyday activities, since the acceleration due to gravity is so nearly constant for all circumstances under which non-physicists operate in everyday life. Not only in everyday life does the terminal speed of a falling object depend on its mass (m) -- among other things -- but that is also equivalent to that speed depending on its weight (m g_0). Physicists even talk about a "standard gravity" or "acceleration due to gravity" being an accepted constant (g_0 = 9.806 65 m/s^2), and most SI guidelines, including NIST's, fully acknowledge the effective equivalence for everyday usage and make no requirement of using the "proper" units for mass (kg) vs. weight (N) for, say, buying things at the store, even though it's technically wrong (where "weight" is given in kilograms even though that's not a unit of weight, but rather of mass). To put it another way, there are far better ways to teach physics than this, because these misunderstanding are not wrong in any meaningfully useful way. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis It isn't important to come out on top, what matters is to be the one who comes out alive. -- Bertolt Brecht, 1898-1956 -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Jeff Schwab wrote: > Erik Max Francis wrote: > >> Jeff Schwab wrote: >> >> >>> Erik Max Francis wrote: >>> Robert Bossy wrote: > 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. > Well, you have to qualify it better than this, because what you've stated in actually correct ... in a viscous fluid. >>> By definition, that's not free fall. >>> >> In a technical physics context. But he's talking about posing the >> question to generally educated people, not physicists (since physicists >> wouldn't make that error). In popular parlance, "free fall" just means >> falling freely without restraint (hence "free fall rides," "free >> falling," etc.). And in that context, in the Earth's atmosphere, you >> _will_ reach a terminal speed that is dependent on your mass (among >> other things). >> >> So you made precisely my point: The average person would not follow >> that the question was being asked was about an abstract (for people >> stuck on the surface of the Earth) physics principle, but rather would >> understand the question to be in a context where the supposedly-wrong >> statement is _actually true_. >> > > So what's the "double mistake?" My understanding was (1) the misuse > (ok, vernacular use) of the term "free fall," and (2) the association of > weight with free-fall velocity ("If I tie an elephant's tail to a > mouse's, and drop them both into free fall, will the mouse slow the > elephant down?") > In my mind, the second mistake was the confusion between weight and mass. Cheers RB -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
On Feb 12, 7:16 am, Jeff Schwab <[EMAIL PROTECTED]> wrote: > Erik Max Francis wrote: > > Jeff Schwab wrote: > > >> Erik Max Francis wrote: > >>> Grant Edwards wrote: > > On 2008-02-12, Jeff Schwab <[EMAIL PROTECTED]> wrote: > > Fair enough! > > Dear me, what's Usenet coming to these days... > > >>> I know, really. Sheesh! Jeff, I won't stand for that! Argue with > >>> me! :-) > > >> OK, uh... You're a poopy-head. > > >> Forgive the cliché, but there's already too much road rage on the > >> information superhighway. I've had limited access to Usenet for the > >> last couple of years, and coming back, I find myself shocked at how > >> many people seem to be mean and argumentative just for the heck of > >> it. Was it really always this hostile? Maybe I've gotten soft in my > >> old age. > > > Note smiley. Grant and I were joking. > > Yes, I understood. > > Ahhh, back to that familiar, awkward discomfort... Hold it, 2, 3 and release...ahhh good times -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Erik Max Francis wrote: > Jeff Schwab wrote: > >> Erik Max Francis wrote: >>> Grant Edwards wrote: >>> On 2008-02-12, Jeff Schwab <[EMAIL PROTECTED]> wrote: > Fair enough! Dear me, what's Usenet coming to these days... >>> >>> I know, really. Sheesh! Jeff, I won't stand for that! Argue with >>> me! :-) >> >> OK, uh... You're a poopy-head. >> >> Forgive the cliché, but there's already too much road rage on the >> information superhighway. I've had limited access to Usenet for the >> last couple of years, and coming back, I find myself shocked at how >> many people seem to be mean and argumentative just for the heck of >> it. Was it really always this hostile? Maybe I've gotten soft in my >> old age. > > Note smiley. Grant and I were joking. Yes, I understood. Ahhh, back to that familiar, awkward discomfort... -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Jeff Schwab wrote: > Erik Max Francis wrote: >> Grant Edwards wrote: >> >>> On 2008-02-12, Jeff Schwab <[EMAIL PROTECTED]> wrote: Fair enough! >>> >>> Dear me, what's Usenet coming to these days... >> >> I know, really. Sheesh! Jeff, I won't stand for that! Argue with >> me! :-) > > OK, uh... You're a poopy-head. > > Forgive the cliché, but there's already too much road rage on the > information superhighway. I've had limited access to Usenet for the > last couple of years, and coming back, I find myself shocked at how many > people seem to be mean and argumentative just for the heck of it. Was > it really always this hostile? Maybe I've gotten soft in my old age. Note smiley. Grant and I were joking. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis Because a bullet has no name / And sees no face -- Skee-Lo -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Erik Max Francis wrote: > Grant Edwards wrote: > >> On 2008-02-12, Jeff Schwab <[EMAIL PROTECTED]> wrote: >>> Fair enough! >> >> Dear me, what's Usenet coming to these days... > > I know, really. Sheesh! Jeff, I won't stand for that! Argue with me! > :-) OK, uh... You're a poopy-head. Forgive the cliché, but there's already too much road rage on the information superhighway. I've had limited access to Usenet for the last couple of years, and coming back, I find myself shocked at how many people seem to be mean and argumentative just for the heck of it. Was it really always this hostile? Maybe I've gotten soft in my old age. -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Grant Edwards wrote: > On 2008-02-12, Jeff Schwab <[EMAIL PROTECTED]> wrote: >> Fair enough! > > Dear me, what's Usenet coming to these days... I know, really. Sheesh! Jeff, I won't stand for that! Argue with me! :-) -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis Because a bullet has no name / And sees no face -- Skee-Lo -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Star Wars and parsecs [was Re: Why not a Python compiler?]
Grant Edwards wrote: > On 2008-02-10, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > ? ? ? 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? > > In some of the series, they sure didn't do it very well, but I > presume they were forced to read what was written. > > If you want to see a movie where the aliens -- at least for > part of the movie -- speak an alien language (with subtitles), > there's "Battlefield Earth". It's amazingly awful. And not in > a fun, campy, MST3K, way. It's awful in more of a dull, > aching, why-didn't-the-dentist-prescribe-better-painkillers > sort of way. Sure glad I didn't see that one in a theater... http://www.theonion.com/content/node/29426 -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Star Wars and parsecs [was Re: Why not a Python compiler?]
On 2008-02-10, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: ? ? ? 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? In some of the series, they sure didn't do it very well, but I presume they were forced to read what was written. If you want to see a movie where the aliens -- at least for part of the movie -- speak an alien language (with subtitles), there's "Battlefield Earth". It's amazingly awful. And not in a fun, campy, MST3K, way. It's awful in more of a dull, aching, why-didn't-the-dentist-prescribe-better-painkillers sort of way. Sure glad I didn't see that one in a theater... -- Grant Edwards grante Yow! I'm working under at the direct orders of WAYNE visi.comNEWTON to deport consenting adults! -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
On 2008-02-12, Jeff Schwab <[EMAIL PROTECTED]> wrote: > Erik Max Francis wrote: >> Jeff Schwab wrote: >> >>> So what's the "double mistake?" My understanding was (1) the misuse >>> (ok, vernacular use) of the term "free fall," and (2) the association >>> of weight with free-fall velocity ("If I tie an elephant's tail to a >>> mouse's, and drop them both into free fall, will the mouse slow the >>> elephant down?") >> >> I presume his point was that physicists have a specialized meaning of >> "free fall" and, in that context, the answer is wrong. >> >> My point was, and still is, that if this question without further >> context is posed to a generally educated laymen, the supposedly wrong >> answer that was given is actually _correct_. After all, >> [...] > Fair enough! Dear me, what's Usenet coming to these days... -- Grant Edwards grante Yow! Yow! Are we in the at perfect mood? visi.com -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Erik Max Francis wrote: > Jeff Schwab wrote: > >> So what's the "double mistake?" My understanding was (1) the misuse >> (ok, vernacular use) of the term "free fall," and (2) the association >> of weight with free-fall velocity ("If I tie an elephant's tail to a >> mouse's, and drop them both into free fall, will the mouse slow the >> elephant down?") > > I presume his point was that physicists have a specialized meaning of > "free fall" and, in that context, the answer is wrong. > > My point was, and still is, that if this question without further > context is posed to a generally educated laymen, the supposedly wrong > answer that was given is actually _correct_. After all, surely the > technical physics meaning of "free fall" came _after_ a more common term > was in use, just as with other terms like "force" or "energy" that have > technical meanings in physics, but more abstract or general meanings in > the general parlance. "Free fall" means something specialized to > physicists, but it means something more general to non-physicists. > > A lot of these kind of "gotcha" questions intended to trick even > reasonable people into demonstrating technical ignorance have precisely > the same problem: The desired technical context is not made clear and > so that the supposedly-wrong answer is not only unsurprising, but often > arguably correct. This kind of stuff is little more than a semantic > terminology game, rather than revealing any deeper concepts. Fair enough! -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Jeff Schwab wrote: > So what's the "double mistake?" My understanding was (1) the misuse > (ok, vernacular use) of the term "free fall," and (2) the association of > weight with free-fall velocity ("If I tie an elephant's tail to a > mouse's, and drop them both into free fall, will the mouse slow the > elephant down?") I presume his point was that physicists have a specialized meaning of "free fall" and, in that context, the answer is wrong. My point was, and still is, that if this question without further context is posed to a generally educated laymen, the supposedly wrong answer that was given is actually _correct_. After all, surely the technical physics meaning of "free fall" came _after_ a more common term was in use, just as with other terms like "force" or "energy" that have technical meanings in physics, but more abstract or general meanings in the general parlance. "Free fall" means something specialized to physicists, but it means something more general to non-physicists. A lot of these kind of "gotcha" questions intended to trick even reasonable people into demonstrating technical ignorance have precisely the same problem: The desired technical context is not made clear and so that the supposedly-wrong answer is not only unsurprising, but often arguably correct. This kind of stuff is little more than a semantic terminology game, rather than revealing any deeper concepts. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis Tell me the truth / I'll take it like a man -- Chante Moore -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Star Wars and parsecs [was Re: Why not a Python compiler?]
In article <[EMAIL PROTECTED]>, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Feb 8, 2:53?pm, Lou Pecora <[EMAIL PROTECTED]> wrote: > > In article <[EMAIL PROTECTED]>, > > ?Grant Edwards <[EMAIL PROTECTED]> wrote: > > > > > On 2008-02-08, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > > > > > > ? ? ? 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? Because they taught it to us. It's obvious. -- -- Lou Pecora -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Erik Max Francis wrote: > Jeff Schwab wrote: > >> Erik Max Francis wrote: >>> Robert Bossy wrote: 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. >>> >>> Well, you have to qualify it better than this, because what you've >>> stated in actually correct ... in a viscous fluid. >> >> By definition, that's not free fall. > > In a technical physics context. But he's talking about posing the > question to generally educated people, not physicists (since physicists > wouldn't make that error). In popular parlance, "free fall" just means > falling freely without restraint (hence "free fall rides," "free > falling," etc.). And in that context, in the Earth's atmosphere, you > _will_ reach a terminal speed that is dependent on your mass (among > other things). > > So you made precisely my point: The average person would not follow > that the question was being asked was about an abstract (for people > stuck on the surface of the Earth) physics principle, but rather would > understand the question to be in a context where the supposedly-wrong > statement is _actually true_. So what's the "double mistake?" My understanding was (1) the misuse (ok, vernacular use) of the term "free fall," and (2) the association of weight with free-fall velocity ("If I tie an elephant's tail to a mouse's, and drop them both into free fall, will the mouse slow the elephant down?") -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Steven D'Aprano wrote: > 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. It's usually spelled _wavicle_, by the way. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis I woke up this morning / You were the first thing on my mind -- India Arie -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Grant Edwards wrote: > On 2008-02-09, Thomas Dybdahl Ahle <[EMAIL PROTECTED]> wrote: >> 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. It probably comes from reading popularizations that make the really silly attempt to join physics to Eastern philosophy and metaphysics, for instance, garbage like _The Tao of Physics_. Modern physics can get weird and spooky and counterintuitive, but any real connection made with Eastern philosophy is only in the eye of the beholder. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis I woke up this morning / You were the first thing on my mind -- India Arie -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Jeff Schwab wrote: > Erik Max Francis wrote: >> Robert Bossy wrote: >>> 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. >> >> Well, you have to qualify it better than this, because what you've >> stated in actually correct ... in a viscous fluid. > > By definition, that's not free fall. In a technical physics context. But he's talking about posing the question to generally educated people, not physicists (since physicists wouldn't make that error). In popular parlance, "free fall" just means falling freely without restraint (hence "free fall rides," "free falling," etc.). And in that context, in the Earth's atmosphere, you _will_ reach a terminal speed that is dependent on your mass (among other things). So you made precisely my point: The average person would not follow that the question was being asked was about an abstract (for people stuck on the surface of the Earth) physics principle, but rather would understand the question to be in a context where the supposedly-wrong statement is _actually true_. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis I woke up this morning / You were the first thing on my mind -- India Arie -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Erik Max Francis wrote: > Robert Bossy wrote: >> Grant Edwards wrote: >>> 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. > > Well, you have to qualify it better than this, because what you've > stated in actually correct ... in a viscous fluid. By definition, that's not free fall. -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Steve Holden wrote: > Well the history of physics for at least two hundred years has been a > migration away from the intuitive. In strict linguistic terms the word > "subatomic" is a fine oxymoron. I suspect it's really "turtles all the > way down". Well, hard to say that's been a monotonic pattern. For instance, Aristotelian physics had an awful lot of components that were fairly bizarre, counter-intuitive, or even contrary to easily gained experience. The notion of impetus -- where an object throw moves in a straight line until it runs out of impetus, then falls straight down -- is clearly contrary to everyday experience of watching two people throw a ball back and forth from a distance, since the path of the ball is clearly curved. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis There is nothing so subject to the inconstancy of fortune as war. -- Miguel de Cervantes, ca. 1600 -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Robert Bossy wrote: > Grant Edwards wrote: >> 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. Well, you have to qualify it better than this, because what you've stated in actually correct ... in a viscous fluid. Terminal speed is reached when the force due to gravity is equal and opposite to the drag force, and the drag force is dependent on the properties of the fluid, as well as the size and mass of the object that is falling through it. It's only when you're dealing with objects falling through vacuum that all objects fall at the same rate, and that's because the gravitational and inertial masses are identical. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis There is nothing so subject to the inconstancy of fortune as war. -- Miguel de Cervantes, ca. 1600 -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
En Mon, 11 Feb 2008 14:05:27 -0200, Grant Edwards <[EMAIL PROTECTED]> escribi�: > On 2008-02-11, Steve Holden <[EMAIL PROTECTED]> wrote: > >> 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. The inertia principle is counter-intuitive too, in a real world with friction. Things don't just "keep going" when impulse cease to exist; everyone knows that a running car eventually stops if the engine stops. That it "would" keep moving at the same speed in a straight line is an abstraction that people hardly can build from experience. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
On 11/02/2008, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2008-02-11, Steve Holden <[EMAIL PROTECTED]> wrote: > > > 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 would like to take part in such an experiment. I should note that movies and such often portray the wrong motion of objects. Years of that type of conditioning may be responsible for the non-newtonian expectations of the participants. Dotan Cohen http://what-is-what.com http://gibberish.co.il א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Grant Edwards wrote: > On 2008-02-11, Steve Holden <[EMAIL PROTECTED]> wrote: > > >> 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 -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
On 2008-02-11, Steve Holden <[EMAIL PROTECTED]> wrote: > 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.comskintight leather at an IRON MAIDEN concert? -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
On 09/02/2008, Ron Provost <[EMAIL PROTECTED]> wrote: > > The division between philosophy and science can be fine indeed. Philosophy > and science are the two rigorous methods of inquiry into the fundamental > nature of things (other methods include religion and superstition). Because > of it's process, science limits itself to those questions which can be > tested expermientally. Philosophy is left to address the remaining > questions which can be examined through reason (mostly deduction). Of many > of the questions which were thought to be only answerably via philosophy, > often someone finds a way to test some of them. This is very often the case > in areas of philosophy studying the fields involving the mind and nature. > Thus whold chunks of philosophy slowly become the realms of psychology, > lingustics, logic (Which as a whole became the realm of the theoretical > science of math around), and many of the questions about the nature of the > universe, existance and time have become the realm of physics. In this way > philosophy may be thought of as the cutting edge of science. > > Similarly science itself has uncovered new questions which currently can > only be addressed through the methods of philosophy. One of the most > interested and recently practical have been investigations into the > foundations of science. For example, Karl Popper was interested in the > process of science and what constitutes a scientific theory vs. > non-scientific theory. His answer: A scientific theory is falsifyable via > the techniques of science (that is experimentation). This is practical > today, because it excludes the whole "intelligent design" theory from > science, little if any of which is falsifyable. > > Thus the line that divides philosophy and science is fine. The two > disciplies in fact need oneanother. Science uncovers new information used > by philosophy to build new philosophical theories while philosophy spends a > huge amount of time questioning or judging the practices of other fields > such as science in much the same way as the US supreme court is supposed to > work to check on the other branches of the government. +5 Informative Dotan Cohen http://what-is-what.com http://gibberish.co.il א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
On 09/02/2008, Ron Provost <[EMAIL PROTECTED]> wrote: > > The division between philosophy and science can be fine indeed. Philosophy > and science are the two rigorous methods of inquiry into the fundamental > nature of things (other methods include religion and superstition). Because > of it's process, science limits itself to those questions which can be > tested expermientally. Philosophy is left to address the remaining > questions which can be examined through reason (mostly deduction). Of many > of the questions which were thought to be only answerably via philosophy, > often someone finds a way to test some of them. This is very often the case > in areas of philosophy studying the fields involving the mind and nature. > Thus whold chunks of philosophy slowly become the realms of psychology, > lingustics, logic (Which as a whole became the realm of the theoretical > science of math around), and many of the questions about the nature of the > universe, existance and time have become the realm of physics. In this way > philosophy may be thought of as the cutting edge of science. > > Similarly science itself has uncovered new questions which currently can > only be addressed through the methods of philosophy. One of the most > interested and recently practical have been investigations into the > foundations of science. For example, Karl Popper was interested in the > process of science and what constitutes a scientific theory vs. > non-scientific theory. His answer: A scientific theory is falsifyable via > the techniques of science (that is experimentation). This is practical > today, because it excludes the whole "intelligent design" theory from > science, little if any of which is falsifyable. > > Thus the line that divides philosophy and science is fine. The two > disciplies in fact need oneanother. Science uncovers new information used > by philosophy to build new philosophical theories while philosophy spends a > huge amount of time questioning or judging the practices of other fields > such as science in much the same way as the US supreme court is supposed to > work to check on the other branches of the government. +5 Informative Dotan Cohen http://what-is-what.com http://gibberish.co.il א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
greg wrote: > Gabriel Genellina wrote: > >> Before the famous Michelson-Morley experiment (end of s. XIX), some >> physicists would have said "light propagates over ether, some kind of >> matter that fills the whole space but has no measurable mass", but the >> experiment failed to show any evidence of it existence. > > Not just that, but it showed there was something seriously weird > about space and time -- how can light travel at the same speed > relative to *everyone*? Einstein eventually figured it out. > > In hindsight, Maxwell's equations had been shouting "Relativity!" > at them all along, but nobody had seen it. > >> previous experiments showed >> that light was not made of particles either. > > Except that the photoelectric effect showed that it *is* made > of particles. Isn't the universe fun? > >> 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. > > So to get back to the original topic, it doesn't really matter > whether you talk about light travelling or propagating. Take > your pick. > Well the history of physics for at least two hundred years has been a migration away from the intuitive. In strict linguistic terms the word "subatomic" is a fine oxymoron. I suspect it's really "turtles all the way down". regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
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 -- http://mail.python.org/mailman/listinfo/python-list
RE: OT: Speed of light [was Re: Why not a Python compiler?]
The division between philosophy and science can be fine indeed. Philosophy and science are the two rigorous methods of inquiry into the fundamental nature of things (other methods include religion and superstition). Because of it's process, science limits itself to those questions which can be tested expermientally. Philosophy is left to address the remaining questions which can be examined through reason (mostly deduction). Of many of the questions which were thought to be only answerably via philosophy, often someone finds a way to test some of them. This is very often the case in areas of philosophy studying the fields involving the mind and nature. Thus whold chunks of philosophy slowly become the realms of psychology, lingustics, logic (Which as a whole became the realm of the theoretical science of math around), and many of the questions about the nature of the universe, existance and time have become the realm of physics. In this way philosophy may be thought of as the cutting edge of science. Similarly science itself has uncovered new questions which currently can only be addressed through the methods of philosophy. One of the most interested and recently practical have been investigations into the foundations of science. For example, Karl Popper was interested in the process of science and what constitutes a scientific theory vs. non-scientific theory. His answer: A scientific theory is falsifyable via the techniques of science (that is experimentation). This is practical today, because it excludes the whole "intelligent design" theory from science, little if any of which is falsifyable. Thus the line that divides philosophy and science is fine. The two disciplies in fact need oneanother. Science uncovers new information used by philosophy to build new philosophical theories while philosophy spends a huge amount of time questioning or judging the practices of other fields such as science in much the same way as the US supreme court is supposed to work to check on the other branches of the government.-- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Gabriel Genellina wrote: > Before the famous Michelson-Morley experiment (end of s. XIX), some > physicists would have said "light propagates over ether, some kind of > matter that fills the whole space but has no measurable mass", but the > experiment failed to show any evidence of it existence. Not just that, but it showed there was something seriously weird about space and time -- how can light travel at the same speed relative to *everyone*? Einstein eventually figured it out. In hindsight, Maxwell's equations had been shouting "Relativity!" at them all along, but nobody had seen it. > previous experiments showed > that light was not made of particles either. Except that the photoelectric effect showed that it *is* made of particles. Isn't the universe fun? > 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. So to get back to the original topic, it doesn't really matter whether you talk about light travelling or propagating. Take your pick. -- Greg -- http://mail.python.org/mailman/listinfo/python-list
Re: Why not a Python compiler?
On Feb 10, 7:29 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Steven D'Aprano wrote: > > On Sat, 09 Feb 2008 01:11:09 +, Marc 'BlackJack' Rintsch wrote: > > >> 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? > > > Assuming the aim is to optimize for speed rather than memory, the > > solution is for the compiler to create something like this pseudo-code: > > > if xrange is Python's built-in xrange: > > execute optimized for-loop at C-like speed > > else: > > execute unoptimized normal loop at Python speed > > > (In case it's not obvious, the decision of which branch to take is made > > at run time, not compile time.) > > > I understand that is more or less what psycho already does. > > ... and Cython, when iterating over lists, for example. That's one of the > reasons why looping is so much faster in Cython than in Pyrex. > > Stefan- Hide quoted text - > > - Show quoted text - There's always the Visitor pattern. in xrange(1).for x: loop_of_x_at_forlike_speed() Do identifiers get hashed once at compile/ definition-execution time, or every time they're encountered? This could be fast... -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
On 2008-02-09, Doug Morse <[EMAIL PROTECTED]> 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). > 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.comand toy with a few common MISAPPREHENSIONS... -- http://mail.python.org/mailman/listinfo/python-list
Re: Why not a Python compiler?
Steven D'Aprano wrote: > On Sat, 09 Feb 2008 01:11:09 +, Marc 'BlackJack' Rintsch wrote: > >> 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? > > Assuming the aim is to optimize for speed rather than memory, the > solution is for the compiler to create something like this pseudo-code: > > if xrange is Python's built-in xrange: > execute optimized for-loop at C-like speed > else: > execute unoptimized normal loop at Python speed > > (In case it's not obvious, the decision of which branch to take is made > at run time, not compile time.) > > I understand that is more or less what psycho already does. ... and Cython, when iterating over lists, for example. That's one of the reasons why looping is so much faster in Cython than in Pyrex. Stefan -- http://mail.python.org/mailman/listinfo/python-list
Re: Why not a Python compiler?
On Feb 6, 2:43 am, "Luis M. González" <[EMAIL PROTECTED]> wrote: > On 5 feb, 05:19, Santiago Romero <[EMAIL PROTECTED]> wrote: > > > > > ( 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 -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
En Sat, 09 Feb 2008 19:01:31 -0200, Doug Morse <[EMAIL PROTECTED]> escribi�: > 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? Before the famous Michelson-Morley experiment (end of s. XIX), some physicists would have said "light propagates over ether, some kind of matter that fills the whole space but has no measurable mass", but the experiment failed to show any evidence of it existence. Then it was hard to explain light propagation as a wave (but Maxwell equations appeared to be so right!), and previous experiments showed that light was not made of particles either. Until DeBroglie formulated its hypothesis of dual nature of matter (and light): wave and particle at the same time. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Star Wars and parsecs [was Re: Why not a Python compiler?]
On Feb 8, 2:53�pm, Lou Pecora <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > �Grant Edwards <[EMAIL PROTECTED]> wrote: > > > On 2008-02-08, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > > > > � � � 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 -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
Grant Edwards wrote: > On 2008-02-09, Thomas Dybdahl Ahle <[EMAIL PROTECTED]> wrote: >> 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." -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
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 <[EMAIL PROTECTED]> 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). -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
On 2008-02-09, Thomas Dybdahl Ahle <[EMAIL PROTECTED]> wrote: > > 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. -- Grant Edwards grante Yow! RELAX!!... This at is gonna be a HEALING visi.comEXPERIENCE!! Besides, I work for DING DONGS! -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
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 -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Speed of light [was Re: Why not a Python compiler?]
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 :-) -- mph -- http://mail.python.org/mailman/listinfo/python-list
Re: Why not a Python compiler?
On Sat, 09 Feb 2008 01:11:09 +, Marc 'BlackJack' Rintsch wrote: > 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? Assuming the aim is to optimize for speed rather than memory, the solution is for the compiler to create something like this pseudo-code: if xrange is Python's built-in xrange: execute optimized for-loop at C-like speed else: execute unoptimized normal loop at Python speed (In case it's not obvious, the decision of which branch to take is made at run time, not compile time.) This, naturally, assumes that the test of whether xrange is the built-in xrange is fast. If it is not, then the optimized code will actually be slower for small enough loops. But that's hardly unusual: no optimizing compiler guarantees to optimize code in every possible case. I understand that is more or less what psycho already does. -- Steven -- http://mail.python.org/mailman/listinfo/python-list
Re: Why not a Python compiler?
Luis M. González wrote: > On 8 feb, 22:15, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> On Fri, 08 Feb 2008 17:45:36 +, Grant Edwards wrote: >>> On 2008-02-08, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: 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. -- http://mail.python.org/mailman/listinfo/python-list
Re: Why not a Python compiler?
On 8 feb, 22:15, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Fri, 08 Feb 2008 17:45:36 +, Grant Edwards wrote: > > On 2008-02-08, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > >> 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... -- http://mail.python.org/mailman/listinfo/python-list
Re: Why not a Python compiler?
On Fri, 08 Feb 2008 17:45:36 +, Grant Edwards wrote: > On 2008-02-08, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > >> 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 -- http://mail.python.org/mailman/listinfo/python-list
Re: Why not a Python compiler?
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 -- http://mail.python.org/mailman/listinfo/python-list
Re: Why not a Python compiler?
Grant Edwards wrote: > On 2008-02-08, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > >>> 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/ -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Star Wars and parsecs [was Re: Why not a Python compiler?]
In article <[EMAIL PROTECTED]>, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2008-02-08, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > > > 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 -- http://mail.python.org/mailman/listinfo/python-list
RE: Why not a Python compiler?
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Grant Edwards > Sent: Friday, February 08, 2008 12:46 PM > To: python-list@python.org > Subject: Re: Why not a Python compiler? > > On 2008-02-08, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > >> 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? > How many ewoks are there to a wookie? (Yes, I know the metric system is archaic, but I really don't care for them new fangled 'standard units'.) * The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA621 -- http://mail.python.org/mailman/listinfo/python-list
Re: Why not a Python compiler?
Grant Edwards wrote: > On 2008-02-08, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > >>> 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. -- http://mail.python.org/mailman/listinfo/python-list
Re: Why not a Python compiler?
On 2008-02-08, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: >> 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 -- http://mail.python.org/mailman/listinfo/python-list
Re: Why not a Python compiler?
Ryszard Szopa <[EMAIL PROTECTED]> writes: >> The main determinant of Python's performance isn't the interpreter >> overhead, but the amount of work that must be done at run-time and >> cannot be moved to compile-time or optimized away. > > Well, I am still not convinced that Python is intrinsically > un-compilable :-). It's not. My point is that it's very hard to optimize if your goal is to implement Python as currently defined. > Some optimizations that are nowadays done by hand probably could be > abstracted. Think assigning a method to a local variable before using > it in a loop... That's an example of what I'm talking about: it is simply not correct to cache methods in general. If you think changing classes is a no-no, remember that function objects can be and do get added to an individual instance's __dict__. Of course, your compiler could support a declaration that disables the optimization for code that really needs to do it, but then you're no longer compatible with Python. (And by "Python" I don't mean just CPython, but the core language as defined by the language reference and implemented in CPython, Jython, and IronPython.) > Anyway, I won't be very surprised if in a couple of years your > average c.l.py troll is going to be asking "So I heard that Python > is an interpreted only language, how can it be any good?", and you > will be explaining for the thousandth time: "Since version 4.2 > Python has a fast native code compiler, so...". ;-) I'll be very happy to be proven wrong in that respect. :-) -- http://mail.python.org/mailman/listinfo/python-list
Re: OT: Star Wars and parsecs [was Re: Why not a Python compiler?]
On 2008-02-08, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > 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 -- http://mail.python.org/mailman/listinfo/python-list
Re: Why not a Python compiler?
On 2008-02-07, Jeroen Ruigrok van der Werven <[EMAIL PROTECTED]> wrote: > -On [20080207 22:09], Reedick, Andrew ([EMAIL PROTECTED]) wrote: >>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. > > http://starwars.wikia.com/wiki/Kessel_Run > > Han Solo claimed that his Millennium Falcon "made the Kessel Run in less > than twelve parsecs." The parsec is a unit of distance, not time. Solo was > not referring directly to his ship's speed when he made this claim. Instead, > he was referring to the shorter route he was able to travel by skirting the > nearby Maw black hole cluster, thus making the run in under the standard > distance. However, parsec relates to time in that a shorter distance equals > a shorter time at the same speed. By moving closer to the black holes, Solo > managed to cut the distance down to about 11.5 parsecs. Um, yea, I'd have to call bullshit on that. IIRC, he was answering a question something like "is she fast". If you buy the above BS, he'd have to be be answering a question about his piloting skills not about how fast the ship is. One could give GL the benefit of the doubt and claim that GL intentionally miswrote the line to give the movie the feel of the badly-written serials he was emulating. But then again, I think GL has since proven beyond a doubt that he's just a really bad writer who is particularly awful at dialog. > 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. -- Grant Edwards grante Yow! BELA LUGOSI is my at co-pilot ... visi.com -- http://mail.python.org/mailman/listinfo/python-list
Re: Why not a Python compiler?
On Feb 8, 12:25 am, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: > > 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) > > In order to correctly implement Python addition, python:add needs to > do a lot of work at run-time. It needs to check for __add__ method of > one or both operands without assuming what it does, since a > user-defined class is free to define __add__ to do whatever it > pleases. The compiler could attempt to infer the types of operands, > but that is hard since an expression such as "a = module.SomeClass()" > completely changes meaning if module.SomeClass or > module.SomeClass.__add__ change. Such changes may seem improbable, > but fact is that being able to do them is a documented part of the > language, and a lot of code makes good use of it. Assuming these > things don't happen means the compiler doesn't implement Python. > This applies not only to addition; expressions such as "foo.bar", > which include any method call, would be translated to (python:getattr > foo "bar"), and so on. Most functions would have to construct actual > tuples, since a function can be replaced with one that takes *args. > Again, optimizing almost any of this away would change the semantics > of Python. From the ability to assign to classes, to modules, to > globals(), and to __dict__'s, literally anything can change at > run-time. *Some* kinds of runtime dispatches can be sped up by In this respect, CL's is similar to Python. Generic functions are even more dynamic than Python's methods. You can add a method to a gf whenever you please. Also, you can assign to classes, change their structure (add or remove slots), change their metaclass and so on. As for foo.bar and friends: in CL you have to define an accessor function if you don't want to use (SLOT-VALUE foo 'bar) all the time (this is usually done through a shortcut in the DEFCLASS macro). CL objects are not hash-tables, so you will get an error if you try to assign to a bogus (by which I mean not present in the class definition) slot. However, you can implement a slot-missing method to sanely handle this situation. You cannot reset slots containing methods in CL (as they do not exist). However, you should be able to implement SLOT-VALUE-USING-CLASS and (SETF SLOT-VALUE-USING-CLASS) which would emulate Python's behavior. Finally, you can use EQL specializers, which give you object (not class) specific behavior. The one thing that isn't so easy to emulate is assignment to modules (though redefinition of a function in some package works as you would expect). > setting up sophisticated caches (one such cache for methods is being > applied to CPython), but getting that right without breaking > correctness is quite tricky. Besides the same caches could be used to > speed up CPython too, so they don't constitute an advantage of the > compiler. > > The main determinant of Python's performance isn't the interpreter > overhead, but the amount of work that must be done at run-time and > cannot be moved to compile-time or optimized away. Well, I am still not convinced that Python is intrinsically un-compilable :-). Some optimizations that are nowadays done by hand probably could be abstracted. Think assigning a method to a local variable before using it in a loop... Expressing simple loops as C for loops... Tail call optimization... (Of course, my intuitions about what would be a great optimization for a Python compiler are vague, so please correct me if I am drastically wrong.) Note that these are the kind of optimizations you don't want in your interpreter. When it comes to debugging, the lack of tail call optimization is a feature, not a bug. Finally, skimming the CLPython mailing list suggests it actually works. Presently it is slower than CPython, but after all it is a far from mature one developer project, so you can treat it as a proof of concept. Anyway, I won't be very surprised if in a couple of years your average c.l.py troll is going to be asking "So I heard that Python is an interpreted only language, how can it be any good?", and you will be explaining for the thousandth time: "Since version 4.2 Python has a fast native code compiler, so...". ;-) Cheers, --
Re: Why not a Python compiler?
On 8 Feb, 08:16, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > [snip more interesting considerations about compiling python] > > Please get back on topic. This discussion is about parsecs and > wookies now. Yes, it's like the lower-value parts of Wikipedia have spilled out onto Usenet. ;-) But I think Hrvoje's post summarises quite well: Python operations are not directly equivalent to the primitive operations which often employ the same symbols (eg. arithmetic operators), determining the attributes of objects typically requires relatively expensive operations (compared to optimised cases in other languages), predicting the outcome of such run-time operations is difficult because even the slightest change can have global consequences. That said, there are some things in Python which are intentionally predictable: names are always associated with a particular scope (local, global), access to such scopes is not configurable (unlike access to instance namespaces, for example). Moreover, people have asserted that many programs do not use the full potential of Python's dynamic facilities. For example, how many programs do something like this...? class A: ... class B: ... for cls in A, B: class C(cls): ... Removing the mere possibility of such stuff piece by piece, or rather telling the programmer that it makes their programs run slow, could make Python programs more readily inspectable and potentially more open to optimisation. I regard this as a more interesting route than just slapping type annotations all over the place and pretending that Java's younger brother hasn't just been conceived. Paul -- http://mail.python.org/mailman/listinfo/python-list
OT: New Hope [was Re: Why not a Python compiler?]
On Fri, 08 Feb 2008 08:25:56 +0100, Torsten Bronger wrote: > Hallöchen! > > Reedick, Andrew writes: > >>> -Original Message- >>> From: [EMAIL PROTECTED] [mailto:python- >>> [EMAIL PROTECTED] On Behalf Of Torsten Bronger >>> Sent: Thursday, February 07, 2008 3:32 PM To: python-list@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. Bah humbug! New Hope, new poke. Some of us are old enough to remember when Star Wars was Star Wars: the movie was called Star Wars, the opening credits listed it as Star Wars (with New Hope merely a subtitle specifically to invoke the flavour of the Saturday afternoon movies of Lucas' teen years) and the novelization was called Star Wars. That novel was credited to Lucas but actually ghost-written by Alan Dean Foster. The 1976 Sphere Books edition is called Star Wars, it's subtitled "From the Adventures of Luke Skywalker", and the inside front page refers to the movie as Star Wars. With no subtitle. In that book, Han refers to "twelve standard time parts", a clunky and ugly phrase even stupider than calling it twelve parsecs, which reads and sounds like real language. Personally, I think Lucas should have just said that in that particular galaxy far far away and a long time ago, "parsec" *was* a measure of time. I'd buy that. -- Steven -- http://mail.python.org/mailman/listinfo/python-list
Re: Why not a Python compiler?
"Santiago Romero" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Why not a Python COMPILER? Check out CLPython it has a Python compiler, though I highly doubt it is what you are thinking of. >From http://common-lisp.net/project/clpython/manual.html Sometimes, the generated Python code can be simplified because the value of an expressions is known at compile time. This is where compiler macros come in. In this example, as 4 > 3 always holds, the compiler macro for py-> replaces (funcall #'py-> 4 3) by the Python value True. After that, the compiler macro for py-val->lisp-bool recognizing True is a constant value, replaces (py-val->lisp-bool True) by t. The Lisp compiler then deduces that always the first branch of the if expression is taken, and replace the whole (cond ...) by (py-print nil (list "y") nil). In this example the compiler macros were able to remove a lot of the Lisp code at compile time. This results in more efficient code. However, in practice there is often not that much that can be decided at compile time, due to Python-the-language being very dynamic. For example, in the expression 5 + x the value of x can be anything. As classes are able to redefine how the + operator behaves (by means of the __add__ and __radd__ methods), the value of 5 + x can be anything as well. Unless the context gives more information about the type of x, the Lisp code must contain a call to the generic addition function py-+. Nevertheless, the compiler macro will inline "common" case, and make the generic call only for "uncommon" arguments. If small integers (fixnums) are common for the + operator, the compiler macro for py-+ could emit: (if (typep x 'fixnum) (+ 5 x) (py-+ 5 x))The check for x being fixnum is very fast; and if x is indeed a fixnum then the inline addition is also very fast. If x is not a fixnum, it could another kind of (Lisp) number, or even a Pythonic object posing as a number. The generic py-+ will handle that. Compiled vs Interpreted Code CLPython can run Python code in two modes, interpreted or compiled. In the latter case, the Lisp code is translated into assembly. The advantage of interpreted code is that debugging is easier (the stack trace contains more information); on the other hand execution of compiled code is much faster. Jack Trades -- http://mail.python.org/mailman/listinfo/python-list
Re: Why not a Python compiler?
Hallöchen! Reedick, Andrew writes: >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:python- >> [EMAIL PROTECTED] On Behalf Of Torsten Bronger >> Sent: Thursday, February 07, 2008 3:32 PM >> To: python-list@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: [EMAIL PROTECTED] (See http://ime.webhop.org for further contact info.) -- http://mail.python.org/mailman/listinfo/python-list