Re: Send data to asyncio coroutine

2015-08-01 Thread Javier
El sábado, 1 de agosto de 2015, 21:15:07 (UTC+2), Marko Rauhamaa escribió: > Javier : > > > My intention now is to use the asyncio.StreamReader passed as argument > > to the asyncio.start_server callback to read objects serialized with > > pickle. The problems are that pickle cant read from it (b

Re: Send data to asyncio coroutine

2015-08-01 Thread Chris Angelico
On Sun, Aug 2, 2015 at 5:33 AM, Mark Lawrence wrote: > Please keep up, 3.5 is in beta and the current default will be 3.6 :) Not sure what you mean by "default", but I've been running 3.6.0a0 for a while now :) ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Send data to asyncio coroutine

2015-08-01 Thread Mark Lawrence
On 01/08/2015 20:07, Javier wrote: El sábado, 1 de agosto de 2015, 20:46:49 (UTC+2), Mark Lawrence escribió: Well! let's forget all this and let's work with python 3.4 :) Please keep up, 3.5 is in beta and the current default will be 3.6 :) -- My fellow Pythonistas, ask not what our languag

Re: Send data to asyncio coroutine

2015-08-01 Thread Mark Lawrence
On 01/08/2015 20:09, Marko Rauhamaa wrote: Mark Lawrence : On 01/08/2015 19:38, Marko Rauhamaa wrote: It is odd how an engineering forum like this one so often judges ideas based on the pedigree of the participants rather than objective technical arguments. What I find odd is that the bleati

Re: Send data to asyncio coroutine

2015-08-01 Thread Marko Rauhamaa
Javier : > My intention now is to use the asyncio.StreamReader passed as argument > to the asyncio.start_server callback to read objects serialized with > pickle. The problems are that pickle cant read from it (because dont > yield from the full stack) and that I don't know the exact length of > e

Re: Send data to asyncio coroutine

2015-08-01 Thread Marko Rauhamaa
Mark Lawrence : > On 01/08/2015 19:38, Marko Rauhamaa wrote: >> It is odd how an engineering forum like this one so often judges >> ideas based on the pedigree of the participants rather than objective >> technical arguments. > > What I find odd is that the bleating and whinging comes long after t

Re: Send data to asyncio coroutine

2015-08-01 Thread Javier
El sábado, 1 de agosto de 2015, 20:46:49 (UTC+2), Mark Lawrence escribió: > On 01/08/2015 19:38, Marko Rauhamaa wrote: > > Javier : > > > >> El sábado, 1 de agosto de 2015, 18:45:17 (UTC+2), Mark Lawrence escribió: > >>> clearly you know better than the Python core developers > >> > >> Nobody thi

Re: Send data to asyncio coroutine

2015-08-01 Thread Mark Lawrence
On 01/08/2015 19:38, Marko Rauhamaa wrote: Javier : El sábado, 1 de agosto de 2015, 18:45:17 (UTC+2), Mark Lawrence escribió: clearly you know better than the Python core developers Nobody thinks that self is better than core developers, and personaly I don't think I am better than anybody,

Re: Send data to asyncio coroutine

2015-08-01 Thread Marko Rauhamaa
Javier : > El sábado, 1 de agosto de 2015, 18:45:17 (UTC+2), Mark Lawrence escribió: >> clearly you know better than the Python core developers > > Nobody thinks that self is better than core developers, and personaly > I don't think I am better than anybody, but, I have my own opinion. It is od

Re: Send data to asyncio coroutine

2015-08-01 Thread Marko Rauhamaa
Javier : > I agree with you, Marko, I came from callbacks too. So, if GvR wants > the yield from become de-facto, does it mean that all python libraries > will evolve to become asyncio friendly libs? or that I have to write > my own library so I can use existing libraries like pickle? I think > "c

Re: Send data to asyncio coroutine

2015-08-01 Thread Javier
El sábado, 1 de agosto de 2015, 18:45:17 (UTC+2), Mark Lawrence escribió: > On 01/08/2015 17:07, Javier wrote: > > > > Asyncio is a crazy headache! I realized that I can't use asyncio tcp > > servers with pickle! Asyncio is good as a concept but bad in real life. > > > > I think python's non bloc

Re: Send data to asyncio coroutine

2015-08-01 Thread Javier
El sábado, 1 de agosto de 2015, 19:19:00 (UTC+2), Marko Rauhamaa escribió: > Javier : > > > Asyncio is a crazy headache! I realized that I can't use asyncio tcp > > servers with pickle! Asyncio is good as a concept but bad in real > > life. > > > > I think python's non blocking I/O is far from be

Re: Send data to asyncio coroutine

2015-08-01 Thread Marko Rauhamaa
Javier : > Asyncio is a crazy headache! I realized that I can't use asyncio tcp > servers with pickle! Asyncio is good as a concept but bad in real > life. > > I think python's non blocking I/O is far from being something useful > for developers till non-async code can invoke async code > transpar

Re: Send data to asyncio coroutine

2015-08-01 Thread Mark Lawrence
On 01/08/2015 17:07, Javier wrote: Asyncio is a crazy headache! I realized that I can't use asyncio tcp servers with pickle! Asyncio is good as a concept but bad in real life. I think python's non blocking I/O is far from being something useful for developers till non-async code can invoke as

Re: Send data to asyncio coroutine

2015-08-01 Thread Javier
El martes, 21 de julio de 2015, 13:31:56 (UTC+2), Javier escribió: > Hello, I'm trying to understand and link asyncio with ordinary coroutines. > Now I just want to understand how to do this on asyncio: > > > def foo(): > data = yield 8 > print(data) > yield "bye" > > def bar()

Re: Send data to asyncio coroutine

2015-07-29 Thread Javier
El miércoles, 29 de julio de 2015, 1:07:22 (UTC+2), Ian escribió: > On Tue, Jul 28, 2015 at 1:17 PM, Javier wrote: > > Hello again. I have been investigating a bit your example. I don't > > understand why I can't write something like this: > > > > > > > > import asyncio > > > > def foo(

Re: Send data to asyncio coroutine

2015-07-28 Thread Rustom Mody
On Wednesday, July 29, 2015 at 4:37:22 AM UTC+5:30, Ian wrote: > I don't entirely disagree. I think that the implementation of async > coroutines on top of synchronous coroutines on top of generators is > overly clever and results in a somewhat leaky abstraction and a fair > amount of confusion. H

Re: Send data to asyncio coroutine

2015-07-28 Thread Ian Kelly
On Tue, Jul 28, 2015 at 2:41 PM, Javier wrote: > I think that force the developer to 'yield from' all function calls to keep > async capabilities is a big mistake, it should be more flexible, like this: > > import asyncio > > @asyncio.coroutine > fun non_blocking_io(): > """ Everybody knows I

Re: Send data to asyncio coroutine

2015-07-28 Thread Ian Kelly
On Tue, Jul 28, 2015 at 1:17 PM, Javier wrote: > Hello again. I have been investigating a bit your example. I don't understand > why I can't write something like this: > > > > import asyncio > > def foo(): > print("start foo") > try: > while True: > val = yiel

Re: Send data to asyncio coroutine

2015-07-28 Thread Javier
El martes, 28 de julio de 2015, 23:18:11 (UTC+2), Javier escribió: > El martes, 21 de julio de 2015, 15:42:47 (UTC+2), Ian escribió: > > On Tue, Jul 21, 2015 at 5:31 AM, wrote: > > > Hello, I'm trying to understand and link asyncio with ordinary > > > coroutines. Now I just want to understand

Re: Send data to asyncio coroutine

2015-07-28 Thread Javier
El martes, 21 de julio de 2015, 15:42:47 (UTC+2), Ian escribió: > On Tue, Jul 21, 2015 at 5:31 AM, wrote: > > Hello, I'm trying to understand and link asyncio with ordinary coroutines. > > Now I just want to understand how to do this on asyncio: > > > > > > def foo(): > > data = yield 8 > >

Re: Send data to asyncio coroutine

2015-07-21 Thread Ian Kelly
On Tue, Jul 21, 2015 at 5:31 AM, wrote: > Hello, I'm trying to understand and link asyncio with ordinary coroutines. > Now I just want to understand how to do this on asyncio: > > > def foo(): > data = yield 8 > print(data) > yield "bye" > > def bar(): > f = foo() > n = f.nex