4 Replies - 393 Views - Last Post: 16 January 2018 - 01:42 PM

#1 bobsmith76   User is offline

  • D.I.C Head

Reputation: 9
  • View blog
  • Posts: 174
  • Joined: 14-February 17

Did GVR have to write code in binary when he invented Python?

Posted 12 January 2018 - 07:03 PM

I just think writing in binary would be unbelievably difficult. Anyone who writes code in binary has my respect. BTW, if anyone wants to discuss their experiences of writing in binary then that too would be welcomed.
Is This A Good Question/Topic? 0
  • +

Replies To: Did GVR have to write code in binary when he invented Python?

#2 ndc85430   User is offline

  • I think you'll find it's "Dr"
  • member icon

Reputation: 800
  • View blog
  • Posts: 3,263
  • Joined: 13-June 14

Re: Did GVR have to write code in binary when he invented Python?

Posted 13 January 2018 - 05:36 AM

Typically, people don't write in raw binary - at a very low level (i.e. closest to the machine), there's assembly. I'm not sure what your question really is, but the main implementation of Python is written in C (cpython).
Was This Post Helpful? 1
  • +
  • -

#3 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 6164
  • View blog
  • Posts: 21,257
  • Joined: 05-May 12

Re: Did GVR have to write code in binary when he invented Python?

Posted 13 January 2018 - 01:40 PM

Off topic: Steve Gibson, famous for the disk repair tool SpinRite, likes to write code in assembly because he wants to extract every bit of efficiency from a machine that he can.
Was This Post Helpful? 0
  • +
  • -

#4 snoopy11   User is offline

  • Engineering ● Software
  • member icon

Reputation: 1460
  • View blog
  • Posts: 4,726
  • Joined: 20-March 10

Re: Did GVR have to write code in binary when he invented Python?

Posted 16 January 2018 - 12:39 PM

I really think there is little point in writing in Assembly after all in C you can still optimise parts of the code with inline Assembly and efficiency therefore is not compromised in any meaningful way...

Which is not to say don't learn Assembly but rather write in C with some inline Assembly if speed and efficiency is so crucial to you...

IMO.
Was This Post Helpful? 0
  • +
  • -

#5 jon.kiparsky   User is online

  • Beginner
  • member icon


Reputation: 11040
  • View blog
  • Posts: 18,855
  • Joined: 19-March 11

Re: Did GVR have to write code in binary when he invented Python?

Posted 16 January 2018 - 01:42 PM

In general, when you implement a new language you're going to write an interpreter/compiler in some existing high-level language, not in assembly or C. In the case of python, there was the neat trick of writing a bunch of core stuff in C and setting things up so that python had a way to use that C. This trick is also used to make fast computing libraries available for things like numpy and scipy.

Of course, once you have python up and running, it's a high-level language so there's the temptation to write the python interpreter in python, and in fact the "pure python" implementation is a very viable thing now.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1