Live data from Hacker News

MicroPython, a few years on

kickstarter.com

11–20 of 32 posts

Re: MicroPython, a few years on

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

Re: MicroPython, a few years on

#12
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.

IIRC the ipython developers are also physicists.

Re: MicroPython, a few years on

#13
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.

Maybe a deeper sense of 'applied' science if you program your experiments ?

Re: MicroPython, a few years on

#14
post #12
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.

IIRC the ipython developers are also physicists.

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

Re: MicroPython, a few years on

#15
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.

As someone who fits the description:

1. A non-negligible amount of physics research involves programming. Analyzing large amounts of data in ways that (hopefully) no one has ever considered before is not something you can easily do by hand anymore.

2. Physicists are taught to see the world as reductionists: complex systems are broken down into smaller, more understandable parts. Hell, most of physics is reducing things to take advantage of symmetries, or approximate interactions as harmonic oscillators (springs), or a small number of other very well understood/studied phenomena. The hard part is making sure your reductionist assumptions and approximations are correct.

3. High-end physics research positions at universities are very few and far between (and are very much a boys club of nepotism with regards to hiring), and even those don't offer the kind of compensation that you see for mid-level software developers in tech companies.

4. After you've learned how to read & interpret publications in physics research, most computer science papers seem tame in comparison.

Incidentally, the reasons I described above are also why many physicists end up being hired by investment banks or hedge funds. Out of all the people from university I still keep in touch with, I think only one of them is doing actual research in physics. The rest are working in tech or at a bank/fund.

Re: MicroPython, a few years on

#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?

Re: MicroPython, a few years on

#17
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?

First, someone might prefer python on a microcontroller for the same reasons one might prefer python on any other system: interactive development, clean string and list handling, no need to explicitly manage memory, familiarity with the language ...

Now that one can buy a 100+ MHz 32b CPU with 256KB RAM and 1MB of FLASH for $5 (and dropping), using assembly or C to make it fit into an 8b PIC with 2KB of RAM to save $3 isn't a worthwhile trade off for many applications.

Re: MicroPython, a few years on

#18
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?

Excellent questions. First, there is the complexity of setting up a cross-development environment for your chosen controller. Take the 8-bit AVR's as found in Arduino. I was using those before Arduino, and frankly didn't see the point of Arduino. But then given my prior experience it was not much of an issue for me to set up a good cross-dev environment and write C to the bare-metal, and pretty soon was sending patches to gdb-avr. But... the magic of Arduino, I see now, was that it created an approachable development environment for AVR's that was friendly to people that didn't come to AVR's ready to patch gdb to their liking.

Now fast-forward to today, when 8-bit controllers are pretty much a thing of the past and ARM Cortex-Mx processors are the way to go. Setting up C/C++ cross-development is a bit more challenging. Writing enough code to get out of reset, get your I/O mux'es set, and actually wiggle an output pin is a lot of work. What Micropython does is turn a USB cable into a development environment that allows you to try things on an ARM a few minutes after your PyBoard arrives in the mail. It also provides a BSD-licensed base of code that works with a well-defined and easy to install build chain so that you can reflash the part with a custom build of your liking. So for the performance-critical parts, you can write a C extension, if it comes to that. But a little bit of in-line assembly (which Micropython supports) might be all you need.

TL;DR: You can avoid a lot of time-consuming heavy lifting and focus your energy on the part that matters to you, accessible through a very powerful language.

I'm admittedly a Micropython partisan. But FWIW I have been doing embedded development off-and-on since the 6502 was the hot new chip (yes, gray beard and all) and to me Micropython is the most interesting development in embedded development since Arduino.

All that said: Is it really a viable way to ship a commercial product? I say yes: 1. The licensing is there. 2. You can easily write C extensions for the performance critical parts. 3. Python should give you time-to-market advantages over C-on-the-bare-metal.

Re: MicroPython, a few years on

#19
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?

Excellent questions. First, there is the complexity of setting up a cross-development environment for your chosen controller. Take the 8-bit AVR's as found in Arduino. I was using those before Arduino, and frankly didn't see the point of Arduino. But then given my prior experience it was not much of an issue for me to set up a good cross-dev environment and write C to the bare-metal, and pretty soon was sending patch…

Excellent summary and some good points made, thanks.

Re: MicroPython, a few years on

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