e-Meeting in freenode #brython channel

28 views
Skip to first unread message

Olemis Lang

unread,
May 24, 2017, 5:40:01 PM5/24/17
to brython

Pierre is there a chance for us to meet in #freenode channel and chat for a while about Brython dev in general? If this is a good idea , what would be the best day + time before next Saturday ?


--
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:



Olemis Lang

unread,
May 24, 2017, 6:17:58 PM5/24/17
to brython

On Wed, May 24, 2017 at 2:40 PM, Olemis Lang <ole...@gmail.com> wrote:
Pierre is there a chance for us to meet in #freenode channel and chat for a while about Brython dev in general? If this is a good idea , what would be the best day + time before next Saturday ?

Prior to that ... a few questions about the current state of Brython . In advance , please , excuse me if I'm asking .

- What does a Brython object look like nowadays ?
- What would be the initial strategy to implement an async core ? [1]_

The first thing I noticed while working with Batavia [2]_ is that their object model is quite straightforward , maps almost 1-to-1 to JS objects . The other thing I noticed is that a few operations are quite straightforward e.g. this would be the implementation of the handler implementing IMPORT_NAME bytecode (this is bound to the Batavia VM object) .

```
1875 VirtualMachine.prototype.byte_IMPORT_NAME = function(name) {
1876     var items = this.popn(2)
1877     this.push(
1878         builtins.__import__.apply(
1879             this,
1880             [
1881                 [name, this.frame.f_globals, this.frame.f_locals, items[1], items[0]],
1882                 null
1883             ]
1884         )
1885     )
1886 }
1887
```

Another example , this is how Python (byte)code is executed 

```
  173                 root_module = new types.Module(name, null, name)
  174                 leaf_module = root_module
  175                 modules.sys.modules[name] = root_module
  176
  177                 code = modules.marshal.load_pyc(this, payload)
  178                 // Convert code object to module
  179                 // args[1].__name__ = args[0]
  180                 frame = this.make_frame({
  181                     'code': code,
  182                     'f_globals': root_module,
  183                     'f_locals': root_module
  184                 })
  185                 this.run_frame(frame)
```

I'd like to have that in Brython core . It's quite readable , and I like it . As you can see , instantiating a module is quite easy and readable. They are using state-of-the-art JS "class inheritance" techniques .

.. [1] I have my own ideas but would like to know what comes out in the discussion and would not like to get biased answers , that's why I do not mention my thoughts on this subject ... ;)

Olemis Lang

unread,
May 24, 2017, 6:20:02 PM5/24/17
to brython

On Wed, May 24, 2017 at 3:17 PM, Olemis Lang <ole...@gmail.com> wrote:
In advance , please , excuse me if I'm asking .

In advance , please , excuse me if I'm asking ... trivial questions , it's been a long time since I coded something related to Brython and my daily job erased my Brython-ish super-powers .

Pierre Quentel

unread,
May 25, 2017, 2:52:20 AM5/25/17
to brython
Olemis,

I can join the channel tomorrow (Friday). When it's 5pm here I think it's 8am in Portland, at what time can you join ?

Kiko

unread,
May 25, 2017, 2:54:54 AM5/25/17
to bry...@googlegroups.com
2017-05-25 8:52 GMT+02:00 Pierre Quentel <pierre....@gmail.com>:
Olemis,

I can join the channel tomorrow (Friday). When it's 5pm here I think it's 8am in Portland, at what time can you join ?

I'm travelling these days and too busy the last year so I'm a bit disconnected from brython development... Please, schedule whatever it is the best for you and I will try to join.

Thanks.

 

--
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/06fc6afe-471c-4c63-95a3-2eae4e244ccf%40googlegroups.com.

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

Pierre Quentel

unread,
May 25, 2017, 3:02:33 AM5/25/17
to brython


Le jeudi 25 mai 2017 00:17:58 UTC+2, Olemis Lang a écrit :

On Wed, May 24, 2017 at 2:40 PM, Olemis Lang <ole...@gmail.com> wrote:
Pierre is there a chance for us to meet in #freenode channel and chat for a while about Brython dev in general? If this is a good idea , what would be the best day + time before next Saturday ?

Prior to that ... a few questions about the current state of Brython . In advance , please , excuse me if I'm asking .

- What does a Brython object look like nowadays ?
I think you can find answers in the wiki page How Brython works, section "Implementation of Python objects"
- What would be the initial strategy to implement an async core ? [1]_
I don't know... I'm just getting into async / await, thanks to the talk at PyCon by Miguel Grinberg.

Olemis Lang

unread,
May 25, 2017, 3:59:40 AM5/25/17
to brython
On Thu, May 25, 2017 at 12:02 AM, Pierre Quentel <pierre....@gmail.com> wrote:

- What does a Brython object look like nowadays ?
I think you can find answers in the wiki page How Brython works, section "Implementation of Python objects"

Thenks for the pointer  . I've seen a few things that maybe can be changed so as to make Brython objects (i.e. js representations of Python objects) more similar to *native* js objects.
 
- What would be the initial strategy to implement an async core ? [1]_
I don't know... I'm just getting into async / await, thanks to the talk at PyCon by Miguel Grinberg.

I'm not sure how far we'll go that way when it comes to implementing the Brython core . Python async / await is a high-level feature as compared to the underlying execution engine . I guess we'll have to dig into the JS code internals .

Olemis Lang

unread,
May 25, 2017, 4:00:59 AM5/25/17
to brython

On Wed, May 24, 2017 at 11:52 PM, Pierre Quentel <pierre....@gmail.com> wrote:
I can join the channel tomorrow (Friday). When it's 5pm here I think it's 8am in Portland, at what time can you join ?

I guess 9:00 PST would be ok .
Reply all
Reply to author
Forward
0 new messages