[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why Images Bother People (or, at least me)

On Thu, 12 Jun 2003, Brent Fulgham wrote:

> One reason I don't particularly care for the whole "image" concept is
> that it seems overly monolithic.  You can't make use of a small language
> core that only loads resources it needs for the job at hand -- you load
> the whole 50 Meg image, whether you want to access a database or play
> MPEG movies, or just print "Hello, World!".

This depends heavily on which dialect of Smalltalk you're talking about.
Squeak has traditionally taken the "kitchen sink" approach, where many
useful (and not so useful) libraries have been added to the base image
over time.  There's currently an attempt to slim this down, so that the
core is an image of a few hundred k, and extra packages are loaded in as
needed.  I usually keep a few images around as starting points, preloaded
with various sets of libraries for different tasks.

> The nice thing about things like Perl, Python, or PLT Scheme is that
> they are very modular and can quickly start up and perform a job for me.
> They only load the libraries and modules needed by my program.

"Quickly start up" is an interesting point.  Even with large images,
Squeak typically pops up a window and is ready to go in under a second.
Remember that all it has to do is dump the image file directly into memory
- there's no linking, parsing, or initialization necessary.

> The second thing I dislike is that my experience is that these
> environments don't interact very well with the outside world.  For
> example, I've played with Squeak a bit and dislike how I don't really
> have the ability to use an editing environment I'm comfortable with,
> rather than the Object browser.  Sure, I *should* use the object
> browser, but I'm stubborn -- I don't want to.  I didn't want to have to
> create new key bindings to make the browser act the way I wanted.

I can understand this.  However, there are packages that give the Browser
both emacs bindings, and a full vim clone available.  And of course it has
all of the hackability advantages of emacs - one of the first things I did
when starting to use Squeak was to add paren matching to the editor.

> Furthermore, there was no easy way to modify the environment in a
> controlled fashion.  In Linux, if I want to play with a new class
> library in a C++ environment, I can redefine my PATH to point to the new
> library and restart the program.  No one else on the system is affected.
> In contrast, an "image" environment requires me to either create a whole
> new 15 - 20 Meg image to try the change out, or do a bunch of "file
> out/file in" manipulations to do so manually.

Why is creating a new 15-20 meg image a problem?  I have maybe 100 images
sitting in my Squeak directory.  They take up a gig of disk space.  So
what?  It's not like I need to back them up - everything important is in
CVS.  Most of them have names indicating that I was using them to do
exactly what you're talking about - try some new package.  Opening a base
image, loading in a package, and doing a "save as" takes all of 10