From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm0-f46.google.com ([74.125.82.46]) by ur; Thu May 4 16:18:44 EDT 2017 Received: by mail-wm0-f46.google.com with SMTP id u65so7217880wmu.1 for <9front@9front.org>; Thu, 04 May 2017 13:18:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=KpHGQfXANQ/sVwRFnLLk9nJJjCBtC0JTEOxd5um0Wag=; b=NYfeR5Iiiq45FSr+fS+/sq5WidNY6GwbWQdOS38LGtQXytNKOVHv1MdybZrOV0TMiR 9NUglwrNsgsX5a4mznu4uamCqIwXoB8ptz/VKvXUwdD2k8kK3WF9C9ILLSsFeo2FNBrL AL9LuNYPz3+SOe024A76JwGXmJOpFNvFGPNZ0YgMDjJOBGney6HcWUtzlG1uWe22T7+7 DXvoD0gwCN8g/CrjfeGcPeytg36MMeGF+EYzyCzDPpo1s/Qzkimyd/GZ5KsJ6ZFYCmqk WUQhjIyQL4AL9FHflXSUiG01u7yUYQd5ZoVTpHhC5JTTOhS4m4UPLXljV3q9oZH92H+5 p19w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=KpHGQfXANQ/sVwRFnLLk9nJJjCBtC0JTEOxd5um0Wag=; b=LgF+brlcFzGWMdkg2DPnypY+5u2ZPLdP/gzLh9pwI9M2RxM5QgM5AQB13Thdlu7nD2 +ok5pCvOgw3PeqM0qIyNduEXMpNPOm7CdXFa89Hif9hZIxNZPcGqYOwtjKYle6DVFSvb 4dZ/n0wVjb4y3drbjMXcThMEp946RuC0COIc50FNZN2zM+X91rsf2mdqKE2puMuON1oB m7sYK/b+zeQJGq8a6K/lO+u6unUujez6PzyJBeRVVY8t9MptT5bNIPBt+riNVnLv0XSp /rPazf++Fqg+9AMIyHEsZQ7pRTsiQqMqYuhk1LPK94HoS7MAuO01bEtPv8b7zLJEyxZh llHA== X-Gm-Message-State: AN3rC/6spTpdj1ZUZBr7BiQWcA4vSLk9hTV9PWHSflzItt5bCw3lev2v 5t6wWP+L2OiPGmiDgVq/s8vHjjG6Lw== X-Received: by 10.28.150.86 with SMTP id y83mr3226608wmd.46.1493929121708; Thu, 04 May 2017 13:18:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.223.139 with HTTP; Thu, 4 May 2017 13:18:41 -0700 (PDT) In-Reply-To: References: From: Bruce Ellis Date: Fri, 5 May 2017 06:18:41 +1000 Message-ID: Subject: Re: [9front] bio io functions To: 9front@9front.org Content-Type: multipart/alternative; boundary=001a114b33e49e7fb6054eb87ade List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: stable replication grid --001a114b33e49e7fb6054eb87ade Content-Type: text/plain; charset=UTF-8 Go provides this functionality using interfaces. brucee On 5 May 2017 at 03:52, Giacomo Tesio wrote: > Nice idea. What do you have in mind instead of file descriptor? > > What about returning the current function from Biofn to allow filters' > composition? > > > Giacomo > > 2017-05-04 18:23 GMT+02:00 Benjamin Purcell : > > I love it > > > > spew > > > > On Thu, May 4, 2017 at 11:02 AM, Julius Schmidt wrote: > >> I would like to change bio to do all I/O through a user replaceable > >> function. The attached patch does just that, adding a new function > Biofn() > >> to register such a function, which replaces read/write. > >> > >> Main uses I have in mind: > >> > >> 1. Allow programs to flush output buffers before stalling for more > input, > >> which would most likely be activated with a command line flag. > >> > >> 2. Use bio with things that are not file descriptors. > >> > >> 3. Apply filters to input/outputs (arguably could also be done with > pipes). > >> > >> 4. Use bio with ioprocs. > --001a114b33e49e7fb6054eb87ade Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Go provides this functionality using interfaces.

<= /div>
brucee

On 5 May 2017 at 03:52, Giacomo Tesio <giacomo@tesio.it><= /span> wrote:
Nice idea. What do you have= in mind instead of file descriptor?

What about returning the current function from Biofn to allow filters'<= br> composition?


Giacomo

2017-05-04 18:23 GMT+02:00 Benjamin Purcell <benjapurcell@gmail.com>:
> I love it
>
> spew
>
> On Thu, May 4, 2017 at 11:02 AM, Julius Schmidt <aiju@phicode.de> wrote:
>> I would like to change bio to do all I/O through a user replaceabl= e
>> function. The attached patch does just that, adding a new function= Biofn()
>> to register such a function, which replaces read/write.
>>
>> Main uses I have in mind:
>>
>> 1. Allow programs to flush output buffers before stalling for more= input,
>> which would most likely be activated with a command line flag.
>>
>> 2. Use bio with things that are not file descriptors.
>>
>> 3. Apply filters to input/outputs (arguably could also be done wit= h pipes).
>>
>> 4. Use bio with ioprocs.

--001a114b33e49e7fb6054eb87ade--