From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io0-f170.google.com ([209.85.223.170]) by ur; Thu May 4 13:52:21 EDT 2017 Received: by mail-io0-f170.google.com with SMTP id k91so31748241ioi.1 for <9front@9front.org>; Thu, 04 May 2017 10:52:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tesio-it.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=OXTcqL0fGyy0V8vnZ7vHjiMabsq4hIkTKawFFqbJoxM=; b=jXswW3P6cXiUQtmSBHBKBUJPnjuAqkRFlRasI0xrkS8pW2b16+04F2A2LwQltgxepo smXktKhBnuzor9xE6jEgr83i6vpK6v2jO7jyU5ktXtKLlTfVOlNOITDztPhEP6Aoasq4 0kcLdecG1gs68R7o+gSVvcBN7sBnA6aMPE99g6OLhzuEuJH/+SlVOFoET7I8isRHRfJq gsZIMp0VSZBXHzoejRRcyl0Eia9QzycanXiaPHeorG3kL6ZT0B0lfb7QUBat5ImHO9Qw aOTwD+pD2H6g4X8S2WAui+f6kj1gf6SfV7ylwchRDSqBJ/Uu7tVEvCkrfHYAiqWj28qz byug== 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=OXTcqL0fGyy0V8vnZ7vHjiMabsq4hIkTKawFFqbJoxM=; b=LmDZj5WMarjfG9QTHMQYvivz9wT2H+KXbX5/cTzXU+fsLZ4Fd8MkyDUisyc09xPQDp Q2bZ96qsdGYllTSYtlASfVgofPVt67UHTSQMNm7GkhR3RGpW0IdUIUudzEhlYD9PwVs7 GWONV48OlF4Mmr46cDt+mEV+igimH3DEyiecpDCPUSZiawCdcJWedGxf9O4Y5bgjeTRg DnMVLr/65W9st/c2XEeXEj7kFsgc/n5xg78WUUxi1r5OeahIrnQiNL4ynuU0rmss/JIN rWzPrLSLtK0Bb8taQUNVcEL/wVGINK7eQ+YPgwRPZ9fR8OaT86qxHJMlG9QHH+2UYtWc qApg== X-Gm-Message-State: AN3rC/4LafBTqouKMm2kNZ6jsv9SPeLEjpUEyoabD5c58Ux3YTUefc8U Ohx9bFAOyuRL74O/MfcNwF66kFpnGCcF X-Received: by 10.107.36.3 with SMTP id k3mr3422029iok.134.1493920334982; Thu, 04 May 2017 10:52:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.33.13 with HTTP; Thu, 4 May 2017 10:52:14 -0700 (PDT) In-Reply-To: References: From: Giacomo Tesio Date: Thu, 4 May 2017 19:52:14 +0200 Message-ID: Subject: Re: [9front] bio io functions To: 9front@9front.org Content-Type: text/plain; charset=UTF-8 List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: component-scale wrapper persistence-scale content-driven interface 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.