News for hackers. Stuff that matters.
Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by matt_eeee on Wednesday October 07, 2020 @08:39AM (#24707562)
Nice article. I would just add the smalltalk is not just a language, but a whole environment. If you have the time I encourage you to give image based development a go. It's still the most productive programming environment I have ever used.
Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by Rochus on Wednesday October 07, 2020 @09:06AM (#24707751)
There are notable versions of Smalltalk such as GNU Smalltalk or SOM which are not running in a virtual image, but can be used like normal file based programming languages. Virtual image based systems have some advantages, but even more disadvantages when it comes to deployment and integration. No wonder that the concept did not catch on. Today there are variants of it, e.g. in Dart, to shorten the start-up time.
Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by bonzini on Wednesday October 07, 2020 @09:41AM (#24708054)
GNU Smalltalk does run in an image. The main differences are: 1) it's possible and easy to rebuild the image from scratch 2) it's relatively common to reuse the same image and load files into it through the command line, without saving it the image back at the end of every execution. However the image is still there. :)
Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by Rochus on Wednesday October 07, 2020 @10:11AM (#24708387)
Well, there is the Object Memory as defined in the Bluebook, but otherwise it's file based. There are important differences to Smalltalk-80, where even the compiler and the scheduler are part of an "eternal" (i.e. with no unique origin) virtual image.
Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by bonzini on Wednesday October 07, 2020 @01:34PM (#24710609)
Saying GNU Smalltalk "is not running in a virtual image" is incorrect.

For example, GNU Smalltalk does not load the whole standard library from scratch when you start it, the way for example Python does when you "import os". In addition it's perfectly possible (or even common) to load more packages into the image so that any file-based scripts you launch load faster.

And even though by default the compiler is written in C, if you load the "Compiler" package then GNU Smalltalk switches on the fly to a parser and bytecode compiler that's written in Smalltalk. If you load the "Debugger" package, exceptions will take you to a gdb-like debugger, with a companion text-based interactive inspector. (The scheduler is part of the image in the same way as in Smalltalk-80, and features such as exception handling and the debugger are entirely implemented in Smalltalk; the only custom feature of the GNU Smalltalk VM that the debugger uses is single-stepping).

So even though the image is not as pervasive as in Smalltalk 80 or Pharo (development happens in files and builds upon an image, instead of happening straight in the image), the image is there and it's not just an implementation detail.

Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by Rochus on Wednesday October 07, 2020 @02:02PM (#24710896)
Thanks for the explanation. It's about the wording. The fellow used "whole environment" and "image based development". I used the term "virtual image" from the Bluebook to mean the same. The Bluebook says "Two major components of the Smalltalk-80 system can be distinguished: the virtual image and the virtual machine. 1. The virtual image consists of all of the objects in the system [...]". The important point here is "all of the objects", especially also the compiler. There is no Smalltalk language outside of a Smalltalk-80 virtual image. You cannot do anything in an original Bluebook system without running the virtual image. That's what the fellow referred to by "whole environment" and I by "running in a virtual image". In GNU Smalltalk you don't need to load an image (i.e. persisted Object Memory state) to do anything reasonable. There is a compiler and and interpreter, and being "file based" is known to be a core benefit proposition of GNU Smalltalk, isn't it?
Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by bonzini on Wednesday October 07, 2020 @02:13PM (#24711002)
> In GNU Smalltalk you don't need to load an image (i.e. persisted Object Memory state) to do anything reasonable.

True but the first thing the VM does if it does not give an image is create empty classes and load files that define those classes. Only then does it do whatever it was asked to do, so the ObjectMemory was not loaded from a persisted state but is effectively indistinguishable from one.

Once the image exists, the main difference between the GST file-based approach and the traditional Smalltalk-80 image-based development is that saving the image back is not "saving your work" but "preparing a cache" in which to load source files ephemerally. But that's just an additional possible use of the image that could be implemented in Squeak/Pharo as well, just like GST had class browser for development if you really wanted.

Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by Rochus on Wednesday October 07, 2020 @02:26PM (#24711135)
Thanks. As I said, it's just about the wording. In the matter we are talking about the same. My whole point was to demonstrate to the fellow that it is well possible to use the Smalltalk language without being forced to always use a "whole environment", and that the ST-80 virtual image approach also has disadvantages. Obviously you came to the same conclusion.
Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by dharmatech on Wednesday October 07, 2020 @11:20AM (#24709163)
The guy you're replying to is the guy behind GNU Smalltalk.
Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by Rochus on Wednesday October 07, 2020 @01:07PM (#24710315)
So what? I also implemented a couple of Smalltalk VMs, see https://github.com/rochus-keller/Smalltalk or https://github.com/rochus-keller/som, and I also spent a lot of time with the GNU ST implementation.
Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by andrewflnr on Wednesday October 07, 2020 @02:39PM (#24711251)
So what? So maybe you should listen to what they say about GNU Smalltalk. They might know a few things.
Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by Rochus on Thursday October 15, 2020 @11:40AM (#24789742)
This is a discussion based on provable facts. Science needs no proof of authority.
Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by sigzero on Wednesday October 07, 2020 @12:32PM (#24709894)
Is Windows support there now?
Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by bonzini on Wednesday October 07, 2020 @01:35PM (#24710626)
I honestly haven't done any serious work on GNU Smalltalk in the last 10 years, but it should have worked already back then. The GUI used GTK+, but it was still on 2.x.
Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by igouy on Thursday October 08, 2020 @11:06AM (#24719754)
> but even more disadvantages when it comes to deployment and integration.

For example? Compared to what?

Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by Rochus on Thursday October 08, 2020 @12:21PM (#24720612)
> For example

Getting rid of objects not belonging to the application to be deployed is difficult or impossible. According to my analysis of the original ST80 v2 virtual image there is a very high interdependency among objects; and since there is no static type information, many dependencies are not statically identifiable. There are also many objects that have not been created or initialized anywhere in the source code (neither in the sources file nor in the Bluebook interpreter), but on which the functionality of the system depends. Versioning of objects and corresponding source code is difficult, also combining a certain version of different components or communication drivers with other parts to be integrated, and so on.

> Compared to what?

E.g. Java or C++ or any technology with clearly identifiable compilation and configuration units.

Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by igouy on Thursday October 08, 2020 @01:39PM (#24721601)
> Getting rid of objects not belonging to the application to be deployed is difficult or impossible.

1) So don't get-rid, now where is "the problem"?

2) So only add "belonging to the application" stuff to the base image.

> … objects that have not been created or initialized anywhere in the source code … but on which the functionality of the system depends.

3) So those are objects that will always be deployed, now where is "the problem"?

> Versioning of objects and corresponding source code is difficult…

So application source code isn't just text that can be saved in text files and versioned like other text files, and loaded into a Smalltalk image in a scriptable repeatable build process?

Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by Rochus on Thursday October 08, 2020 @01:59PM (#24721836)
> So don't get-rid, now where is "the problem"?

Well, not every software manufacturer want's to deploy all development tools used to develop the software and possibly code which is only meant to be used inhouse. And if you e.g. deploy to safety-related targets you even have to demonstrate that there is no "dead code" (e.g. DO-178). Of course it doesn't matter for hobby or non-critical applications.

> So application source code isn't just text that can be saved in text files and versioned like other text files

In ST80 source code is just an external dump file; the actual configuration unit is the virtual image. Bootstrapping a virtual image from source code in ST80 is very difficult or nearly impossible.

Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by igouy on Thursday October 08, 2020 @03:05PM (#24722559)
No, not "all development tools used to develop the software and possibly code which is only meant to be used inhouse".

Just the development tools included in the base Smalltalk implementation — we can choose whether or not to include other stuff.

> Of course it doesn't matter for …

Apparently, it doesn't matter for the whole range of business critical applications that do not need to be DO-178 certified.

> In ST80 source code is just an external dump file …

Do you mean that in ST80 source code can be saved as a text file and versioned like other text files?

> Bootstrapping a virtual image …

We can use a base virtual image someone else implemented. (Like we use a JVM someone else implemented, …)

Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by Rochus on Thursday October 08, 2020 @03:15PM (#24722706)
Well, you were asking.
Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by igouy on Thursday October 08, 2020 @04:40PM (#24723709)
From your answers so far, it doesn't seem at-all obvious that were considering disadvantages of "virtual image based systems" rather than particular disadvantages of the ST80 implementation.

Would a Smalltalk image without gui classes not be feasible?

Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by Rochus on Thursday October 08, 2020 @05:26PM (#24724108)
I spent much of my life in an with Smalltalk images (some would say too much), and there were also the big names and figures when I did Smalltalk projects in the nineties. Some of the issues could be handled spending a lot of money. The basic concepts (and issues) are the same in all Bluebook offsprings. You probably mean GNU ST; it has the advantage that there is a compiler and library available outside of virtual images and you can use it like a "normal" compiled language and easily re-assemble a virtual image with the objects and versions required. This allows you to use the image as a cache to reduce startup times like e.g. Dart does it. But this is not the original Smalltalk virtual image idea, i.e. not the "whole environment" the fellow referred to.
Re:The Absolute No-Frills Quite Ignorant Incomplete Beginner... by igouy on Thursday October 08, 2020 @06:26PM (#24724596)
> You probably mean GNU ST

I mean that "deploy all development tools used to develop the software" seems to be a separable from "Bootstrapping a virtual image from source code in ST80 is very difficult or nearly impossible".

bootstrapped image + libs + gui + tools + app ==> development environment

bootstrapped image + libs + gui + app ==> gui deployment

bootstrapped image + libs + app ==> headless deployment

> smalltalk is not just a language, but a whole environment

I mean could the fellow have his "whole environment" for development - and - have his no-gui no-ide boostrapped image + libs + app for deployment.