3 ms·
I understand what value MicroPython holds for Python community who want to get into embedded computing. But aren't these contradictory - >but it is time to di
by Abishek_Muthian 6y ago
I understand what value MicroPython holds for Python community who want to get into embedded computing.
But aren't these contradictory -
>but it is time to ditch C/C++ for MicroPython.
>Therefore, it is critical to put performance demanding code in C/C++ modules and compile a MicroPython bindings
I understand that these are underlying issues of Python itself and I've been burned before because of it. Had a massive python project in my previous startup, it became very clear soon enough when the user base grew that only way to extract meaningful performance(and to bring down server costs) was to replace core components with C-extensions(e.g. Concurrency, Networking). Although we were able to do it, it is a huge overhead for a small startup and capital intensive.
If I have to recommend Python to someone who is new to programming, I have to add a disclaimer that "If you want to build something which demands serious performance with it, you'll also have to learn C/C++"
All those can be avoided, if we could just take up a language which was specifically built to fix the underlying issues with Python i.e. If it's the utility we want, then Go.
As far as embedded is concerned, TinyGo does what MicroPython does. But I've found solace with Gobot via Firmata, although it demands Client-Server architecture the utility of not having to flash the Microcontroller each time we make a change is worth it, besides having all the libraries we have in the Go ecosystem at our disposal. I would recommend this for home projects where Client-Server arch is not an issue, I recently built a 'Butt Triggered Pomodoro Timer' with it[1].
[1]https://abishekmuthian.com/butt-pomodoro-a-butt-triggered-pomodoro-timer/ https://abishekmuthian.com/butt-pomodoro-a-butt-triggered-po...
- mch82 6y agoI wonder how many projects really need the performance? Most projects are integrating parts into a whole. While expert programmers might be needed to create the parts & package them as libraries, how often is the same true of larger assemblies of parts that solve a domain problem? Blueprints in Unreal Engine are an interesting case study. Programmers create components in C++ and expose APIs for them. Level designers use Blueprints to integrate & orchestrate those components into levels, without the same need for programming expertise.
- Abishek_Muthian 6y ago>I wonder how many projects really need the performance? Anything scalable can make use of performance improvements, so that means production applications with hundreds and thousands of concurrent users is a right example in my experience. Apart from better usability, performance enhancements results directly in greater capital-efficiency(server costs).
- neilpanchal 6y agoThanks for the insight, in your experience how has the performance been?
- Abishek_Muthian 6y agoWith Go? It's magnitude faster than python and it's concurrency might be paralleled maybe only by elixir although I wonder whether the later would match Go's utility based programming paradigm which results in faster roll-outs. My subjective opinion is, the only place I wouldn't consider using Go is when it's garbage collection could hypothetically be harmful(literally) i.e. Say I'm coding a system for a ventilator, I will either go with traditional/proven language for that environment like C or a newer, safer alternative like Rust.
- SV_BubbleTime 6y agoWhat are you finding the Go environment takes for resources on your micro before your actual code?