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 ?
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?
I hope someone can help this newbie :)
Thanks in advance,
Mariano
On Mon, Feb 8, 2010 at 9:42 AM, Mariano Martinez Peck <marianopeck@gmail.com
wrote:
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 ?
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.
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?
As far as I'm aware all primitives are written in Slang, even if they're simply wrappers. But if you look in the files in platforms/{Cross,Mac OS,unix}/plugins/FooPlugin you'll find cross-platform and platform-specific support code for each plugin (a plugin being a related suite of primitives), and look in the src tree for plugins and extplugins and look in their subdirectries you'll find all the generated Slang plugin code.
A better place to look is in VMMaker using the browser. There you'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.
HTH Eliot
I hope someone can help this newbie :)
Thanks in advance,
Mariano
On Mon, Feb 8, 2010 at 7:41 PM, Eliot Miranda eliot.miranda@gmail.comwrote:
On Mon, Feb 8, 2010 at 9:42 AM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
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 ?
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.
Thanks Eliot for the explanation. This is new for me so I will be learning and bothering for a while ;)
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?
As far as I'm aware all primitives are written in Slang, even if they're simply wrappers. But if you look in the files in platforms/{Cross,Mac OS,unix}/plugins/FooPlugin you'll find cross-platform and platform-specific support code for each plugin (a plugin being a related suite of primitives),
perfect, I got it and I could see it :)
and look in the src tree for plugins and extplugins and look in their subdirectries you'll find all the generated Slang plugin code.
I didn't find this. I guess you are talking about the src folder where VMMaker put the genereated code, however, I couldn't make it work yet (after I tell you the problem)
A better place to look is in VMMaker using the browser. There you'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.
I saw it! Thanks...much clear now. I have, however, a couple of problems/questions:
- I couldn't compile in VMMaker as I have the error: "MacOSPowerPCOS9VMMaker could not find directory for: Mac OS specific files; is the platform root path set correctly?" However, I have correctly set the path. I attach a screenshot of the pharo image and the output of a console. Do you know what the problem can be ?
- can I download a "standard" VMMaker configuration from somewhere?
- shouldn'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 :)
- is there a way to know which are the "core" 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't need CroquetPlugin or FFI if I don'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). What I am trying to do is to see how can I create the minimal "production" vm according to my needs.
- I know nothing about SLANG, but something surprised me: "self" referes directly to the C function name ? For example, in SocketPlugin >> primitiveResolverAddressLookupResult it does: "sz := self sqResolverAddrLookupResultSize."
and sqResolverAddrLookupResultSize is the name of the C function of the plugin. WOWWW!!!
Thanks for all the help.
Mariano
HTH Eliot
I hope someone can help this newbie :)
Thanks in advance,
Mariano
On Tue, Feb 9, 2010 at 8:41 AM, Mariano Martinez Peck <marianopeck@gmail.com
wrote:
On Mon, Feb 8, 2010 at 7:41 PM, Eliot Miranda eliot.miranda@gmail.comwrote:
On Mon, Feb 8, 2010 at 9:42 AM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
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 ?
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.
Thanks Eliot for the explanation. This is new for me so I will be learning and bothering for a while ;)
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?
As far as I'm aware all primitives are written in Slang, even if they're simply wrappers. But if you look in the files in platforms/{Cross,Mac OS,unix}/plugins/FooPlugin you'll find cross-platform and platform-specific support code for each plugin (a plugin being a related suite of primitives),
perfect, I got it and I could see it :)
and look in the src tree for plugins and extplugins and look in their subdirectries you'll find all the generated Slang plugin code.
I didn't find this. I guess you are talking about the src folder where VMMaker put the genereated code, however, I couldn't make it work yet (after I tell you the problem)
Right, and where the generated code is can vary. Look for directories called src or src32. (Or, better generate the code as you're trying to below; I can help ;) )
A better place to look is in VMMaker using the browser. There you'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.
I saw it! Thanks...much clear now. I have, however, a couple of problems/questions:
- I couldn't compile in VMMaker as I have the error:
"MacOSPowerPCOS9VMMaker could not find directory for: Mac OS specific files; is the platform root path set correctly?" However, I have correctly set the path. I attach a screenshot of the pharo image and the output of a console. Do you know what the problem can be ?
The directory the MacOSPowerPCOS9VMMaker expects is called 'Mac OS' not MacOS or Macos or... So either change it to expect MacOS or move or copy your platforms subdirectory from platforms/MacOS to 'platforms/Mac OS'.
- can I download a "standard" VMMaker configuration from somewhere?
John and David are the experts here. I have a decidedly non-standard configuration (for the time being) and so am of no help.
- shouldn'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 :)
Uh, yes :)
- is there a way to know which are the "core" 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't need CroquetPlugin or FFI if I don'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). What I am trying to do is to see how can I create the minimal "production" vm according to my needs.
I don'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.
- I know nothing about SLANG, but something surprised me: "self" referes
directly to the C function name ? For example, in SocketPlugin >> primitiveResolverAddressLookupResult it does: "sz := self sqResolverAddrLookupResultSize."
and sqResolverAddrLookupResultSize is the name of the C function of the plugin. WOWWW!!!
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->foo(arg).
You'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).
Thanks for all the help.
Mariano
HTH Eliot
I hope someone can help this newbie :)
Thanks in advance,
Mariano
A better place to look is in VMMaker using the browser. There you'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.
I saw it! Thanks...much clear now. I have, however, a couple of problems/questions:
- I couldn't compile in VMMaker as I have the error:
"MacOSPowerPCOS9VMMaker could not find directory for: Mac OS specific files; is the platform root path set correctly?" However, I have correctly set the path. I attach a screenshot of the pharo image and the output of a console. Do you know what the problem can be ?
The directory the MacOSPowerPCOS9VMMaker expects is called 'Mac OS' not MacOS or Macos or... So either change it to expect MacOS or move or copy your platforms subdirectory from platforms/MacOS to 'platforms/Mac OS'.
I knew that was going to be confusing :( I did try 'Mac OS' as it was like that after downloading with SVN. And that's where I got the problem. Then, I thought (used to Linux) that there may be some problem with the space. I changed, but still the same problem :(
- can I download a "standard" VMMaker configuration from somewhere?
John and David are the experts here. I have a decidedly non-standard configuration (for the time being) and so am of no help.
ok...no problem :)
- shouldn'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 :)
Uh, yes :)
Excellent. Let's see what others think.
- is there a way to know which are the "core" 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't need CroquetPlugin or FFI if I don'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). What I am trying to do is to see how can I create the minimal "production" vm according to my needs.
I don'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.
Exactly that was my idea. I see work in progress for minimal images, but not for "minimal" or more modular VM. I said I don't see not because there isn't, just because I don't know.
I even though in having official .config for different common needs. For example, a standard one, a kernel, a web (with Socket, Network, etc), a headless, etc... of course every people can build their own as they wish...But sometimes (at least that's what happens to me) I don't know what a plugin is, and neither I don't know if it is used or not by the image I plan to use.
- I know nothing about SLANG, but something surprised me: "self"
referes directly to the C function name ? For example, in SocketPlugin >> primitiveResolverAddressLookupResult it does: "sz := self sqResolverAddrLookupResultSize."
and sqResolverAddrLookupResultSize is the name of the C function of the plugin. WOWWW!!!
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->foo(arg).
Much clear now :) Thanks!
You'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).
Cool. I saw them!
Thanks for all the help.
Mariano
HTH Eliot
I hope someone can help this newbie :)
Thanks in advance,
Mariano
Den 09.02.2010 19:12, skrev Mariano Martinez Peck:
A better place to look is in VMMaker using the browser. There you'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. I saw it! Thanks...much clear now. I have, however, a couple of problems/questions: - I couldn't compile in VMMaker as I have the error: "MacOSPowerPCOS9VMMaker could not find directory for: Mac OS specific files; is the platform root path set correctly?" However, I have correctly set the path. I attach a screenshot of the pharo image and the output of a console. Do you know what the problem can be ? The directory the MacOSPowerPCOS9VMMaker expects is called 'Mac OS' not MacOS or Macos or... So either change it to expect MacOS or move or copy your platforms subdirectory from platforms/MacOS to 'platforms/Mac OS'.
I knew that was going to be confusing :( I did try 'Mac OS' as it was like that after downloading with SVN. And that's where I got the problem. Then, I thought (used to Linux) that there may be some problem with the space. I changed, but still the same problem :(
If the screenshot is accurate, I believe the "path to platform source" line needs to point to .../platforms, not /platforms/MacOS. This subfolder is chosen with the Platform name.
Cheers, Henry
I knew that was going to be confusing :( I did try 'Mac OS' as it was like that after downloading with SVN. And that's where I got the problem. Then, I thought (used to Linux) that there may be some problem with the space. I changed, but still the same problem :(
If the screenshot is accurate, I believe the "path to platform source" line needs to point to .../platforms, not /platforms/MacOS. This subfolder is chosen with the Platform name.
What an idiot I am :) Thanks Henrik, that worked!
Mariano Martinez Peck wrote:
Exactly that was my idea. I see work in progress for minimal images, but not for "minimal" or more modular VM. I said I don't see not because there isn't, just because I don't know.
The VM is modular by design, i.e., by using plugins. The most minimal VM at this point is decidedly the Android VM, see
http://code.google.com/p/squeak-android-vm/source/browse/trunk/project/jni/
From this VM you could still remove the B2DPlugin, LargeIntegers, MiscPrimPlugin, and ZipPlugin. That's pretty damn minimal (the binary is 300k in size).
Cheers, - Andreas
For the OSX Version 4 VM the build documentation says:
F. Select plugins. (Suggest selecting menu item "make all internal", then drag back the following back to Plugins not built: CroquetPlugin FFIPlugin FloatMathPlugin FileCopyPlugin Mpeg3Plugin TestOSAPlugin
I also then supply these as external plugins, some are mac platform specific.
ClipboardExtendedPlugin.bundle CroquetPlugin.bundle CurlPlugin.bundle FloatMathPlugin.bundle FT2Plugin.bundle IA32ABI.bundle KedamaPlugin.bundle KedamaPlugin2.bundle LocalePlugin.bundle mpeg3Plugin.bundle OggPlugin.bundle PrintJobPlugin.bundle QuicktimePlugin.bundle RomePlugin.bundle SerialExtendedUnixPlugin.bundle ServicesPlugin.bundle SparklePlugin.bundle SpellingPlugin.bundle SqueakFFIPrims.bundle TestOSAPlugin.bundle UnixOSProcessPlugin.bundle
On 2010-02-09, at 10:33 AM, Andreas Raab wrote:
Mariano Martinez Peck wrote:
Exactly that was my idea. I see work in progress for minimal images, but not for "minimal" or more modular VM. I said I don't see not because there isn't, just because I don't know.
The VM is modular by design, i.e., by using plugins. The most minimal VM at this point is decidedly the Android VM, see
http://code.google.com/p/squeak-android-vm/source/browse/trunk/project/jni/
From this VM you could still remove the B2DPlugin, LargeIntegers, MiscPrimPlugin, and ZipPlugin. That's pretty damn minimal (the binary is 300k in size).
Cheers,
- Andreas
-- =========================================================================== John M. McIntosh johnmci@smalltalkconsulting.com Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================
On Tue, Feb 9, 2010 at 7:37 PM, John M McIntosh < johnmci@smalltalkconsulting.com> wrote:
For the OSX Version 4 VM the build documentation says:
Where is that information John ? I am trying to compile the vm now that I already generated the .c but I am not sure how to do it correctly.
I noticed that it doesn't exit something like http://www.squeakvm.org/macos
I checked in http://smalltalkconsulting.com/squeak.html
but I didn't find anything.
Thanks
Mariano
F. Select plugins. (Suggest selecting menu item "make all
internal", then drag back the following back to Plugins not built: CroquetPlugin FFIPlugin FloatMathPlugin FileCopyPlugin Mpeg3Plugin TestOSAPlugin
I also then supply these as external plugins, some are mac platform specific.
ClipboardExtendedPlugin.bundle CroquetPlugin.bundle CurlPlugin.bundle FloatMathPlugin.bundle FT2Plugin.bundle IA32ABI.bundle KedamaPlugin.bundle KedamaPlugin2.bundle LocalePlugin.bundle mpeg3Plugin.bundle OggPlugin.bundle PrintJobPlugin.bundle QuicktimePlugin.bundle RomePlugin.bundle SerialExtendedUnixPlugin.bundle ServicesPlugin.bundle SparklePlugin.bundle SpellingPlugin.bundle SqueakFFIPrims.bundle TestOSAPlugin.bundle UnixOSProcessPlugin.bundle
On 2010-02-09, at 10:33 AM, Andreas Raab wrote:
Mariano Martinez Peck wrote:
Exactly that was my idea. I see work in progress for minimal images, but
not for "minimal" or more modular VM. I said I don't see not because there isn't, just because I don't know.
The VM is modular by design, i.e., by using plugins. The most minimal VM
at this point is decidedly the Android VM, see
http://code.google.com/p/squeak-android-vm/source/browse/trunk/project/jni/
From this VM you could still remove the B2DPlugin, LargeIntegers,
MiscPrimPlugin, and ZipPlugin. That's pretty damn minimal (the binary is 300k in size).
Cheers,
- Andreas
--
John M. McIntosh johnmci@smalltalkconsulting.com Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================
http://www.squeakvm.org/cgi-bin/viewcvs.cgi/trunk/platforms/Mac%20OS/vm/Docu...
On 2010-02-09, at 11:39 AM, Mariano Martinez Peck wrote:
On Tue, Feb 9, 2010 at 7:37 PM, John M McIntosh johnmci@smalltalkconsulting.com wrote:
For the OSX Version 4 VM the build documentation says:
Where is that information John ? I am trying to compile the vm now that I already generated the .c but I am not sure how to do it correctly.
I noticed that it doesn't exit something like http://www.squeakvm.org/macos
I checked in http://smalltalkconsulting.com/squeak.html
but I didn't find anything.
Thanks
Mariano
-- =========================================================================== John M. McIntosh johnmci@smalltalkconsulting.com Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================
On Tue, Feb 9, 2010 at 9:10 PM, John M McIntosh < johnmci@smalltalkconsulting.com> wrote:
http://www.squeakvm.org/cgi-bin/viewcvs.cgi/trunk/platforms/Mac%20OS/vm/Docu...
Thanks John. I have been trying to follow your steps. They are pretty accurate, however, I had some problems. I hope my newbie problems be of help to update the documentation if required.
1) I had to copy the src generated from VMMaker (which was generated by default in the same directoy where the image is) to svnSqueakTree/
From your comments I think you let also the default src. So, in such case I
guess to need to do what I did (copy). I am right ?
In summary: copy /Users/mariano/Pharo/imagenes/Pharo1.0-10508-rc1dev10.01.1/src to /Users/mariano/Pharo/VM/svnSqueakTree/svnSqueakTree
2) In step 6, A) it says "Double-click the SqueakVMUNIXPATHS.xcodeproj file" which one ?? because at that time I have 3 of those files, as the readme previously said to copy that file to the folder where "platforms" and "src" are...So, I have 3 different SqueakVMUNIXPATHS.xcodeproj files.
I used the one of /Users/mariano/Pharo/VM/svnSqueakTree/svnSqueakTree
is this correct ? which should I use ?
3) In step 6, e) it says "From the Project menu pick the active build configuration you want to use." I noticed that there is an option "set active build configuration" and 3 options: development, deployment and deployment symbols.
3.a) I am intrigued in the differences of those 3. I mean, what is done different in the compilation.
3.b) What is deploymentSymbols ?
3.c) Doing develoment, the VM is 2mb, but doing deployment is 3....is this correct ?? I would expect the development be bigger that deployment
4.d) There is an incredible difference in speed. Development is MUUUUUUCH more slow that production. This takes me to 3.a) ;)
4) No matter the "set active build configuration" I couldn't make FreeType to work. I open an image with TrueType, but I cannot see the fonts...But the plugins are included when building the VM with VMMaker. Do you now what can be the problem ?
Thanks for any tip!
Mariano
On 2010-02-09, at 11:39 AM, Mariano Martinez Peck wrote:
On Tue, Feb 9, 2010 at 7:37 PM, John M McIntosh < johnmci@smalltalkconsulting.com> wrote:
For the OSX Version 4 VM the build documentation says:
Where is that information John ? I am trying to compile the vm now that I already generated the .c but I am not sure how to do it correctly.
I noticed that it doesn't exit something like http://www.squeakvm.org/macos
I checked in http://smalltalkconsulting.com/squeak.html
but I didn't find anything.
Thanks
Mariano
--
John M. McIntosh johnmci@smalltalkconsulting.com Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================
On Wed, Feb 10, 2010 at 11:11 AM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
On Tue, Feb 9, 2010 at 9:10 PM, John M McIntosh < johnmci@smalltalkconsulting.com> wrote:
http://www.squeakvm.org/cgi-bin/viewcvs.cgi/trunk/platforms/Mac%20OS/vm/Docu...
Thanks John. I have been trying to follow your steps. They are pretty accurate, however, I had some problems. I hope my newbie problems be of help to update the documentation if required.
- I had to copy the src generated from VMMaker (which was generated by
default in the same directoy where the image is) to svnSqueakTree/ From your comments I think you let also the default src. So, in such case I guess to need to do what I did (copy). I am right ?
In summary: copy /Users/mariano/Pharo/imagenes/Pharo1.0-10508-rc1dev10.01.1/src to /Users/mariano/Pharo/VM/svnSqueakTree/svnSqueakTree
- In step 6, A) it says "Double-click the SqueakVMUNIXPATHS.xcodeproj
file" which one ?? because at that time I have 3 of those files, as the readme previously said to copy that file to the folder where "platforms" and "src" are...So, I have 3 different SqueakVMUNIXPATHS.xcodeproj files.
I used the one of /Users/mariano/Pharo/VM/svnSqueakTree/svnSqueakTree
is this correct ? which should I use ?
- In step 6, e) it says "From the Project menu pick the active build
configuration you want to use." I noticed that there is an option "set active build configuration" and 3 options: development, deployment and deployment symbols.
3.a) I am intrigued in the differences of those 3. I mean, what is done different in the compilation.
3.b) What is deploymentSymbols ?
3.c) Doing develoment, the VM is 2mb, but doing deployment is 3....is this correct ?? I would expect the development be bigger that deployment
4.d) There is an incredible difference in speed. Development is MUUUUUUCH more slow that production. This takes me to 3.a) ;)
- No matter the "set active build configuration" I couldn't make
FreeType to work. I open an image with TrueType, but I cannot see the fonts...But the plugins are included when building the VM with VMMaker. Do you now what can be the problem ?
5) No matter which plugins I compile with VMMaker, when I open SqueakVMUNIXPATHS.xcodeproj with XCode, I see all the plugins I didn't include, in red, which make sense....so, what can I do to compile correctly ? go to each red file, right button -> delete ? I think that doesn't work as I have errors trying to compile after that :(
Thanks!
Mariano
Thanks for any tip!
Mariano
On 2010-02-09, at 11:39 AM, Mariano Martinez Peck wrote:
On Tue, Feb 9, 2010 at 7:37 PM, John M McIntosh < johnmci@smalltalkconsulting.com> wrote:
For the OSX Version 4 VM the build documentation says:
Where is that information John ? I am trying to compile the vm now that I already generated the .c but I am not sure how to do it correctly.
I noticed that it doesn't exit something like http://www.squeakvm.org/macos
I checked in http://smalltalkconsulting.com/squeak.html
but I didn't find anything.
Thanks
Mariano
--
=========================================================================== John M. McIntosh johnmci@smalltalkconsulting.com Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
===========================================================================
On Wed, Feb 10, 2010 at 4:38 AM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
On Wed, Feb 10, 2010 at 11:11 AM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
On Tue, Feb 9, 2010 at 9:10 PM, John M McIntosh < johnmci@smalltalkconsulting.com> wrote:
http://www.squeakvm.org/cgi-bin/viewcvs.cgi/trunk/platforms/Mac%20OS/vm/Docu...
Thanks John. I have been trying to follow your steps. They are pretty accurate, however, I had some problems. I hope my newbie problems be of help to update the documentation if required.
- I had to copy the src generated from VMMaker (which was generated by
default in the same directoy where the image is) to svnSqueakTree/ From your comments I think you let also the default src. So, in such case I guess to need to do what I did (copy). I am right ?
In summary: copy /Users/mariano/Pharo/imagenes/Pharo1.0-10508-rc1dev10.01.1/src to /Users/mariano/Pharo/VM/svnSqueakTree/svnSqueakTree
- In step 6, A) it says "Double-click the SqueakVMUNIXPATHS.xcodeproj
file" which one ?? because at that time I have 3 of those files, as the readme previously said to copy that file to the folder where "platforms" and "src" are...So, I have 3 different SqueakVMUNIXPATHS.xcodeproj files.
I used the one of /Users/mariano/Pharo/VM/svnSqueakTree/svnSqueakTree
is this correct ? which should I use ?
- In step 6, e) it says "From the Project menu pick the active build
configuration you want to use." I noticed that there is an option "set active build configuration" and 3 options: development, deployment and deployment symbols.
3.a) I am intrigued in the differences of those 3. I mean, what is done different in the compilation.
3.b) What is deploymentSymbols ?
3.c) Doing develoment, the VM is 2mb, but doing deployment is 3....is this correct ?? I would expect the development be bigger that deployment
4.d) There is an incredible difference in speed. Development is MUUUUUUCH more slow that production. This takes me to 3.a) ;)
- No matter the "set active build configuration" I couldn't make
FreeType to work. I open an image with TrueType, but I cannot see the fonts...But the plugins are included when building the VM with VMMaker. Do you now what can be the problem ?
- No matter which plugins I compile with VMMaker, when I open
SqueakVMUNIXPATHS.xcodeproj with XCode, I see all the plugins I didn't include, in red, which make sense....so, what can I do to compile correctly ? go to each red file, right button -> delete ? I think that doesn't work as I have errors trying to compile after that :(
Deleting the red definitions is the right thing to do. I expect you need to remove corresponding definitions from sqNamedPrims.h as well.
HTH Eliot
Thanks!
Mariano
Thanks for any tip!
Mariano
On 2010-02-09, at 11:39 AM, Mariano Martinez Peck wrote:
On Tue, Feb 9, 2010 at 7:37 PM, John M McIntosh < johnmci@smalltalkconsulting.com> wrote:
For the OSX Version 4 VM the build documentation says:
Where is that information John ? I am trying to compile the vm now that I already generated the .c but I am not sure how to do it correctly.
I noticed that it doesn't exit something like http://www.squeakvm.org/macos
I checked in http://smalltalkconsulting.com/squeak.html
but I didn't find anything.
Thanks
Mariano
--
=========================================================================== John M. McIntosh johnmci@smalltalkconsulting.com Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
===========================================================================
On Tue, Feb 9, 2010 at 10:33 AM, Andreas Raab andreas.raab@gmx.de wrote:
Mariano Martinez Peck wrote:
Exactly that was my idea. I see work in progress for minimal images, but not for "minimal" or more modular VM. I said I don't see not because there isn't, just because I don't know.
The VM is modular by design, i.e., by using plugins. The most minimal VM at this point is decidedly the Android VM, see
http://code.google.com/p/squeak-android-vm/source/browse/trunk/project/jni/
From this VM you could still remove the B2DPlugin, LargeIntegers, MiscPrimPlugin, and ZipPlugin. That's pretty damn minimal (the binary is 300k in size).
I would definitely /not/ remove LargeIntegers (core arithmetic) or ZipPlugin (method trailers, loading/unloading compressed files). We need to start making a chart of plugin vs functionality supported and (as Tim has encouraged us to do in the past) start evicting plugins that do not support core language functionality (e.g. LargeIntegers) or near universal utility (e.g. ZipPlugin) to external status.
Cheers,
- Andreas
rant alert...
On Tue, Feb 9, 2010 at 10:38 AM, Eliot Miranda eliot.miranda@gmail.comwrote:
On Tue, Feb 9, 2010 at 10:33 AM, Andreas Raab andreas.raab@gmx.de wrote:
Mariano Martinez Peck wrote:
Exactly that was my idea. I see work in progress for minimal images, but not for "minimal" or more modular VM. I said I don't see not because there isn't, just because I don't know.
The VM is modular by design, i.e., by using plugins. The most minimal VM at this point is decidedly the Android VM, see
http://code.google.com/p/squeak-android-vm/source/browse/trunk/project/jni/
From this VM you could still remove the B2DPlugin, LargeIntegers, MiscPrimPlugin, and ZipPlugin. That's pretty damn minimal (the binary is 300k in size).
I would definitely /not/ remove LargeIntegers (core arithmetic) or ZipPlugin (method trailers, loading/unloading compressed files). We need to start making a chart of plugin vs functionality supported and (as Tim has encouraged us to do in the past) start evicting plugins that do not support core language functionality (e.g. LargeIntegers) or near universal utility (e.g. ZipPlugin) to external status.
To this end, good class comments for plugins helps. For example this was not helpful to me when doing the closure compiler (a primitive in GeniePlugin overflowed the frame size):
This plugin implements the functionality of CRStrokeFeature>>sameClassAbsoluteStrokeDistance: aCRFeature forReference: aBoolean . This means that changes there should be mirrored here!
GeniePlugin>>majorNO should be in sync with version number of Genie.
This doesn't tell me what GeniePlugin is useful for unless I go find CRStrokeFeature and read its class comment if it has one. The class comment needs to at last mention that the GeniePlugin supports gesture recognition of gestures made with input devices such as a pen tablet.
In general packages in the Smalltalk world all too often lack good high-level comments, and announcements of new versions lack them too. being told that version N.M of package foo is now available is, to me, useless unless I know what foo does at a high level.
To this end I plead with all plugin authors to revisit their plugins and, where lacking, add good high-level information on what their plugins do.
P.S. Sorry to single out GeniePlugin; it is simply an example, and certainly not the worst.
Cheers,
- Andreas
Eliot Miranda wrote:
The VM is modular by design, i.e., by using plugins. The most minimal VM at this point is decidedly the Android VM, see http://code.google.com/p/squeak-android-vm/source/browse/trunk/project/jni/ From this VM you could still remove the B2DPlugin, LargeIntegers, MiscPrimPlugin, and ZipPlugin. That's pretty damn minimal (the binary is 300k in size).
I would definitely /not/ remove LargeIntegers (core arithmetic) or ZipPlugin (method trailers, loading/unloading compressed files).
Oh, for sure. That's why they're in there :-) Ditto for MiscPrimPlugin (which has some of the string comparison prims) and B2DPlugin is required due to the heavy use of gradients and stuff.
The above is close to the smallest set of plugins if you don't require I/O. If you do, you would definitely add SocketPlugin (which is on my shortlist for the Android VM).
Cheers, - Andreas
On Tue, Feb 09, 2010 at 05:41:03PM +0100, Mariano Martinez Peck wrote:
- is there a way to know which are the "core" 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't need CroquetPlugin or FFI if I don'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). What I am trying to do is to see how can I create the minimal "production" vm according to my needs.
The minimum set of plugins required for a useful VM is: BalloonEnginePlugin BitBltSimulation FilePlugin SocketPlugin
This produces a VM that can run an image, open the display, read the source files, and interact with the network. You can add other plugins as needed. John provided the list of plugins that he includes in a Mac VM, and you can see the plugins used in Ian's Unix VMs by looking at the files platforms/unix/src/plugins.int and platforms/unix/src/plugins.ext, which were generated from VMMaker as of Ian's last distribution.
Dave
On Tue, Feb 9, 2010 at 11:59 PM, David T. Lewis lewis@mail.msen.com wrote:
On Tue, Feb 09, 2010 at 05:41:03PM +0100, Mariano Martinez Peck wrote:
- is there a way to know which are the "core" 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't need CroquetPlugin or FFI if I don'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). What I am trying to do is to see how can I create the minimal
"production"
vm according to my needs.
The minimum set of plugins required for a useful VM is: BalloonEnginePlugin BitBltSimulation FilePlugin SocketPlugin
This produces a VM that can run an image, open the display,
Thanks Dave! Suppose I am using a headless image (maybe seaside using RFB), can I remove BitBltSimulation or BalloonEnginePlugin too ?
There is a difference between this list and Andreas one (cool because those are the one Andreas said that can be removed)
B2DPlugin.c LargeIntegers.c MiscPrimitivePlugin.c ZipPlugin.c
Eliot said he recommended to have LargeIntegers and ZipPlugin. So, I guess I will put them too.
read the source files, and interact with the network.
Exactly that was what I was looking for :)
You can add other plugins as needed. John provided the list of plugins that he includes in a Mac VM, and you can see the plugins used in Ian's Unix VMs by looking at the files platforms/unix/src/plugins.int and platforms/unix/src/plugins.ext, which were generated from VMMaker as of Ian's last distribution.
Ahh okok. I didn't know about those files to see the plugins used.
Thanks for the help!
Mariano
Dave
On Wed, Feb 10, 2010 at 09:17:53AM +0100, Mariano Martinez Peck wrote:
On Tue, Feb 9, 2010 at 11:59 PM, David T. Lewis lewis@mail.msen.com wrote:
The minimum set of plugins required for a useful VM is: BalloonEnginePlugin BitBltSimulation FilePlugin SocketPlugin
This produces a VM that can run an image, open the display,
Thanks Dave! Suppose I am using a headless image (maybe seaside using RFB), can I remove BitBltSimulation or BalloonEnginePlugin too ?
Actually I don't know. Give it a try and see what happens ;)
There is a difference between this list and Andreas one (cool because those are the one Andreas said that can be removed)
B2DPlugin.c LargeIntegers.c MiscPrimitivePlugin.c ZipPlugin.c
Eliot said he recommended to have LargeIntegers and ZipPlugin. So, I guess I will put them too.
Yes, those are all plugins that you will want to include in your build for performance reasons, but they are not strictly required.
Dave
Well you can VMMaker(er) up all the C code for building an interpreter, but you'll get a bunch of missing procedures, those are platform specific support api.
For porting hopefully I've identified all the platform specific code here.
http://isqueak.org/PlatformVMAPI
This excludes things like unix(like) file system and socket support. Usually you find the platform has support for unix sockets and file system, so the common code is used.
On 2010-02-08, at 9:42 AM, Mariano Martinez Peck wrote:
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 ?
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?
I hope someone can help this newbie :)
Thanks in advance,
Mariano
-- =========================================================================== John M. McIntosh johnmci@smalltalkconsulting.com Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================
On Monday 08 February 2010 11:12:50 pm Mariano Martinez Peck wrote:
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 ?
Yes. Slang is like lex or yacc and primitives are like API bindings. Each plugin has two layers coded in C - the top layer has a regular pattern and is usually generated automatically from Slang and the bottom layer which is hand- coded. The main program is also a platform-specific layer and is hand-coded.
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.
The code generated by VMMaker from Slang is just a library. The platform team hand-codes the main program, platform support code and the build scripts. For instance, the unix source tree has: /platforms/Cross/ - platform independent support code (hand-coded) /platforms/unix/ - unix specific VM and plugin code (hand-coded) /platforms/unix/src/ - VM interpreter library and plugins (Slang-coded) /platforms/unix/cmake/ - build scripts
The build scripts for the VM and its plugins merge the code from Cross/ unix/ and unix/src to build the complete VM and its plugins.
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?
The first line of a generated file will contain information about the Slang source code and the VM used to generate this file.
HTH .. Subbu
vm-dev@lists.squeakfoundation.org