5 ms·
WOW!! I see this as a serious competitor to Lua. I think lua because so popular because of its small footprint and easy embedability... Perhaps this is the fir
by ethanpil 12y ago
WOW!! I see this as a serious competitor to Lua. I think lua because so popular because of its small footprint and easy embedability... Perhaps this is the first step to a Python revolution...
I expect to see a lot of interesting devices and software embedding Micro Python.
- plorkyeran 12y agoIt's still well over an order of magnitude bigger than Lua. MicroPython is ~200k non-blank-non-comment lines of code (as reported by cloc), while Lua 5.1 is 12k.
- carbon12 12y agoActually, most of that SLOC is in the stmhal/ port, of which ~100k is the ST library. The true count comes from the py/ directory, for which cloc gives only 25k. And there are a lot of extra bits there, eg the inline assembler, the Thumb and X64 assembler helpers, etc. EDIT: without the additional assemblers, cloc gives 22k. Remember that Python has ints, floats, complex and bignum, and these are all included in Micro Python. So that 22k SLOC includes complex arithmetic and a 1k bignum implementation.
- nly 12y ago$ size /usr/bin/micropython text data bss dec hex filename 272356 1336 1216 274908 431dc /usr/bin/micropython $ size /usr/lib/liblua.so.5.2.3 text data bss dec hex filename 195101 6408 8 201517 3132d /usr/lib/liblua.so.5.2.3 I think it would really interesting for µPy to be opened up to run as a hosted runtime.
- trynumber9 12y agoAnd then there is LuaJIT. As fast as V8, smaller than Micro Python, with a dead simple FFI.
- freehunter 12y agoGod I wish we had Lua instead of Javascript in the browser.
- kzrdude 12y agoand in the desktop.