Re: Python Written in C?

2008-08-01 Thread Tim Rowe
2008/7/21 Krishnakant Mane [EMAIL PROTECTED]:

 First off all c# is absolute rubbish waist of time.

What a pity others are joining in this pointless language flame-war.

Look, I recently had to write a script for manipulating some data; I
struggled to organise it in Python and in C++, but when I tried C#
everything fell naturally into place and I had it done in next to no
time. Other times it has been Python or C++ that has been the most
natural way to express what I'm trying to do.  Just because /you/
don't like C# doesn't mean it's rubbish or a waste of time; personally
I loathe Perl, but I respect the fact that a lot of programmers can
get good results very quickly in it.

I reckon that the programmer who only knows one language is like a
carpenter trying to make a cabinet with just a chisel. Ok for making
the joints (although a hammer would have been handy to hit it with),
not /really/ as good as a plane for getting large areas smooth, and
the blade keeps jumping out when you try to use it as a screwdriver...

The one-language programmer isn't really in a position to choose the
right tool for the job, because they only have one tool. Anybody who
says that a language in real use is a waste of time is denying the
reality of those who find it an effective tool. Similarly, anybody who
says that a language -- any language -- is right for all jobs plainly
doesn't understand that language design involves a lot of compromises,
and that the compromises that are appropriate choices for one task are
inappropriate for another. Python is a great tool. So is C#. You /can/
do the same job with either, but the smart move is to choose the one
that is best adapted to the task in hand.

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


Re: Python Written in C?

2008-08-01 Thread Fabio Oikawa
2008/8/1 Tim Rowe [EMAIL PROTECTED]

 2008/7/21 Krishnakant Mane [EMAIL PROTECTED]:

  First off all c# is absolute rubbish waist of time.

 What a pity others are joining in this pointless language flame-war.

 Look, I recently had to write a script for manipulating some data; I
 struggled to organise it in Python and in C++, but when I tried C#
 everything fell naturally into place and I had it done in next to no
 time. Other times it has been Python or C++ that has been the most
 natural way to express what I'm trying to do.  Just because /you/
 don't like C# doesn't mean it's rubbish or a waste of time; personally
 I loathe Perl, but I respect the fact that a lot of programmers can
 get good results very quickly in it.

 I reckon that the programmer who only knows one language is like a
 carpenter trying to make a cabinet with just a chisel. Ok for making
 the joints (although a hammer would have been handy to hit it with),
 not /really/ as good as a plane for getting large areas smooth, and
 the blade keeps jumping out when you try to use it as a screwdriver...

 The one-language programmer isn't really in a position to choose the
 right tool for the job, because they only have one tool. Anybody who
 says that a language in real use is a waste of time is denying the
 reality of those who find it an effective tool. Similarly, anybody who
 says that a language -- any language -- is right for all jobs plainly
 doesn't understand that language design involves a lot of compromises,
 and that the compromises that are appropriate choices for one task are
 inappropriate for another. Python is a great tool. So is C#. You /can/
 do the same job with either, but the smart move is to choose the one
 that is best adapted to the task in hand.

Great, I agree! The only problem is to be so good in several
languages. Generally programmers are proficient in one or two.

Cheers,
Fábio
--
http://mail.python.org/mailman/listinfo/python-list

Re: Python Written in C?

2008-07-29 Thread Warren Myers
The OO overheads for C++ are almost non-existent.
http://www.informit.com/articles/article.aspx?p=1192024ns=15058

On Mon, Jul 21, 2008 at 2:05 PM, Dan Upton [EMAIL PROTECTED] wrote:
 On Mon, Jul 21, 2008 at 1:21 PM, Marc 'BlackJack' Rintsch
 [EMAIL PROTECTED] wrote:
 On Mon, 21 Jul 2008 18:12:54 +0200, mk wrote:

 Seriously, though, would there be any advantage in re-implementing
 Python in e.g. C++?

 Not that current implementation is bad, anything but, but if you're not
 careful, the fact that lists are implemented as C arrays can bite your
 rear from time to time (it recently bit mine while using lxml). Suppose
 C++ re-implementation used some other data structure (like linked list,
 possibly with twists like having an array containing pointers to 1st
 linked list elements to speed lookups up), which would be a bit slower
 on average perhaps, but it would behave better re deletion?

 Aside (actual reply below): at least for a sorted LL, you're basically
 describing Henriksen's algorithm.  They can asymptotically be faster,
 based on amortized analysis, but they're somewhat more complicated to
 implement.


 An operation that most people avoid because of the penalty of shifting
 down all elements after the deleted one.  Pythonistas tend to build new
 lists without unwanted elements instead.  I can't even remember when I
 deleted something from a list in the past.

 Ciao,
Marc 'BlackJack' Rintsch

 The other side of the equation though is the OO-overhead for C++
 programs as compared to C.  (A couple years ago we used an
 instrumentation tool to check the instruction count for a simple hello
 world program written in C (ie, main(){printf(Hello world!); return
 0;}) and Python (main(){couthello worldendl;return 0;}), and the
 instruction count was significantly higher for C++.  I expect any sort
 of C++ objects you used to implement Python structures will be slower
 than the equivalent in C.  So even if writing it in C++ would reduce
 the overhead for deleting from a list, I expect you would lose a lot
 more.
 --
 http://mail.python.org/mailman/listinfo/python-list




-- 

Warren Myers
http://warrenmyers.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-28 Thread VernM
On Jul 20, 3:50 pm, [EMAIL PROTECTED] wrote:
 I'm just learning about Python now and it sounds interesting. But I
 just read (on the Wiki page) that mainstream Python was written in C.
 That's what I was searching for: Python was written in what other
 language?

 See, my concern was something like: OK, if Python is so hot, then,
 hopefully someone is writing it in assembly language for each MPU chip
 out there. Otherwise, if, say, they've written it in C#, then it looks
 like the REAL, generally useful language to learn is C# and Python is
 akin to Visual Basic or something: a specialty languagewhereas
 REAL WORLD programmers who want to be generally useful go and learn
 C#.

 So I was suspecting the Python compiler or interpreter is written in a
 REAL language like C#. So, Wiki says it's written in C! It's almost as
 if it were an intentional trick...write your own, new language in an
 OLD, real world language that is passe. Compile it into executable
 modules of course, so it is a real, working compiler, alright. But the
 SOURCE is some old, high level language which no one wants to use
 anymore! So now you've got a hot new language package and no one can
 say well, it is written in, the SOURCE code is written in, a REAL
 language. No, it's not! The source is some outdated language and
 compiler and no one is going to prefer learning THAT to learning your
 hot new language!

 I'm not dissing Python, here. Just noting that, if it is written in C,
 that throws a curve at me in trying to balance the value of learning
 Python vs. some other major language.

Thank you giveitawhril2...!!

I haven't had so much fun reading a thead in years. Hilarious
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-24 Thread castironpi
On Jul 23, 12:10 pm, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
 On Wed, 23 Jul 2008 09:42:29 -0700, castironpi wrote:
  On Jul 23, 9:11 am, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
  On Wed, 23 Jul 2008 14:10:22 +0200, mk wrote:
   Marc 'BlackJack' Rintsch wrote:
   I can't even remember when I deleted something from a list in the past.

   Still, doesn't that strike you as.. workaround?

  No, I find it actually safer; I don't have to care where modifications of
  the list might be seen elsewhere in the program.

  Ciao,
          Marc 'BlackJack' Rintsch

  a[:]= newlist

  and

  a= newlist

  have two completely different effects, and one is just as safe as
  'del'.  Besides, del isn't safe to be seen elsewhere in the program in
  other threads, if they aren't locking the GIL.

 As usual you are talking nonsense…

 Ciao,
         Marc 'BlackJack' Rintsch

As usual you are taking flamebait!
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-23 Thread mk

Marc 'BlackJack' Rintsch wrote:

An operation that most people avoid because of the penalty of shifting
down all elements after the deleted one.  Pythonistas tend to build new
lists without unwanted elements instead. 


Which is exactly what I have done with my big lxml.etree, from which I 
needed to delete some elements: constructed a new tree only with 
elements I wanted. Sure, that works.


There _is_ a minor side effect: nearly doubling memory usage while the 
operation lasts. 99% of the time it's not a problem, sure.


 I can't even remember when I

deleted something from a list in the past.


Still, doesn't that strike you as.. workaround?

I half-got used to it, but it would still be nice not to (practically) 
have to use it.


Enough whining. Gonna eat my quiche and do my Python. :-)




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


Re: Python Written in C?

2008-07-23 Thread mk

Actually, all of the compilers I'm familiar with (gcc and a
handful of cross compilers for various microprocessors)
translate from high-level languages (e.g. C, C++) into
assembly, which is then assembled into relocatable object
files, which are then linked/loaded to produce machine
language.


Doesn't g++ translate C++ into C and then compile C?

Last I heard, most C++ compilers were doing that.




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


Re: Python Written in C?

2008-07-23 Thread Matthieu Brucher
2008/7/23 mk [EMAIL PROTECTED]:
 Actually, all of the compilers I'm familiar with (gcc and a
 handful of cross compilers for various microprocessors)
 translate from high-level languages (e.g. C, C++) into
 assembly, which is then assembled into relocatable object
 files, which are then linked/loaded to produce machine
 language.

 Doesn't g++ translate C++ into C and then compile C?

 Last I heard, most C++ compilers were doing that.

GCC translates every language into its one as a tree, which is then
translated to assembly.

Matthieu
-- 
French PhD student
Website : http://matthieu-brucher.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn : http://www.linkedin.com/in/matthieubrucher
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-23 Thread Grant Edwards
On 2008-07-23, mk [EMAIL PROTECTED] wrote:
 Actually, all of the compilers I'm familiar with (gcc and a
 handful of cross compilers for various microprocessors)
 translate from high-level languages (e.g. C, C++) into
 assembly, which is then assembled into relocatable object
 files, which are then linked/loaded to produce machine
 language.

 Doesn't g++ translate C++ into C and then compile C?

No.

 Last I heard, most C++ compilers were doing that.

A decade or two ago there were some C++ front-ends that did
that, but I don't think it's common in modern C++ compilers.

-- 
Grant Edwards   grante Yow! Oh, I get it!!
  at   The BEACH goes on, huh,
   visi.comSONNY??
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-23 Thread Marc 'BlackJack' Rintsch
On Wed, 23 Jul 2008 14:10:22 +0200, mk wrote:

 Marc 'BlackJack' Rintsch wrote:
 I can't even remember when I deleted something from a list in the past.
 
 Still, doesn't that strike you as.. workaround?

No, I find it actually safer; I don't have to care where modifications of
the list might be seen elsewhere in the program.

Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-23 Thread castironpi
On Jul 23, 9:11 am, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
 On Wed, 23 Jul 2008 14:10:22 +0200, mk wrote:
  Marc 'BlackJack' Rintsch wrote:
  I can't even remember when I deleted something from a list in the past.

  Still, doesn't that strike you as.. workaround?

 No, I find it actually safer; I don't have to care where modifications of
 the list might be seen elsewhere in the program.

 Ciao,
         Marc 'BlackJack' Rintsch

a[:]= newlist

and

a= newlist

have two completely different effects, and one is just as safe as
'del'.  Besides, del isn't safe to be seen elsewhere in the program in
other threads, if they aren't locking the GIL.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-23 Thread Marc 'BlackJack' Rintsch
On Wed, 23 Jul 2008 09:42:29 -0700, castironpi wrote:

 On Jul 23, 9:11 am, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
 On Wed, 23 Jul 2008 14:10:22 +0200, mk wrote:
  Marc 'BlackJack' Rintsch wrote:
  I can't even remember when I deleted something from a list in the past.

  Still, doesn't that strike you as.. workaround?

 No, I find it actually safer; I don't have to care where modifications of
 the list might be seen elsewhere in the program.

 Ciao,
         Marc 'BlackJack' Rintsch
 
 a[:]= newlist
 
 and
 
 a= newlist
 
 have two completely different effects, and one is just as safe as
 'del'.  Besides, del isn't safe to be seen elsewhere in the program in
 other threads, if they aren't locking the GIL.

As usual you are talking nonsense…

Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list

Re: Python Written in C?

2008-07-22 Thread cokofreedom
On Jul 22, 5:59 am, Larry Bates [EMAIL PROTECTED] wrote:
 Grant Edwards wrote:
  On 2008-07-22, Larry Bates [EMAIL PROTECTED] wrote:

  You talk about writing it in assembly language for each MPU
  chip.  Actually it is even better than that.  We now have
  these modern inventions, called compilers that do that type of
  work for us.  They translate high level instructions, not
  into assembler but into machine language.

  Actually, all of the compilers I'm familiar with (gcc and a
  handful of cross compilers for various microprocessors)
  translate from high-level languages (e.g. C, C++) into
  assembly, which is then assembled into relocatable object
  files, which are then linked/loaded to produce machine
  language.

 I just learned something I did not know.  I was under the impression that they
 translated directly to machine code without ever actually generating Assembler
 text files.  Seems like a waste to generate the text and turn around run that
 through the assembler, but what do I know.  I guess that way the compiler can
 have pluggable assembler back-ends.

 -Larry

I also I have just learned something new! Troll threads are useful.
Yay.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-22 Thread Paul Rudin
DaveM [EMAIL PROTECTED] writes:

 On Mon, 21 Jul 2008 03:18:01 +0200, Michiel Overtoom [EMAIL PROTECTED]
 wrote:


Many major text/word processing programs (Emacs, vi, MS-Word) are also
written in C.

 I thought Emacs was written in Lisp.

The core - including the lisp interpreter - is written in C. A lot of
the user functionality is written in (emacs) lisp.

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


Re: Python Written in C?

2008-07-22 Thread Grant Edwards
On 2008-07-22, Larry Bates [EMAIL PROTECTED] wrote:
 Grant Edwards wrote:
 On 2008-07-22, Larry Bates [EMAIL PROTECTED] wrote:
 
 You talk about writing it in assembly language for each MPU
 chip.  Actually it is even better than that.  We now have
 these modern inventions, called compilers that do that type of
 work for us.  They translate high level instructions, not 
 into assembler but into machine language.
 
 Actually, all of the compilers I'm familiar with (gcc and a
 handful of cross compilers for various microprocessors)
 translate from high-level languages (e.g. C, C++) into
 assembly, which is then assembled into relocatable object
 files, which are then linked/loaded to produce machine
 language.
 
 I just learned something I did not know.  I was under the
 impression that they translated directly to machine code
 without ever actually generating Assembler text files.

There may indeed be compilers that work that way.  On Unix
systems (which is what I work with) compilers have
traditionally generated assembly language files.

 Seems like a waste to generate the text and turn around run
 that through the assembler, but what do I know.  I guess that
 way the compiler can have pluggable assembler back-ends.

Since you probably need an assembler anyway, generating
assembly-language in the compiler prevents you from having to
duplicate a bunch of object-code-generation code in two places.

-- 
Grant Edwards   grante Yow! Okay ... I'm going
  at   home to write the I HATE
   visi.comRUBIK's CUBE HANDBOOK FOR
   DEAD CAT LOVERS ...
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-22 Thread Ethan Furman

Iain King wrote:

On Jul 21, 6:58 am, Krishnakant Mane [EMAIL PROTECTED] wrote:


First off all c# is absolute rubbish waist of time.  if I need to
learn it then I better lern java or pythonfor that matter.  and by the
way what is a real programmer?


The story of a Real Programmer:

http://www.pbm.com/~lindahl/mel.html

Iain


Wow.  Awesome story.
~Ethan

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


Re: Python Written in C?

2008-07-22 Thread Michiel Overtoom
giveitawhril2008 wrote...

 I think someone should write a compiler, Revenge of BASIC.

Your remark made an immediate association with me with the following soundtrack:

http://www.empire-of-the-claw.com/files/Empire%20of%20The%20Claw%20-%20Tranc
e%20of%20the%2080's%20Arcade.mp3

A creature for my amusement

Greetings,

-- 
The ability of the OSS process to collect and harness
the collective IQ of thousands of individuals across
the Internet is simply amazing. - Vinod Vallopillil
http://www.catb.org/~esr/halloween/halloween4.html

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


Re: Python Written in C?

2008-07-22 Thread Scott David Daniels

Erik Max Francis wrote:

Ethan Furman wrote:


Iain King wrote:

The story of a Real Programmer:
http://www.pbm.com/~lindahl/mel.html
Iain


Wow.  Awesome story.


If my google-fu is up to snuff, these are screenshots (scans of 
printouts) of the actual blackjack game in operation:


http://wps.com/projects/LGP-21/Software/LGP30-Blackjack1.jpg
http://wps.com/projects/LGP-21/Software/LGP30-Blackjack2.jpg

and here's a scan of a printout of some source code (machine language):

http://wps.com/projects/LGP-21/Software/CrapGame.tiff


The high school I went to had an LGP-30, and I learned to program on it.
Rumor had it that a student from two years before me used to work late
in the lab, and allow the janitors to play blackjack, and it is further
rumored that he made a bit of money leaning on the transfer control
button.

--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-22 Thread Larry Bates

Grant Edwards wrote:

On 2008-07-22, Larry Bates [EMAIL PROTECTED] wrote:

Grant Edwards wrote:

On 2008-07-22, Larry Bates [EMAIL PROTECTED] wrote:


You talk about writing it in assembly language for each MPU
chip.  Actually it is even better than that.  We now have
these modern inventions, called compilers that do that type of
work for us.  They translate high level instructions, not 
into assembler but into machine language.

Actually, all of the compilers I'm familiar with (gcc and a
handful of cross compilers for various microprocessors)
translate from high-level languages (e.g. C, C++) into
assembly, which is then assembled into relocatable object
files, which are then linked/loaded to produce machine
language.


I just learned something I did not know.  I was under the
impression that they translated directly to machine code
without ever actually generating Assembler text files.


There may indeed be compilers that work that way.  On Unix
systems (which is what I work with) compilers have
traditionally generated assembly language files.


Seems like a waste to generate the text and turn around run
that through the assembler, but what do I know.  I guess that
way the compiler can have pluggable assembler back-ends.


Since you probably need an assembler anyway, generating
assembly-language in the compiler prevents you from having to
duplicate a bunch of object-code-generation code in two places.



I'm not sure I understand what you mean here.  The code generation phase of the 
top level compiler would have to generate assembler mnemonics instead of just 
generating machine coded directly.  At that point it should be just as easy to 
generate machine code, unless you take advantage of macros, or other helpers 
provided in the assembly phase.


My compiler work was way back on mainframes and the ones I worked with 
definitely didn't produce assembler then needed to be run through the assembler. 
 They created likable objects directly.  But that was over 30 years ago!


All this may be a moot point, because assembler is just a mnemonic 
representations of machine language anyway.


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


Re: Python Written in C?

2008-07-22 Thread Larry Bates

Marc 'BlackJack' Rintsch wrote:

On Mon, 21 Jul 2008 18:12:54 +0200, mk wrote:

Seriously, though, would there be any advantage in re-implementing 
Python in e.g. C++?


Not that current implementation is bad, anything but, but if you're not 
careful, the fact that lists are implemented as C arrays can bite your 
rear from time to time (it recently bit mine while using lxml). Suppose 
C++ re-implementation used some other data structure (like linked list, 
possibly with twists like having an array containing pointers to 1st 
linked list elements to speed lookups up), which would be a bit slower 
on average perhaps, but it would behave better re deletion?


An operation that most people avoid because of the penalty of shifting
down all elements after the deleted one.  Pythonistas tend to build new
lists without unwanted elements instead.  I can't even remember when I
deleted something from a list in the past.

Ciao,
Marc 'BlackJack' Rintsch


When I use os.walk and need to remove directories or files.  Seems to be the 
only way to do the in-place delete that is required.  But you are right, it is 
very seldom.


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


Re: Python Written in C?

2008-07-22 Thread Grant Edwards
On 2008-07-23, Larry Bates [EMAIL PROTECTED] wrote:

 Since you probably need an assembler anyway, generating
 assembly-language in the compiler prevents you from having to
 duplicate a bunch of object-code-generation code in two places.

 I'm not sure I understand what you mean here.  The code
 generation phase of the top level compiler would have to
 generate assembler mnemonics instead of just generating
 machine coded directly.  At that point it should be just as
 easy to generate machine code, unless you take advantage of
 macros, or other helpers provided in the assembly phase.

Generating assembly language can be a lot easier than
generating machine code.  One of the big advantage if you're
generating assembly language is you don't have to handle
relocation and address fix-up issues -- you can let the
assembler and linker take care of it.  Letting the linker do
the final machine-code generation step also allows certain
optimizations that can't really be done by the compiler.

 My compiler work was way back on mainframes and the ones I
 worked with definitely didn't produce assembler then needed to
 be run through the assembler.  They created likable objects
 directly.

There probably are plenty of compilers that do that.  My
background is Unix and microprocessor stuff, and it could be
that for various reasons the emit assembly approach was more
common in that genre.

 But that was over 30 years ago!

 All this may be a moot point, because assembler is just a
 mnemonic representations of machine language anyway.

On many architectures, a particular mnemonic can end up being
translated into one of several slightly different machine
instructions -- for example a simple jump mnemonic might
generate any one of several instructions depending on how far
away the destination is located.  If you've already got an
assembler and linker than know how to deal with that stuff,
then rather than duplicate the same functionality in the
compiler, one might just decided to emit a jump mnemonic and
a label.

-- 
Grant Edwards   grante Yow!  Wow! Look!! A stray
  at   meatball!! Let's interview
   visi.comit!
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-22 Thread Tim Roberts
Larry Bates [EMAIL PROTECTED] wrote:
 
I just learned something I did not know.  I was under the impression that they 
translated directly to machine code without ever actually generating Assembler 
text files. 

Some do, some don't.  It's an implementation chioce.  gcc generates a text
file and pipes it to gas.  The __asm__ directive just adds strings to the
assembler file.

Visual C++ generates machine language.  The compiler has to include an
assembler for inline assembly.
-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza  Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-21 Thread Krishnakant Mane
On 21/07/2008, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 I'm just learning about Python now and it sounds interesting. But I
 just read (on the Wiki page) that mainstream Python was written in C.
 That's what I was searching for: Python was written in what other
 language?

Are you a PH.d researcher
In the first place why do you want to make an issue of what an x
language is compiled in 
and if that' is what you are researching in, then sorry to say you
don't seam to have a mindset needed for researcher.
 See, my concern was something like: OK, if Python is so hot, then,
 hopefully someone is writing it in assembly language for each MPU chip
 out there. Otherwise, if, say, they've written it in C#, then it looks
 like the REAL, generally useful language to learn is C# and Python is
 akin to Visual Basic or something: a specialty languagewhereas
 REAL WORLD programmers who want to be generally useful go and learn
 C#.

First off all c# is absolute rubbish waist of time.  if I need to
learn it then I better lern java or pythonfor that matter.  and by the
way what is a real programmer?
I never knew that there are robots who program vertually and a real
programmer .
What do you think I am a spam bot who is writing a vertual program 
every day?  first give me your defination for real programmer.
 So I was suspecting the Python compiler or interpreter is written in a
 REAL language like C#. So, Wiki says it's written in C! It's almost as
 if it were an intentional trick...write your own, new language in an
 OLD, real world language that is passe. Compile it into executable
 modules of course, so it is a real, working compiler, alright. But the
 SOURCE is some old, high level language which no one wants to use
 anymore! So now you've got a hot new language package and no one can
 say well, it is written in, the SOURCE code is written in, a REAL
 language. No, it's not! The source is some outdated language and
 compiler and no one is going to prefer learning THAT to learning your
 hot new language!

what! no one is using c?  I want to know what people use to write
device drivers?  I am such a fool I really never new that people use
c# to create device drivers for hardware and for creating firmware.  I
admit my stupidity that I never knew that c# is real programming
language .
and what is your programming language?python is a free and open
source programming language and does not belong to one person.

 I'm not dissing Python, here. Just noting that, if it is written in C,
 that throws a curve at me in trying to balance the value of learning
 Python vs. some other major language.
My request and strong recommendation to you is don't learn python,
because you don't deserve to.  I am not saying for dissing you, i
know you are real programmer .  but you seam to have a typical
mindset which the rubbish microsoft has inculcated in many
programmers, aa sorry real programmers  line you.
I don't think there is any point saying vvb kind of  some thing is
great and python is rubbish.  every language has its value and vb is
not a language in the first place.  python is made with a view that it
is usefull for all purposes and it has been so far successful and I
don't really care why it is done in c as long as it does the work.
happy hacking.
Krishnakant.
 --
 http://mail.python.org/mailman/listinfo/python-list

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


Re: Python Written in C?

2008-07-21 Thread Fredrik Lundh

Michael Torrie wrote:


[EMAIL PROTECTED] wrote:



I'm not dissing Python, here. Just noting that, if it is written in C,
that throws a curve at me in trying to balance the value of learning
Python vs. some other major language.


Definitely one of the most non-sequitor statements I have ever heard.
Actually your entire post doesn't make much sense.  Maybe you are a
brother bot to castropini?


or that perl troll making another attempt to add noise to this 
newsgroup?  I'm a bit surprised that he managed to generate this

many replies, really.

/F

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


Python Written in C?

2008-07-21 Thread Peter Anderson
 Bah, new-fangled languages like Pascal... Real programmers write 
Fortran. Using punch-cards and paper-tape. Real programmers can edit 
their programs with a pointy stick and some home-made sticky-tape. -- 
Grant Edwards


Reminds me of a funny story from my past working life. I had this fibre 
tipped pen, given to me as a freebie by some computer company. The pen 
had something like Floppy Disk Pen printed down the barrel. A 
colleague who was more into IT management than programming or hands-on 
support picked it up at a meeting and said something like - That's 
interesting, what's it for? Seeing an opportunity I replied Its a new 
bit of technology that allows you to write directly to your floppy disks 
when you are away from your computer! What a great idea! he replied 
in all seriousness!


Maybe our friend could find one to code C# with! ;-)

Peter
--

Peter Anderson

There is nothing more difficult to take in hand, more perilous to 
conduct, or more uncertain in its success, than to take the lead in the 
introduction of a new order of things — Niccolo Machiavelli, /The 
Prince/, ch. 6


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


Re: Python Written in C?

2008-07-21 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Michiel
Overtoom wrote:

 Many major text/word processing programs (Emacs, vi, MS-Word) are also
 written in C. Does that mean you should do all your text processing in C?

How else would you implement a Boyer-Moore algorithm?
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-21 Thread Iain King
On Jul 21, 6:58 am, Krishnakant Mane [EMAIL PROTECTED] wrote:


 First off all c# is absolute rubbish waist of time.  if I need to
 learn it then I better lern java or pythonfor that matter.  and by the
 way what is a real programmer?

The story of a Real Programmer:

http://www.pbm.com/~lindahl/mel.html

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


Re: Python Written in C?

2008-07-21 Thread Bruno Desthuilliers

[EMAIL PROTECTED] a écrit :
(snip clueless nonsense)

Surely a troll... No one on earth can be *that* clueless.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-21 Thread ptn
On Jul 20, 5:50 pm, [EMAIL PROTECTED] wrote:
 I'm just learning about Python now and it sounds interesting. But I
 just read (on the Wiki page) that mainstream Python was written in C.
 That's what I was searching for: Python was written in what other
 language?

 See, my concern was something like: OK, if Python is so hot, then,
 hopefully someone is writing it in assembly language for each MPU chip
 out there. Otherwise, if, say, they've written it in C#, then it looks
 like the REAL, generally useful language to learn is C# and Python is
 akin to Visual Basic or something: a specialty languagewhereas
 REAL WORLD programmers who want to be generally useful go and learn
 C#.

 So I was suspecting the Python compiler or interpreter is written in a
 REAL language like C#. So, Wiki says it's written in C! It's almost as
 if it were an intentional trick...write your own, new language in an
 OLD, real world language that is passe. Compile it into executable
 modules of course, so it is a real, working compiler, alright. But the
 SOURCE is some old, high level language which no one wants to use
 anymore! So now you've got a hot new language package and no one can
 say well, it is written in, the SOURCE code is written in, a REAL
 language. No, it's not! The source is some outdated language and
 compiler and no one is going to prefer learning THAT to learning your
 hot new language!

 I'm not dissing Python, here. Just noting that, if it is written in C,
 that throws a curve at me in trying to balance the value of learning
 Python vs. some other major language.


Sounds like you program only because someone's paying you. Any
programmer who says that C is outdated and not real *is* outdated and
not real.

Not used anymore? M I wonder, have you heard of something called
Linux? The open source Unix-like system? Or perhaps you are familiar
with Apache? Does GNOME ring any bells to you? Vim? Git? You
got some serious research to do, STFW.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-21 Thread Martin P. Hellwig

Bruno Desthuilliers wrote:

[EMAIL PROTECTED] a écrit :
(snip clueless nonsense)

Surely a troll... No one on earth can be *that* clueless.

I disagree he has upper management written all over him.

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


Re: Python Written in C?

2008-07-21 Thread rynt
On Jul 20, 3:50 pm, [EMAIL PROTECTED] wrote:
 I'm just learning about Python now and it sounds interesting. But I
 just read (on the Wiki page) that mainstream Python was written in C.
 That's what I was searching for: Python was written in what other
 language?

 See, my concern was something like: OK, if Python is so hot, then,
 hopefully someone is writing it in assembly language for each MPU chip
 out there. Otherwise, if, say, they've written it in C#, then it looks
 like the REAL, generally useful language to learn is C# and Python is
 akin to Visual Basic or something: a specialty languagewhereas
 REAL WORLD programmers who want to be generally useful go and learn
 C#.

 So I was suspecting the Python compiler or interpreter is written in a
 REAL language like C#. So, Wiki says it's written in C! It's almost as
 if it were an intentional trick...write your own, new language in an
 OLD, real world language that is passe. Compile it into executable
 modules of course, so it is a real, working compiler, alright. But the
 SOURCE is some old, high level language which no one wants to use
 anymore! So now you've got a hot new language package and no one can
 say well, it is written in, the SOURCE code is written in, a REAL
 language. No, it's not! The source is some outdated language and
 compiler and no one is going to prefer learning THAT to learning your
 hot new language!

 I'm not dissing Python, here. Just noting that, if it is written in C,
 that throws a curve at me in trying to balance the value of learning
 Python vs. some other major language.

You're either ---
A.  A Troll
B.  A young, immature programmer trying to show off
or
C.  A total idiot.

Who cares what language a language is written in as long as you can be
productive - which you certainly can be in Python.

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


Re: Python Written in C?

2008-07-21 Thread Fredrik Lundh

rynt wrote:


You're either ---
A.  A Troll
B.  A young, immature programmer trying to show off
or
C.  A total idiot.


you forgot the All of the above choice.

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


Re: Python Written in C?

2008-07-21 Thread Matthew Fitzgibbons

Martin P. Hellwig wrote:

I disagree he has upper management written all over him.



In any case, the OP should remember that programming languages are all 
theoretically the same: if you can do it in one language, then you can 
theoretically do it any other. When choosing a language, you just need 
to find one that (a) has the right tools to do the job (libraries, 
methods of deployment, supported platforms, etc.) and (b) that you and 
your team are comfortable using. Python has the tools to tackle a huge 
range of problems (you can often use the standard library when you would 
have to write C code from scratch), and many find it, dare I say, fun to 
use (whereas I find C# roughly equivalent to being shot). Whether you 
should use it depends on your domain and your team's preference.


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


Re: Python Written in C?

2008-07-21 Thread mk

Grant Edwards wrote:


Using punch-cards and paper-tape.  Real programmers can edit
their programs with a pointy stick and some home-made
sticky-tape.


Wrong! Real programmers can program using only Touring machine (and 
something having to do with post for some reason). I'm sure our 
brilliant OP[1] could program in both.


[1] Troll, really. Don't feed the troll. I wouldn't have posted about 
him because that only adds to the noise. oops.








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


Re: Python Written in C?

2008-07-21 Thread Tim Golden

mk wrote:

Grant Edwards wrote:


Using punch-cards and paper-tape.  Real programmers can edit
their programs with a pointy stick and some home-made
sticky-tape.


Wrong! Real programmers can program using only Touring machine


Is that some kind of bicycle?

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


Re: Python Written in C?

2008-07-21 Thread Fredrik Lundh

Tim Golden wrote:


Wrong! Real programmers can program using only Touring machine


Is that some kind of bicycle?


there's a nearly infinite number of software projects with that name, 
but the Ultimate Touring Machine could be found in sydney not long ago:


http://tinyurl.com/5t2dl4

/F

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


Re: Python Written in C?

2008-07-21 Thread Marcus.CM

Hi everyone,

Yes, python is written in C. Maybe the original poster is looking for 
ultimate language and thus finds it uncomfortable that python should 
be written in C and not python itself.
Actually it doesnt matter if IronPython is written in C# and Python in 
C. Each programming language is like a tool to the programmer and no, C 
is not outdate, its just a language with a much higher learning curve
and its best left to do stuffs requiring drivers or optimized algorithms 
and other embedded stuffs that is usable by other languages. What do you 
think C# is written in? C# ?

You see how flawed this logic is.
Anyway, good luck on your search. But why look for ultimate language, 
when the core difference is the programmmer him/herself. In the hands 
of an skilled programmer, any language could accomplish much and then 
there is an issue with time. I would cringe to do in C what i do in 
python nowadays, and i have like 14 years of C/C++ programming 
background. Someone wrote bittorrent in python and today its Utorrent 
written in C/C++ that is cool, you see that doesnt mean that the next 
guy wrote write it in python would not beat the cool factor, its a 
matter of design, look, feel and its all about the programmer.


Like they say in racing, its the driver not the car.





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


Re: Python Written in C?

2008-07-21 Thread mk



Who cares what language a language is written in as long as you can be
productive - which you certainly can be in Python.


Seriously, though, would there be any advantage in re-implementing 
Python in e.g. C++?


Not that current implementation is bad, anything but, but if you're not 
careful, the fact that lists are implemented as C arrays can bite your 
rear from time to time (it recently bit mine while using lxml). Suppose 
C++ re-implementation used some other data structure (like linked list, 
possibly with twists like having an array containing pointers to 1st 
linked list elements to speed lookups up), which would be a bit slower 
on average perhaps, but it would behave better re deletion?



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


Re: Python Written in C?

2008-07-21 Thread Marcus.CM

Its called a BMW today.


Fredrik Lundh wrote:

Tim Golden wrote:


Wrong! Real programmers can program using only Touring machine


Is that some kind of bicycle?


there's a nearly infinite number of software projects with that name, 
but the Ultimate Touring Machine could be found in sydney not long ago:


http://tinyurl.com/5t2dl4

/F

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




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


Re: Python Written in C?

2008-07-21 Thread Marc 'BlackJack' Rintsch
On Mon, 21 Jul 2008 11:26:27 -0700, castironpi wrote:

 On Jul 20, 11:59 pm, Michael Torrie [EMAIL PROTECTED] wrote:
 [EMAIL PROTECTED] wrote:
  I'm not dissing Python, here. Just noting that, if it is written in C,
  that throws a curve at me in trying to balance the value of learning
  Python vs. some other major language.

 Definitely one of the most non-sequitor statements I have ever heard.
 Actually your entire post doesn't make much sense.  Maybe you are a
 brother bot to castropini?  Perhaps a less-trained one, although none of
 castropini's posts seem to make sense either.  The AI needs a bit of work.
 
 Are you saying Python is not good for writing A.I., or the A.I. isn't
 good at writing Python?

Are you saying python is not as smart as you.

Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list

RE: Python Written in C?

2008-07-21 Thread Phil Runciman



On 20 jul, 19:50, [EMAIL PROTECTED] wrote:
 I'm just learning about Python now and it sounds interesting. But I
 just read (on the Wiki page) that mainstream Python was written in C.
 That's what I was searching for: Python was written in what other
 language?

 See, my concern was something like: OK, if Python is so hot, then,
 hopefully someone is writing it in assembly language for each MPU chip
 out there. Otherwise, if, say, they've written it in C#, then it looks
 like the REAL, generally useful language to learn is C# and Python is
 akin to Visual Basic or something: a specialty languagewhereas
 REAL WORLD programmers who want to be generally useful go and learn
 C#.

 So I was suspecting the Python compiler or interpreter is written in a

.. if Python is so hot.. Python represents progress not the ultimate
goal. Thank goodness we are continuing to learn from past mistakes. 

All compilers and interpreters started out being written in another
language. You do not help us by stating the obvious. 

This is even true of the interpreter in your own brain that processes
English. IMHO The latter still has some bugs in it. ;-)


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


Re: Python Written in C?

2008-07-21 Thread Terry Reedy



Fredrik Lundh wrote:

rynt wrote:


You're either ---
A.  A Troll
B.  A young, immature programmer trying to show off
or
C.  A total idiot.


you forgot the All of the above choice.


Or Aspiring Comic.  This is certain one of the more entertaining troll 
posts we have had ;-).


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


Re: Python Written in C?

2008-07-21 Thread Terry Reedy



mk wrote:

Seriously, though, would there be any advantage in re-implementing 
Python in e.g. C++?


Considered and rejected by Guido and the CPython developer crew.
Anyone who wants C++Python is free to make one, just as people have done 
JavePython (Jython), C#Python, (IonPython), PythonPython (PyPy), and 
compiled-CPython (multiple).


Not that current implementation is bad, anything but, but if you're not 
careful, the fact that lists are implemented as C arrays can bite your 
rear from time to time (it recently bit mine while using lxml). Suppose 
C++ re-implementation used some other data structure (like linked list, 
possibly with twists like having an array containing pointers to 1st 
linked list elements to speed lookups up), which would be a bit slower 
on average perhaps, but it would behave better re deletion?


This is a data structure issue, not a language issue.  The tradeoffs for 
practical implementation include code-length, code-complexity, 
code-fragility, and ease of cross-platform compilation as well as 
classical time and space issues.


tjr

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


Re: Python Written in C?

2008-07-21 Thread DaveM
On Mon, 21 Jul 2008 03:18:01 +0200, Michiel Overtoom [EMAIL PROTECTED]
wrote:


Many major text/word processing programs (Emacs, vi, MS-Word) are also
written in C.

I thought Emacs was written in Lisp.

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


Re: Python Written in C?

2008-07-21 Thread Mensanator
On Jul 21, 8:26 am, Johannes Bauer [EMAIL PROTECTED] wrote:
 Mensanator schrieb:

  You want cool?
  THIS is cool:

  j = ((invert(xyz[1]-xyz[0],xyz[1]**(k-1))*(xyz[1]**(k-1)-prev_gen[2]))
  % xyz[1]**(k-1))/xyz[1]**(k-2)

 You call it cool, I call it NameError: name 'invert' is not defined.

It is when you do: from gmpy import *

That single line wasn't the whole program.

What's cool is that it IS a single line, that does answers
with 5 decimal digits without breaking a sweat. Sure, you
can use GMP with C (and I've done it). But it's nothing like
doing it in Python.


 Regards,
 Johannes

 --
 Wer etwas kritisiert muss es noch lange nicht selber besser können. Es
 reicht zu wissen, daß andere es besser können und andere es auch
 besser machen um einen Vergleich zu bringen.     -     Wolfgang Gerber
        in de.sci.electronics [EMAIL PROTECTED]

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


Re: Python Written in C?

2008-07-21 Thread Teiresias
[EMAIL PROTECTED] writes:

 I'm just learning about Python now and it sounds interesting. But I
 just read (on the Wiki page) that mainstream Python was written in C.
 That's what I was searching for: Python was written in what other
 language?

Well, yes, the interpreter and a handful of the core modules are written in C.
However, most of Python -- especially the cool bits -- aren't written in
C.  They're written in ... Python!

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


Re: Python Written in C?

2008-07-21 Thread Tom Machinski
On Mon, Jul 21, 2008 at 3:53 PM, DaveM [EMAIL PROTECTED] wrote:

 On Mon, 21 Jul 2008 03:18:01 +0200, Michiel Overtoom [EMAIL PROTECTED]
 wrote:


 Many major text/word processing programs (Emacs, vi, MS-Word) are also
 written in C.

 I thought Emacs was written in Lisp.


Large parts of Emacs are indeed implemented in Emacs Lisp. There's are some
core functions implemented in C.

MS-Word, afaik, had very substantial parts written in Visual Basic.

Tom


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

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

Re: Python Written in C?

2008-07-21 Thread giveitawhril2008
On Jul 20, 9:18 pm, Michiel Overtoom [EMAIL PROTECTED] wrote:
.

 Many major text/word processing programs (Emacs, vi, MS-Word) are also
 written in C. Does that mean you should do all your text processing in C?

Well, actually, as a COBOL geezer I should not complain about Python.
Rumor had it that the COMPUTE statement in COBOL invoked FORTRAN
arithmetic modules. Yes, real programmers DO write in FORTRAN!

Frankly, I say screw not only object-oriented programming but
structured programming as well. I think someone should write a
compiler, Revenge of BASIC. It would have good old REMs,
FOR...TO...NEXTs, GOSUBS, GOTOs, etc. Standard libraries of
subroutines, and/or Copy Libraries of source code, could handle
switching to new screens or forms, placement of objects, alteration of
characteristics of all these, detection of mouse and keyboard actions,
graphics, sound, placement of HTML code, EVERYTHING!

If anyone wants to write this compiler, they should probably do it in
Python. Make it open source, of course. I'm waiting!
--
http://mail.python.org/mailman/listinfo/python-list


RE: Python Written in C?

2008-07-21 Thread Delaney, Timothy (Tim)
Fredrik Lundh wrote:

 rynt wrote:
 
 You're either ---
 A.  A Troll
 B.  A young, immature programmer trying to show off or
 C.  A total idiot.
 
 you forgot the All of the above choice.

I read it as an inclusive or.

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


Re: Python Written in C?

2008-07-21 Thread Craig Allen
it's clear to me that the perfect language should exist a priori,
coming to being causa sui. Having to actually implement a language is
disgusting and unnatural.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-21 Thread bojannastic at googlemail
On Jul 20, 6:50 pm, [EMAIL PROTECTED] wrote:
 So I was suspecting the Python compiler or interpreter is written in a
 REAL language like C#. So, Wiki says it's written in C! It's almost as
 if it were an intentional trick...write your own, new language in an
 OLD, real world language that is passe. Compile it into executable
 modules of course, so it is a real, working compiler, alright. But the
 SOURCE is some old, high level language which no one wants to use
 anymore! So now you've got a hot new language package and no one can
 say well, it is written in, the SOURCE code is written in, a REAL
 language. No, it's not! The source is some outdated language and
 compiler and no one is going to prefer learning THAT to learning your
 hot new language!

Young people these days...

I will just answer using one of old Microsoft's ads: My compiler
compiled yours.


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


Re: Python Written in C?

2008-07-21 Thread Larry Bates

[EMAIL PROTECTED] wrote:

I'm just learning about Python now and it sounds interesting. But I
just read (on the Wiki page) that mainstream Python was written in C.
That's what I was searching for: Python was written in what other
language?

See, my concern was something like: OK, if Python is so hot, then,
hopefully someone is writing it in assembly language for each MPU chip
out there. Otherwise, if, say, they've written it in C#, then it looks
like the REAL, generally useful language to learn is C# and Python is
akin to Visual Basic or something: a specialty languagewhereas
REAL WORLD programmers who want to be generally useful go and learn
C#.

So I was suspecting the Python compiler or interpreter is written in a
REAL language like C#. So, Wiki says it's written in C! It's almost as
if it were an intentional trick...write your own, new language in an
OLD, real world language that is passe. Compile it into executable
modules of course, so it is a real, working compiler, alright. But the
SOURCE is some old, high level language which no one wants to use
anymore! So now you've got a hot new language package and no one can
say well, it is written in, the SOURCE code is written in, a REAL
language. No, it's not! The source is some outdated language and
compiler and no one is going to prefer learning THAT to learning your
hot new language!

I'm not dissing Python, here. Just noting that, if it is written in C,
that throws a curve at me in trying to balance the value of learning
Python vs. some other major language.


SPSS (was and may still be) written in Fortran and the Fortran compiler was 
written in C.  But NOBODY would suggest that you try to solve the problems that 
SPSS is used for in C.


You talk about writing it in assembly language for each MPU chip.  Actually it 
is even better than that.  We now have these modern inventions, called compilers 
that do that type of work for us.  They translate high level instructions, not 
into assembler but into machine language.


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


Python Written in C?

2008-07-20 Thread giveitawhril2008
I'm just learning about Python now and it sounds interesting. But I
just read (on the Wiki page) that mainstream Python was written in C.
That's what I was searching for: Python was written in what other
language?

See, my concern was something like: OK, if Python is so hot, then,
hopefully someone is writing it in assembly language for each MPU chip
out there. Otherwise, if, say, they've written it in C#, then it looks
like the REAL, generally useful language to learn is C# and Python is
akin to Visual Basic or something: a specialty languagewhereas
REAL WORLD programmers who want to be generally useful go and learn
C#.

So I was suspecting the Python compiler or interpreter is written in a
REAL language like C#. So, Wiki says it's written in C! It's almost as
if it were an intentional trick...write your own, new language in an
OLD, real world language that is passe. Compile it into executable
modules of course, so it is a real, working compiler, alright. But the
SOURCE is some old, high level language which no one wants to use
anymore! So now you've got a hot new language package and no one can
say well, it is written in, the SOURCE code is written in, a REAL
language. No, it's not! The source is some outdated language and
compiler and no one is going to prefer learning THAT to learning your
hot new language!

I'm not dissing Python, here. Just noting that, if it is written in C,
that throws a curve at me in trying to balance the value of learning
Python vs. some other major language.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-20 Thread alex23
On Jul 21, 8:50 am, [EMAIL PROTECTED] wrote:
 I'm not dissing Python, here. Just noting that, if it is written in C,
 that throws a curve at me in trying to balance the value of learning
 Python vs. some other major language.

The advantage of Python over C - to me - is in the higher order
abstractions it provides, not in pointless discussions of purity. Even
better, Python allows me to -mix- both C  Python together, to take
advantage of the strengths of each as appropriate.

Try writing something of complexity in Python. Then write the same
thing in C. -Then- make your decision which you prefer.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-20 Thread Mensanator
On Jul 20, 5:50�pm, [EMAIL PROTECTED] wrote:
 I'm just learning about Python now and it sounds interesting. But I
 just read (on the Wiki page) that mainstream Python was written in C.
 That's what I was searching for: Python was written in what other
 language?

 See, my concern was something like: OK, if Python is so hot, then,
 hopefully someone is writing it in assembly language for each MPU chip
 out there. Otherwise, if, say, they've written it in C#, then it looks
 like the REAL, generally useful language to learn is C# and Python is
 akin to Visual Basic or something: a specialty languagewhereas
 REAL WORLD programmers who want to be generally useful go and learn
 C#.

Python is for people who want to program, not REAL WORLD
programmers.


 So I was suspecting the Python compiler or interpreter is written in a
 REAL language like C#. So, Wiki says it's written in C! It's almost as
 if it were an intentional trick...write your own, new language in an
 OLD, real world language that is passe. Compile it into executable
 modules of course, so it is a real, working compiler, alright. But the
 SOURCE is some old, high level language

C isn't a high level language, that's part of its problem.

 which no one wants to use
 anymore! So now you've got a hot new language package and no one can
 say well, it is written in, the SOURCE code is written in, a REAL
 language. No, it's not! The source is some outdated language and
 compiler and no one is going to prefer learning THAT to learning your
 hot new language!

 I'm not dissing Python, here.

Yes, you are.

 Just noting that, if it is written in C,
 that throws a curve at me in trying to balance the value of learning
 Python vs. some other major language.

Then go learn C, nobody's stopping you.

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

Re: Python Written in C?

2008-07-20 Thread Roy Smith
In article 
[EMAIL PROTECTED],
 Mensanator [EMAIL PROTECTED] wrote:

 C isn't a high level language, that's part of its problem.

C is the highest level assembler language I've ever used.  And I've used a 
few.  It really is cool that you can add two 32-bit integers and not have 
to worry about all those carry bits.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-20 Thread John Machin
On Jul 21, 8:50 am, [EMAIL PROTECTED] wrote:
 I'm just learning about Python now and it sounds interesting. But I
 just read (on the Wiki page) that mainstream Python was written in C.
 That's what I was searching for: Python was written in what other
 language?

 See, my concern was something like: OK, if Python is so hot, then,
 hopefully someone is writing it in assembly language for each MPU chip
 out there.

Why do that, when gcc has a code generator for just about every MPU
chip out there?

 Otherwise, if, say, they've written it in C#, then it looks
 like the REAL, generally useful language to learn is C#

A bit of a non sequitur  and C# is available on how many different
MPU chips?

 and Python is
 akin to Visual Basic

chuckle/

 or something: a specialty language
 whereas
 REAL WORLD programmers who want to be generally useful go and learn
 C#.

?


 So I was suspecting the Python compiler or interpreter is written in a
 REAL language like C#. So, Wiki says it's written in C! It's almost as
 if it were an intentional trick...write your own, new language in an
 OLD, real world language that is passe. Compile it into executable
 modules of course, so it is a real, working compiler, alright. But the
 SOURCE is some old, high level language which no one wants to use
 anymore!

Nobody wants to use C any more?

 So now you've got a hot new language package and no one can
 say well, it is written in, the SOURCE code is written in, a REAL
 language. No, it's not! The source is some outdated language and
 compiler and no one is going to prefer learning THAT to learning your
 hot new language!

 I'm not dissing Python, here. Just noting that, if it is written in C,
 that throws a curve at me in trying to balance the value of learning
 Python vs. some other major language.

It should be sublimely irrelevant to most people learning LanguageX
what language LanguageX is written in.

Some other implementations of Python: PyPy (written in Python), Jython
(written in Java) and IronPython (written in C#).
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-20 Thread Carl Banks
On Jul 20, 6:50 pm, [EMAIL PROTECTED] wrote:
 I'm not dissing Python, here. Just noting that, if it is written in C,
 that throws a curve at me in trying to balance the value of learning
 Python vs. some other major language.

I somehow doubt the Python community will feel much of a loss if you
decide to learn some other language.


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


Re: Python Written in C?

2008-07-20 Thread Teiresias
[EMAIL PROTECTED] writes:

 I'm just learning about Python now and it sounds interesting. But I
 just read (on the Wiki page) that mainstream Python was written in C.
 That's what I was searching for: Python was written in what other
 language?

Well, yes, the interpreter and a handful of the core modules are written in C.
However, most of Python -- especially the cool bits -- aren't written in
C.  They're written in ... Python!

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


Re: Python Written in C?

2008-07-20 Thread Michiel Overtoom
Giveitawhril wrote...

 REAL WORLD programmers who want to be generally useful go 
 and learn C#.

No: Real programmers first eat a quiche and then return to their Pascal
programming.


 But the SOURCE is some old, high level language which no one wants to 
 use anymore! 

C is alive and kicking. Every language has its place.
Plus, there exists implementations of Python written in Python itself;
see PyPy: http://codespeak.net/pypy/dist/pypy/doc/home.html


 Just noting that, if it is written in C, that throws a curve at me 
 in trying to balance the value of learning Python vs. some other 
 major language.

Many major text/word processing programs (Emacs, vi, MS-Word) are also
written in C. Does that mean you should do all your text processing in C?

Greetings,


-- 
The ability of the OSS process to collect and harness
the collective IQ of thousands of individuals across
the Internet is simply amazing. - Vinod Vallopillil
http://www.catb.org/~esr/halloween/halloween4.html

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


Re: Python Written in C?

2008-07-20 Thread Dan Upton
On Sun, Jul 20, 2008 at 9:18 PM, Michiel Overtoom [EMAIL PROTECTED] wrote:
 Giveitawhril wrote...

 REAL WORLD programmers who want to be generally useful go
 and learn C#.

 No: Real programmers first eat a quiche and then return to their Pascal
 programming.

Bah, new-fangled languages like Pascal... Real programmers write Fortran.



 But the SOURCE is some old, high level language which no one wants to
 use anymore!

 C is alive and kicking. Every language has its place.
 Plus, there exists implementations of Python written in Python itself;
 see PyPy: http://codespeak.net/pypy/dist/pypy/doc/home.html


 Just noting that, if it is written in C, that throws a curve at me
 in trying to balance the value of learning Python vs. some other
 major language.

 Many major text/word processing programs (Emacs, vi, MS-Word) are also
 written in C. Does that mean you should do all your text processing in C?


Don't you?

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


Re: Python Written in C?

2008-07-20 Thread Mensanator
On Jul 20, 7:37�pm, Roy Smith [EMAIL PROTECTED] wrote:
 In article
 [EMAIL PROTECTED],

 �Mensanator [EMAIL PROTECTED] wrote:
  C isn't a high level language, that's part of its problem.

 C is the highest level assembler language

Isn't that like bragging about being the smartest
kid on the short bus?

 I've ever used. �And I've used a
 few. �It really is cool that you can add two 32-bit integers and not have
 to worry about all those carry bits.

Carry bits? Who worries about carry bits when you have
unlimited precision arithmetic? You want cool?
THIS is cool:

j = ((invert(xyz[1]-xyz[0],xyz[1]**(k-1))*(xyz[1]**(k-1)-prev_gen[2]))
% xyz[1]**(k-1))/xyz[1]**(k-2)

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

Re: Python Written in C?

2008-07-20 Thread Stephen Johnson

Carry bits? Who worries about carry bits when you have
unlimited precision arithmetic? You want cool?
THIS is cool:

j = ((invert(xyz[1]-xyz[0],xyz[1]**(k-1))*(xyz[1]**(k-1)-prev_gen[2]))
% xyz[1]**(k-1))/xyz[1]**(k-2)


You call that cool. I call it unreadable.

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


Re: Python Written in C?

2008-07-20 Thread Grant Edwards
On 2008-07-21, Dan Upton [EMAIL PROTECTED] wrote:

 REAL WORLD programmers who want to be generally useful go and
 learn C#.

 No: Real programmers first eat a quiche and then return to
 their Pascal programming.

 Bah, new-fangled languages like Pascal... Real programmers
 write Fortran.

Using punch-cards and paper-tape.  Real programmers can edit
their programs with a pointy stick and some home-made
sticky-tape.

-- 
Grant Edwards   grante Yow!  While I'm in
  at   LEVITTOWN I thought I'd
   visi.comlike to see the NUCLEAR
   FAMILY!!
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-20 Thread Casey McGinty
On Sun, Jul 20, 2008 at 5:06 PM, Grant Edwards [EMAIL PROTECTED] wrote:

 On 2008-07-21, Dan Upton [EMAIL PROTECTED] wrote:

 Using punch-cards and paper-tape.  Real programmers can edit
 their programs with a pointy stick and some home-made
 sticky-tape.


Doesn't everyone know that REAL programmers use butterflies.
http://xkcd.com/378/
--
http://mail.python.org/mailman/listinfo/python-list

Re: Python Written in C?

2008-07-20 Thread Mensanator
On Jul 20, 10:05�pm, Stephen Johnson [EMAIL PROTECTED] wrote:
  Carry bits? Who worries about carry bits when you have
  unlimited precision arithmetic? You want cool?
  THIS is cool:

  j = ((invert(xyz[1]-xyz[0],xyz[1]**(k-1))*(xyz[1]**(k-1)-prev_gen[2]))
  % xyz[1]**(k-1))/xyz[1]**(k-2)

 You call that cool. I call it unreadable.

Ok, but not in the sense that something like
Scheme is unreadable as this is nothing but
algebra (albeit complicaed).


 -Steve Johnson

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

Re: Python Written in C?

2008-07-20 Thread Dan Upton
On Sun, Jul 20, 2008 at 11:51 PM, Mensanator [EMAIL PROTECTED] wrote:
 On Jul 20, 10:05�pm, Stephen Johnson [EMAIL PROTECTED] wrote:
  Carry bits? Who worries about carry bits when you have
  unlimited precision arithmetic? You want cool?
  THIS is cool:

  j = ((invert(xyz[1]-xyz[0],xyz[1]**(k-1))*(xyz[1]**(k-1)-prev_gen[2]))
  % xyz[1]**(k-1))/xyz[1]**(k-2)

 You call that cool. I call it unreadable.

 Ok, but not in the sense that something like
 Scheme is unreadable as this is nothing but
 algebra (albeit complicaed).


Scheme doesn't *have* to be unreadable... any more unreadable than any
other language when poorly documented/formatted, anyway.
--
http://mail.python.org/mailman/listinfo/python-list

Re: Python Written in C?

2008-07-20 Thread Michael Torrie
Mensanator wrote:
 On Jul 20, 7:37�pm, Roy Smith [EMAIL PROTECTED] wrote:
 In article
 [EMAIL PROTECTED],

 �Mensanator [EMAIL PROTECTED] wrote:
 C isn't a high level language, that's part of its problem.
 C is the highest level assembler language
 
 Isn't that like bragging about being the smartest
 kid on the short bus?
 
 I've ever used. �And I've used a
 few. �It really is cool that you can add two 32-bit integers and not have
 to worry about all those carry bits.
 
 Carry bits? Who worries about carry bits when you have
 unlimited precision arithmetic? You want cool?

Perhaps you missed the wonderful humor in Roy's post.  It was rather
brilliant.  Sorry you missed it.
--
http://mail.python.org/mailman/listinfo/python-list

Re: Python Written in C?

2008-07-20 Thread Michael Torrie
[EMAIL PROTECTED] wrote:
 I'm not dissing Python, here. Just noting that, if it is written in C,
 that throws a curve at me in trying to balance the value of learning
 Python vs. some other major language.

Definitely one of the most non-sequitor statements I have ever heard.
Actually your entire post doesn't make much sense.  Maybe you are a
brother bot to castropini?  Perhaps a less-trained one, although none of
castropini's posts seem to make sense either.  The AI needs a bit of work.

I am very confused over your incoherent ramblings about C# being some
how more real than C, or Python, or Visual Basic, or any other language.
 I fail to grasp what connection the syntax of a language has to do with
anything being real or not.  You first say you hope someone was writing
optimized assembly for python on the different platforms (I'm not
familiar with the acronym MPU.) and then go on to say it should have
been written with C#.  I'm confused as to what C# has to do with
optimized, platform-specific assembly.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-20 Thread Manuel Vazquez Acosta
I think your mixing things up. Even modern C compiler are mostly written
in some other high level language. See GCC, for instance: it's mostly
written in C.

Many languages are made for build other major systems:
* C was made in order to ease the build of Unix
* Ada was made in order to ease the build of Air Traffic Control Systems.
* and so on...

On the other hand, Python's language features are, in a way, orthogonal
to those of the underlying language in which Python *may* be implemented
(take a look at PyPy: http://en.wikipedia.org/wiki/PyPy).

I mean, I really don't care how Python mappings are implemented in C.
What I care about is that I think in terms of (key, value) mappings,
regardless of how lookups, insertions, deletions, and so are made
internally. In C, I would have to resort to implement a hash table or so.

Let's summarize: Python is a *new* language. C was the option to make it
happen, there are others.

Manuel.


[EMAIL PROTECTED] wrote:
 I'm just learning about Python now and it sounds interesting. But I
 just read (on the Wiki page) that mainstream Python was written in C.
 That's what I was searching for: Python was written in what other
 language?

 See, my concern was something like: OK, if Python is so hot, then,
 hopefully someone is writing it in assembly language for each MPU chip
 out there. Otherwise, if, say, they've written it in C#, then it looks
 like the REAL, generally useful language to learn is C# and Python is
 akin to Visual Basic or something: a specialty languagewhereas
 REAL WORLD programmers who want to be generally useful go and learn
 C#.

 So I was suspecting the Python compiler or interpreter is written in a
 REAL language like C#. So, Wiki says it's written in C! It's almost as
 if it were an intentional trick...write your own, new language in an
 OLD, real world language that is passe. Compile it into executable
 modules of course, so it is a real, working compiler, alright. But the
 SOURCE is some old, high level language which no one wants to use
 anymore! So now you've got a hot new language package and no one can
 say well, it is written in, the SOURCE code is written in, a REAL
 language. No, it's not! The source is some outdated language and
 compiler and no one is going to prefer learning THAT to learning your
 hot new language!

 I'm not dissing Python, here. Just noting that, if it is written in C,
 that throws a curve at me in trying to balance the value of learning
 Python vs. some other major language.
 --
 http://mail.python.org/mailman/listinfo/python-list


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


Re: Python Written in C?

2008-07-20 Thread Mensanator
On Jul 20, 11:08 pm, Dan Upton [EMAIL PROTECTED] wrote:
 On Sun, Jul 20, 2008 at 11:51 PM, Mensanator [EMAIL PROTECTED] wrote:
  On Jul 20, 10:05�pm, Stephen Johnson [EMAIL PROTECTED] wrote:
   Carry bits? Who worries about carry bits when you have
   unlimited precision arithmetic? You want cool?
   THIS is cool:

   j = ((invert(xyz[1]-xyz[0],xyz[1]**(k-1))*(xyz[1]**(k-1)-prev_gen[2]))
   % xyz[1]**(k-1))/xyz[1]**(k-2)

  You call that cool. I call it unreadable.

  Ok, but not in the sense that something like
  Scheme is unreadable as this is nothing but
  algebra (albeit complicaed).

 Scheme doesn't *have* to be unreadable... any more unreadable than any
 other language when poorly documented/formatted, anyway.

When I needed to whip up a variation on Ulam's
Spiral recently, I went and got the Scheme version
I wrote 4 years ago when I briefly toyed with Scheme
and thought I'd just translate the plotting part to
Python. Couldn't make any sense of it and ended up
doing the Python version with Turtle Graphics.

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

Re: Python Written in C?

2008-07-20 Thread Tim Roberts
[EMAIL PROTECTED] wrote:

I'm just learning about Python now and it sounds interesting. But I
just read (on the Wiki page) that mainstream Python was written in C.
That's what I was searching for: Python was written in what other
language?

See, my concern was something like: OK, if Python is so hot, then,
hopefully someone is writing it in assembly language for each MPU chip
out there. ...

No one writes compilers in assembly language.  Most people don't even write
assemblers in assembly language.

So I was suspecting the Python compiler or interpreter is written in a
REAL language like C#. So, Wiki says it's written in C! It's almost as
if it were an intentional trick...write your own, new language in an
OLD, real world language that is passe.

You seem to believe that, because YOU are just learning about Python, that
necessarily means that Python itself is new.  That is incorrect.  Python
was originally conceived and developed in 1990.  Anders Hejlsberg, who
designed C#, was still at Borland at that time, and had not even created
Delphi yet.  C++ was still many years away from becoming an ISO standard.

I'm not dissing Python, here. Just noting that, if it is written in C,
that throws a curve at me in trying to balance the value of learning
Python vs. some other major language.

I would say you have a very strange criteria for deciding whether a
language is worth learning.
-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza  Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Written in C?

2008-07-20 Thread Yu-Xi Lim

Grant Edwards wrote:

On 2008-07-21, Dan Upton [EMAIL PROTECTED] wrote:


REAL WORLD programmers who want to be generally useful go and
learn C#.

No: Real programmers first eat a quiche and then return to
their Pascal programming.

Bah, new-fangled languages like Pascal... Real programmers
write Fortran.


Using punch-cards and paper-tape.  Real programmers can edit
their programs with a pointy stick and some home-made
sticky-tape.



Bah. Butterflies! http://xkcd.com/378/
--
http://mail.python.org/mailman/listinfo/python-list