469,296 Members | 2,141 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,296 developers. It's quick & easy.

Why learn Python ??

I have now free time and money to do what I want :-)
I have some basic skills in programming (C, Pascal, Macromedia
Actionscript) but don't know exactly what to do in the world of programming.
And also I don't know exactly why would I learn Python rather than C#,
C++ or Perl. Basicaly I don't know where to start, if there is much to do or
if it is has it seems and there is software to everything nowadays and so
doesn't make sense to spend time in learning a programming language.
I just have this idea that I would like to contribute to the curve of
accelarated exponential progress (technological singularity), artificial
intelligence and so on. From that point of view there is much to do... But
can I stand for it and where to start?
Anyone would help me and give me some hints?

-BichoVerde
Jul 18 '05 #1
42 3299
"Bicho Verde" <bi********@sapo.pt> writes:
And also I don't know exactly why would I learn Python rather than C#,
C++ or Perl. Basicaly I don't know where to start, if there is much to do or
if it is has it seems and there is software to everything nowadays and so
doesn't make sense to spend time in learning a programming language.
I'd say don't bother with C++ unless you're working on a big
multi-person project. Its design will make no sense to you unless
you've faced the problems that come up in those projects. Otherwise
it's a big mess.

Perl has its fans and I can't promise you won't be one. It's built
like a natural (spoken) language, that is, it wasn't designed, it just
sort of evolved, and has all kinds of specialized rules and exceptions
and multiple ways of doing the same thing. Some people think that's
great. Others (most Python fans) think Perl is a big mess. The book
"Learning Perl" by Schwartz and Christiensen is definitely very good,
so you might look at it to decide if you like Perl. But note that the
book only scratches the surface, and Perl gets messier the deeper you go.

C# is mostly Microsoft-specific and not much serious is done with it, IMO.
I just have this idea that I would like to contribute to the curve of
accelarated exponential progress (technological singularity), artificial
intelligence and so on. From that point of view there is much to do... But
can I stand for it and where to start?
Anyone would help me and give me some hints?


Traditionally that kind of research has been done in Lisp. You could
look at Winston and Horn's book on Lisp, which is also a reasonably
good introduction to AI methods.
Jul 18 '05 #2
"Bicho Verde" wrote:
I have now free time and money to do what I want :-)

I have some basic skills in programming (C, Pascal,
Macromedia Actionscript) but don't know exactly what to do
in the world of programming.

And also I don't know exactly why would I learn Python
rather than C#, C++ or Perl. Basicaly I don't know where
to start, if there is much to do or if it is has it seems
and there is software to everything nowadays and so
doesn't make sense to spend time in learning a programming
language.

I just have this idea that I would like to contribute
to the curve of accelarated exponential progress
(technological singularity), artificial intelligence and so
on. From that point of view there is much to do... But can
I stand for it and where to start?

Anyone would help me and give me some hints?


I agree in large part with Paul's comments.

C# is Microsoft's baby though it's technically an open standard --
don't go there unless you have a reason.

Perl is pretty cool but I definitely found it harder to use and less
intuitive than Python.

I would not dismiss C++ (or even vanilla C) outright. I strongly
suggest starting in Python and looking to C and C++ when you have good
reason -- that is, when those languages will let you do something that
Python is less than than stellar at: large applications, system
software, performance-critical applications, embedded programming,
etc.

I would also add that while Lisp has been a favorite in the AI
community, you will find that most AI techniques generalize to most
any programming language. I spent a good deal of time in grad school
and on my first job doing AI programming in C++. The only time I used
Lisp was in introductory classes, mostly to write elegant -- but
toy -- programs.
Jul 18 '05 #3
I guess I didn't really answer the main question: Why learn Python
over Perl, C/C++, C#, etc.

In short, because it's easier to program, isn't tied to a platform,
and has lots of high-level functionality right out of the box.
Jul 18 '05 #4
"Derek" <no**@none.com> writes:
I would also add that while Lisp has been a favorite in the AI
community, you will find that most AI techniques generalize to most
any programming language. I spent a good deal of time in grad school
and on my first job doing AI programming in C++. The only time I used
Lisp was in introductory classes, mostly to write elegant -- but
toy -- programs.


Lest Derek give the impression that Lisp is in any way a "toy"
language, or that it somehow sacrifices practicality for elegance, I
feel honour bound to point out that it is actually the most powerful
and expressive programming language known to man, and excells in
solving problems which are often considered too hard to be solved in
other languages.

If you want to perform miracles, then learn Lisp. If you
merely want to write programs that rock, then learn Python.

:-)

If, however, masochism is more you bent, then I thoroughly recommend C++.

--
Greenspun's Tenth Rule of Programming:

Greenspun's Tenth Rule of Programming: "Any sufficiently complicated
C or Fortran program contains an ad-hoc, informally-specified,
bug-ridden, slow implementation of half of Common Lisp."
Jul 18 '05 #5
>>>>> "Bicho" == Bicho Verde <bi********@sapo.pt> writes:

Bicho> I have now free time and money to do what I want :-) I have
Bicho> some basic skills in programming (C, Pascal, Macromedia
Bicho> Actionscript) but don't know exactly what to do in the
Bicho> world of programming. And also I don't know exactly why
Bicho> would I learn Python rather than C#, C++ or Perl. Basicaly

Well, I assume you want to have fun programming, and that kinda rules
out C# and (especially) C++. They don't really have the favourable
effort/gratification ratio of Python. If you want to get something
done, choose Python. If covering your ass if/when your project fails
is more important than actually succeeding, choose more
conservatively, which means Java/C++/C#. Since you are on your own in
this, Python is an excellent choice.

If you choose Perl, you will at some regret your choice and consider
porting the app to Python. You save a lot of time/frustration by not
going there in the first place.

Bicho> I don't know where to start, if there is much to do or if
Bicho> it is has it seems and there is software to everything
Bicho> nowadays and so doesn't make sense to spend time in
Bicho> learning a programming language. I just have this idea

There really isn't software to do all those little script-level tasks
you need to do every now and then, so learning Python is still not a
lost cause even if you never get anything bigger done. Also, writing a
Python script is often faster than searching for a program to do the
thing and then learning how to use that program. It's also more fun.

Bicho> that I would like to contribute to the curve of accelarated
Bicho> exponential progress (technological singularity),
Bicho> artificial intelligence and so on. From that point of view
Bicho> there is much to do... But can I stand for it and where to
Bicho> start? Anyone would help me and give me some hints?

Learn Python first, the ease of programming can quite possibly inspire
you to create something interesting.

--
Ville Vainio http://www.students.tut.fi/~vainio24
Jul 18 '05 #6
>>>>> "Jacek" == Jacek Generowicz <ja**************@cern.ch> writes:

Jacek> Lest Derek give the impression that Lisp is in any way a
Jacek> "toy" language, or that it somehow sacrifices practicality
Jacek> for elegance, I feel honour bound to point out that it is
Jacek> actually the most powerful and expressive programming
Jacek> language known to man, and excells in solving problems
Jacek> which are often considered too hard to be solved in other
Jacek> languages.

Python will catch up Real Soon Now - there are so many Python+Lisp
projects in the works, soon we can implement all the impossible tasks
in the world by combining development speed of Python with macro magic
of Lisp for that final, "impossible" leap :-).

Jacek> -- Greenspun's Tenth Rule of Programming:

Jacek> Greenspun's Tenth Rule of Programming: "Any sufficiently
Jacek> complicated C or Fortran program contains an ad-hoc,
Jacek> informally-specified, bug-ridden, slow implementation of
Jacek> half of Common Lisp."

At least they should have implemented scheme instead.

--
Ville Vainio http://www.students.tut.fi/~vainio24
Jul 18 '05 #7
Ville Vainio wrote:
Learn Python first, the ease of programming can quite possibly inspire
you to create something interesting.


This is true. Learn Python and *then* learn other languages. Learn as
many languages as you like. Python will teach you how to think when
writing programs. This thought process will be the same for C, C++,
Perl, etc. As a bonus, Python can be applied to solving real-world
problems as well. So, you get the best of both worlds:

1. A theorhetical language that easily teaches the concepts of modern
computer programming.

2. A practical language that is actually useful for doing things.

Python is also easy to read compared to other languages. It's much
easier to learn. Its syntax doesn't get in the way of learning like C
++, or other language's syntax can. It's fun too.

Best of luck,

Bart

Jul 18 '05 #8
Ville Vainio wrote:

If you choose Perl, you will at some regret your choice and consider
porting the app to Python. You save a lot of time/frustration by not
going there in the first place.


This is only true if you actually know Python. If you carefully avoid
acquiring any knowledge of or ability in Python, you will rarely regret
the decision not to use Python for your project. <wink>

-Peter
Jul 18 '05 #9
Group : comp.lang.python
I have now free time and money to do what I want :-)
.....


If I would have enough money and free time to do what I want, I would
*stop* programming....
But if you insist on wanting to write software, Python is a **very**
good choice.
--
Rony

/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
/ bu************@yahoo.fr (delete _no_spam)
/
| www.bucodi.com - My work
\ www.ifrance/karamusic -- My hobby
\_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Jul 18 '05 #10
"Jacek Generowicz" wrote:
I would also add that while Lisp has been a favorite in
the AI community, you will find that most AI techniques
generalize to most any programming language. I spent
a good deal of time in grad school and on my first job
doing AI programming in C++. The only time I used Lisp
was in introductory classes, mostly to write elegant --
but toy -- programs.


Lest Derek give the impression that Lisp is in any way a
"toy" language, or that it somehow sacrifices practicality
for elegance, I feel honour bound to point out that it
is actually the most powerful and expressive programming
language known to man, and excells in solving problems
which are often considered too hard to be solved in other
languages.


I meant no disrespect to Lisp. My intention was only to point out
that it's quite possible to carry out AI programming in other
languages, albeit less miraculously. :)

Jul 18 '05 #11
Bicho Verde wrote:
Anyone would help me and give me some hints?


- C# is like a MS-specific Java.
- C++ is for system programming where performance is important. I love
C++ but I think it was Herb Sutter (a C++ guru) who described C++ as a
"last resort language" and I must agree.
- Perl is also a very nice language, but I would suggest to basically
see it as a parsing language and Perl 6 will make perl even better in
that domain with built-in support for grammars. And knowing a parsing
language is a very good thing. However, for other than that, even if
Perl has all the functionality, Python is cleaner, simpler and more
structured and elegant.

If you're interested in AI, I strongly suggest to look at functional
languages like Lisp dialects.

Don't be afraid to learn many languages, that's the way you will learn
what is strong about each of them, and that we basically need them all;)

Regards,

Nicolas

Jul 18 '05 #12
|Thus Spake Bicho Verde On the now historical date of Mon, 12 Jan 2004
13:05:19 +0000|
I have now free time and money to do what I want :-) Go to the Bahamas. You'll enjoy it more.

[chop]
Anyone would help me and give me some hints?


Here's my two cents on which languages to learn, why and in what order.

Python:
Python is probably the best language from which to branch out to other
languages. If you learn it well, you will have all the major concepts of
programming as part of your mental toolkit. Luckily, Python's learning
curve is not at all steep, there's a great and wonderful community that
gladly answers questions and helps you through the confusing parts. As a
bonus, you'll find that it's terribly, dastardly useful.

C:
In my opinion, this is where a student should move next. At some point or
another, every serious programmer has to dig into some C code. It's
important to learn C before C++ because many of the conveniences of C++
make one lazy about learning C. Because of it's vast popularity, you can
often find resources that give algorithms and outlines of processes in C,
and those ideas can then be applied to your language of choice. Be sure
to investigate linked lists, trees, hashing and memory allocation methods
and other such "not quite basic" constructs in C. From those, you will
understand a lot more of what goes on behind the scenes in other
languages.

C++:
If you've learned C, It's good to move onto C++ if only for the sake of
completeness. When I first learned C++, I was completely enamored of it,
but that crush has since died. It's important in GUI based applications
and gives you a fair grounding in Object Oriented programming. I strongly
recommend Bruce Eckel's "Thinking in C++" as a guide to the language
*after* you've gotten the basics down. It is available for free online,
but I'm glad I bought the dead tree version of it. There is some debate
as to how useful C++ is, but I think it's at least useful enough to take
some time learning well.

Lisp/Scheme:
Lisp and Scheme are two languages that people claim will give you
Jedi-like powers as a programmer. I'm learning them right now, so I can't
give you advice on why one would learn them. I'm learning Scheme first,
because there seem to be many more introductory tutorials and a lot of
advice that one should learn Scheme, then move to Common Lisp. YMMV. If
you like AI, at some point you will run across Lisp code, so it should be
of particular interest to you. In short, the consensus is that Lisp, like
milk, does a body good.

It is my philosophy that one should at least learn enough of a lot of
languages that you can at least browse some code without feeling lost.
Each new language gives you some new ideas that make you better at other
languages.

What follows is the minimum I would suggest you familiarize yourself with.

Sed/Awk/Bash shell Scripting:
Sed, Awk and bash shell scripting get tossed around enough that you should
be able to read them. Sed and Awk are confusing at first, and take some
measure of work to develop even a minimum competency in. Don't give up
easily here. It pays off in the long run.

Perl:
I don't like perl, but you shouldn't judge a language on my opinion of it.
Perl is very popular and is worthy understanding the basics of. Even if
you don't like it, learn enough of it to read programs written in it. It
is a very important language. Perl is easier to learn once you have
mastered Sed and Awk. (and vice versa) In many ways Perl is a souped up
combination of the two languages that's been imbued with mutant
super-powers.

Java:
Once you have learned C++, it's almost trivial to learn Java. The hardest
part is keeping separate in your head what applies to C++ and what applies
to Java. Besides, it's not a bad thing to be able to put on your resume.

C# and .Net:
I fear that C# is just another Microsoft misadventure, but for now it's
worth gaining a cursory knowledge of. If nothing else, it's a buzzword
compliant way to build your resume. Though, Microsoft can be a tricky
devil, so think carefully before you bank a career on something they
control.

PHP:
PHP has it's fair share of warts, but reading a couple of books on it
gives you a strong grounding in the issues a dynamic web-based application
faces.

Assembly:
Research carefully, and find a good book on assembly language programming.
Spend some time wrestling with it. It's hard and confusing. You may
never again touch a lick of assembly in your life, but you will always be
glad for the knowledge it gave you. Assembly is more of a long term
project than any of the other languages I've mentioned, so go slow here.

And always remember:

Programming is not a spectator sport.

Close the book often and try to write code from memory.

HTH

Good Luck!

Sam Walters.

--
Never forget the halloween documents.
http://www.opensource.org/halloween/
""" Where will Microsoft try to drag you today?
Do you really want to go there?"""

Jul 18 '05 #13
ian
On Mon, 12 Jan 2004 13:05:19 +0000, Bicho Verde wrote:
And also I don't know exactly why would I learn Python rather than C#,
C++ or Perl.


As usual, someone else already said it better than I can:

"Why Python?" by Eric S. Raymond
http://www.linuxjournal.com/article.php?sid=3882

--IAN

Jul 18 '05 #14
In article <7x************@ruckus.brouhaha.com>,
Paul Rubin <http://ph****@NOSPAM.invalid> wrote:
Jul 18 '05 #15
In article <bt************@ID-46268.news.uni-berlin.de>,
Derek <no**@none.com> wrote:
Jul 18 '05 #16
cl****@lairds.com (Cameron Laird) writes:
I'd say don't bother with C++ unless you're working on a big
multi-person project. Its design will make no sense to you unless
you've faced the problems that come up in those projects. Otherwise
it's a big mess.


And if you *are* working on a big multi-person project, and you
choose C++, you're likely to end up with ... a big mess.


C++ was motivated by the problems faced by big projects written in C.
I'm talking about stuff like telephone switches with hundreds of
programmers and millions of lines of code. Even with very competent
designers and managers, those projects usually ran amuck. C++ gives
some real help in keeping projects like that functioning, if the
programmers and managers know what they're doing. If they don't know
what they're doing (as is the case in most projects), C++ isn't that
likely to help and may make the problems worse.

But if you've lived through the multitudinous nightmares of projects
like that, and you then read Stroustrup's book about C++, on just
about every page you'll see some feature described and you'll
recognize the specific nightmare that inspired it. If you haven't
experienced those nightmares yourself, I can't be sure but I think the
feature descriptions will just seem like feature descriptions and
you won't understand the real reasons why they're there.

I think the OP's list should also have included Java, which is sort of
a modernized, "discount" version of C++.
Jul 18 '05 #17
"Cameron Laird" in message:
I contest the proposition that "Python is less than stellar
at large applications ...", and, in particular, that C++ is
super- ior there. I recognize you're not alone in that;
for me, though, large-scale programming is one of Python's
*strengths*.

I don't have a good decision mechanism to propose. Trial by
ordeal (and most large-team projects fit in that category)
seems as apt as any.


All I know is that there are thousands of extremely large projects
written in C++, some consisting of millions of lines of code written
by hundreds of developers. C++, while far from perfect, has proven
its worth on a huge scale. Python, at the very least, has yet to do
so.

Jul 18 '05 #18
Paul Rubin <http://ph****@NOSPAM.invalid> writes:
[...]
C++ was motivated by the problems faced by big projects written in C.
I'm talking about stuff like telephone switches with hundreds of
programmers and millions of lines of code. Even with very competent

[...]

If you're doing a comparative study of C and C++, that's true.

But many, many other languages that don't suffer from C++'s absurd
baggage also provide that kind of scalability (in terms of function
points -- nobody cares about lines of code). The consensus seems to
be that the root causes of C++'s baggage are C-compatibility and
efficiency, not primarily the demands of large projects.
John
Jul 18 '05 #19
Jacek Generowicz <ja**************@cern.ch> writes:
[...]
If you want to perform miracles, then learn Lisp. If you
merely want to write programs that rock, then learn Python.

[...]

....and then somebody argues that macros aren't a programming language
feature, but a harmful means of inventing new languages, and then we
get into that endless macro thread again...
John
Jul 18 '05 #20
"Derek" <no**@none.com> writes:
[...]
All I know is that there are thousands of extremely large projects
written in C++, some consisting of millions of lines of code written
by hundreds of developers. C++, while far from perfect, has proven
its worth on a huge scale. Python, at the very least, has yet to do
so.


See a recent thread here listing some fairly large Python projects.

Of course, taking lines of code at face value is rather like talking
about waiting lists instead of waiting times...
John
Jul 18 '05 #21
"Bicho Verde" <bi********@sapo.pt> writes:
[...]
I have some basic skills in programming (C, Pascal, Macromedia
Actionscript) but don't know exactly what to do in the world of programming.
If you just want to motivate yourself for some semi-arbitrary project,
my advice is to start using some open-source software. All software
sucks, so you'll eventually find something that pisses you off enough
to make you want to fix it or do it from scratch, properly :-)

And also I don't know exactly why would I learn Python rather than C#,
C++ or Perl.
They are all very different languages. Trawl through google groups --
comp.lang.python is a great place to look for comments on all three
(but I would say that). Try some of Alex Martelli's posts. I used to
default to the widely-held position that "language wars" are mostly
content-free "religious" arguments, but experience has taught me
otherwise. There are big, important, differences in programmer
efficiency, in computer-resource efficiency, and in community support.
And, to some extent, in the ways they make you think about problems.

The issues are subtle and complicated, and understanding them requires
writing programs in a set of languages diverse enough to come
somewhere vaguely close to spanning the big space of language-design
possibilities.

I'm feeling particularly self-indulgent, so here are a bunch that seem
notable current players to me:

Python: All-round pragmatic winner, and elegant to boot. One
disadvantage: you'll struggle to motivate yourself to learn any other
language once you've used it ;-)

Perl: CPAN is great; the language is merely an insane version of Python
(yes, Perl does predate Python).

C++: No compromises on execution speed; plays well with C (and with
Python: check out Boost Python); horrendously complicated; no garbage
collector (unless you add one yourself, but then you'd be better off
mixing C++ with a saner language). Notable for "templates".

C: Needs no introduction!

Java: Solid security model; piles of code; shockingly mediocre language,
to the extent that there would be precious few sane uses of the thing
were it not for Jython and all those libraries (but watch out for over-
engineering).

C#: Java for MS .NET users (to first order, anyway). .NET has broader
goals than Java for language interoperation, so even though Jim Hugunin
and others have done some initial work on a .NET implementation of
Python, dynamic languages like Python will likely never be full .NET
citizens (thanks to the design of the .NET CLR). If that full
citizenship is important to you, C# has that advantage, but I'm
reliably informed it's fairly well-described as "a Java clone"
(implying programmer-inefficiency), so I'd be inclined to look for a
better language with a good .NET implementation. Lisp? Smalltalk?
(there was talk of an excellent .NET smalltalk implementation, but I'm
not sure whether that was vapourware or not...)

O'Caml: Excellent execution speed without C/C++'s unpleasant bugs.
Functional (in the technical sense), with elegant static type
inference, but multi-paradigm: you can write procedural code too.
Requires a different way of thinking to procedural languages for best
use. Nasty syntax. O'Reilly book in English and French.

Haskell: Another functional language (like O'Caml); good for forcing you
to think functionally; lazy evaluation. Lots of good books.

Fortran: Still rules for some numerical analysis work.

Lisp: Powerful, elegant and well-established, but it has been argued
(see recent threads here) that Lisp macros are not best described as a
language feature, but rather as a harmful, Babel-inducing, tool for
making new languages.

Scheme: Cleaned-up version of Lisp. Beautifully simple. Suffers from a
splintering of the user community thanks to a multitude of subtly
different implementations. Worth learning just to read Abelsson &
Sussman's (sp?) freely-downloadable book "Structure and Interpretation
of Computer Programs".

Eiffel: Design by contract. The book to read is Meyer's "Object-
Oriented Software Construction". Full of interesting stuff, if you can
stand his self-importance ;-).

Lua: Pint-sized Python.

Erlang: Concurrent programming.

Ruby: Python with a smaller user community (unless you're Japanese),
some minor wins and losses, and a very questionable design decision or
two thrown in (see numerous threads on this group).

Smalltalk: Never tried it, but sounds interesting, and similar to Python
in some ways.

Oz: Prolog for the 21st century (OK, I admit I haven't a clue what it's
like really, but I have to try it some day...).

Mathematica and Maple: Heaven, if you're into maths.

Alex Martelli has pointed out the brain-stretching value of learning
languages of a different nature (some of which aren't Turing
complete): including query languages (eg. SQL) and markup languages
(eg. XML).

Everybody here will tell you this, but I'm going to say it yet again:
don't be so foolish as to think you have to write *all* your code in a
language like C++ (or C, or Fortran, depending on the use) just
because you want the program as a whole to run fast.

And take the current myopic view of static typing (in the eyes of the
great unwashed programming public) with a bucket of salt.

Basicaly I don't know where to start, if there is much to do or
if it is has it seems and there is software to everything nowadays and so
doesn't make sense to spend time in learning a programming language.

I just have this idea that I would like to contribute to the curve of
accelarated exponential progress (technological singularity), artificial
intelligence and so on. From that point of view there is much to do... But
You should be able to get that lot done in a weekend, no? <wink>

Really, if you buy the notion of a technological singularity, you've
got me well-and-truly puzzled as to how you fit that into your brain
at the same time as believing that "there is software to everything
[sic] nowadays"!

can I stand for it and where to start?


Small?... and, of course, keep your eyes peeled for something you
think really matters.
John
Jul 18 '05 #22
Jacek Generowicz <ja**************@cern.ch> writes:
Samuel Walters <sw*************@yahoo.com> writes:
because there seem to be many more introductory tutorials and a lot of
advice that one should learn Scheme, then move to Common Lisp.


Careful. If you were to make such a suggestion on comp.lang.lisp, then
you'd be likely to be told that learning Scheme first will cause you
irreversible brain damage. Of course, now that He Whose Name Must Not
Be Mentioned is no longer posting there,


Heeeeeeeeee's back!

Cheers,
mwh

--
MAN: How can I tell that the past isn't a fiction designed to
account for the discrepancy between my immediate physical
sensations and my state of mind?
-- The Hitch-Hikers Guide to the Galaxy, Episode 12
Jul 18 '05 #23
Michael Hudson <mw*@python.net> writes:
Careful. If you were to make such a suggestion on comp.lang.lisp, then
you'd be likely to be told that learning Scheme first will cause you
irreversible brain damage. Of course, now that He Whose Name Must Not
Be Mentioned is no longer posting there,


Heeeeeeeeee's back!


Yes, kinda ironic that I happened to post this on the eve of his
return.
Jul 18 '05 #24
"Francis Avila" <fr***********@yahoo.com> wrote in message news:<10*************@corp.supernews.com>...
EP wrote in message ...
Is it true that the original Google spider was written in Python?


I don't know *what* Google uses Python for, but it uses Python.


The old version of the google toolbar showed a special hint when
hovering over the page rank icon. At least the first spider was
written in python - there is nothing like a urban legend about this
fact. And it seems that python was used enthusiastic by the google
team.

I remember an article about google's spider in a pre 1998 issue of
germans 'CT' or 'IX' magazine, can't remember which one.
Jul 18 '05 #25
In article <10*************@corp.supernews.com>,
Francis Avila <fr***********@yahoo.com> wrote:
EP wrote in message ...

Is it true that the original Google spider was written in Python?


I don't know *what* Google uses Python for, but it uses Python.


How about http://www.python.org/Jobs.html
--
Aahz (aa**@pythoncraft.com) <*> http://www.pythoncraft.com/

A: No.
Q: Is top-posting okay?
Jul 18 '05 #26
Paul Rubin <http://ph****@NOSPAM.invalid> writes:
jj*@pobox.com (John J. Lee) writes:
But at any rate, I thought we were talking about huge projects
involving many programmers, and I don't think Grail was of that
sort at all.
Right. Wasn't it a research project? In any case, hardly a
large-scale programming effort along the lines of Mozilla!


Grail wasn't huge but I think any serious browser qualifies as
substantial.


True, though not on the same scale as Zope, for example (or the others
I list below).

If you're saying it didn't really fail but actually
wasn't even seriously attempted,
Not sure what the goals were, but I'm not sure they were to compete
with Netscape and IE. CNRI funding -- "R" for research -- seems to
imply I do remember correctly (one of us should really check the facts
here... oh well, it's USENET ;-).

Do correct me if I'm wrong, but you seem to imply, in saying "wasn't
even seriously attempted", that if Grail wasn't intended to be a
Netscape-replacement, it must have had no purpose at all. That's
certainly not obvious to me.

ok, that's even fewer substantial
programs that have even been tried in Python.


The project stopped, according to the tarball, because CNRI didn't
want to allocate more money to it because of low usage compared to,
the big two of the day. Given that, what do we learn from Grail?

Well, what does the *existence* of Grail tell us (along with
similar-size projects like Mailman)? It tells us that projects at
least that large are feasible. What does the *ending* of Grail
development tell us about Python's suitability for development of
large projects? Not a lot: all we know is that it *didn't* run into
the problems that afflict large-scale projects (if you believe the
tarball README, anyway).

Others provided (in a different bit of the thread) at least one
example of a much larger system, solving a problem that would take a
best-estimate of on the order of a million lines of C++ code if solved
in C++. Other people posted examples in an thread last year:
eg. Peter Hansen with another project the same size as Zope (there
have been lots of other threads too, by the look of it -- but I
haven't scoured those for examples). Twisted is at least that big,
too (according to pycount.py run on the old version of Twisted that's
sitting on my hard drive -- again, it seems to spit out multiple total
lines, so I hope it's working right...!).

Of course, the above two paragraphs (implicitly) points out the big
joke here: it seems hard to dispute that reducing the number of lines
of code needed by an order of magnitude is a good way of reducing risk
on big projects. Now, what sort of language would you pick to achieve
that? C++ or Java? Or Lisp or Python?

not-holding-my-breath-for-your-answer-<wink>-ly y'rs,
John
Jul 18 '05 #27
"Derek" <no**@none.com> writes:
"John J. Lee" wrote:

[...]
for the
great majority of projects, optimisation does not require
implementation of the *entire* system in a language like
C++. The sum of C++ and Python is greater than the parts.


Python and C++ can also be a bigger mess than sum of either part.
Take your pick.


Not entirely sure what you mean, so I'll try and restate it:

You're saying that the C++ code for a Python extension is uglier than
the equivalent C++ code you'd write for a pure-C++ solution, where the
C++ code in question is that used to solve the *small part* of the
*whole* problem that you've farmed out to C++. Right?

Actually, I think that's only true if you're writing wrappers in C on
the C API level. Leaving that important point aside, though, the
choice we're discussing here is between:

1. Most code in Python, plus small amount (say 10 percent) of C/C++
code plus ugly code to wrap it (or the latter two mixed up
together, if you prefer).

2. All code in C++.
For cases where it meets the performance requirements, 1 is preferable
to 2 because, even given an overhead of ugliness (which I dispute,
thanks to SWIG and Boost Python) in that 10 percent of the problem
recoded in C++, you make a saving on the other 90 percent that (far!)
more than compensates. A ratio of 5-10 in terms of lines of code is
often quoted, and that ratio applies to 90% of the project.
John
Jul 18 '05 #28
In article <87************@pobox.com>, John J. Lee <jj*@pobox.com> wrote:
Jul 18 '05 #29
On Wed, Jan 14, 2004 at 08:08:37PM +0000, John J. Lee wrote:
according to pycount.py run on the old version of Twisted that's
sitting on my hard drive -- again, it seems to spit out multiple total
lines, so I hope it's working right...!


"find | xargs foo" can invoke foo multiple times. linux has a
surprisingly small upper bound on commandline length, on the order of
a 128k, and xargs is probably more conserative than that.
os.system("/bin/true " + "x" * 129000) 0 os.system("/bin/true " + "x" * 130000)

32512

Jeff

Jul 18 '05 #30
jj*@pobox.com (John J. Lee) writes:
"David M. Cook" <da******@nowhere.net> writes:
In article <40***********************@news.telepac.pt>, Bicho Verde wrote:

[...]
You could casually pick up enough Python to be useful in a week or so of
evenings.

Perl is not much harder,


It *seems* so when you first learn it...
but has a lot of "gotchas".


... and they never end! Ilya Zakharevich (a "Perl God"):

[...]

Can't resist another bit of Perl-bashing: I just noticed this bit of
the FSF's license page. There's an amusing (and not accidental, I
think) parallel between the language and its license:

http://www.fsf.org/licenses/license-list.html

The (Original) Artistic License.
We cannot say that this is a free software license because it is
too vague; some passages are too clever for their own good, and
their meaning is not clear. We urge you to avoid using
it,[snip...]
John
Jul 18 '05 #31
cl****@lairds.com (Cameron Laird) schreef:
Not sure what the goals were, but I'm not sure they were to compete
with Netscape and IE. CNRI funding -- "R" for research -- seems to
Certainly not the *original* goal, because Grail antedated those
latecomers.


My copy of Netscape 0.94beta for Windows has a file date of 1994-11-22.

And from the Grail docs:
"Grail was started in August 1995 as a quick and dirty demo. It quickly
became a serious project, as witnessed by the release of version 0.2 in
November 1995, and again by the planned release of version 0.3 (currently
in beta) in June 1996."

--
JanC

"Be strict when sending and tolerant when receiving."
RFC 1958 - Architectural Principles of the Internet - section 3.9
Jul 18 '05 #32
On Tue, 13 Jan 2004 12:21:00 +0100, rumours say that Bruno Desthuilliers
<bd***********@tsoin-tsoin.free.fr> might have written:
<troll>
Woops ! The problem with Perl is actually that it's more or less a
write-only language !-)
</troll>


I think you mean Perl is a WORN language (Write Once, Read Never).
--
TZOTZIOY, I speak England very best,
Ils sont fous ces Redmontains! --Harddix
Jul 18 '05 #33
Christos "TZOTZIOY" Georgiou <tz**@sil-tec.gr> writes:
On Tue, 13 Jan 2004 12:21:00 +0100, rumours say that Bruno Desthuilliers
<bd***********@tsoin-tsoin.free.fr> might have written:
<troll>
Woops ! The problem with Perl is actually that it's more or less a
write-only language !-)
</troll>


I think you mean Perl is a WORN language (Write Once, Read Never).


WORA (Write Once, Run Away)?

Cheers,
mwh

--
Worryingly, DEFUN appears to be a function that removes all the
fun from something: after using it all your code is converted
to C++. -- Tim Bradshaw, comp.lang.lisp
Jul 18 '05 #34
jj*@pobox.com (John J. Lee) writes:
Not sure what the goals were, but I'm not sure they were to compete
with Netscape and IE. CNRI funding -- "R" for research -- seems to
imply I do remember correctly (one of us should really check the
facts here... oh well, it's USENET ;-).


I thought the purpose of grail was a test bed for research into mobile
agents, that being what most of the PythonLabs flok were working on at
CNRI. I'm probably no better informed than the rest of this thread,
though :-)

Cheers,
mwh

--
Our Constitution never promised us a good or efficient government,
just a representative one. And that's what we got.
-- http://www.advogato.org/person/mrorg...html?start=109
Jul 18 '05 #35
In article <Xn******************@213.119.4.35>,
JanC <us****@janc.cjb.net> wrote:
cl****@lairds.com (Cameron Laird) schreef:
Not sure what the goals were, but I'm not sure they were to compete
with Netscape and IE. CNRI funding -- "R" for research -- seems to

Certainly not the *original* goal, because Grail antedated those
latecomers.


My copy of Netscape 0.94beta for Windows has a file date of 1994-11-22.

And from the Grail docs:
"Grail was started in August 1995 as a quick and dirty demo. It quickly
became a serious project, as witnessed by the release of version 0.2 in
November 1995, and again by the planned release of version 0.3 (currently
in beta) in June 1996."

Jul 18 '05 #36
cl****@lairds.com (Cameron Laird) schreef:
In article <Xn******************@213.119.4.35>,
JanC <us****@janc.cjb.net> wrote:
My copy of Netscape 0.94beta for Windows has a file date of 1994-11-22.

And from the Grail docs:
"Grail was started in August 1995 as a quick and dirty demo. It quickly
became a serious project, as witnessed by the release of version 0.2 in
November 1995, and again by the planned release of version 0.3 (currently
in beta) in June 1996."

Yikes! Good research--and I'm always in favor of that.
I apologize for my error. It's certainly disquieting;
I had such a strong memory that Grail was around in
mid-'94 that I didn't verify the facts. What *was* I
thinking about?


Well, I didn't know Grail was that old, so I went searching.

But Netscape was largely based on Mosaic anyway; being developed by the
same developers. The beta I was talking about above still has a Mosaic
logo. ;-)

--
JanC

"Be strict when sending and tolerant when receiving."
RFC 1958 - Architectural Principles of the Internet - section 3.9
Jul 18 '05 #37
JanC:
But Netscape was largely based on Mosaic anyway; being developed by the
same developers. The beta I was talking about above still has a Mosaic
logo. ;-)


While it had many of the same developers, as I recall, none of the code was
shared. They were planning to call it Netscape Mosaic but that was
changed before the final release. Also, and again pulling out some old
memory here, Netscape paid UIUC a chunk of money just in case there
was some accidental copyright transfer because of not doing a pure
clean-room reimplementation. I think that was mentioned in the IPO
prospectus... but I'm not going to try and dig it up now.

Andrew
da***@dalkescientific.com

Jul 18 '05 #38
"Andrew Dalke" <ad****@mindspring.com> wrote in message news:<AL****************@newsread2.news.pas.earthl ink.net>...
JanC:
But Netscape was largely based on Mosaic anyway; being developed by the
same developers. The beta I was talking about above still has a Mosaic
logo. ;-)


While it had many of the same developers, as I recall, none of the code was
shared. They were planning to call it Netscape Mosaic but that was
changed before the final release.


It was actually called Mosaic Netscape for a time since the company
was originally called Mosaic Communications Corporation. Visit
http://www.mcom.com and see where it takes you! (Completely work safe,
I might add.) Now that's what I call long term domain name asset
management!

There seemed to be some fairly major differences between later
releases of Mosaic before NCSA pulled it (after licensing it to
various corporations) and Netscape Navigator - Navigator was threaded
even on Windows 3.1, and was clearly better supported on UNIX, Windows
and Mac. Still, it's amusing to consider Netscape 4.x and earlier as
having some common heritage with Internet Explorer.

As for Grail, it was certainly a "hot product" in the Python community
in 1995 because of the restricted execution environment which I
evaluated for a project involving mobile software agents. How
priorities and trends have changed since then! Who would have thought
that Microsoft Outlook would be the premier platform for mobile code?
;-)

Paul
Jul 18 '05 #39
gr*****@dscpl.com.au (Graham Dumpleton) wrote in message
Would agree that more often than not it is the programmers working
on the project. I have met very very few programmers who I thought
had what it takes to develop decent C++ code which is understandable
and maintainable. Part of the problem though is not the programmers
but the C++ libraries they have to work with. Even though the
STL may be the "standard template library", it is pretty dangerous stuff.
Your average programmer however will tell you it is wonderful stuff
and never understand its danger and how one can so easily create
huge disasters with it.


<SNIP>

What is so dangerous about the STL in C++?
Jul 18 '05 #40
be*******@aol.com wrote:
What is so dangerous about the STL in C++?


One thing is that iterators can get invalidated when the container is
modified.
--
Rainer Deyke - ra*****@eldwood.com - http://eldwood.com
Jul 18 '05 #41
jj*@pobox.com (John J. Lee) wrote in message news:<87************@pobox.com>...
"Bicho Verde" <bi********@sapo.pt> writes:
C#: Java for MS .NET users (to first order, anyway). .NET has broader
goals than Java for language interoperation, so even though Jim Hugunin
and others have done some initial work on a .NET implementation of
Python, dynamic languages like Python will likely never be full .NET
citizens (thanks to the design of the .NET CLR). If that full
citizenship is important to you, C# has that advantage, but I'm
reliably informed it's fairly well-described as "a Java clone"
(implying programmer-inefficiency), so I'd be inclined to look for a
better language with a good .NET implementation. Lisp? Smalltalk?
(there was talk of an excellent .NET smalltalk implementation, but I'm
not sure whether that was vapourware or not...)


C# also fixes a lot of stupidities in java: for example a method can
"return" more than one new value and there is a syntax for first class-ish
callback methods (delegates) among the more prominent improvements.
Also C# is far friendlier to "legacy" code (than java was originally
intended to be).

From a pure code beauty point of view (or point of me/us :) ) Python
is still easier to read thanks to things like slicing,
list/dictionary displays, and keyword arguments
but type safety is a really big win for larger projects, and of course
C# is much faster.

And once you get some feeling for the namespace
hierarchy and the development environment I think it is a fairly
productive work environment. Maybe more productive than python?
There are some easily fixable problems/irritations --
like the way IO uses preallocated buffers in C++ style, which is
irritating but easy to wrap away. To my taste I'd definitely prefer
C# over lisp or smalltalk.

There is the portability thing, of course. And python is free...

OTOH *stackless* python has some *really* compelling advantages over C#
-- like the ability to feasibly manage thousands of microthreads,
which I wouldn't advise in C#, java, or "normal" python....

-- Aaron Watters
===
WIND THE FROG!
Jul 18 '05 #42
Rainer Deyke said the following on 01/16/2004 07:23 PM:
be*******@aol.com wrote:
What is so dangerous about the STL in C++?

One thing is that iterators can get invalidated when the container is
modified.


Hm, I think there are similar problems in Python:
--- snip ---
adict = {'foo': 'bar', 'spam': 'ham'}

for key in adict: # has to be adict.keys()
del adict[key]
--- snap ---

This snippet leads to a RuntimeError but the first item will be gone.

Of course, you may use the "older" syntax in this case. ".keys()" will
generate the list of keys once in advance, while the upper example will
call next() each time AFAIK.

Regards
Mirko
--
Jul 18 '05 #43

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

24 posts views Thread by Charif Lakchiri | last post: by
14 posts views Thread by Sam | last post: by
8 posts views Thread by Aziz McTang | last post: by
7 posts views Thread by fyleow | last post: by
9 posts views Thread by Katie Tam | last post: by
18 posts views Thread by Amol | last post: by
65 posts views Thread by Chris Carlen | last post: by
28 posts views Thread by windandwaves | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.