
MicroPython, a few years on - feederico
https://www.kickstarter.com/projects/214379695/micro-python-python-for-microcontrollers/posts/1502594
======
kelvin0
" _The biggest news is that I am now working on MicroPython full time! I
finished my research in theoretical physics..._ "

What is it with physicists and programming? I know at least 3 people who
started having physics degrees, but left it completely for programming. Mind
you they are all excellent coders and sharps as hell... but this is not an
uncommon profile it seems.

~~~
Walkman
IIRC the ipython developers are also physicists.

~~~
agumonkey
Jupyter was used by the LIGO team, are these the same ?

~~~
dinedal
Jupyter is IPython notebook, they just rebranded it. It's the same software.

~~~
agumonkey
I meant the teams.

------
SeanDav
I mean absolutely no disrespect and wish everyone well in this project, but
other than a fun hobby or even more fun career for the author, what is the use
case for MicroPython? Surely at the microcontroller level, C is perfectly
adequate and already in place, everywhere?

~~~
ufo
My question is "why not Lua"? I can see why someone would like to program on a
higher level scripting language instead of C and Lua is very much designed
from the start to be lean, fast and embeddable. It also inter-operates very
easily with C.

~~~
pfalcon
Because some people disagree that Lua is nice language. Lean-ness is
questionable, e.g. BrainFuck is much more "lean", so what? MicroPython can be
built to the same binary sizes as a typical Lua build, and yet offer more
language features. Lua's embedability has stronghold in games, that's where it
usually embedded. Embedded hardware systems are a little different beasts. For
them, it's helpful to differentiate e.g. integer from float number (Lua's
numbers are floats, it took Lua a long way to acquire a standard module to do
bitwise operations, which some people consider just an ugly hack). Also,
helpful to differentiate arrays with guaranteed O(1) access from dictionaries
(Lua has some mutant container type about whose behavior you can never be
sure).

~~~
ufo
Lua 5.3 released recently and has integers and bitwise operators. Array access
is also O(1) as long as you use integer keys and don't have any "holes" in the
array.

~~~
pfalcon
That's what I mean - recently. With more than 20-year Lua history, finally
recently adding bitwise operations to the core language is move welcomed by
Lua community. No talking about the fact that Lua authors still can't find
right pattern for modules, so in 5.3 they smashed how it was in 5.2 and few
previous versions (and that's not the 1st time IIRC), and welcomed community
to redo their homework on that part. That only emphasizing the fact that Lua
is intended for adhoc embedding, like, you put it in your game, wrap your
game's objects. Anything else - well, depends. Changes in 5.3 is a reason why
a lot of community is on 5.2. (Well, to be fair, there's Python2/Python3 split
too, MicroPython is Py3.)

> Array access is also O(1) as long as you use integer keys and don't have any
> "holes" in the array.

Right, if you don't have "holes", if you start array indexing from arbitrary
number (it would be cool to start indexing from e.g. Pi btw, too bad Lua isn't
orthodox enough to do that ;-) ), then it's O(1). Otherwise, it's phase of
moon dependent (pun intended).

------
pfalcon
FYI, there was an update on currently running MicroPython ESP8266 kickstarter
about reverse engineering and open-source aspects of ESP8266 chip. Some people
say it's good. I tried to post it on HN, but it didn't catch momentum:
[https://news.ycombinator.com/item?id=11174534](https://news.ycombinator.com/item?id=11174534)
. Maybe readers of this thread find it interesting though.

------
supergreg
Can micropython be used to make Android apps?

~~~
dbcurtis
first, lets be clear about Micropython, the software versus PyBoard, the
reference hardware. Micropython on a Pyboard is runnunig on bare metal with no
OS. Micropython is very portable, and builds nicely on Linux, yielding a nice
small-footprint Python. I am not aware of a build for Android, but it seems
like it should be straightforward. Everything about Micropython is tuned for
low memory footprint, so it might be a great tool for Android aps.

~~~
unwind
But Android is based on Linux, i.e. it wouldn't allow MicroPython to run
directly on the bare metal.

So that would seem to make actual Python a better candidate for Android
porting. I found [http://qpython.com/](http://qpython.com/) which seems
interesting, but the site didn't look finished.

~~~
inclemnet
Python indeed runs fine on Android once you can get it to compile (the
interpreter needs to be patched to compile with bionic, or can be compiled
without patches using the CrystaX NDK). The Kivy graphical framework has the
associated python-for-android project [1] taking care of doing this plus
including other components like Python modules (including complex ones like
numpy) and can compile with different kinds of backend (not just Kivy). There
are also other projects running Python on Android in different ways.

[1] [https://github.com/kivy/python-for-
android](https://github.com/kivy/python-for-android)

