Python Written in C?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tim Roberts

    #16
    Re: Python Written in C?

    giveitawhril200 8@gmail.com 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, timr@probo.com
    Providenza & Boekelheide, Inc.

    Comment

    • Krishnakant Mane

      #17
      Re: Python Written in C?

      On 21/07/2008, giveitawhril200 8@gmail.com <giveitawhril20 08@gmail.comwro te:
      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 language....whe reas
      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?"pytho n 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.

      Comment

      • Fredrik Lundh

        #18
        Re: Python Written in C?

        Michael Torrie 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>

        Comment

        • Iain King

          #19
          Re: Python Written in C?

          On Jul 21, 6:58 am, "Krishnakan t Mane" <hackin...@gmai l.comwrote:
          >
          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:



          Iain

          Comment

          • ptn

            #20
            Re: Python Written in C?

            On Jul 20, 5:50 pm, giveitawhril2.. .@gmail.com 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 language....whe reas
            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? Mmmmm 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.

            Comment

            • Martin P. Hellwig

              #21
              Re: Python Written in C?

              Bruno Desthuilliers wrote:
              giveitawhril200 8@gmail.com 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

              Comment

              • rynt

                #22
                Re: Python Written in C?

                On Jul 20, 3:50 pm, giveitawhril2.. .@gmail.com 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 language....whe reas
                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

                Comment

                • Fredrik Lundh

                  #23
                  Re: Python Written in C?

                  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.

                  Comment

                  • Matthew Fitzgibbons

                    #24
                    Re: Python Written in C?

                    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

                    Comment

                    • Marcus.CM

                      #25
                      Re: Python Written in C?

                      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 "programmme r" 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.





                      Comment

                      • mk

                        #26
                        Re: Python Written in C?

                        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?


                        Comment

                        • Matthew Woodcraft

                          #27
                          Re: Python Written in C?

                          Roy Smith <roy@panix.comw rote:
                          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.
                          I was ever so pleased when I found out that the LLVM people have
                          learned this lesson from C.

                          I look forward to the day when we can have similar treatment for all
                          forms of error checking. Programming will be so much easier.

                          -M-

                          Comment

                          • David C. Ullrich

                            #28
                            Re: Python Written in C?

                            In article <cqKdnc3xC9qQVR 7VnZ2dnUVZ_hjin Z2d@speakeasy.n et>,
                            Erik Max Francis <max@alcyone.co mwrote:
                            giveitawhril200 8@gmail.com 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 language....whe reas
                            REAL WORLD programmers who want to be generally useful go and learn
                            C#.
                            >
                            Psst. What language do you think the primary implementations of C# is
                            written in?
                            I know, I know, call on me!

                            Object Pascal, obviously.

                            --
                            David C. Ullrich

                            Comment

                            • Marc 'BlackJack' Rintsch

                              #29
                              Re: Python Written in C?

                              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

                              Comment

                              • Dan Upton

                                #30
                                Re: Python Written in C?

                                On Mon, Jul 21, 2008 at 1:21 PM, Marc 'BlackJack' Rintsch
                                <bj_666@gmx.net 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(){cout<<" hello world"<<endl;re turn 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.

                                Comment

                                Working...