From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ua0-f182.google.com ([209.85.217.182]) by ur; Thu May 4 12:23:24 EDT 2017 Received: by mail-ua0-f182.google.com with SMTP id g49so12334646uaa.1 for <9front@9front.org>; Thu, 04 May 2017 09:23:22 -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=vyBUd7wImFXhfTzggu1mmVlEFe1X5eZk5FdcCCCay+o=; b=Il4ypocvWOk01I/fVb2D4vMlHALeXieSa3axAG9QZ5OQAK8dMjasvYqwvihopaq8nB PuNdyQYW3iKUEp57RX7D4CEXPuAe1kegOtZZYXxFHXlo2jC9m04F0vn2UchFP1O8NakM N5pMiMTYlGHOKjG3OqGZduhVzX3xXjgU6yNDoQGVh5q/XnmJXK6BzqinwoF5k3baa9gf cv12o/nHpmEs0WZEG8P4mlB6fZX9b//e1GYGGVuAxrcjK78vzb9m3j0SR5MZZDJpwi3/ F01h8fopXZY+sHqrDLkdS2ir9ZeK32zPP/rZPDMtmu4lsUUIlerqw2txGyqgG1H/buUx 3OqQ== 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=vyBUd7wImFXhfTzggu1mmVlEFe1X5eZk5FdcCCCay+o=; b=B0ddLq8dJ4To8X4Wor8UQaikNaL2FyNj0+458VyYPUNnncXpx7vY9S/B8JUpP/xTPY 3qEHH63KxYj5k9klOl6equRj3nwUfpFLYmo/4HYzfrj2J0fYS9vkaRWJJGp69PUdQCUg G/WBsT34QZwqZJWu3z3pezgI37bCR2M8cPFU7lLpCVW8iuMa6TNcdrrboaY/09mIXNh6 5By05wLR6MJfQJILhazmtHvT/0zAOKjOtJq19dyZHmdkXNa+rxITP9sj5K78x99ORO6V f0M9e0Lxy2PMlIZLBw19bIaCkpAOJiw2VIYQ9soVh0xG1LEF86y4pPMRgiuM72GfZO/E SFcg== X-Gm-Message-State: AN3rC/5thI5kH0dY4nLIk7rIceSjuJoWX8NzocpY1St3FBYT4m0aQJep Nr95b5o5e5JHBZfIfE4IPds/HgOiNG5B X-Received: by 10.176.2.178 with SMTP id 47mr13822353uah.36.1493915002300; Thu, 04 May 2017 09:23:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.44.151 with HTTP; Thu, 4 May 2017 09:23:21 -0700 (PDT) In-Reply-To: References: From: Benjamin Purcell Date: Thu, 4 May 2017 11:23:21 -0500 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: stateless agile self-signing locator 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.