A quick recap of my previous weeks:
Beside, during the time at CKO we managed to work close to each other (but also meet in person, which is always nice) and find some ugly issue with Android WebView inability to expose SharedArrayBuffer but also incapable of dealing with current coincident fallback: the synchronous XMLHttpRequest one, based on a dedicated Service Worker.
Because of that, I’ve focused on re-creating (it’s hopefully my last time around this topic) a module/library which only goal is to allow all possible fallbacks for all possible browsers so that such primitive way to exchange data worker to main can be tackled a part:
The primitive seems to work well and deliver, it’s called reflected and it’s based on reflected-ffi which is also what coincident uses and mostly because I didn’t want to reinvent every single wheel.
However, if extreme performance is desirable, I might copy over reflected-ffi encoder functionality (keeping the ffi part in there) because the current approach always uses the same primitives and there’s no need for extra abstraction (or let’s say I don’t care maintaining that extra abstraction, very few people even use or understand this stack anyway) but so far my main focus is in testing all Desktop to Mobile scenarios and be sure we’re covered.
My next step aroind this topic is to rewrite (partially) coincident logic and see if we can have an easy drop-in replacement for the Positron story, or just port back all this effort into the next version of coincident so that users/followers won’t be confused by the too many options out there (they are all extremely similar yet extremely different in extremely tiny details that all matter for various reasons).
… meanwhile …
Damien (core MicroPython maintainer) has delivered pretty much everything I was hoping for or dreaming about in MicroPython:
weakref module now with at least a finalize and a ref function, awesome to signal any interested party that some Python refence is gone and thre’s no need to keep it around anymoreasyncio.Future that would make code more portable across different Python runtimes (C-Python, Pyodide, MicroPython)As soon as Damien published this new version, we did our update and tests and found a couple of bugs/regressions described in here and Damien fixed both in a snap … there’s still some conversation happening so watch that space or feel free to interact if you hae ideas/opinions around those topics (especially what an if empty_list: ... should do in Python when empty_list is a JS array with a length 0).
I’ve been reviewing a couople of issues/docs updates here and there and I thank and welcome @iliketocode2 effort in trying to improve even small, yet important, details of our projects!
And that’s a wrap: I now have missing parts from MicroPython to move forward around the ability to let it drive servers and boards, I have a project that so far is delivering when it comes to strategies needed/used to synchronously invoe main thread calls from a worker (beside an even better understanding of all the issues that could happen in all scenarios) and tons of stuff to do to actually deliver what we promised for this first quarter, hoping that new bugs, browsers or web views constraints and what not, won’t actually slow us down more than it happened already 🤞