<br><br><div class="gmail_quote">On Fri, Nov 27, 2009 at 2:24 PM, Nicolas Cellier <span dir="ltr">&lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt;</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 &lt;<a href="mailto:cputney@wiresong.ca">cputney@wiresong.ca</a>&gt;:<br>
<div><div></div><div class="h5">&gt;<br>
&gt; On 27-Nov-09, at 8:03 AM, David T. Lewis wrote:<br>
&gt;<br>
&gt;&gt; I implemented IOHandle for this, see <a href="http://wiki.squeak.org/squeak/996" target="_blank">http://wiki.squeak.org/squeak/996</a>.<br>
&gt;&gt; I have not maintained it since about 2003, but the idea is<br>
&gt;&gt; straightforward.<br>
&gt;<br>
&gt; Yes. I looked into IOHandle when implementing Filesystem, but decided to go<br>
&gt; with a new (simpler, but limited) implementation that would let me explore<br>
&gt; the requirements for the stream architecture I had in mind.<br>
&gt;<br>
&gt;&gt; My purpose at that time was to :<br>
&gt;&gt;<br>
&gt;&gt;  * Separate the representation of external IO channels from the<br>
&gt;&gt; represention<br>
&gt;&gt;   of streams and communication protocols.<br>
&gt;&gt;  * Provide a uniform representation of IO channels similar to the unix<br>
&gt;&gt; notion<br>
&gt;&gt;   of treating everything as a &#39;file&#39;.<br>
&gt;&gt;  * Simplify future refactoring of Socket and FileStream.<br>
&gt;&gt;  * Provide a place for handling asynchronous IO events. Refer to the aio<br>
&gt;&gt;   handling in the unix VM. Files, Sockets, and AsyncFiles could (should)<br>
&gt;&gt; use<br>
&gt;&gt;   a common IO event handling mechanism (aio event signaling a Smalltalk<br>
&gt;&gt; Semaphore).<br>
&gt;<br>
&gt; Indeed. Filesystem comes at this from the other direction, but I think we<br>
&gt; want to end up in the same place. For now I&#39;ve done TSTTCPW, which is use<br>
&gt; the primitives from the FilePlugin. But eventually I want to improve the<br>
&gt; plumbing. You&#39;ve done some important work here - perhaps Filesystem can use<br>
&gt; AioPlugin at some point.<br>
&gt;<br>
&gt; Colin<br>
&gt;<br>
&gt;<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&#39;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&#39;re right, the use of the C library&#39;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>