View Single Post
  #4   Spotlight this post!  
Unread 01-01-2008, 19:33
hdanak hdanak is offline
Registered User
FRC #2584 (Reseda Regents Robotics)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: California
Posts: 13
hdanak is an unknown quantity at this point
Re: Programming in Python and Explaination of Programming

not meant as a reply, just some thoughts:

It interesting to see what real speed advantage the coprocessor would give. Python is generally 16x slower than native, so it would seem that (if true) the Python code would run more slowly on a 400 mhz computer than native c on the 40 mhz (i think) PIC mcu. But it might be worthwhile just using C on the coprocessor, which may or may not be against the purpose of a coprocessor. I think python would be worthwhile for extra control speed (using heavily optimized code, or more likely, native imported code), ease of development (the mcc18 C is not exactly ANSI C, so it would be generally easier to use a higher layer of abstraction instead of dodging all the pitfalls and differences; though it may take some work to setup), and portability of code (we could use a straight cvs/svn/bazaar rep to manage the code which is generally more modular and clean-cut than the C code). Other than that, its way easier to get new programmers in the team learn python than C (well, depends on how thoroughly they think of a problem; if they could live in abstraction, python is easy); it would generally take a day or two to pickup the python syntax (after the general compsci aspect is explained) vs a week for C (which would also require a thorough knowledge of the PIC18 mcu before any programming). Of course, this is after its all setup. And lastly, python is new and cool and stuff, along with linux(not so new, but still cool and stuff).

So those were our reason for trying the python/coprocessor technique.

Last edited by hdanak : 01-01-2008 at 21:09.