<br><br><div class="gmail_quote">On Fri, Nov 27, 2009 at 2:24 PM, Nicolas Cellier <span dir="ltr"><<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
2009/11/27 Colin Putney <<a href="mailto:cputney@wiresong.ca">cputney@wiresong.ca</a>>:<br>
<div><div></div><div class="h5">><br>
> On 27-Nov-09, at 8:03 AM, David T. Lewis wrote:<br>
><br>
>> I implemented IOHandle for this, see <a href="http://wiki.squeak.org/squeak/996" target="_blank">http://wiki.squeak.org/squeak/996</a>.<br>
>> I have not maintained it since about 2003, but the idea is<br>
>> straightforward.<br>
><br>
> Yes. I looked into IOHandle when implementing Filesystem, but decided to go<br>
> with a new (simpler, but limited) implementation that would let me explore<br>
> the requirements for the stream architecture I had in mind.<br>
><br>
>> My purpose at that time was to :<br>
>><br>
>> * Separate the representation of external IO channels from the<br>
>> represention<br>
>> of streams and communication protocols.<br>
>> * Provide a uniform representation of IO channels similar to the unix<br>
>> notion<br>
>> of treating everything as a 'file'.<br>
>> * Simplify future refactoring of Socket and FileStream.<br>
>> * Provide a place for handling asynchronous IO events. Refer to the aio<br>
>> handling in the unix VM. Files, Sockets, and AsyncFiles could (should)<br>
>> use<br>
>> a common IO event handling mechanism (aio event signaling a Smalltalk<br>
>> Semaphore).<br>
><br>
> Indeed. Filesystem comes at this from the other direction, but I think we<br>
> want to end up in the same place. For now I've done TSTTCPW, which is use<br>
> the primitives from the FilePlugin. But eventually I want to improve the<br>
> plumbing. You've done some important work here - perhaps Filesystem can use<br>
> AioPlugin at some point.<br>
><br>
> Colin<br>
><br>
><br>
<br>
</div></div>I wonder why level 3 stdio was used (FILE * fopen, fclose ...) rather<br>
than level 2 (int fid, open, close, ...) in file plugin... Better<br>
portability ?<br></blockquote><div><br></div><div>level 2 isn't really a level, its a section of the unix manual pages. Section 2 is the system calls (which really define what unix is). Section 3 is libraries. So only the stdio library in section 3 is portable across C implementations. So yes, you're right, the use of the C library's stdio facilities was chosen for portability.</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<font color="#888888"><br>
Nicolas<br>
<br>
</font></blockquote></div><br>