Re: Is python not good enough?

2010-01-25 Thread Albert van der Horst
In article hij24v$e7...@panix5.panix.com, Aahz a...@pythoncraft.com wrote:
In article 1b42700d-139a-4653-8669-d4ee2fc48...@r5g2000yqb.googlegroups.com,
ikuta liu  ikut...@gmail.com wrote:

Is python not good enough? for google, enhance python performance is
the good way better then choose build Go language?

It is not at all clear that -- despite some comments to the contrary --
the Go developers are intending to compete with Python.  Go seems much
more intended to compete with C++/Java.  If they're successful, we may
eventually see GoPython.  ;-)

As far as I can tell, Go was not intended to compete with anything.
It was their own itch they scratched.
Then they opened it to the world, which I applaud.

If Go was to compete with anything, they would have give it a name
that was Googleable. ;-)

--
Aahz (a...@pythoncraft.com)   * http://www.pythoncraft.com/

Groetjes Albert

--
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
alb...@spearc.xs4all.nl =n http://home.hccnet.nl/a.w.m.van.der.horst

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-25 Thread Simon Brunning
2010/1/25 Albert van der Horst alb...@spenarnc.xs4all.nl:
 If Go was to compete with anything, they would have give it a name
 that was Googleable. ;-)

If they want it Googleable, it will be. ;-)

-- 
Cheers,
Simon B.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-25 Thread David Robinow
On Mon, Jan 25, 2010 at 8:57 AM, Simon Brunning
si...@brunningonline.net wrote:
 2010/1/25 Albert van der Horst alb...@spenarnc.xs4all.nl:
 If Go was to compete with anything, they would have give it a name
 that was Googleable. ;-)
 If they want it Googleable, it will be. ;-)

http://www.google.com/search?q=go+language
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-18 Thread Phlip
On Jan 12, 7:09 am, ikuta liu ikut...@gmail.com wrote:

 Go language try to merge low level, hight level and browser language.

Go uses := for assignment.

This means, to appease the self-righteous indignation of the math
professor who would claim = should mean equality...

...you gotta type a shift and 2 characters for a very common operator.

Pass!

--
  Phlip
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-18 Thread Tim Chase

Phlip wrote:
On Jan 12, 7:09 am, ikuta liu ikut...@gmail.com wrote: 

Go language try to merge low level, hight level and browser language.


Go uses := for assignment.

This means, to appease the self-righteous indignation of the math
professor who would claim = should mean equality...

...you gotta type a shift and 2 characters for a very common operator.

Pass!


Pass?!  no...Pascal! :-)

-tkc





--
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-18 Thread David Cournapeau
On Mon, Jan 18, 2010 at 8:03 PM, Phlip phlip2...@gmail.com wrote:

 This means, to appease the self-righteous indignation of the math
 professor who would claim = should mean equality...

Much more likely, this is part of the stated goal of making go very
easy to analyse (to build tools and so that go is very fast to
compile), as stated in its FAQ.

cheers,

David
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-18 Thread Anh Hai Trinh
On Jan 18, 6:03 pm, Phlip phlip2...@gmail.com wrote:
 On Jan 12, 7:09 am, ikuta liu ikut...@gmail.com wrote:

  Go language try to merge low level, hight level and browser language.

 Go uses := for assignment.

Except that it doesn't. := is a declaration.

s := foo

is short for

var s string = foo


Cheers,

aht
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-18 Thread Phlip
On Jan 18, 5:59 am, Anh Hai Trinh anh.hai.tr...@gmail.com wrote:

  Go uses := for assignment.

 Except that it doesn't. := is a declaration.

Ah, and that's why Go is easy for cheap parsers to rip.

Tx all!

I was formerly too mortified to proceed - now I'm back in the Go camp.
They fixed the hideous redundancy of Java without the ill-defined
scope issues of Python  Ruby, and without the tacky little 'var' of
JavaScript!

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-18 Thread Steven D'Aprano
On Mon, 18 Jan 2010 03:03:26 -0800, Phlip wrote:

 On Jan 12, 7:09 am, ikuta liu ikut...@gmail.com wrote:
 
 Go language try to merge low level, hight level and browser language.
 
 Go uses := for assignment.
 
 This means, to appease the self-righteous indignation of the math
 professor who would claim = should mean equality...
 
 ...you gotta type a shift and 2 characters for a very common operator.

I doubt it has anything to do with the math professor. Any maths 
professor will tell you that, in mathematics, = is used for both 
assignment and equality, since in maths they are the same thing.

And besides, equality testing is no less common than assignment. To 
appease the self-righteous indignation of the C coders, we have to type 
== instead of = for a very common operator. No matter what convention you 
use, you're going to upset some group of people.

Seriously, I programmed in Pascal for many years, and typing := for 
assignment is not a burden.



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-18 Thread Steven D'Aprano
On Mon, 18 Jan 2010 07:37:36 -0800, Phlip wrote:

 They fixed the hideous redundancy of Java without the ill-defined scope
 issues of Python

Which ill-defined scope issues are you referring to?


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-18 Thread MRAB

Phlip wrote:

On Jan 12, 7:09 am, ikuta liu ikut...@gmail.com wrote:


Go language try to merge low level, hight level and browser language.


Go uses := for assignment.

This means, to appease the self-righteous indignation of the math
professor who would claim = should mean equality...

...you gotta type a shift and 2 characters for a very common operator.

Pass!


If I were going to list what I didn't like about Go, that wouldn't be
one of them!
--
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-17 Thread Stefan Behnel
Paul Rubin, 17.01.2010 05:06:
 David Cournapeau writes:
 
 And certainly, one of the big reason for
 the python success is easy interface with C. Maybe interfacing with C
 is the real reason for holding back python implementations ?
 
 The CPython/C API is not terrible but it's not all that easy to use.
 For example, it's very easy to make reference counting errors.  Other
 language FFI's that I've used avoid that problem to some extent.

Other languages don't have Cython.


 It's true that CPython has quite a few existing C modules that would require
 rework if the API were to change incompatibly.

quite a few sounds a bit too weak here. Some of the existing C extensions
have become reasons to use Python in the first place. Think of NumPy, for
example, and the whole scipy environment. Think of the
performance-to-usability ratio of cElementTree and lxml. Think of the huge
body of Cython code in Sage. Imagine what the set of dbm modules (or even
the entire standard library) would be without external C libraries and C
extensions.

The C-API and the ton of modules that use it are pretty vital for Python.
AFAICT, Py3 is pretty much a virgin platform when it comes to scientific
computing, mostly because NumPy still wasn't adapted to the changes in the
C-API. They even consider rewriting parts of it in Cython a simpler way to
solve this issue than trying to port the code itself. This shows that any
change to that API may have a tremendous effect on the usability of Python
as a whole.


 But I think a different
 (better) API wouldn't stop people from writing new modules.

Writing new modules may not be enough.

Stefan
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-17 Thread Blog

On 1/12/2010 9:09 PM, ikuta liu wrote:

I'm a little confused.
Is python not good enough?
for google, enhance python performance is the good way better then
choose build Go language?

Go language try to merge low level, hight level and browser language.

Those I'd like to see it on python..
Have you not heard about the Unladen Swallow project from google? 
There's a new PEP coming up which will propose google's codebase to be 
merged with Py3k, resulting in superior performance.


--
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-17 Thread alex23
Blog blogtes...@gmail.com wrote:
 Have you not heard about the Unladen Swallow project from google?
 There's a new PEP coming up which will propose google's codebase to be
 merged with Py3k, resulting in superior performance.

This kind of worries me for a number of reasons:
 * unladen is _way_ too immature and unproven a project to replace the
current implementation,
 * Google themselves have stressed they're only concerned with
improvements that benefit their use cases, such that
 * other benchmarks appear to perform _worse_ under unladen, and
 * has the project even posted substantive enough gains to warrant
this change? that didn't seem to be the situation when I last checked
 * so far, the speed improvements have come at a cost of significantly
higher memory use (i believe it was ~10 times that of CPython at one
point)

I dunno, I kinda feel about Unladen Swallow the exact same way I do
about Go: if it wasn't a Google project, I really doubt it would be
getting the attention it is (over the other performance enhancement
projects: cython, psyco2, pypi et al)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-16 Thread John Nagle

Nobody wrote:

On Fri, 15 Jan 2010 12:34:17 -0800, John Nagle wrote:


Actually, no.  It's quite possible to make a Python implementation that
runs fast.  It's just that CPython, a naive interpreter, is too primitive
to do it.  I was really hoping that Google would put somebody good at
compilers in charge of Python and bring it up to production speed.

Look at Shed Skin, a hard-code compiler for Python


A hard-code compiler for the subset of Python which can easily be compiled.

Shed Skin has so many restrictions that it isn't really accurate to
describe the language which it supports as Python.

Hardly any real-world Python code can be compiled with Shed Skin. Some of
it could be changed without too much effort, although most of that is the
kind of code which wouldn't look any different if it was implemented in
C++ or Java.

The monomorphism restriction is likely to be particularly onerous: the
type of a variable must be known at compile time; instances of subclasses
are allowed, but you can only call methods which are defined in the
compile-time class.

If you're writing code which makes extensive use of Python's dynamicity,
making it work with Shed Skin would require as much effort as re-writing
it in e.g. Java, and would largely defeat the point of using Python in the
first place.

http://shedskin.googlecode.com/files/shedskin-tutorial-0.3.html

If you want a language to have comparable performance to C++ or Java, you
have to allow some things to be fixed at compile-time. There's a reason
why C++ and Java support both virtual and non-virtual (final) methods.


My point is that Python is a good language held back by a bad
implementation.  Python has gotten further with a declaration-free syntax
than any other language.  BASIC and JavaScript started out declaration-free,
and declarations had to be retrofitted.  Python has survived without them.
(Yes, there are hokey extensions like Psyco declarations and decorators,
but both are marginal concepts.)

The key to hard-compiling Python is that you have to compile the
whole program, not individual modules.  You can't tell how an individual
module will be used until you've seen its callers.  If the compiler
looks at the whole program at once, type inference has a good chance of
disambiguating most type issues.

If you can see the whole program at once, most dynamism can be detected.
What's really needed is to detect the most common case, where objects don't
have unexpected dynamism and can be implemented as hard structures.

John Nagle

--
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-16 Thread Steve Holden
John Nagle wrote:
 Nobody wrote:
 On Fri, 15 Jan 2010 12:34:17 -0800, John Nagle wrote:

 Actually, no.  It's quite possible to make a Python
 implementation that
 runs fast.  It's just that CPython, a naive interpreter, is too
 primitive
 to do it.  I was really hoping that Google would put somebody good at
 compilers in charge of Python and bring it up to production speed.

 Look at Shed Skin, a hard-code compiler for Python

 A hard-code compiler for the subset of Python which can easily be
 compiled.

 Shed Skin has so many restrictions that it isn't really accurate to
 describe the language which it supports as Python.

 Hardly any real-world Python code can be compiled with Shed Skin. Some of
 it could be changed without too much effort, although most of that is the
 kind of code which wouldn't look any different if it was implemented in
 C++ or Java.

 The monomorphism restriction is likely to be particularly onerous: the
 type of a variable must be known at compile time; instances of subclasses
 are allowed, but you can only call methods which are defined in the
 compile-time class.

 If you're writing code which makes extensive use of Python's dynamicity,
 making it work with Shed Skin would require as much effort as re-writing
 it in e.g. Java, and would largely defeat the point of using Python in
 the
 first place.

 http://shedskin.googlecode.com/files/shedskin-tutorial-0.3.html

 If you want a language to have comparable performance to C++ or Java, you
 have to allow some things to be fixed at compile-time. There's a reason
 why C++ and Java support both virtual and non-virtual (final) methods.
 
 My point is that Python is a good language held back by a bad
 implementation.  Python has gotten further with a declaration-free syntax
 than any other language.  BASIC and JavaScript started out
 declaration-free,
 and declarations had to be retrofitted.  Python has survived without them.
 (Yes, there are hokey extensions like Psyco declarations and decorators,
 but both are marginal concepts.)
 
 The key to hard-compiling Python is that you have to compile the
 whole program, not individual modules.  You can't tell how an individual
 module will be used until you've seen its callers.  If the compiler
 looks at the whole program at once, type inference has a good chance of
 disambiguating most type issues.
 
 If you can see the whole program at once, most dynamism can be
 detected.
 What's really needed is to detect the most common case, where objects don't
 have unexpected dynamism and can be implemented as hard structures.
 
 John Nagle
 
Of course, Guido has left the path to declarations open through the use
of function argument annotation. If you wanted to write programs that
reasoned about Python programs to optimize them, annotations could come
in very useful.

regards
 Steve
-- 
Steve Holden   +1 571 484 6266   +1 800 494 3119
PyCon is coming! Atlanta, Feb 2010  http://us.pycon.org/
Holden Web LLC http://www.holdenweb.com/
UPCOMING EVENTS:http://holdenweb.eventbrite.com/

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-16 Thread David Cournapeau
On Sun, Jan 17, 2010 at 4:17 AM, John Nagle na...@animats.com wrote:
 Nobody wrote:

 On Fri, 15 Jan 2010 12:34:17 -0800, John Nagle wrote:

    Actually, no.  It's quite possible to make a Python implementation
 that
 runs fast.  It's just that CPython, a naive interpreter, is too primitive
 to do it.  I was really hoping that Google would put somebody good at
 compilers in charge of Python and bring it up to production speed.

    Look at Shed Skin, a hard-code compiler for Python

 A hard-code compiler for the subset of Python which can easily be
 compiled.

 Shed Skin has so many restrictions that it isn't really accurate to
 describe the language which it supports as Python.

 Hardly any real-world Python code can be compiled with Shed Skin. Some of
 it could be changed without too much effort, although most of that is the
 kind of code which wouldn't look any different if it was implemented in
 C++ or Java.

 The monomorphism restriction is likely to be particularly onerous: the
 type of a variable must be known at compile time; instances of subclasses
 are allowed, but you can only call methods which are defined in the
 compile-time class.

 If you're writing code which makes extensive use of Python's dynamicity,
 making it work with Shed Skin would require as much effort as re-writing
 it in e.g. Java, and would largely defeat the point of using Python in the
 first place.

 http://shedskin.googlecode.com/files/shedskin-tutorial-0.3.html

 If you want a language to have comparable performance to C++ or Java, you
 have to allow some things to be fixed at compile-time. There's a reason
 why C++ and Java support both virtual and non-virtual (final) methods.

    My point is that Python is a good language held back by a bad
 implementation.  Python has gotten further with a declaration-free syntax
 than any other language.  BASIC and JavaScript started out declaration-free,
 and declarations had to be retrofitted.  Python has survived without them.
 (Yes, there are hokey extensions like Psyco declarations and decorators,
 but both are marginal concepts.)

There are efficient implementations of dynamic programming languages
which do not rely on declaration (if by declaration you mean typing
declaration), even when available:

http://strongtalk.googlecode.com/svn/web%20site/history.html

See also:

http://www.avibryant.com/2008/05/those-who-misre.html

David
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-16 Thread John Nagle

David Cournapeau wrote:

On Sun, Jan 17, 2010 at 4:17 AM, John Nagle na...@animats.com wrote:

Nobody wrote:

On Fri, 15 Jan 2010 12:34:17 -0800, John Nagle wrote:


   Actually, no.  It's quite possible to make a Python implementation
that
runs fast.  It's just that CPython, a naive interpreter, is too primitive
to do it.  I was really hoping that Google would put somebody good at
compilers in charge of Python and bring it up to production speed.

   Look at Shed Skin, a hard-code compiler for Python

A hard-code compiler for the subset of Python which can easily be
compiled.

Shed Skin has so many restrictions that it isn't really accurate to
describe the language which it supports as Python.

Hardly any real-world Python code can be compiled with Shed Skin. Some of
it could be changed without too much effort, although most of that is the
kind of code which wouldn't look any different if it was implemented in
C++ or Java.

The monomorphism restriction is likely to be particularly onerous: the
type of a variable must be known at compile time; instances of subclasses
are allowed, but you can only call methods which are defined in the
compile-time class.

If you're writing code which makes extensive use of Python's dynamicity,
making it work with Shed Skin would require as much effort as re-writing
it in e.g. Java, and would largely defeat the point of using Python in the
first place.

http://shedskin.googlecode.com/files/shedskin-tutorial-0.3.html

If you want a language to have comparable performance to C++ or Java, you
have to allow some things to be fixed at compile-time. There's a reason
why C++ and Java support both virtual and non-virtual (final) methods.

   My point is that Python is a good language held back by a bad
implementation.  Python has gotten further with a declaration-free syntax
than any other language.  BASIC and JavaScript started out declaration-free,
and declarations had to be retrofitted.  Python has survived without them.
(Yes, there are hokey extensions like Psyco declarations and decorators,
but both are marginal concepts.)


There are efficient implementations of dynamic programming languages
which do not rely on declaration (if by declaration you mean typing
declaration), even when available:

http://strongtalk.googlecode.com/svn/web%20site/history.html

See also:

http://www.avibryant.com/2008/05/those-who-misre.html


   Yes, that's my point.

   Psyco was a good first step.  The big win with Psyco is that it
generally can recognize when a variable is an integer or floating
point number, and generate hard code for that.  It doesn't do much
for the rest of the language.  Psyco is really a kind of JIT compiler.
Those are useful, but in some ways limited.

   To go beyond that, global analysis is needed.  A big bottleneck
in Python is that too much time is spent doing dictionary lookups
for things that could be bound at compile time.  So the next big
win is figuring out which classes definitely don't have any hidden
dynamism.  A global check is needed to see if any external code
messes with the attributes of a class or its functions from outside
the function.  Most of the time, this is the case.  Once that's
been done, the class's module can be analyzed for optimization.

   If the class doesn't use setattr, etc. to add attributes to
itself, then the class can be slotted, with a C++ like structure for
the class members and functions.

   Global analysis also has to determine the class hierarchy; what inherits
from what.  It may be necessary to implement object as an abstract class
with a huge number of virtual functions, so that duck typing will work.
That's a space cost, but not a time cost.

   Caller/callee type inference is useful to determine the potential types
of parameters.  Often, analysis of all the calls to a function will determine
the types of many of the paraeters.  Then, those parameters can be hard-typed
at compile time.

   You can go this far without the restrictions Shed Skin imposes, such as
the restriction that lists must be homogeneous.   If you do impose that
restriction, array processing becomes much faster.  Type inference for
array elements is hard when arrays are computed from other arrays, so
that's a huge simplification.

   Yes, you can't use eval to get at existing variables. But in Python,
you don't really need to.

John Nagle
--
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-16 Thread David Cournapeau
On Sun, Jan 17, 2010 at 11:43 AM, John Nagle na...@animats.com wrote:
 David Cournapeau wrote:

 On Sun, Jan 17, 2010 at 4:17 AM, John Nagle na...@animats.com wrote:

 Nobody wrote:

 On Fri, 15 Jan 2010 12:34:17 -0800, John Nagle wrote:

   Actually, no.  It's quite possible to make a Python implementation
 that
 runs fast.  It's just that CPython, a naive interpreter, is too
 primitive
 to do it.  I was really hoping that Google would put somebody good at
 compilers in charge of Python and bring it up to production speed.

   Look at Shed Skin, a hard-code compiler for Python

 A hard-code compiler for the subset of Python which can easily be
 compiled.

 Shed Skin has so many restrictions that it isn't really accurate to
 describe the language which it supports as Python.

 Hardly any real-world Python code can be compiled with Shed Skin. Some
 of
 it could be changed without too much effort, although most of that is
 the
 kind of code which wouldn't look any different if it was implemented in
 C++ or Java.

 The monomorphism restriction is likely to be particularly onerous: the
 type of a variable must be known at compile time; instances of
 subclasses
 are allowed, but you can only call methods which are defined in the
 compile-time class.

 If you're writing code which makes extensive use of Python's dynamicity,
 making it work with Shed Skin would require as much effort as re-writing
 it in e.g. Java, and would largely defeat the point of using Python in
 the
 first place.

 http://shedskin.googlecode.com/files/shedskin-tutorial-0.3.html

 If you want a language to have comparable performance to C++ or Java,
 you
 have to allow some things to be fixed at compile-time. There's a reason
 why C++ and Java support both virtual and non-virtual (final) methods.

   My point is that Python is a good language held back by a bad
 implementation.  Python has gotten further with a declaration-free syntax
 than any other language.  BASIC and JavaScript started out
 declaration-free,
 and declarations had to be retrofitted.  Python has survived without
 them.
 (Yes, there are hokey extensions like Psyco declarations and
 decorators,
 but both are marginal concepts.)

 There are efficient implementations of dynamic programming languages
 which do not rely on declaration (if by declaration you mean typing
 declaration), even when available:

 http://strongtalk.googlecode.com/svn/web%20site/history.html

 See also:

 http://www.avibryant.com/2008/05/those-who-misre.html

   Yes, that's my point.

Compilation with global type inference may be a good way to speed up
python, but it is not the only way. Your claim about lookups does seem
to contradict how the various efficient implementations of dynamic
languages work. For example, the V8 engine deal with dynamic
attributes without static analysis:

http://code.google.com/apis/v8/design.html

So JIT may be limited, but I don't think it applies to the examples
you have given. Maybe static analysis ala stalin is needed for very
fast execution.

I don't claim any knowledge on those technologies, but my impression
is that other forces held back a fast python implementation, in
particular compatibility with C extensions. For example, I know no
fast implementation of dynamic languages which do not rely on garbage
collection: if this is indeed true, it may mean that retrofitting a gc
everywhere is needed, but doing so without breaking C extensions is
hard (if at all possible ?). And certainly, one of the big reason for
the python success is easy interface with C. Maybe interfacing with C
is the real reason for holding back python implementations ?

cheers,

David
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-16 Thread Paul Rubin
David Cournapeau courn...@gmail.com writes:

 And certainly, one of the big reason for
 the python success is easy interface with C. Maybe interfacing with C
 is the real reason for holding back python implementations ?

The CPython/C API is not terrible but it's not all that easy to use.
For example, it's very easy to make reference counting errors.  Other
language FFI's that I've used avoid that problem to some extent.  It's
true that CPython has quite a few existing C modules that would require
rework if the API were to change incompatibly.  But I think a different
(better) API wouldn't stop people from writing new modules.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-16 Thread Terry Reedy

On 1/16/2010 10:08 PM, David Cournapeau wrote:


Compilation with global type inference may be a good way to speed up
python, but it is not the only way. Your claim about lookups does seem
to contradict how the various efficient implementations of dynamic
languages work. For example, the V8 engine deal with dynamic
attributes without static analysis:

http://code.google.com/apis/v8/design.html


Reading that, I notice a couple of things.

1. Like Psycho, V8 trades space for time. Given that space is now 
expanding more than time is shrinking, this is more sensible in general 
than it was a decade ago. Given Javascript programs are usually small 
and work with small objects, this is even more sensible for Javascript 
than for some Python programs.


2. It compiles to object code rather than byte code. If the only target 
is standard 32/64 bit Intel/AMD processors, this is quite sensible. Does 
V8 have, for instance, Cray versions?


Guido wants the reference version to be runnable on everything with a C 
compiler and maintainable and upgradeable by volunteers who are not 
assembler experts (which I believe are getting more rare).


tjr

--
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-15 Thread John Nagle

Terry Reedy wrote:

On 1/12/2010 10:17 AM, Krister Svanlund wrote:
Their goal of 
making Go very fast to compile by machines somewhat conflicts with 
Python's goal of being fast to read by humans.


   Actually, no.  It's quite possible to make a Python implementation that
runs fast.  It's just that CPython, a naive interpreter, is too primitive
to do it.  I was really hoping that Google would put somebody good at
compilers in charge of Python and bring it up to production speed.

   Look at Shed Skin, a hard-code compiler for Python with automatic
type inference.  One guy did that.

   The language is fine, but the CPython implementation is obsolete.

John Nagle
--
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-15 Thread Nobody
On Fri, 15 Jan 2010 12:34:17 -0800, John Nagle wrote:

 Actually, no.  It's quite possible to make a Python implementation that
 runs fast.  It's just that CPython, a naive interpreter, is too primitive
 to do it.  I was really hoping that Google would put somebody good at
 compilers in charge of Python and bring it up to production speed.
 
 Look at Shed Skin, a hard-code compiler for Python

A hard-code compiler for the subset of Python which can easily be compiled.

Shed Skin has so many restrictions that it isn't really accurate to
describe the language which it supports as Python.

Hardly any real-world Python code can be compiled with Shed Skin. Some of
it could be changed without too much effort, although most of that is the
kind of code which wouldn't look any different if it was implemented in
C++ or Java.

The monomorphism restriction is likely to be particularly onerous: the
type of a variable must be known at compile time; instances of subclasses
are allowed, but you can only call methods which are defined in the
compile-time class.

If you're writing code which makes extensive use of Python's dynamicity,
making it work with Shed Skin would require as much effort as re-writing
it in e.g. Java, and would largely defeat the point of using Python in the
first place.

http://shedskin.googlecode.com/files/shedskin-tutorial-0.3.html

If you want a language to have comparable performance to C++ or Java, you
have to allow some things to be fixed at compile-time. There's a reason
why C++ and Java support both virtual and non-virtual (final) methods.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-15 Thread hackingKK

On Saturday 16 January 2010 08:01 AM, Nobody wrote:

On Fri, 15 Jan 2010 12:34:17 -0800, John Nagle wrote:

   

 Actually, no.  It's quite possible to make a Python implementation that
runs fast.  It's just that CPython, a naive interpreter, is too primitive
to do it.  I was really hoping that Google would put somebody good at
compilers in charge of Python and bring it up to production speed.
production?
 




 Look at Shed Skin, a hard-code compiler for Python
 

A hard-code compiler for the subset of Python which can easily be compiled.

Shed Skin has so many restrictions that it isn't really accurate to
describe the language which it supports as Python.
+1
   




Hardly any real-world Python code can be compiled with Shed Skin. Some of
it could be changed without too much effort, although most of that is the
kind of code which wouldn't look any different if it was implemented in
C++ or Java.
   



Happy hacking.
Krishnakant.

--
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-13 Thread johan.san...@gmail.com
On Jan 13, 12:55 am, a...@pythoncraft.com (Aahz) wrote:
 In article 1b42700d-139a-4653-8669-d4ee2fc48...@r5g2000yqb.googlegroups.com,
 ikuta liu  ikut...@gmail.com wrote:



 Is python not good enough? for google, enhance python performance is
 the good way better then choose build Go language?

 It is not at all clear that -- despite some comments to the contrary --
 the Go developers are intending to compete with Python.  Go seems much
 more intended to compete with C++/Java.  If they're successful, we may
 eventually see GoPython.  ;-)
 --
 Aahz (a...@pythoncraft.com)           *        http://www.pythoncraft.com/

 If you think it's expensive to hire a professional to do the job, wait
 until you hire an amateur.  --Red Adair

GoPython i think would be neat.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-13 Thread tanix
In article 53ec94c0-dbdd-4901-a46b-d7faee121...@j14g2000yqm.googlegroups.com, 
johan.san...@gmail.com johan.san...@gmail.com wrote:
On Jan 13, 12:55=A0am, a...@pythoncraft.com (Aahz) wrote:
 In article 1b42700d-139a-4653-8669-d4ee2fc48...@r5g2000yqb.googlegroups.=
com,
 ikuta liu =A0ikut...@gmail.com wrote:



 Is python not good enough? for google, enhance python performance is
 the good way better then choose build Go language?

 It is not at all clear that -- despite some comments to the contrary --
 the Go developers are intending to compete with Python. =A0Go seems much
 more intended to compete with C++/Java. =A0If they're successful, we may
 eventually see GoPython. =A0;-)
 --
 Aahz (a...@pythoncraft.com) =A0 =A0 =A0 =A0 =A0 * =A0 =A0 =A0 =A0http:/=
/www.pythoncraft.com/

 If you think it's expensive to hire a professional to do the job, wait
 until you hire an amateur. =A0--Red Adair

GoPython i think would be neat.

Well, as soon as they restore the braces to identify the code
blocks and provide the functionality of advanced statically
type languages, such as threads, async processing, all synchronization
primitives, garbage collection, events and GUI, i'd be willing
to switch to Python. Some of it is already there. But not all.

Except, before doing it, I'd like to know what Python buys me
compared to say Java.

--
Programmer's Goldmine collections:

http://preciseinfo.org

Tens of thousands of code examples and expert discussions on
C++, MFC, VC, ATL, STL, templates, Java, Python, Javascript, PHP,
organized by major topics of language, tools, methods, techniques.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-13 Thread Chris Rebert
On Wed, Jan 13, 2010 at 1:06 AM, tanix ta...@mongo.net wrote:
 In article 
 53ec94c0-dbdd-4901-a46b-d7faee121...@j14g2000yqm.googlegroups.com, 
 johan.san...@gmail.com johan.san...@gmail.com wrote:
On Jan 13, 12:55=A0am, a...@pythoncraft.com (Aahz) wrote:
 In article 1b42700d-139a-4653-8669-d4ee2fc48...@r5g2000yqb.googlegroups.=
com,
 ikuta liu =A0ikut...@gmail.com wrote:

 Is python not good enough? for google, enhance python performance is
 the good way better then choose build Go language?

 It is not at all clear that -- despite some comments to the contrary --
 the Go developers are intending to compete with Python. =A0Go seems much
 more intended to compete with C++/Java. =A0If they're successful, we may
 eventually see GoPython. =A0;-)
 --
 Aahz (a...@pythoncraft.com) =A0 =A0 =A0 =A0 =A0 * =A0 =A0 =A0 =A0http:/=
/www.pythoncraft.com/

 If you think it's expensive to hire a professional to do the job, wait
 until you hire an amateur. =A0--Red Adair

GoPython i think would be neat.

 Well, as soon as they restore the braces to identify the code
 blocks and provide the functionality of advanced statically
 type languages, such as threads, async processing, all synchronization
 primitives, garbage collection, events and GUI, i'd be willing
 to switch to Python. Some of it is already there. But not all.

 Except, before doing it, I'd like to know what Python buys me
 compared to say Java.

The lack of knowledge shown here gives me even less confidence in your
Goldmine collections than before.

Cheers,
Chris
--
http://blog.rebertia.com

 --
 Programmer's Goldmine collections:

 http://preciseinfo.org

 Tens of thousands of code examples and expert discussions on
 C++, MFC, VC, ATL, STL, templates, Java, Python, Javascript, PHP,
 organized by major topics of language, tools, methods, techniques.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-13 Thread Stefan Behnel

tanix, 13.01.2010 10:06:

Well, as soon as they restore the braces to identify the code
blocks and provide the functionality of advanced statically
type languages, such as threads, async processing, all synchronization
primitives, garbage collection, events and GUI, i'd be willing
to switch to Python. Some of it is already there. But not all.


Why don't you write up a proposal for the python-ideas list?

Stefan
--
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-13 Thread Jonathan Hartley
On Jan 13, 9:06 am, ta...@mongo.net (tanix) wrote:
 Well, as soon as they restore the braces to identify the code
 blocks and provide the functionality of advanced statically
 type languages, such as threads, async processing, all synchronization
 primitives, garbage collection, events and GUI, i'd be willing
 to switch to Python. Some of it is already there. But not all.

 Except, before doing it, I'd like to know what Python buys me
 compared to say Java.


Hey tanis.

The absence of braces from Python is a thoughtful, deliberate choice.
There are good reasons for it, and many people (especially people
round these parts) think Python is better without braces. If you don't
like it then fair enough, your preferences are your own to choose.

Other than that, Python does have every single one of the things you
enumerate.

Regarding static versus dynamic typing - many people (especially
people round these parts) believe dynamic typing to be superior to
static typing in many situations. Again, personal taste seems to weigh
heavily in this topic, but there are strong reasons to prefer dynamic
typing - it allows you to write some programs that simply couldn't be
written statically, and this greater flexibility sometimes allows you
to choose algorithms and code organisation that is a better match for
your problem than a statically typed language would, making your
programs easier to write, shorter, and simpler to read.

As for a direct comparison with Java, then perhaps the most prominent
differences are that Python generally produces shorter, simpler-
looking programs, which are easier to write and read. Dynamic typing
is an advantage of Python in most situations. On the other hand,
Python often has poorer performance than Java. My personal hypothesis
is that this performance mismatch is most pronounced in small,
benchmark-like data churning inner-loops, and becomes less significant
for most real-world programs that have high complexity, since Python's
power-through-simplicity allows developers to visualise better
algorithms and refactor more easily than would otherwise be the case.

Best regards,

  Jonathan
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-13 Thread ikuta liu
On 1月13日, 上午7時55分, a...@pythoncraft.com (Aahz) wrote:
 In article 1b42700d-139a-4653-8669-d4ee2fc48...@r5g2000yqb.googlegroups.com,
 ikuta liu  ikut...@gmail.com wrote:



 Is python not good enough? for google, enhance python performance is
 the good way better then choose build Go language?

 It is not at all clear that -- despite some comments to the contrary --
 the Go developers are intending to compete with Python.  Go seems much
 more intended to compete with C++/Java.  If they're successful, we may
 eventually see GoPython.  ;-)
 --
 Aahz (a...@pythoncraft.com)           *        http://www.pythoncraft.com/

 If you think it's expensive to hire a professional to do the job, wait
 until you hire an amateur.  --Red Adair
Thanks for the reply.
I don't think GoPython would be happen... because...
http://code.google.com/p/googleappengine/issues/detail?id=2382

Go is going to take the position from python and browser language
(Native Client),
Don't surprise Go got the interpreter in the future.


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-13 Thread tanix
In article mailman.901.1263452854.28905.python-l...@python.org, Dennis Lee 
Bieber wlfr...@ix.netcom.com wrote:
On Wed, 13 Jan 2010 00:53:19 -0800 (PST), johan.san...@gmail.com
johan.san...@gmail.com declaimed the following in
gmane.comp.python.general:

 GoPython i think would be neat.

As long as it doesn't get called GoPy (too easy to pronounce as
goopy)

:--}

You guys are funny, I tellya.

--
Programmer's Goldmine collections:

http://preciseinfo.org

Tens of thousands of code examples and expert discussions on
C++, MFC, VC, ATL, STL, templates, Java, Python, Javascript, PHP,
organized by major topics of language, tools, methods, techniques.

-- 
http://mail.python.org/mailman/listinfo/python-list


Is python not good enough?

2010-01-12 Thread ikuta liu
I'm a little confused.
Is python not good enough?
for google, enhance python performance is the good way better then
choose build Go language?

Go language try to merge low level, hight level and browser language.

Those I'd like to see it on python..
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-12 Thread Stefan Behnel

ikuta liu, 12.01.2010 16:09:

I'm a little confused.
Is python not good enough?
for google, enhance python performance is the good way better then
choose build Go language?

Go language try to merge low level, hight level and browser language.

Those I'd like to see it on python..


I think everyone's free to put resources into the creation of new 
programming languages. Google has enough money to put it into all sorts of 
things without the need to have them pay off.


Stefan
--
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-12 Thread Krister Svanlund
Every language has it uses and Google obviously thought that it would
take more resources to get Python to the level they need it than to
start using Go.

Python is great for alot of things but it's not perfect for anything.

On Tue, Jan 12, 2010 at 4:09 PM, ikuta liu ikut...@gmail.com wrote:
 I'm a little confused.
 Is python not good enough?
 for google, enhance python performance is the good way better then
 choose build Go language?

 Go language try to merge low level, hight level and browser language.

 Those I'd like to see it on python..
 --
 http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-12 Thread Ethan Furman

[please don't top-post]

Krister Svanlund wrote:

On Tue, Jan 12, 2010 at 4:09 PM, ikuta liu ikut...@gmail.com wrote:

I'm a little confused.
Is python not good enough?
for google, enhance python performance is the good way better then
choose build Go language?

Go language try to merge low level, hight level and browser language.

Those I'd like to see it on python..
--
http://mail.python.org/mailman/listinfo/python-list


 Every language has it uses and Google obviously thought that it would
 take more resources to get Python to the level they need it than to
 start using Go.

 Python is great for alot of things but it's not perfect for anything.


s/anything/everything/

~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-12 Thread Terry Reedy

On 1/12/2010 10:17 AM, Krister Svanlund wrote:

Every language has it uses and Google obviously thought that it would
take more resources to get Python to the level they need it than to
start using Go.


'Google' does not think.

Go builds on previous works by the main developers. I doubt that they 
even considered trying to upgrade Python and in particular, its 
generators, to accomplish the parallel processing goals. Their goal of 
making Go very fast to compile by machines somewhat conflicts with 
Python's goal of being fast to read by humans.


Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list


Re: Is python not good enough?

2010-01-12 Thread Aahz
In article 1b42700d-139a-4653-8669-d4ee2fc48...@r5g2000yqb.googlegroups.com,
ikuta liu  ikut...@gmail.com wrote:

Is python not good enough? for google, enhance python performance is
the good way better then choose build Go language?

It is not at all clear that -- despite some comments to the contrary --
the Go developers are intending to compete with Python.  Go seems much
more intended to compete with C++/Java.  If they're successful, we may
eventually see GoPython.  ;-)
-- 
Aahz (a...@pythoncraft.com)   * http://www.pythoncraft.com/

If you think it's expensive to hire a professional to do the job, wait
until you hire an amateur.  --Red Adair
-- 
http://mail.python.org/mailman/listinfo/python-list