News for hackers. Stuff that matters.
Re:Micro Python – a lean and efficient implementation of Pyt... by ethanpil on Tuesday June 03, 2014 @12:19PM (#7841097)
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.

Re:Micro Python – a lean and efficient implementation of Pyt... by plorkyeran on Tuesday June 03, 2014 @12:38PM (#7841216)
It'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.
Re:Micro Python – a lean and efficient implementation of Pyt... by carbon12 on Tuesday June 03, 2014 @02:54PM (#7842075)
Actually, 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.

Re:Micro Python – a lean and efficient implementation of Pyt... by nly on Tuesday June 03, 2014 @08:00PM (#7843388)

    $ 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.
Re:Micro Python – a lean and efficient implementation of Pyt... by trynumber9 on Tuesday June 03, 2014 @03:12PM (#7842166)
And then there is LuaJIT. As fast as V8, smaller than Micro Python, with a dead simple FFI.
Re:Micro Python – a lean and efficient implementation of Pyt... by freehunter on Tuesday June 03, 2014 @04:05PM (#7842403)
God I wish we had Lua instead of Javascript in the browser.
Re:Micro Python – a lean and efficient implementation of Pyt... by kzrdude on Tuesday June 03, 2014 @05:31PM (#7842859)
and in the desktop.