5 ms·
The ability to use Python (instead of C, C++, or some flavor of assembly) on small chips and microcontrollers.
by coderdude 16y ago
The ability to use Python (instead of C, C++, or some flavor of assembly) on small chips and microcontrollers.
- xkenneth86 16y agoYeah! It's really awesome.
- jey 16y agoThat doesn't really answer the question. Why would one want to do that, and why's that worth the trouble? "What's the motivation to make a chip that runs Python?" "To be able to run Python on a chip."
- rbanffy 16y agoA computer nerd is a person who uses a computer in order to use a computer. It's easier to do complicated things in a language like python than with C++. And it will never let you dereference a null pointer.
- coderdude 16y agoWrite once/run anywhere would be a motivation. By the looks of it you wouldn't be able to literally run just any script on the chips that you bring over from a desktop machine, but the amount of tweaking would be minimal I think. Being able to use Python's standard library on a chip would be useful. It's a dynamic language so you can do things you couldn't do with C. It's type-safe and easy as all hell to use. The usual motivations for using Python apply here. It just uses more resources and is understandably slower to execute.
- viraptor 16y agoSome objections: Write once/run anywhere would be a motivation. - "Run anywhere" is not true for most desktop programs and definitely not true for embedded stuff. When you're at 64k, you usually don't even reuse stuff like display handling, because your PCB layout is different enough that you'd have to rewrite the i/o layer anyways. Or because you a specific way to get the data. Or... I can't imagine much reasonable code reuse outside of standardised platforms like Arduino. Much less any "run anywhere" programs. It's a dynamic language so you can do things you couldn't do with C - There's nothing in language X, that you cannot do in C. Since it seems to be a google project, I guess they're just trying to create something that can be pushed onto Android, much like their own Java VM.
- dfox 16y agoRunning python VM on these platforms is certainly better than running there VM for some flavor of BASIC as is often done. Primary motivation for both is probably same as for dynamic languages on normal computers: easier programming.
- kwantam 16y agoI'm not trying to pick a fight here, nor am I claiming you're wrong as such, but I think you have to actually justify the claim that programming a microcontroller in Python is "certainly better" than doing so in BASIC. An overwhelming number of microcontroller applications are extremely simple bits of control code; there's certainly an argument to be made that _not_ carrying around the trappings of a high-level language like Python is better. "Better for x," it would seem, is the only type of argument that will be tenable. So, what's an application for a microcontroller that will actually make use of Python's various advantages over BASIC?
- gte910h 16y agoMemory protection, ease of development, fantastic libraries and clarity all come to mind.