Live data from Hacker News

MicroPython, a few years on

kickstarter.com

21–30 of 32 posts

Re: MicroPython, a few years on

#21
post #11

" 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.

[deleted]

Re: MicroPython, a few years on

#23

Can micropython be used to make Android apps?

I started Android port: http://forum.micropython.org/viewtopic.php?f=15&t=898 . It's primary goal not to make normal Android apps (.apk's), but to access Android APIs from command line (like adb). Here's quick example what it can do: https://github.com/pfalcon/micropython-projs/tree/master/and... . I also have an OpenGLES example someone which turns out I missed to push. Of course, I though about making "normal" apps too, but that would be a long way and bunch of effort.

With ESP8266 port kickstarter, Android port is put on hold.

Re: MicroPython, a few years on

#24

Earlier quoted context omitted.

You'd be better off trying to to use Jython (which compiles Python to JVM bytecode) because that would give you interop with Android's Java libraries.

I'm not aware of anyone having succeeded with Jython - I think there are technical issues but I'm not sure what's the nature of the problem. One option for interacting with java from python is to use tools like pyjnius ( http://pyjnius.readthedocs.org/en/latest/ ) - this is what e.g. Kivy does to get system information like screen metrics.

MicroPython Android support mentioned above is exactly inspired by pyjnius. My initial interest for uPy Android is to just hack on Android, not produce walled-garden (APK) apps. But I intended to post about this effort on Kivy list to see if someone might be interested. The idea might be to have something small, like https://love2d.org/ , but in Python. Note that I myself not really interested in cloning love2d, but if some readers of these comments would find idea interesting and could spread the word to Kivy circles, that would be appreciated (you never know what may come up if wide community gets involved - that's the beauty of Open Source).

Re: MicroPython, a few years on

#25
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 . Maybe readers of this thread find it interesting though.

Re: MicroPython, a few years on

#26
post #20
post #16

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?

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.

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).

Re: MicroPython, a few years on

#27
post #20
post #16

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?

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.

Look up the Barracuda Application Server. It's commercial but has Lua for dynamic stuff. Runs on reliable microkernels, too. One worth cloning with FOSS.

Re: MicroPython, a few years on

#29
post #20

Earlier quoted context omitted.

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.

Look up the Barracuda Application Server. It's commercial but has Lua for dynamic stuff. Runs on reliable microkernels, too. One worth cloning with FOSS.

Lua is on the market for much longer time, and of course it's used in many products. It's my personal belief though that in many places Lua is used, it's used for the lack of alternative. And one of my motives for working on MicroPython is to provide such better alternative. It's the same liberal license, but has that "batteries included" stroke (mind that for MicroPython, there're "coin-sized" batteries included ;-) ), i.e. out of the box it comes with many features with nice standard API, which for Lua must be provided separately (invented and reinvented?). The key of this effort is of course sustainability, and we're making plans how to be around for a long time ;-).

All in all, we're on the same playing field, and welcome independent reviews of MicroPython vs Lua.

Re: MicroPython, a few years on

#30
post #26
post #20

Earlier quoted context omitted.

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.

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.…

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.
Post reply on HN