News for hackers. Stuff that matters.
Re:Smalltalk: Welcome to the Balkans by rbanffy on Thursday February 11, 2010 @02:27PM (#1118498)
Smalltalk has been using images since ever. The image contains your world - your code, development tools and all your complete environment, preserving its state between your sessions. When it's time to deliver the application to its users, you just take out whatever is not the application and its dependencies and give the image to your client.

That said, I too find it a bit disturbing not to be able to import/export changes to the base image as text-files and being unable to build a clean image from source-code only.

Re:Smalltalk: Welcome to the Balkans by cabalamat on Thursday February 11, 2010 @02:59PM (#1118590)
> I too find it a bit disturbing not to be able to import/export changes to the base image as text-files and being unable to build a clean image from source-code only.

I also find that disturbing. Another vthing i find disturbing, which may be a related problem is that although Smalltak lets you do all sorts of cool things like rotate its menus 30 degrees while the application is still running, often it just doesn't do what I expect for no apparent reason (other Smalltalk programmers seem to have the same experience). I suspect this progem is related to the fact that you can't simply get the state of the system as a set of text files. For me, at least, developing in Smalltalk feels a bit like walking around wonderingg whether I'll fall in the quicksand.

Re:Smalltalk: Welcome to the Balkans by spooneybarger on Thursday February 11, 2010 @04:41PM (#1118848)
I find having a live interactive debugger on the actual data makes it far easier to 'get the state of the system' rather than some text files which have very little to do with the state of the system and usually just represent code whereas a 'system' is a combination of code and data.
Re:Smalltalk: Welcome to the Balkans by cabalamat on Thursday February 11, 2010 @09:37PM (#1119562)
That's a very valid point -- actually being able to see the state of the data it very important in knowing what's going on. As Brooks and Raymond put it: "Show me your code and conceal your data structures, and I shall continue to be mystified. Show me your data structures, and I won't usually need your code; it'll be obvious."

But can you do this in Smalltalk? OK, you have inspectors that show you a representation of your data, but the representation is incomplete. I haven't used Smalltalk in years, so I'll gave an example in Python to show what I mean:

   >>> a = [1,2]
   >>> b=[a,a]
   >>> c=[[1,2],[1,2]]
   >>> b
   [[1, 2], [1, 2]]
   >>> c
   [[1, 2], [1, 2]]
   >>> b[0][0]='x'
   >>> b
   [['x', 2], ['x', 2]]
   >>> c[0][0]='x'
   >>> c
   [['x', 2], [1, 2]]
(b) and (c) initiallly have the same representation, but they behave differently. I don't like this, so I'm creating a language where the text representation of an object defines how it behaves: if two objects have the sdame representation, their internal structure is the same, and their behaviour will (with one exception) be the same. This representation format is used as a serialisation format, and is also used to write literals in the language. This means that it's possible to display precisely the value of any object, including all the sub-objects it contains.
Re:Smalltalk: Welcome to the Balkans by spooneybarger on Friday February 12, 2010 @08:20AM (#1120447)
Yes you can because 'a' is an object and your array [1,2] is a different object. They have the same value but a different identity. You can use a smalltalk inspector to see both value and identity.
Re:Smalltalk: Welcome to the Balkans by larsr on Thursday February 11, 2010 @03:34PM (#1118678)
There are objects in the modern day Squeak image that were created when Smalltalk-80 was released. In fact, if you explore around Squeak's image, you can find all sorts of disconnected bits and pieces that nobody uses anymore, that are just along for the ride because they are in the image. Sort of Smalltalk pseudogenes. It's organic, very different, and to me as a biologist who likes to program, quite fascinating.
Re:Smalltalk: Welcome to the Balkans by rbanffy on Thursday February 11, 2010 @03:47PM (#1118712)
I know I shouldn't, but this organic thing makes me worry that one day my working image could develop some kind of disease ;-)
Re:Smalltalk: Welcome to the Balkans by mahmud on Thursday February 11, 2010 @05:31PM (#1118953)
Use a purifying/tree-shaking tool then. I am sure STs have them.
Re:Smalltalk: Welcome to the Balkans by spooneybarger on Thursday February 11, 2010 @04:45PM (#1118853)
There are some good points about how many people use images in this avi bryant interview that is completely different from the 'steroetypical' idea that many people have of how 'everyone' uses images:

http://www.infoq.com/interviews/bryant-smalltalk-dabbledb

Re:Smalltalk: Welcome to the Balkans by _delirium on Thursday February 11, 2010 @06:48PM (#1119140)
> being unable to build a clean image from source-code only

It's a different language, but I found this paper on making SBCL (a lisp compiler) build from source interesting: http://www.doc.gold.ac.uk/~mas01cr/papers/s32008/sbcl.pdf

The previous situation was that the CMUCL compiler, which SBCL forked from, was essentially defined by the image, which was incrementally changed into new versions--- and over decades this process had made the source code that was nominally "the CMUCL source" increasingly different from the in-memory image that was actually CMUCL.

I still find the image-based model vaguely fascinating in its blurring of the compile-time/runtime distinction, something that occasionally gets resurrected under various guises: http://en.wikipedia.org/wiki/Interactive_programming

Re:Smalltalk: Welcome to the Balkans by spooneybarger on Thursday February 11, 2010 @04:39PM (#1118846)
You can do both of those things. You can file out changes and you can use text files to load in and build an image, it just isnt very commonly done.