Hi,<div><br></div><div>I like very much the idea. I&#39;m willing to collaborate.</div><div><br></div><div>However, i think that it would be important first to make the CMake configurations from the VM compatible with SqueakNOS platform sources. It would be simpler if the VM has a uniform building process.</div>

<div><br></div><div>So, my vision (i&#39;ve started working on this)...Anybody should be able to download the squeaknos git repository inside the platform sources of the CogVM. Then go to an image with CMakeVMMaker, have a SqueakNosConfig class, and follow the same rules for generating the makefiles as from a standard vm: generateSources;generate. Then cmake ., make, and install.</div>

<div><br>Then we can think of improving the image with new stuff. All new stuff from the image for interfacing with networking and with filesystems should be very interesting. </div><div><br></div><div>So in my opinion, first we need a modern image running with a CogVM and with a simple building process. This way, with a simpler and uniform building process, i&#39;m sure we will attain the attention and time of more people willing to colaborate.</div>

<div><br></div><div>Happy to see movement on this list,</div><div>My 2 cents,</div><div>Cheers,</div><div>Guido.</div><div><br></div><div><br><div class="gmail_quote">2012/10/25 Javier Pimás <span dir="ltr">&lt;<a href="mailto:elpochodelagente@gmail.com" target="_blank">elpochodelagente@gmail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi guys, cool to see there&#39;s people reading the list these days!<br><br><div class="gmail_quote">On Wed, Oct 24, 2012 at 9:46 PM, Jecel Assumpcao Jr. <span dir="ltr">&lt;<a href="mailto:jecel@merlintec.com" target="_blank">jecel@merlintec.com</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Javier,<div class="im"><br>
<div><br>
&gt; Last night I had a really interesting idea about the VM...<br>
&gt; For now, we have a special VM platform that is &quot;squeakNOS&quot;. This is sometimes<br>
&gt; a problem, we need a custom makefile, the VM gets old and we are still working<br>
&gt; with the old interpreter because of this. Supporting the makefile is really boring.<br>
<br>
</div></div><div class="im">What are the Vm changes that we need? I thought it was just one plugin<br>
to allow low level i/o and memory access plus a patch to find the image<br>
pre-loaded into memory, right?<br></div></blockquote><div><br></div><div>There are different parts of the VM that were modified to make squeaknos. One of them is this special linking I told. Other part was to add some primitives for accessing special procesor instructions from smalltalk: in and out. As you probably know, they are needed to interact with io devices. There is a plugin which implements a primitive for each of these (there are variants, in byte, in word, in dword, etc). </div>




<div><br></div><div>This plugin can now be easily removed and replaced by AsmJit (igor&#39;s assembler) and NativeBoost. The real challenge is to make the unix VM load after grub, we may need an elf loader.</div><div><br>



</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">

<div><br>
&gt; What I&#39;m thinking about, then? We have nativeboost to execute binary code, an<br>
&gt; assembler and even prototype of smalltalk to binary translator (waterfall),<br>
<br>
</div></div><div class="im">I am not familiar with waterfall, but in the past we had a Smalltalk to<br>
x86 translator in the Exupery project.<br></div></blockquote><div><br></div><div>Yes, it&#39;s similar.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">
<div><br>
&gt; wouldn&#39;t it be possible to use all that to make the standard unix VM work with the<br>
&gt; sq/NOS image?<br>
<br>
</div></div><div class="im">The nativeboost and related parts would indeed be an alternative to the<br>
plugin. But it seems to me that the startup patch to the Unix VM would<br>
still be needed. I am sure it would be relatively easy to write code<br>
that could work either way (in fact, isn&#39;t that already the case for the<br>
SqueakNOS VM?).<br>
</div><div><br><div class="im">
&gt; What work I think that would be required?<br>
&gt; - Making the image partly POSIX compliant? This means it should be able to receive<br>
&gt; syscalls and respond to them, probably doing nothing in most cases.<br>
<br>
</div></div><div class="im">The image would be receiving syscalls from where? I think I<br>
misunderstood this part.<br></div></blockquote><div><br></div><div>From the VM itself (or other programs if we are able to execute them). We would use the Unix VM, and this VM would think it is executing on Unix. So if for example it calls printf, it would end in a syscall to the kernel, like this:</div>




<div><br></div>         mov eax,4         ;system call number for output(sys_write)<br>         mov ebx,1         ;default output device<br>         mov ecx, msg1      ;message to write<br>         mov edx, msg1len   ;message length   <br>




         int 0x80  </div><div class="gmail_quote"><br></div><div class="gmail_quote">From smalltalk what we should do is place an interrupt handler that catches syscalls and  manages them through callbacks to the image.</div>



<div class="gmail_quote">  <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">

<div><br>&gt; - Re-coding the support code written in C. But doing it in smalltalk and nativizing it<br>
&gt; with waterfall or with asmjit. This code is really short, shouldn&#39;t be much work.<br>
<br>
</div></div><div class="im">And some of this support code isn&#39;t really in C anyway, since that<br>
language has no notion of i/o ports. It would be interesting to have<br>
multiple versions of such code in the same image if we want it to be<br>
able to run on ARM computers as well as PCs at some point.<br></div></blockquote><div><br></div><div>The less statically compiled, the best.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">


<div><br>
&gt; - Moving some fancy stuff from actual Makefile to Smalltalk. The actual Makefile has<br>
&gt; to do some special linking of binary code. For example, it takes some binary code<br>
&gt; from libc and puts it in the VM. We&#39;ll have to do this from the image.<br>
<br>
</div></div><div class="im">It seems that the current VMMaker tools are using CMake. If the goal is<br>
to merge the SqueakNOS and Unix VMs, doesn&#39;t it make sense to use the<br>
same things for both?<br></div></blockquote><div><br></div><div>Yes, but the SqueakNOS makefile was made before CMake came, and now up-to-date VMs are made with CMake, which means we have to update to CMake too if we want to have the latest VM. But it may be even easier not to have a special platform at all, that&#39;s what I want.</div>



<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<div><br>
&gt; What we gain? Important and cool stuff:<br>
&gt; - We don&#39;t need a special vm any more. This removes a barrier to entering the<br>
</div></div>&gt; project.- We get this support code written in smalltalk so we get closer to the<br>
&gt; idea of a full-smalltalk OS- We get POSIX compatibility, this means we might be<br>
&gt; able to/get closer to execute code compiled for unix.- We get POSIX documented<div class="im"><br>
<div>&gt; in smalltalk code... I don&#39;t know if somebody is interested in this anyway<br>
<br>
</div></div><div class="im">Does the &quot;execute code compiled for unix&quot; part mean you want to run<br>
stuff written in C within the image and have SqueakNOS pretend to be<br>
Unix for that code? </div></blockquote><div><br></div><div>Yes! At first, only for the VM, after that who knows.</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



This seems like a completely different project from<br>
having a single VM binary run on top of Unix and on bare computers. And<br>
it is not something that would be very secure unless that code runs in a<br>
separate address space.<br></blockquote><div><br></div></div><div>SqueakNOS has none security mechanisms implented for now.</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<br>
By the way, in 1987 my then partner asked me if &quot;it is possible to write<br>
a Unix in Smalltalk&quot;. Though in theory the answer is &quot;yes&quot; (you can<br>
always simulate some computer in Smalltalk and run Unix on that - it<br>
would just be really, really slow) I replied &quot;no&quot;, which resulted in a<br>
series of events which killed our company. So I have given this question<br>
a lot of thought in the past few decades....<br>
<br></blockquote></div><div>But then you didn&#39;t have SqueakNOS ;P</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-- Jecel<br>
<br></blockquote><div><br></div><div>Cheers,</div><div>Javier</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
_______________________________________________<br>
SqueakNOS mailing list<br>
<a href="mailto:SqueakNOS@lists.squeakfoundation.org" target="_blank">SqueakNOS@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/squeaknos" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/squeaknos</a><br>
</blockquote></div></div><br><br clear="all"><div class="HOEnZb"><div class="h5"><div><br></div>-- <br>Lic. Javier Pimás<br>Ciudad de Buenos Aires<br>
</div></div><br>_______________________________________________<br>
SqueakNOS mailing list<br>
<a href="mailto:SqueakNOS@lists.squeakfoundation.org">SqueakNOS@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/squeaknos" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/squeaknos</a><br>
<br></blockquote></div><br></div>