jkn <jkn...@nicorp.f9.co.uk> wrote: > I'm curious what ...behavioural... models you are creating quickly in > Python that then need rewriting in C for speed. SPICE? some other CAD? > Might be interesting to learn more about what and how you are actually > doing.
The convert-to-C cases were complex filtering functions. I do make good use of spice-based tools, but I often find it useful to make a more abstract model, usually before completing the design. This helps with component selection, finalizing the design, and making sure that I understood the what the circuit would do. I started work 1980ish, had an early 6502-based home computer, and my then place of work had some 6502-based Pet computers, so I gained the ability to quickly write BASIC programs as an engineering aid. Later, when BASIC dropped into obscurity, I switched to C and C++, although I always found that cumbersome compared to the old BASIC. Later still, when I found that my Google queries for code examples started returning more Python than C, I tried that -- and discovered that Python was like BASIC, only better. But that's just me. Other hardware engineers use a variety of modeling applications. Or don't need to because they're just that clever? Or they give the modeling work to system engineers who will use whatever apps that system engineers use, and will return a result a few weeks later. Personally, I've tended to get used to writing code in just one general-purpose language, and it seems to me that I get a useful result relatively quickly. > How about running your front end (simulation) work in PyPy, and the > backend display work on CPython, if there are some missing features in > PyPy that you need. This may be more or less easy depending on your > requirements and any intermediate format you have. Maybe I should look at that again. In the case of the filter models, their usefulness had grown to the point that requiring support by other people was a possibility, so converting them to C seemed better than writing something that bridged between two language implementations. > Or you could offer to assist in the PyPy porting? Or express an interest > in specific libraries being ported? I'm a hardware engineer not a software engineer, so I have to plead lack of ability there. I do appreciate the work that's done on Python, and have to be grateful for what is available, since I'm not paying for it. -- https://mail.python.org/mailman/listinfo/python-list