compiling to python byte codes

Maurice LING mauriceling at acm.org
Sun Sep 5 19:20:59 EDT 2004


> 
> In your situation, I can promise you that it is *faster* to take the time
> to learn about this stuff correctly then to try to power through it
> without learning; it is one of those places in computer technology
> where there are such powerful tools to help you that it is better to
> learn how to use them then to kludge through. Unfortunately, it is too
> large a topic to cover in a Usenet posting. 

I realised that there are powerful tools such as lex and yacc around 
that can save me a lot of time. I'll be using PLY for my purpose.

> 
> If your institution offers a compilers class (a sadly diminishing number),
> try to take or audit that. (You most likely don't want a *compiler*, but
> an *interpreter*; the course will explain the difference. An interpreter
> typically uses much the same technology to implement, parsers and abstract
> syntax trees and such, but is usually much easier to implement.)  (I think
> you hinted this was thesis project, hence this suggestion. Failing that,
> you may need a compilers book and some self-study time. Again, I promise
> you this is faster almost immediately than trying to power through this
> without it.)

I can only have the self-study options and good books on compiler 
construction are rare. I am a molecular biologist by professional 
training. There are things that are tough for me to understand and to 
just find the answer about stacks vs register computers will take ages, 
and I always appreciate people who do not treat me as an idiot. I'm sure 
there are much more idiotic questions being asked in newsgroups.

> 
> Stepping up a level, are you sure you can't just implement a C or Python
> library and let people write their own programs in Python? You'll never be
> able to match Python-the-language's feature set. 

What I'm doing is a special-purpose language (for modelling purposes).



More information about the Python-list mailing list