<br><br><div class="gmail_quote">On Tue, Feb 9, 2010 at 8:41 AM, Mariano Martinez Peck <span dir="ltr">&lt;<a href="mailto:marianopeck@gmail.com">marianopeck@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;">
 <br><br><br><div class="gmail_quote">On Mon, Feb 8, 2010 at 7:41 PM, Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">


 <br><br><br><div class="gmail_quote">On Mon, Feb 8, 2010 at 9:42 AM, Mariano Martinez Peck <span dir="ltr">&lt;<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">



 <br>Hi folks. Disusing with a friend, he asked me if Squeak was completely written in itself (actually, SLANG). I think (I am not sure) that some parts of the VM as Interpreter, ObjectMemory, and most primitives are written in SLANG and then using VMMaker I can convert from that to C. Ok.....but...I think I heard that there are primitives that are directly written in C (not SLANG, no translation).  Is this true ?<br>



</blockquote><div><br></div><div>If you look at the blue book and its definition of what Smalltalk-80 is then all of that except lower-level window management (creating the window in which Squeak appears, collecting events from the GUI), and image I/O (reading and writing the image to and from the snapshot file) is entirely written in Slang and can be run as a simulation.  But go beyond that to the large array of primitives for sound, video and so on and lots of the Slang code for the primitives is merely a wrapper around some library that actually implements the functionality.</div>


</div></blockquote><div><br><br>Thanks Eliot for the explanation. This is new for me so I will be learning and bothering for a while ;)<br> </div><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">


<div class="gmail_quote">
<div><br></div><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
<br>If true, how can be that addressed ? where is the C code of that? because, I take VMMaker, I convert to C, then compile, install and I have a working VM. So...that C code must come somewhere...where is it ? how can I know if a primitive is written in SLANG or directly in C?<br>



</blockquote><div><br></div><div>As far as I&#39;m aware all primitives are written in Slang, even if they&#39;re simply wrappers.  But if you look in the files in </div><div>    platforms/{Cross,Mac OS,unix}/plugins/FooPlugin</div>



<div>you&#39;ll find cross-platform and platform-specific support code for each plugin (a plugin being a related suite of primitives),</div></div></blockquote><div><br><br>perfect, I got it and I could see it :)<br><br> </div>


<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><div class="gmail_quote"><div> and look in the src tree for plugins and extplugins and look in their subdirectries you&#39;ll find all the generated Slang plugin code.</div>


</div></blockquote><div><br><br>I didn&#39;t find this. I guess you are talking about the src folder where VMMaker put the genereated code, however, I couldn&#39;t make it work yet (after I tell you the problem)<br></div>
</div></blockquote><div><br></div><div>Right, and where the generated code is can vary.  Look for directories called src or src32. (Or, better generate the code as you&#39;re trying to below; I can help ;) )</div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div> </div>

<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><div class="gmail_quote">
<div><br></div><div>A better place to look is in VMMaker using the browser.  There you&#39;ll see different kinds of primitive from things like GeniePlugin where all the code is written in Slang to SocketPlugin where all the code is merely wrappers around platform-specific support code.</div>


</div></blockquote><div><br><br>I saw it! Thanks...much clear now.   I have, however, a couple of problems/questions:<br><br>- I couldn&#39;t compile in VMMaker as I have the error: &quot;MacOSPowerPCOS9VMMaker could not find directory for: Mac OS specific files; is the platform root path set correctly?&quot;   However, I have correctly set the path. I attach a screenshot of the pharo image and the output of a console.<br>

Do you know what the problem can be ?<br></div></div></blockquote><div><br></div><div>The directory the  MacOSPowerPCOS9VMMaker expects is called &#39;Mac OS&#39; not MacOS or Macos or...  So either change it to expect MacOS or move or copy your platforms subdirectory from platforms/MacOS to &#39;platforms/Mac OS&#39;.</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div>- can I download a &quot;standard&quot; VMMaker configuration from somewhere?  <br>
</div></div></blockquote><div><br></div><div>John and David are the experts here.  I have a decidedly non-standard configuration (for the time being) and so am of no help.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div> <br>- shouldn&#39;t be a good idea every time a new official VM is done, to save the configuration into a .config file and to include it in the zip ?  So that I can reproduce it and know what was done :)<br>
</div></div></blockquote><div><br></div><div>Uh, yes :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div>- is there a way to know which are the &quot;core&quot; plugins ? I mean, suppose I want to deploy an application, do you know more or less which plugins will be VERY likely to be needed ?   For example, I guess I don&#39;t need CroquetPlugin or FFI if I don&#39;t use it in my app, but FilePlugin for example, I guess it is needed even to bootstrap (maybe I am wrong, it is just an example).<br>

What I am trying to do is to see how can I create the minimal &quot;production&quot; vm according to my needs.</div></div></blockquote><div><br></div><div>I don&#39;t know of any proper list.  But these are excellent questions.  I think we do need a core list and as we work towards a kernel image we should try and arrange that those primitives needed by things loaded into the core image but not needed by the kernel image itself are available as external plugins, with notable exceptions such as the core graphics.  Having a more modular VM should make it easier to configure, not more difficult, because the core VM will be a simpler leaner more known quantity and plugins will be freer to evolve with the packages that they support.</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div> </div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div><br>- I know nothing about SLANG, but something <span><span style="background-color:rgb(255, 255, 255)" title="sorprendió">surprised</span></span> me:  &quot;self&quot;  referes directly to the C function name ?<br>

For example, in SocketPlugin &gt;&gt; primitiveResolverAddressLookupResult    it does:<br>&quot;sz := self sqResolverAddrLookupResultSize.&quot;<br><br>and sqResolverAddrLookupResultSize is the name of the C function of the plugin. WOWWW!!!<br>
</div></div></blockquote><div><br></div><div>Yes, in Slang the receiver is elided, except for sends to the interpreterProxy.  There is effectively only one receiver in the main VM, the VM itself, and C has no concept of the receiver, so Slang just deletes it, or converts interpreterProxy foo: arg info interpreterProxy-&gt;foo(arg).</div>
<div><br></div><div>You&#39;ll see some implementations of the C functions in the InterpreterSimulator and in subclasses of various plugins that simulate those plugins (e.g. look at subclasses of the FilePlugin).</div><div>
 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div>
<br><br>Thanks for all the help.<br><br>Mariano<br><br></div><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
<div class="gmail_quote">
<div><br></div><div>HTH</div><div>Eliot</div><div><br></div><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
<br>I hope someone can help this newbie :)<br><br>Thanks in advance,<br><br>Mariano<br><br><br>
<br></blockquote></div><br>
<br></blockquote></div><br>
<br></blockquote></div><br>