That's great. I'm moving all of my scripts to Python now. If the guy's name is Guido, it's gotta be good!
-- hello dear sirs my name is jamesh i are india (bihar) can u guide me install red had linux 9?
Re:His name is Guido?
by
moro_666
·
· Score: 5, Interesting
I dont think that the name Guido will give you any guarantees on the language quality...
However, could this be Google's move against Sun and Microsoft ?
Sun has Java Microsoft has C#
It would be pretty logical that google would like to control something that is comparable to sun and microsoft's bigtime server languages. Python has moderately fast bytecode (google stuff could improve a lot here) and it's got a decent oop model and a threading api. i/o is also usable. i think zope fans can hype their favourite thing in the responding posts too.
i can't wait for the first version of GPython or Gython !
--
I'd tell you the chances of this story being a dupe, but you wouldn't like it.
Umm...
First of all Python has been part of Google since the beginning. There's even a quote about it on the Python.org homepage.
Secondarily, Python is still much slower than C, and it's used internally or for prototyping, from what I've heard, at Google. Once an external project is prototyped and "proof of concept"ed they move to a faster language.
Python is about speed of development, not necessarily execution and they would NEVER use Zope for Google, it's dog slow.
Once an external project is prototyped and "proof of concept"ed they move to a faster language.
Based on what I've heard from people that work there, this is not always the case (I assume you're talking about re-writing entire applications in "something faster" after the Python prototype proves the concept). Sometimes it's not necessary to optimize the shit out of everything; to do so would be a waste of resources. One of the nice things about Python is that you can re-implement hotspots in other languages (such as C or C++) without having to rewrite the whole application (yes, I know you can do that sort of thing in other languages, too).
-- [b.belong('us') for b in bases if b.owner() == 'you']
Re:His name is Guido?
by
MechaShiva
·
· Score: 2, Funny
PythonG!
-- After calming me down with some orange slices and some fetal spooning,
E.T. revealed to me his singular purpose.
Re:His name is Guido?
by
1shoonya0
·
· Score: 2, Funny
wonder if they would rename string as g-string?
-- I doubt, therefore I might be.
Re:His name is Guido?
by
DARKFORCE123
·
· Score: 4, Interesting
It would be pretty logical that google would like to control something that is comparable to sun and microsoft's bigtime server languages. Python has moderately fast bytecode (google stuff could improve a lot here) and it's got a decent oop model and a threading api. i/o is also usable. i think zope fans can hype their favourite thing in the responding posts too.
Microsoft hasn't been asleep either when it comes to Python. They hired the original guy who worked on the Iron Python project http://www.ironpython.com/ which brought Python to.NET.
Re:His name is Guido?
by
julesh
·
· Score: 3, Informative
Python has moderately fast bytecode (google stuff could improve a lot here) and it's got a decent oop model and a threading api.
Python's biggest problem from a performance perspective is that the language effectively guarantees operations on several internal objects (e.g. lists, dictionaries, etc) are atomic (from a multithreading point of view). This means that some kind of lock must be held when working with such objects. Because this is how most Python programs spend most of their time, Python usually just has a global lock for all such objects that threads hold whenever they aren't blocked. This means that multithreaded Python apps do not usually benefit from having multiprocessing systems. The obvious alternative (per-object locks acquired when necessary) doesn't seem to help, as it slows single-thread performance significantly.
I think this flaw means that Python cannot really compete with Java or C# on big server systems. And I don't see how to fix it, either, without breaking the beauty of the language.
Next time try throwing in some over-the-top, sensationalized, flamebait speculation. More points if it's a complete non-sequitur. For example:
"It seems that Python creator Guido van Rossum has received an offer from Google, and accepted it. Here is also some confirmation. Does this finally confirm that vi is better than emacs?"
or
"It seems that Python creator Guido van Rossum has received an offer from Google, and accepted it. Here is also some confirmation. Is this move calculated to counter Apple's move to Intel?"
And to cap it off, add a slight disclaimer that 'you don't want to start a flamewar'.
It seems that Python creator Guido van Rossum has received an offer from Google, and accepted it. Here is also some confirmation. Not to flame the flames, but does this unexpected move confirm that PostgreSQL is slipping behind MySQL in the conformance to SQL Standards?
or
It seems that Python creator Guido van Rossum has received an offer from Google, and accepted it. Here is also some confirmation. Would he have been hired if he was a C++ programmer? Not to restart the flamewar, but doesn't this prove that C++ and Java are toy languages compared to python?
-- "Sure there's porn and piracy on the Web but there's probably a downside too."
No, "not to start a flamewar" is old-school. These days, the tactic is to say something that you can be reasonably sure will get modded up to +5, but trying to make yourself look rebellious and daring by prefixing it with, "I know I'll get modded down for this, but..."
-- The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
I love Python, but...
by
ShatteredDream
·
· Score: 5, Interesting
I really do think it has been hampered by having a less rigorously standardized basic class library than Java or.NET. It would be great to see Python get some better documentation tools as well so that it'd be easy to generate documentation on par with the Java and.NET documentation.
And of course if Google wanted to really screw with both Sun and Microsoft, especially Microsoft, they could create their own cross-platform web and gui toolkits and a free RAD GUI builder a la Visual Studio for Python. If they could create a Python framework on par with Swing or Windows Forms, there'd be quite a bit of wailing and gnashing of teeth in both camps:)
-- XML is a known as a key material required to create SMD: Software of Mass Destruction
Re:I love Python, but...
by
Anonymous Coward
·
· Score: 2, Informative
It would be great to see Python get some better documentation tools as well so that it'd be easy to generate documentation on par with the Java and.NET documentation.
I've always found help(object in question) in the interpreter to be more efficient than looking it up in the sun javadocs or on msdn.
And of course if Google wanted to really screw with both Sun and Microsoft, especially Microsoft, they could create their own cross-platform web and gui toolkits
WxWidgets? PyGTK?
Re:I love Python, but...
by
a_karbon_devel_005
·
· Score: 4, Interesting
I really do think it has been hampered by having a less rigorously standardized basic class library than Java or.NET. It would be great to see Python get some better documentation tools as well so that it'd be easy to generate documentation on par with the Java and.NET documentation.
Actually Python's interactive interpreter and class/method documentation strings work very well. Most times it's much nicer to simply be able to DO stuff and look up help at the same time rather than go sifting through some huge morass of automated docs.
Also, the next time you can do something in Java or.NET that you can't do in Python, let me know.
Re:I love Python, but...
by
YA_Python_dev
·
· Score: 4, Informative
WxWidgets?
Good point. I think that Python + wxPython + wxGlade is a very powerful combination for clean, fast and maintainable GUI development.
If you do GUIs I suggest to try these tools: they are simple and powerful (wxPython even contains additional classes that are not present in wxWidgets).
-- There's a hidden treasure in Python 3.x: __prepare__()
Re:I love Python, but...
by
tomservo291
·
· Score: 3, Informative
Python is self documenting. You should be documenting it as you go along. Everything in python is an object, and every object has a doc string, therefore EVERYTHING in python has documentation built into it. Variables, functions, classes, anything and everything.
Re:I love Python, but...
by
AT
·
· Score: 2, Interesting
I agree the class libraries are a bit hodge-podge, but the documentation tools seem to be on par with Java/.NET. A bit less structured, but then python is a less structured language, too. Plus with pydoc, I can browse the docs with a browser (a la javadoc, but dynamically generated) or from the commandline.
In my opinion, the more fancy stuff people have used javadoc tags for (object relational mapping, test cases and contraints, etc.) should be done with annotations anyway, and annotations are supported by the most recent versions of both python and java.
Re:I love Python, but...
by
jgrahn
·
· Score: 2, Interesting
I really do think it has been hampered by having a less rigorously standardized basic class library than Java or.NET.
I disagree. Python (like Perl) tends to mirror the underlying OS and libraries in some no-nonsense, pragmatic way.
Java and.NET want to be your OS, and seem to make a point of reinventing
as many wheels as possible, hoping you forget how to use the ones you already
have in the process.
My wheels are Unix, and I do not plan to replace them.
Python doesn't try to force me; that's one reason I enjoy programming in it.
It would be great to see Python get some better documentation tools as well so that it'd be easy to generate documentation on par with the Java and.NET documentation.
What's missing, in your opinion?
Man pages have always been (mostly) enough for me, and
Python's docstrings and pydoc reach about the same level.
I don't want graphs with deep inheritance hierarchies and
detailed method parameter descriptions.
Re:I love Python, but...
by
julesh
·
· Score: 2, Interesting
WxWidgets? PyGTK?
Both of those are substantially lower-level than the grandparent's examples (SWING and Windows.Forms, IIRC). Wx seems to be pretty much an MFC reimplementation ported to Python, while GTK seems to take a different but equally low-level approach to it all.
I'm currently working on a UI framework based around an XML object description framework and layout engine that might fit the bill better. Currently only C++ is supported, but Python's on the roadmap. Not sure what license I'll be able to release under, though, as it includes some of my company's proprietary tech. May be able to convince the boss that a GPL version of it in our competitors' hands wouldn't be a threat to us, a la QT.
An assumption
by
Anonymous Coward
·
· Score: 5, Interesting
Everyone seems to assume that his main purpose with Google is to do Python.
I'm not saying that assumption is not true. It's just that he is a huge talent. If I had a gargantuan project to run, I'd hire him no matter what the language.
I wonder if the management types have figured out that anyone who can create and run a large successful open source project is a much better manager than the average MBA.
Re:An assumption
by
linuxmop
·
· Score: 5, Insightful
This is a well-founded assumption. Much of Google's internal development is done in Python. Thus, it is important that Python development continue quickly and continue in a direction that benefits Google. They cannot risk that Guido find himself unable to afford to continue as Python project leader.
No, they are most certainly hiring Guido to continue Python development. It would be a disaster for Python, and thus for Google, if they diverted his talent toward some random Google project.
Re:An assumption
by
viega
·
· Score: 2, Informative
He's supposed to be spending 50% of his time on Python itself, which is a lot more than he was able to spend on it in his last job.
Re:An assumption
by
gstein
·
· Score: 3, Informative
Oh, quite true. At Google, we use Python, Java, and C++ for all of our work. Python is critical to our development and infrastructure.
I gave a keynote at PyCon last year about the importance of Python at Google. Some people transcribed the talk. You should be able to find it via Google. (heh!)
Re:An assumption
by
gstein
·
· Score: 5, Informative
Ha! Guido would quit in a heartbeat if you tried to make him manage people. That just isn't where he's at. He's absolutely brilliant and loves to write excellent code. Great. We're gonna let him do just that:-)
In any case: yeah, we hired him because we want him to work on Python itself. And as John says later in this thread -- about half his time.
Python v. Perl
by
Shadow+Wrought
·
· Score: 3, Interesting
So... Since Guido got an offer and Larry Wall didn't, does that mean that Google has tipped its hand in the debate?
-- If brevity is the soul of wit, then how does one explain Twitter?
Re:Python v. Perl
by
gtrubetskoy
·
· Score: 3, Informative
So... Since Guido got an offer and Larry Wall didn't, does that mean that Google has tipped its hand in the debate?
Google's always been pretty open about heavy Python use. There is fairly interesting presentation by Greg Stein about Python at Goole here (audio only).
Re:Python v. Perl
by
kurosawdust
·
· Score: 2, Funny
So... Since Guido got an offer and Larry Wall didn't, does that mean that Google has tipped its hand in the debate?
If the debate you're referring to is "Python vs. mustachioed Christian", then yes, they've declared their preference.
One Liners...
by
Anonymous Coward
·
· Score: 5, Funny
The winning offer was the one that had first-line indented paragraphs.
We just love a guy that gets so wrapped up in his work!
We've got penguins, we've got pythons, and we've got a lemur with a minigun...this zoo rocks!
After hearing the report, Ballmer threw a Hissssy fit.
Someone reported a problem with a mouse at Google Central and the recruiter got to work on hiring the python guy.
With a keen eye on competition, Google is just trying to catch up to the number of reptiles employed by Microsoft.
Re:One Liners...
by
radiotyler
·
· Score: 2, Funny
I hate you so much. Consider yourself pelted in the face with tomatos and pulled off the stage with one of those giant hook dinguses. No wonder you posted as an AC, I wouldn't want my name on that post either.
-- hi mom!
Becoming the new Xerox Parc
by
suso
·
· Score: 5, Insightful
So is google becoming the new Xerox Parc?
Re:Becoming the new Xerox Parc
by
Tumbleweed
·
· Score: 5, Insightful
Considering they're actually bringing out products that people USE, I'd say not.:)
Re:Becoming the new Xerox Parc
by
Amouth
·
· Score: 2, Interesting
No.. to do that they would need to make amazing things and then throw them away saying no one will ever want that..
google is making amazing things.. and they know everyone wants them
Parc = !AxF(x) Google = AxF(x)
-- '...if only "Jumping to a Conclusion" was an event in the Olympics.'
Python was used in Google's first academic version
by
Anonymous Coward
·
· Score: 2, Informative
In L&S's "Anatomy of a search engine article" they wrote:
In order to scale to hundreds of millions of web pages, Google has a fast distributed crawling system. A single URLserver serves lists of URLs to a number of crawlers (we typically ran about 3). Both the URLserver and the crawlers are implemented in Python
By hiring Guido, they are clearly stating that there's only one way to do it. And that way is, of course, with Python.
Yes, I see a Google search for 'perl' now has a transcript of Monty Python's Parrot sketch as the first hit.
Re:No, no, no, no!
by
sammy+baby
·
· Score: 2, Funny
Heh. Meanwhile, a webmaster at Mt. Holyke is wondering why some philosophy professor's page is getting slashdotted...
This doesn't mean they want to "control" Python
by
Augusto
·
· Score: 4, Interesting
Considering that last year google hired some of the main Java language guys (which still do talks about Java) last year; Joshua Bloch and Neal Gafter). Their background is mainly language/compiler design, my impression was and still is that I wouldn't be surprised if google was just working on their own (new) language. This just confirms this a little bit more...
--
- sigs are for wimps.
Re:This doesn't mean they want to "control" Python
by
xTantrum
·
· Score: 2, Funny
now that would be really interesting to see. guido can give them the simplicity and exceptional design of python for robust RAD and the JAVA team can give them....uhhh...hold on let me think..
-- $action = empty(PHP) ? backToC() : unset(PHP) ;
"when the concrete cases are understood, the abstractions are readily
Re:This doesn't mean they want to "control" Python
by
Surt
·
· Score: 2, Interesting
It would be fantastic to see a language from google that: 1) is open source so the people who avoided java for that reason can participate 2) is brace constrained, so the people who hate python for whitespace can participate 3) has a full frontend for gcc, so the optimization freaks can participate 4) has a vm, so the web folks can love it 5) has an interpreter, so the python/ruby people can enjoy it 6) has multiple inheritance or explicit delegates, so the people who can't live without that aren't stuck in c++ 7) builds on all the great features we've been seeing in language design lately 8) has the functional programming features needed to draw in the ML/LISP crowd 9) comes with a nice well rounded library with a good naming convention 10) has the backing of a big name computer player (hence google)
Is it too much to ask?
Please, google?
-- "Who is the Journal of Quantum Physics going to believe?" --Stephen Hawking
Re:This doesn't mean they want to "control" Python
by
Surt
·
· Score: 2, Funny
Give yourself time, you'll recover.
-- "Who is the Journal of Quantum Physics going to believe?" --Stephen Hawking
Re:This doesn't mean they want to "control" Python
by
strstrep
·
· Score: 4, Insightful
Hasn't Perl already done 80-90% of that for years?
Re:This doesn't mean they want to "control" Python
by
kwoff
·
· Score: 2, Funny
By "sane", I assume you mean "not conducive to implementing
the language features you listed", since apparently only the
"insane" language has managed to do that.
(Now watch, whereas your flippant comment was marked Insightful,
I will be a Troll.)
Semi-Off-Topic Python vs. Perl discussion
by
kin_korn_karn
·
· Score: 2, Interesting
While Perl is still my sentimental favorite, I'm open-minded about programming languages, especially those that are as widely used as Python. I've never been able to really understand Python, though, because of its bizarre syntax. (insert Perl syntax joke here) It's always seemed easier to just do what I need to do in Perl, since I know it so well.
If I'm reasonably proficient in Perl, what would I gain by using Python instead? I'm not trying to troll here, I'm just wondering what I'm missing. If Google uses it internally it must have an advantage over other languages, but I've never not been able to do something in Perl if I really wanted to.
Re:Semi-Off-Topic Python vs. Perl discussion
by
gorzek
·
· Score: 5, Informative
I can't speak for anyone else, but I did make the leap from perl to Python, and have no regrets.
I still use perl for quick-and-dirty text-processing and so forth, but Python is excellent for creating scripts you want to be able to maintain later. The syntax is sparse (compared to most other languages), so there isn't as much code to maintain. I found most of my favorite perl features were also represented (foreach, regular expressions, etc.)
People who've never spent much time with Python will gripe about the whitespace. It was never an issue for me, and I've never had problems with it.
If you plan to do any significant object-oriented programming, Python is very good for that. For procedural programs, the only edge it has over perl is readability, due to the concise syntax.
One thing to keep in mind with Python, however, is that it does NOT convert between numbers and strings automatically, while perl does. It's no big deal to cast a number as a str() or cast a string as int(), but if you don't know about it beforehand, it will get you.
From what I understand, Python is also very nice for metaprogramming, but I've never used it for that. I have used it for quick command-line utilities, GUI apps (with wxPython), and game programming. The object-oriented features are really why I prefer it over perl. They are intuitive, and you have a lot of power over how the objects behave in various circumstances.
If you have any C# experience, I've found you can port C# code to Python with only minor (mostly cosmetic) changes. (This obviously excludes using libraries written for C#, though--I was referring to the syntax of the code itself as being easily ported.)
Sorry if this explanation wasn't technical enough. I was just trying to lay out the general reasons I found a move from perl to Python relatively painless.
Re:Semi-Off-Topic Python vs. Perl discussion
by
drgonzo59
·
· Score: 2, Interesting
I switched from Java to Python. Today's hardware probably runs Python just as fast as the hardware 5 years ago ran Java. My reasons why I like like Python in decreasing order (some of them you have mentioned):
1. OO - with classes, inheritance and other OO goodies 2. scripted - no need to compile, easy to debug 3. powerful native data types - dictionaries (hashes), lists and sets(new in 2.xx) 4. simple syntax (indentation => code blocks) - a blessing in disguise, I can read anybody's Python program - the format is always the same 5. rich library and extensions - networking, GUI(wxWindows, Qt, Gtk, Tk...),math (SciPy, Numeric), regex, file and string manipulation etc. 6. can inline C code with weave, can manipulate C data in Python with Pyrex, can use JIT compile with Psyco 7. can use threads 8. is a completely free and open source unlike Sun's Java 9. has some functional/declarative constructs (lambda, map, reduce and apply) 10. i like the name Guido - it sounds cool (ok, ok I don't really know how to say it but I needed the 10th reason...)
Better article headline:
by
killmenow
·
· Score: 5, Funny
google.py:
import Guido
Dynamic Typing
by
kevin_conaway
·
· Score: 2, Interesting
Let me first say that I love Python. I find that dynamic typing makes it easier as a developer and saves time. However, on projects where there are multiple developers and maintainers, is dynamic typing a hindrance? I suppose it comes down to if you document thoroughly what comes in and out of a function/class. Anyone have any thoughts on this? I'm curious
Re:Dynamic Typing
by
mad.frog
·
· Score: 2, Interesting
However, on projects where there are multiple developers and maintainers, is dynamic typing a hindrance?
In my experience (with JavaScript/ActionScript, not Python): yes. Your mileage may vary.
I suppose it comes down to if you document thoroughly what comes in and out of a function/class. Anyone have any thoughts on this?
Hey, I've got an idea! We could have the compiler actually check to ensure that the documentation for argument types is present.
And for bonus points, it could also check to make sure that the types used match the comments.
We could call this, oh, I dunno, "strong typing"...
Re:Dynamic Typing
by
m50d
·
· Score: 2, Insightful
You have to document the function arguments. Static typing doesn't change that, it just hides some of the most immediate problems from not doing so. (An int still needs documentation saying what values it can have). I feel dynamic typing is such a timesaver and improves flexibility so much that its benefits outweigh the costs. But whatever works for you.
I think that people immediately assume because he goes Google, that means Google as a whole is somehow going to revolutionize all the ways it does things to the 'Python' way (whatever that is). That is hardly going to be the case. He is just one man, who can, if they give him enough authority, make some significant contributions, but Google is already deep into its "ways" and it's difficult in terms of "quick overhauls" to do much of anything in terms of change.
It might be nice to see some of the Guido python style in Google's future software though.
Often times it's only required to rewrite the most crucial bits of an app. This is fairly straightforward in Python.
PyPy: a Python implementation written in Python
by
YA_Python_dev
·
· Score: 4, Informative
Python has moderately fast bytecode (google stuff could improve a lot here)
A very interesting project that aims to create a faster Python implementation is PyPy, funded by the EU, by google (with Summer of Code) and by a lot of programmers that donate their own time.
Even the Psyco guys say that the future is in PyPy!
-- There's a hidden treasure in Python 3.x: __prepare__()
Re:an offer from Google
by
FrankDrebin
·
· Score: 3, Funny
complete conjecture
by
abes
·
· Score: 2, Insightful
Perhaps the parallels between Google and Netscape are as close as some speculated. Could Google be trying to write their own 'OS'? I doubt very much that they actually want to write an entire OS, but I suspect they do want to be able to provide internet-applications, as they have already started on this endevaour (toolbar, and Google Earth). What do they need to do this? Servers to provide content (check), a multi-platform GUI (Firefox toolkit?, Opera?), and a language to bind them together (Python?).
AJAX is working for Google fairly well right now, but it's probably not an end-all answer. Javascript is fine for writing small apps, but it's not that great of a language. And even with the distance diminishing between browsers, it's still a pain to write cross-browser code. One of the great accomplishments I've seen of javascript (besides maps.google) is the FCK editor, but even that can be slow, and takes large amounts of memory.
Looking ahead, I suspect Google knows that Javascript will eventually have to dumped. M$ already has an answer,.net. They have their browser, and they can afford not to have to worry about being cross-platform.
In the end, the web browser is not a great for doing things besides browsing the web. On top of that, with EOLAs legal suit against embedded applications, full fledged internet apps seem to be the only way to go. If Google is to survive, they need the tools and framework in order to deploy such apps.
The Zen of Python
by
Anonymous Coward
·
· Score: 2, Informative
For the curious......
The Zen of Python (by Tim Peters)
Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those!
Python vs. compiled Java and C
by
drgonzo59
·
· Score: 4, Interesting
The ability to inline C code in Python rocks.
I like weave but I am waiting to see what will come out of the PyPy project - the author is the one who wrote Psyco (the JIT compiler for Python).
Then there is Pyrex where Python can manipulate C data with language extensions, as opposed to weave where C code is inlined into the python code and Python data is manipulated in C.
It is true that as a scripting language Python is slower than (byte)compiled languages. But it is slower by a constant factor. In other words people would say "Your Python solution is 4x slower than my Java solution!". What this means though is that just by upgrading the hardware that Python runs on, one can reach the speed of execution of the compiled program. In other words Python on an Athlon 64 fx 57 might run faster than java bytecode on a 1Ghz Athlon, or might even run faster than C on a 100Mhz machine (I am just making these numbers up, maybe someone knows of some benchmarks?). The point is that application that required C 15-20 years ago can probably be re-written in Python now.
Re:Python vs. compiled Java and C
by
Anonymous Coward
·
· Score: 2, Interesting
It is true that as a scripting language Python is slower than (byte)compiled languages.
Python IS byte-compiled.
But it is slower by a constant factor. In other words people would say "Your Python solution is 4x slower than my Java solution!".
I'm not sure what the significance of this is. It is not possible to accurately predict the performance differential prior to actually trying it. Once you try something, you can see that it takes X times as long as something else, which means if you upgrade the hardware appropriately (CPU and/or memory bandwidth), your performance will increase accordingly. This is true of anything, including writing something in C and then rewriting it to go faster.
The point is that application that required C 15-20 years ago can probably be re-written in Python now.
That is rather understating the case. 20 years ago many of us were using 1 MHz 8-bit machines. Hardware is now commonly 2 GHz 64-bit machines. That's more than a 16,000-fold increase. Python is a lot better than 1/16000th the speed of C.
Depending on what you're doing, it can be nearly as fast as C, if you are using a standard module which is implemented in C. E.g. various forms of text processing and even image processing (PIL).
If you are using a lot of Python code instead, you might be 1/10th or 1/100th the speed of C. Then you use http://psyco.sourceforge.net/ If that's not fast enough, it often turns out that just re-writing a small part in C (the main bottleneck) can speed things up dramatically.
You also have to keep in mind that a multiple-factor is not the only important part. For example, if you have a 3D game engine that is controlled by Python and does its rendering in C, the Python framework might take 1 ms per frame whereas the C framework might only take 0.1 ms. Only 1/10th the speed, you think? Not at all, because your theoretical framerate (1,000 fps vs 10,000 fps) is not important when the actual rendering in C takes 30 ms either way. Total frametime is 31 ms vs 30.1 ms, which is 32.25 fps vs 33.22 fps, less than 1 FPS difference. Additionally, if your graphics card is the bottleneck, it won't matter as much that you're burning extra CPU on Python, because you're already sending the GPU about as much as it can handle.
Re:Python vs. compiled Java and C
by
kpharmer
·
· Score: 2, Interesting
> It is true that as a scripting language Python is slower than (byte)compiled languages. But it is slower > by a constant factor.
Python is just as fast as c or java when it comes to io-intensive applications: http://www.osnews.com/story.php?news_id=5602&page= 3 That code that cannot be optimized by Pycho is considerably slower, though the above benchmark exaggerates it through errors in their use of python.
My application processes over twenty million events a day through python - which includes transforming each event, and then applying a metadata-driven validation against each as well. The application is designed to handle a billion events a day. Performance is not a problem. Though at some point we might end up rewriting a few functions in c. We originally thought we would by 10 million events a day, but now realize that we should be fine until about 100 million a day.
And the benefits? Very low labor costs, quick time to market, easy maintenance, almost no data quality problems due to code defects. The small performance trade off has been an extremely good compromise in my experience.
Re:Python vs. compiled Java and C
by
drgonzo59
·
· Score: 2, Insightful
I believe that "Premature optimization is the root of all evil." But most of all I believe in "the right tool for the right job".
Usually the first saying is applied when someone has decided on the language, say C, and on their hardware. But when programming, instead of thinking of the algorithm and how to correctly write it, they think about how many registers can they use at the same time first and start with inlining of assembly code. I think though, that the same principle can be applied to the choice of language and hardware. In this the mistake would be to choose a lower level language just because of speed, even though the problem can be solved _much_ faster (in terms of developing time) in a higher level language.
For example I had to write a little project to process text (about 2 million articles including some pdf files) then to do some scientific computation and finally design a reasonable GUI. The languages I new were C/C++/Java. I started with Java but I realized the project was just going to slow. I new what I wanted to get done, it is just it took a long time to write in Java. I looked around and tried a number languages Ruby, Perl, Python, even Matlab, tried to move some of the processing into MySQL as stored procedures. The best choice was to switch to Python. I didn't know Python at all but within a week I was fairly proficient with it. It is just as good of a OO language as Java and comes with a good set of supporting libraries. My project took about a couple of months and I wrote it in about 10K lines. I am estimating but I think I would have taken me twice as long to write it in Java and it would have been at least 15K or more lines long. The added problem with more code for the same problem is support and quality control. I can browse much faster through a 10k lines than through 20K lines to look for a bug or to some refactoring.
But all this doesn't mean that everyone, including you, should switch to Python immediately and drop C and C++. I acknowledge that Python is slower on average that other compiled (even JIT compiled) languages and some domains of application require speed most of all. As it turns out though, it is usually a vrey small part of code that needs to be sped up. In other words it is the good 'ol 80/20 rule (80% of the time the program is in the 20% of the code). What this means is that you could write the project faster in a higher level language like Python then choose certain critical part of your code (this requires having a head on the shoulders to know which parts are those and to know a little about algorithmic complexity O(n) stuff...) and optimize just that. This can be done beautifully in Python. As of now there at least 2 methods to do it: you can inline C code in Python using weave (hosted on the SciPy project page) or you can use a language extension to manipulate C data in Python using Pyrex. (I know there are other, but these are the most stable ones I think). I will use weave to inline some C code to speed up some of the computation. The result actually might be _faster!_ than Java.
In the end it all comes down to cost analysis, because you have a trade-off: for example, you can pay your developers twice as much and expect to pay twice for support and patches and have them develop in Java or you can achieve the same speed by allowing them to use Python (if they are smart enough they'll know how to optimize the critical regions after the program is runnig correctly) and you can buy extra(newer) hardware to compensate for the constant speed difference. If they can both optimize their Python code with C (in the end!) and buy faster hardware you might get a double benefit. But, of course, it is up to you (the company) to decide.
New Windows screen saver
by
Skiron
·
· Score: 5, Funny
'Flying chairs', coded by Steve 'monkey' Balmer.
My plan to get hired by Google:
by
BigZaphod
·
· Score: 3, Funny
Unfortunately I think my languages are just too powerful for Google, really. I'm not sure they can handle them. That must be why they haven't called me yet...
--
I am unique, just like you, and you, and you...
Re:Wikipedia entry?
by
gardyloo
·
· Score: 2, Funny
So is my Encyclopaedia Brittanica. With red ink. Take THAT, Wikipedia!
Google strategy....
by
Doppler00
·
· Score: 2, Funny
#google strategy while(stock > 400):
for company in buyoutlist:
company.purchase()
spend_money()
for phd in smart_people_list:
phd.hire()
release_cool_google_tool()
(might be syntax errors in this, I work with so many languages I get confused myself)
try pydoc by Ka-Ping Yee
by
goon
·
· Score: 2, Informative
`... Python get some better
documentation tools as well so that
it'd be easy to generate documentation
on par with the Java and.NET
documentation....`
I make this same mistake everytime I program in python. If you dont read the docs [1] & other peoples code you can write functional code, but with a third to a half bloat penalty. That is of course unless you read lots of example code or the docs...
So check again. Because PyDoc [2] is a tool that displays the documentation, from the source. It is pretty much on par with Java and.Net.
Reference [1] google on `PyDoc the module`, `look for Ka-Ping Yee and PyDoc`: http://www.google.com/search?q=pydoc [Accessed Friday, 23 December 2005]
[2] PyDoc, `The python documentation module by Ka-Ping Yee and PyDoc`: http://del.icio.us/goon/pydoc [Accessed Friday, 23 December 2005]
Re:The Google Brain-Drain
by
Xthlc
·
· Score: 2, Interesting
There's a bit of a difference between giving money and collaboration.
Money is great. I have nothing against money. But treating a university like a farm team is not quite the same as working with a group of researchers and then publicizing the results. The former benefits just Google and the students who are around when the money hasn't been used up yet. The latter benefits Google, the researchers, the students, and (ideally) everyone who comes after them in that particular field.
I'm thinking about the difference between Google's OSS approach (finance development, reap the benefits, hire the best that come out of that process) vs. id Software's approach (when something is no longer generating revenue, release it as OSS). How much of all the amazing stuff that I'm sure goes on behind Google's walls is going to vanish into the NDA void, never to be seen again? How much of that would've been shared with the public if its author had been working at a company that would allow it (vs. one that owns personal projects done on 20% time)?
I'm not trying to bash Google here; I just have some honest concerns about their overall philosophy of absorbing the best and the brightest into a single monoculture. Perfectly happy to be shown that I'm wrong.
That's great. I'm moving all of my scripts to Python now. If the guy's name is Guido, it's gotta be good!
hello dear sirs my name is jamesh i are india (bihar) can u guide me install red had linux 9?
well, let's hope the dupe has more info than those two lines.
I really do think it has been hampered by having a less rigorously standardized basic class library than Java or .NET. It would be great to see Python get some better documentation tools as well so that it'd be easy to generate documentation on par with the Java and .NET documentation.
:)
And of course if Google wanted to really screw with both Sun and Microsoft, especially Microsoft, they could create their own cross-platform web and gui toolkits and a free RAD GUI builder a la Visual Studio for Python. If they could create a Python framework on par with Swing or Windows Forms, there'd be quite a bit of wailing and gnashing of teeth in both camps
Click here or a puppy gets stomped!
Everyone seems to assume that his main purpose with Google is to do Python.
I'm not saying that assumption is not true. It's just that he is a huge talent. If I had a gargantuan project to run, I'd hire him no matter what the language.
I wonder if the management types have figured out that anyone who can create and run a large successful open source project is a much better manager than the average MBA.
So... Since Guido got an offer and Larry Wall didn't, does that mean that Google has tipped its hand in the debate?
If brevity is the soul of wit, then how does one explain Twitter?
The winning offer was the one that had first-line indented paragraphs.
We just love a guy that gets so wrapped up in his work!
We've got penguins, we've got pythons, and we've got a lemur with a minigun...this zoo rocks!
After hearing the report, Ballmer threw a Hissssy fit.
Someone reported a problem with a mouse at Google Central and the recruiter got to work on hiring the python guy.
With a keen eye on competition, Google is just trying to catch up to the number of reptiles employed by Microsoft.
So is google becoming the new Xerox Parc?
In L&S's "Anatomy of a search engine article" they wrote:
In order to scale to hundreds of millions of web pages, Google has a fast distributed crawling system. A single URLserver serves lists of URLs to a number of crawlers (we typically ran about 3). Both the URLserver and the crawlers are implemented in Python
http://www-db.stanford.edu/~backrub/google.html
A way of returning a favor, perhaps?
He's back! In programming language form!
By hiring Guido, they are clearly stating that there's only one way to do it. And that way is, of course, with Python.
Yes, I see a Google search for 'perl' now has a transcript of Monty Python's Parrot sketch as the first hit.
Considering that last year google hired some of the main Java language guys (which still do talks about Java) last year; Joshua Bloch and Neal Gafter). Their background is mainly language/compiler design, my impression was and still is that I wouldn't be surprised if google was just working on their own (new) language. This just confirms this a little bit more ...
- sigs are for wimps.
While Perl is still my sentimental favorite, I'm open-minded about programming languages, especially those that are as widely used as Python. I've never been able to really understand Python, though, because of its bizarre syntax. (insert Perl syntax joke here) It's always seemed easier to just do what I need to do in Perl, since I know it so well.
If I'm reasonably proficient in Perl, what would I gain by using Python instead? I'm not trying to troll here, I'm just wondering what I'm missing. If Google uses it internally it must have an advantage over other languages, but I've never not been able to do something in Perl if I really wanted to.
google.py: import Guido
Let me first say that I love Python. I find that dynamic typing makes it easier as a developer and saves time. However, on projects where there are multiple developers and maintainers, is dynamic typing a hindrance? I suppose it comes down to if you document thoroughly what comes in and out of a function/class. Anyone have any thoughts on this? I'm curious
It might be nice to see some of the Guido python style in Google's future software though.
absolutely.
Often times it's only required to rewrite the most crucial bits of an app. This is fairly straightforward in Python.
A very interesting project that aims to create a faster Python implementation is PyPy, funded by the EU, by google (with Summer of Code) and by a lot of programmers that donate their own time.
Even the Psyco guys say that the future is in PyPy!
There's a hidden treasure in Python 3.x: __prepare__()
An offer you can't refuse
... especially when your name is Guido.
Anybody want a peanut?
http://en.wikipedia.org/wiki/ALF_programming_langu age
AJAX is working for Google fairly well right now, but it's probably not an end-all answer. Javascript is fine for writing small apps, but it's not that great of a language. And even with the distance diminishing between browsers, it's still a pain to write cross-browser code. One of the great accomplishments I've seen of javascript (besides maps.google) is the FCK editor, but even that can be slow, and takes large amounts of memory.
Looking ahead, I suspect Google knows that Javascript will eventually have to dumped. M$ already has an answer, .net. They have their browser, and they can afford not to have to worry about being cross-platform.
In the end, the web browser is not a great for doing things besides browsing the web. On top of that, with EOLAs legal suit against embedded applications, full fledged internet apps seem to be the only way to go. If Google is to survive, they need the tools and framework in order to deploy such apps.
For the curious......
The Zen of Python (by Tim Peters)
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
SO Funny! naming a language off a lame british tv show. Damn, that is so cool. I got it, I'll create a new language and call it Alf.
Stupid nerds.
Well... Some Mothers do 'Ave 'Em.
"I'm not impatient. I just hate waiting." - My Dad
I like weave but I am waiting to see what will come out of the PyPy project - the author is the one who wrote Psyco (the JIT compiler for Python).
Then there is Pyrex where Python can manipulate C data with language extensions, as opposed to weave where C code is inlined into the python code and Python data is manipulated in C.
It is true that as a scripting language Python is slower than (byte)compiled languages. But it is slower by a constant factor. In other words people would say "Your Python solution is 4x slower than my Java solution!". What this means though is that just by upgrading the hardware that Python runs on, one can reach the speed of execution of the compiled program. In other words Python on an Athlon 64 fx 57 might run faster than java bytecode on a 1Ghz Athlon, or might even run faster than C on a 100Mhz machine (I am just making these numbers up, maybe someone knows of some benchmarks?). The point is that application that required C 15-20 years ago can probably be re-written in Python now.
'Flying chairs', coded by Steve 'monkey' Balmer.
Step 1) Develop several important and useful programming languages.
Step 2) ????
Step 3) Profit!
Unfortunately I think my languages are just too powerful for Google, really. I'm not sure they can handle them. That must be why they haven't called me yet...
Hexy - a strategy game for iPhone/iPod Touch
In the interpreter, do:
>>> import this
Send email from the afterlife! Write your e-will at Dead Man's Switch.
Does Google know something I don't know?
did he update that himself?
I am unique, just like you, and you, and you...
So is my Encyclopaedia Brittanica. With red ink. Take THAT, Wikipedia!
#google strategy
while(stock > 400):
for company in buyoutlist:
company.purchase()
spend_money()
for phd in smart_people_list:
phd.hire()
release_cool_google_tool()
(might be syntax errors in this, I work with so many languages I get confused myself)
`... Python get some better
documentation tools as well so that
it'd be easy to generate documentation
on par with the Java and
documentation.
I make this same mistake everytime I program in python. If you dont read the docs [1] & other peoples code you can write functional code, but with a third to a half bloat penalty. That is of course unless you read lots of example code or the docs...
So check again. Because PyDoc [2] is a tool that displays the documentation, from the source. It is pretty much on par with Java and
Reference
[1] google on `PyDoc the module`, `look for Ka-Ping Yee and PyDoc`:
http://www.google.com/search?q=pydoc
[Accessed Friday, 23 December 2005]
[2] PyDoc, `The python documentation module by Ka-Ping Yee and PyDoc`:
http://del.icio.us/goon/pydoc
[Accessed Friday, 23 December 2005]
peterrenshaw ~ Another Scrappy Startup
There's a bit of a difference between giving money and collaboration.
Money is great. I have nothing against money. But treating a university like a farm team is not quite the same as working with a group of researchers and then publicizing the results. The former benefits just Google and the students who are around when the money hasn't been used up yet. The latter benefits Google, the researchers, the students, and (ideally) everyone who comes after them in that particular field.
I'm thinking about the difference between Google's OSS approach (finance development, reap the benefits, hire the best that come out of that process) vs. id Software's approach (when something is no longer generating revenue, release it as OSS). How much of all the amazing stuff that I'm sure goes on behind Google's walls is going to vanish into the NDA void, never to be seen again? How much of that would've been shared with the public if its author had been working at a company that would allow it (vs. one that owns personal projects done on 20% time)?
I'm not trying to bash Google here; I just have some honest concerns about their overall philosophy of absorbing the best and the brightest into a single monoculture. Perfectly happy to be shown that I'm wrong.