rawpython / remi

Python REMote Interface library. Platform independent. In about 100 Kbytes, perfect for your diet.
Apache License 2.0
3.52k stars 404 forks source link

Shameless fork/reimplementation #124

Open pfalcon opened 8 years ago

pfalcon commented 8 years ago

I find remi pretty cool, and definitely more modern/scalable approach than e.g. http://www.gtk-server.org/ . At 100K and no dependencies beyond standard library it's also very attentively and cool written. Unfortunately, not cool enough for https://github.com/micropython/micropython , where 100K of code is unbelievably huge and unlikely fit embedded platforms supported. Even if targeting only unix port, few features currently used by remi are currently missing in micropython/micropython-lib. So, while having contemplated adding missing features on uPy side, things like threading make it too big, complex, and not portable. So, instead I started with an empty file, trying to reimplement features one by one, starting with "look" part (no events/updates so far). The most boring part (for a programmer) with web UI is styling, and so I'm going inherit one from remi. That's why I consider it a fork, even though code is intended to be written from scratch.

So, this is request for feedback (even if it's "Don't do this!" or "You're bastard!"), but mostly self-confession: any time I see similar projects, I want to know why there're some, instead of them working together. The above is my "why".

awesomebytes commented 8 years ago

Uhm, maybe it's me that I'm having problems finding the link, but where is your fork?

pfalcon commented 8 years ago

In a ~/tmp. Again, this an early request for feedback/declaration of intent, maybe I'll receive so compelling arguments that I'll bury it in awe ;-).

nzjrs commented 8 years ago

Oh, in that case, which parts of remi are unsupported by the stdlib?

Some widgets can definately be removed if needed (i.e. IMO the svg widgets should be a submodule), and also you should not include the editor in your LOC estimate.

pfalcon commented 8 years ago

Ok, I developed my hack further so it shows complete Python -> HTML -> WebSocket -> Python -> WebSocket -> HTML interaction, pushed https://github.com/pfalcon/uremi (suggestion on name are also welcome, API isn't going to be compatible with remi).

I tested provided simple_app.py to work in 16K of heap memory with MicroPython.

(The repo above will be rebased, and probably further development will be way off.)

dddomodossola commented 8 years ago

@pfalcon Really good work! Maybe will contribute soon.