logoalt Hacker News

esttoday at 4:01 AM2 repliesview on HN

offtopic I am curious anyone tried using micropython to replace CPython o x86 servers?


Replies

matt_trentinitoday at 5:49 AM

Yes, although MicroPython is focused on running on microcontrollers it can be useful if you want to reduce memory consumption, flash space and even startup time on servers.

The challenge is that MicroPython has many fewer standard libraries:

https://github.com/micropython/micropython/wiki/Standard-Lib...

And so many Python libraries targeting CPython won't work out-of-the box and you'll need to modify them or use alternatives that do work on the MicroPython subset.

analog31today at 4:27 AM

I've not used MicroPython, but its fork, CircuitPython. My impression is that it's essentially a Python that doesn't interact with an operating system. Thus if there's a reason for a server to have an OS and interact with it, the regular Python would be preferable.

I also don't know how much of the more advanced optimizations of Python are built into MicroPython. There's always a dilemma between making it performant, and making it micro.