by geijoenr · 3y ago · 0 comments
Why the constant obsession to apply a technology designed for a specific purpose everywhere else, even when it doesn't make sense?
Not to say that's valid in this instance, but plenty of early VMs were entirely made to improve resource constrained hardware
If you tell me is a toy, and somebody's pet project: fine. Is all about having fun.
But then don't mention "professional" in the project description.
This isn't in competition with C or C++, it's in competition with micropython. Python isn't a great language except in its ubiquity. I'd rather work in what I know, which is TS. This opens up microcontroller development to JavaScript devs of whom there are a lot of us.
Types are really helpful when dealing with unfamiliar APIs. When doing embedded projects, you deal with a lot of APIs. There are the language built ins, any libraries you are using to interface with peripherals. This project opens up microcontroller development in a big way to a LOT of developers.
Is it what you want to use for a commercial embedded device? I can't say. Is that the only standard? Then you should just be using C for everything, I guess. But something like a Raspberry Pi Pico or ESP32 has plenty of resources to run JavaScript while still being able to manage a weather station or automated garden or security camera or pen plotter. There are lots of applications that don't use the full power of the board.
Instead of ctrl+f for "professional" I suggest re-reading it
>professional TypeScript developer experience
It is about experience of sane programming environment, right?
Unless you have a background in C/C++ already, most people can probably get up and running with something like this way, way faster.
const x: boolean | undefined | null = getValue(); const not_x: boolean = !!!y
I added TS type annotation for clarity, although could be inferred if `getValue` is typed accordingly.
By having somebody else do it. Abstraction is a wonderful thing.
Same problem for MicroPython. Same problem for LUA, same problem for any scripting language running on constrained MCU.
For example, it supports ESP32.
Every problem sure starts to look like a ESP32 nail if I have this tool chain available.
For my day job, I use STM32/C++ because it's what the company has standardized on. For my side gig/consulting work, I've pretty much standardized on ESP32 because it's cheap, has lots of resources and good community, and I can leverage the Arduino ecosystem. It's grossly overkill for a lot of projects but no-one cares. Clients just care that you can ship fast.
My next step is moving the side gig work to MicroPython or some other higher-level language that lets me code much faster than C/C++.