blocking Py to nonblocking JS, interesting link using skulpt

59 views
Skip to first unread message

Kiko

unread,
Jun 28, 2017, 2:21:29 PM6/28/17
to bry...@googlegroups.com

Pierre Quentel

unread,
Jul 2, 2017, 4:15:27 AM7/2/17
to brython


Le mercredi 28 juin 2017 20:21:29 UTC+2, kiko (on pybonacci) a écrit :
https://anvil.works/blog/pycon-talk
Thanks Kiko, it's very interesting indeed. I had read Skulpt documentation about Suspensions many times and didn't understand a single word, the presentation here is much more clear.

Implementing something similar in Brython is another story, but anyway, writing a Python-to-Javascript translator is not for the faint-hearted ;-)

Olemis Lang

unread,
Jul 3, 2017, 2:46:30 PM7/3/17
to brython

On Sun, Jul 2, 2017 at 4:15 AM, Pierre Quentel <pierre....@gmail.com> wrote:
Implementing something similar in Brython is another story, but anyway, writing a Python-to-Javascript translator is not for the faint-hearted ;-)


I have a idea of how to achieve an async js implementation of a sync Python code with both Brython and Batavia . Unfortunately I've had no time to either write or code this myself ; so consider it the successor of Fermat theorem .


--
Regards,

Olemis - @olemislc

Apache™ Bloodhound contributor
http://issues.apache.org/bloodhound
http://blood-hound.net

Brython committer
http://brython.info
http://github.com/brython-dev/brython

SciPy Latin America - Cuban Ambassador
Chairman of SciPy LA 2017 - http://scipyla.org/conf/2017

Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:



Joao S. O. Bueno

unread,
Jul 3, 2017, 3:47:29 PM7/3/17
to bry...@googlegroups.com
In a project I was working in early 2015, I managed to actually use "yield" (maybe even "yield from") from pure Bryton code, and have the code stop at that point, make an ajax call, get the result, and continue execution in the next Brython code.


I had not feedled with that project ever since (it was halted due to project changes) - but maybe I can still
figure out what I did, and someone else could work on a minimalistc Brython module to allow this.  


(/me hits send, grab a shovel, and starts digging around the code for some archeology)


--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+unsubscribe@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/CAGMZAuMY81fTJ3s_SQsZkqVtGynrnkUptscskcD6i2SvaQsTBA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

Jonathan Verner

unread,
Jul 4, 2017, 2:47:53 AM7/4/17
to brython, gwi...@gmail.com
Actually this is how the brython version of asyncio module is implemented... the problem with this approach is that, e.g., async imports can't be implemented without changes in code since that would need support from the python 2 js compiler 
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.

To post to this group, send email to bry...@googlegroups.com.

Olemis Lang

unread,
Jul 4, 2017, 9:44:52 AM7/4/17
to brython

On Tue, Jul 4, 2017 at 2:47 AM, Jonathan Verner <jona...@temno.eu> wrote:
Actually this is how the brython version of asyncio module is implemented... the problem with this approach is that, e.g., async imports can't be implemented without changes in code since that would need support from the python 2 js compiler 

Exactly Jonathan . In my opinion this are the main facts :

#1 - async js core for sync python statements can be implemented ...
#2 - ... but will require a whole reimplementation of Brython core

p.s. BTW, an async core is not the only feature I think we need looking forward . I've had other conversations with Pierre on public channels about this . Nonetheless an async core is paramount to make brython run in environments like Tizen OS (but not limited to that ... it's just the one I've tested) .

Jonathan Verner

unread,
Jul 5, 2017, 6:47:42 AM7/5/17
to brython
#2 - ... but will require a whole reimplementation of Brython core

Actually, Pierre's work on input leads me to think that it would be possible to implement it without too much changes...
Reply all
Reply to author
Forward
0 new messages