Re: Comments on ‘wip-nio’

2012-03-31 Thread Andreas Rottmann
Nala Ginrut writes: > On Thu, Mar 22, 2012 at 6:39 AM, Ludovic Courtès wrote: > >> Hello, >> >> I had a quick look at ‘wip-nio’, and here are initial comments. >> >> • epoll is Linux-specific. Any idea how a more multi-platform API >>could be provided? I guess libevent could be used, but

Re: Comments on ‘wip-nio’

2012-03-27 Thread Ludovic Courtès
Hi, Andy Wingo skribis: > On Wed 21 Mar 2012 23:39, l...@gnu.org (Ludovic Courtès) writes: > >> I had a quick look at ‘wip-nio’, and here are initial comments. > > Thanks for the feedback! > >> • epoll is Linux-specific. Any idea how a more multi-platform API >> could be provided? I gues

Re: Comments on ‘wip-nio’

2012-03-25 Thread Andy Wingo
On Sun 25 Mar 2012 22:17, Neil Jerram writes: > Andy Wingo writes: > >> How about, you write your code in such a way that it deals with eports. >> You could surround your code in a prompt that if an eport operation >> aborts because it would block, you save the continuation and ask your >> main

Re: Comments on ‘wip-nio’

2012-03-25 Thread Neil Jerram
Andy Wingo writes: > On Thu 22 Mar 2012 22:36, Neil Jerram writes: > >> It seems like the module has to anticipate the main loop infrastructure >> that any using programs will use - which isn't a nice solution. > > How about, you write your code in such a way that it deals with eports. > You cou

Re: Comments on ‘wip-nio’

2012-03-23 Thread Andy Wingo
On Fri 23 Mar 2012 02:47, Nala Ginrut writes: > Besides, I think we need "write bytevector from port and return the > successful size". That's what (ice-9 nio) from wip-ethreads implements -- the primitives. It's a little confusing as things have changed some since I first posted wip-nio. Summ

Re: Comments on ‘wip-nio’

2012-03-23 Thread Andy Wingo
Heya :) On Wed 21 Mar 2012 23:39, l...@gnu.org (Ludovic Courtès) writes: > I had a quick look at ‘wip-nio’, and here are initial comments. Thanks for the feedback! > • epoll is Linux-specific. Any idea how a more multi-platform API > could be provided? I guess libevent could be used, bu

Re: Comments on ‘wip-nio’

2012-03-23 Thread Andy Wingo
On Thu 22 Mar 2012 22:36, Neil Jerram writes: > It seems like the module has to anticipate the main loop infrastructure > that any using programs will use - which isn't a nice solution. How about, you write your code in such a way that it deals with eports. You could surround your code in a prom

Re: Comments on ‘wip-nio’

2012-03-22 Thread Nala Ginrut
Besides, I think we need "write bytevector from port and return the successful size". Just like "write-string!/partial". Now I have to use utf8->string to convert the bytevector to string. Why we need such a thing? Because once we introduced Non-Block IO ,we can not write the whole bytevector in on

Re: Comments on ‘wip-nio’

2012-03-22 Thread Nala Ginrut
On Fri, Mar 23, 2012 at 5:36 AM, Neil Jerram wrote: > but I would guess that there are cases > where a module isn't already constrained like this, and still might want > to use a "do X in N seconds time" function. > > > I think this "do X in N seconds time" function would be useful. And it's bette

Re: Comments on ‘wip-nio’

2012-03-22 Thread Neil Jerram
l...@gnu.org (Ludovic Courtès) writes: > Hi, > > Nala Ginrut skribis: > >> On Thu, Mar 22, 2012 at 6:39 AM, Ludovic Courtès wrote: >> >>> Hello, >>> >>> I had a quick look at ‘wip-nio’, and here are initial comments. >>> >>> • epoll is Linux-specific. Any idea how a more multi-platform API >>>

Re: Comments on ‘wip-nio’

2012-03-22 Thread Ludovic Courtès
Hi, Nala Ginrut skribis: > On Thu, Mar 22, 2012 at 6:39 AM, Ludovic Courtès wrote: > >> Hello, >> >> I had a quick look at ‘wip-nio’, and here are initial comments. >> >> • epoll is Linux-specific. Any idea how a more multi-platform API >>could be provided? I guess libevent could be used

Re: Comments on ‘wip-nio’

2012-03-21 Thread Nala Ginrut
On Thu, Mar 22, 2012 at 6:39 AM, Ludovic Courtès wrote: > Hello, > > I had a quick look at ‘wip-nio’, and here are initial comments. > > • epoll is Linux-specific. Any idea how a more multi-platform API >could be provided? I guess libevent could be used, but we don’t >want to add one m

Comments on ‘wip-nio’

2012-03-21 Thread Ludovic Courtès
Hello, I had a quick look at ‘wip-nio’, and here are initial comments. • epoll is Linux-specific. Any idea how a more multi-platform API could be provided? I guess libevent could be used, but we don’t want to add one more dependency in 2.0. How much is (ice-9 nio) dependent on ep