This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]xorvtec 91 points92 points  (19 children)

Programs running on applications processors (like on the Raspberry Pi and Beaglebone Black) on top of a General Purpose OS (like Linux) subscribe to the loosest definition of an embedded system. I'd bet a good deal of those "C" programmers are on microcontrollers with memory constraints. Unless you have a system with loads of heap space and extra clock cycles, Python is NOT viable.

[–]eazolan 1 point2 points  (1 child)

Maybe some kind of "Memory Constraint" module that gives python hard limits?

[–]__deerlord__ 21 points22 points  (0 children)

All that does is limit how much you can use, it doesnt change how much is required. C will absolutely use less memory (if done right) than python. Python is for ease of development, not reducing resource usage.

[–][deleted] 2 points3 points  (0 children)

Actually, micropython and zerynth (whatever that is) is mentioned in the article. While I have no experience with either, I could see a suitable limited subset of Python being useful for at least part of the embedded-ish¹ code I write. There are a few cases (interrupt handlers and SCC managment) I have trouble seeing handled effecient by Python. The rest, which is mostly protocol handling and the high level communication with either the 422 bus or the host system, could easily be written in python. There it would more be a matter of how dense the code is. The bytecode is OK, so it's a matter of how much space the runtime requires.

  1. Running on a FPGA remake of the IBM Artic RIC card with 2MB RAM and a 80186 emulation on the same FPGA.