Re: VM images and working in the VM image

stephane ducasse <[email protected]> Sun, 13 May 2007 12:20:17 +0200
Newsgroups gmane.comp.lang.smalltalk.strongtalk
Message-ID <[email protected]>
from a model point of view, what you can do in java is the same in  
smalltalk.
S# for example has a mini core (bytecode+ objects) and load package  
on the fly.
Now in Smalltalk you can save your code in files and versionned them  
if you want.

What you should know is that you have other mechanisms that help you:
	- in VW I used a DB backend
	in VW (because they have engineers you can load parcel = bytecode  
and serialized objects
	without compiling the code at load time
	- in Squeak I used monticello that version source files
	
Normally these approaches are more adpated since they know that there  
are versioning
Smalltalk code so the underluying metamodel is cleverer than mere  
text file.

Now what I want to say is that the idea of an image = a cache of  
method and objects
is good but it is not really a good engineering metaphor. It is cool  
and cosy (imagine I can
send you my image on Mac and you can see exactly where my PC pointer  
is on the stack is, then you can proceed.....debug webserver on the  
fly while they are running) but usually
I rebuild my image from scratch each time I start programming.
We could have a Smalltalk (squeak on day) or I guess that GNU is  
doing that, that starts
with a minikernel seed and load compiled code. There is nothing at  
the model level that prevents
that.

Stef
On 12 mai 07, at 23:24, Richard wrote:

>
> Coming from a background of C++, Ruby and Java I'm used the idea that
> you program in an IDE and then you output a Jar, or a bunch of shared
> libraries and executables. This process involves selecting which
> packages you want to use and it also involves people sorting their
> software into packages and declairing package dependencies. It seems
> to me (and I don't have much experience with smalltalk) that  one has
> one big VM image containing the IDE and the program being developed,
> but if I write a webserver for instance when I deploy the webserver in
> production I don't want the IDE as part of it (probably I want to be
> able to attach a debugger via a TCP connection, but that is another
> issue).
>
> Does strongtalk support the notion of packages in a similar way to
> Java? Can I write a package in strongtalk, declare its dependencies,
> then create a VM image that just contains my software and its
> dependencies (transitive closure obviously)?
>
> I also want to keep all my source code in files on the disk. That way
> I can use existing source control systems. It must be easy to have the
> VM (well some objects probably) watching the source files and reload
> them if they change. That way at least one can operate even if one
> doesn't yet have a GUI (e.g. the present situation with linux and
> strongtalk). The file system is also a bit more trustworthy than a
> running executable, e.g. if my power goes off then files are ok, but
> the VM image is gone. Also source files normally don't get corrupted,
> but I'm afraid that if the power goes off while I'm saving a VM image
> it might get corrupted.
>
> I think its an advantage to support more than one GUI system because
> not everyone wants the same thing (some people want a GUI system that
> behaves like the common ones, some people want to try something
> radiacally new). In the beginning lots of people can start making GUI
> systems, but after a while those that are good become apparent and
> more effort goes into them.
>
> It seems to me that package dependancies are as simple as nominating
> one package for each class, and some number of dependent packages.
> Then having the class loader disallow the loading of any class who's
> dependent packages can't be located. It is quite usefull to make
> packages into a tree, i.e. java.swing.controllers being a subpackage
> of java.swing.
>
> Packages can do other things, like static initialization, but I don't
> know of too many situations where one really needs static
> initialization other than for factories which seems to be a less
> important idiom in languages that support reflection.
>
> regards,
>
> Richard.
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Strongtalk-general" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/strongtalk-general?hl=en
-~----------~----~----~----~------~----~------~--~---