C enviroment that can read python occasionally, is micropython what I want?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
microPyforMy
Posts: 7
Joined: Wed Mar 22, 2017 4:09 pm

Re: C enviroment that can read python occasionally, is micropython what I want?

Post by microPyforMy » Fri Mar 24, 2017 5:09 pm

deshipu wrote:You can also take a look at LUA (nodemcu) and JavaScript (espruino) -- they are implemented for similar platforms to those on which MicroPython works, and might fit your use case better. And of course there is always that Forth ;-).
Good ideas! And I appreciate it. But...

NodeMCU is a port of eLua but man, there is just no community for that at all. Seems questionable.

Espruino is a whole environment, can't use it to extend C at all, everything is JS and you can extend that with C sort of.

MicroPython in its smallest form would still be 5 times bigger than any C mcu project I've ever done just for some very light scripting.

And Forth.... Forth is like a more confusing assembly. Part of the problem is I'd be the only person who could write scripts for it. Very limiting and even less support than eLua.

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: C enviroment that can read python occasionally, is micropython what I want?

Post by deshipu » Fri Mar 24, 2017 5:24 pm

You can always write a compiler from a C-like syntax to Forth-like bytecode. That's actually what Python does.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: C enviroment that can read python occasionally, is micropython what I want?

Post by pythoncoder » Mon Mar 27, 2017 6:27 am

Would it be feasible to strip MicroPython down further? MicroPython implements Python 3.4. Presumably it could be reduced if it were reduced to a subset along the lines of a much earlier version. Surely easier than specifying a language and writing a compiler from scratch.

I cut my Python teeth (fangs?) on V1.6; you could do a lot with that version. Documentation and language specs are available for early versions e.g. https://docs.python.org/release/1.6/.
Peter Hinch
Index to my micropython libraries.

Post Reply