50 years Smalltalk anniversary celebration at Computer History Museum
computerhistory.org
computerhistory.org
What I like about Pharo:
1. Programming in the debugger makes things feel much quicker
2. Evaluating expressions inside your code editor makes programming feel much quicker
3. The ability to quickly browse classes and methods makes programming feel much quicker (e.g. I type Date somewhere, select it, press CMD+B and now I browse the Date class).
Don't get me wrong, Pharo has downsides, especially when it comes to using it in production (IMO). With that said, the language feels fun to use! I definitely like it now as my first language for side projects as it is more graphical, more playful, and feels quicker for iterative development (e.g. when consuming APIs). It's why I wanted to learn it in the first place, it has shown me a different philosophy on how programmers interact with a programming language and IDE.
1. Build a local image intended to help with 1 branch (branched out of fresh cloned develop).
2. Add changes, unit and system tests for TDD/regression defense/coverage.
3. Commit and push code to share with the teammates.
4. Open PR to develop when ready/PR's approved
5. Eventually merge develop into master and version bump for release
6. The PRs running CI/CD pipelines with the full battery of tests and
7. The final docker image that devops can consume at will for deployment under their load balancer or whatever architecture they had setup.
In this style, images generated by work on bugfix or feature branches are optionally disposable after its PR. The dev can choose to archive or not.
Start with a base image, import code pulled from the VCS repo, start the image, run some test verifications and copy the image to its designated virtual insurance host.
That said, projects in general are NOT change sets. They're just collections of classes serialized out as ST source code. These source code files capture the state of the source code within the image, but not the state of the image itself.
Done properly, you don't have any aspects of the source code depending on some existing state within the image, but not captured in a class. But, you don't know that for sure. All of the source code relies somewhat on the vast amount of global state within the image. If global variables make you itch, well, let me introduce to you an ST image.
Pharo is a fork of Squeak, and it's distributed as an image.
Now the Pharo folks have done a lot of VM work, but even in the beginning I imagine that having a chain of custody of source code that converted a stock Squeak image into a nascent Pharo image probably never existed.
I bet even with their long github history it would be very difficult to generate later Pharo images from source code checked in to github.
The ST image is a ball of clay that the developers add to and cut away from in an ad hoc manner. I'm sure they strive to repeatability and such, but I imagine it's not really a high priority for them when some sneaks into a core developers image (which can be from their work, or changes merged from someone else).
Having been raised in a world of "make clean install", where the finished product is a deterministic result of all these pieces I can see and touch, the ST image world has always made me a bit uncomfortable.
Obviously the users cope, and it's a "me" thing, but there you are.
And importing updated code to a live system sounds like a black magic. What happens while it's still in progress? Or does one have to start a new process, like we do in other frameworks? Erlang has live updates, but I imagine live update in smalltalk works very differently. So many questions!
> it's not only a code, it's a also current _state_ of the system
There is no difference in Smalltalk. The code includes all the created instances with current field values.
> updated code to a live system
From the user point of view everything is simple, yet the simplicity is the advantage of the compiler, not the user. If you update the code the instances that you upgrade run the new code, and if you don't upgrade the old objects they run the old code.
> I mean, for a web application most state should be in a database, but this takes some discipline.
This state could also reside in an image and Smalltalk has solutions like GemStone and Magma (OODBMS) solutions.
> And importing updated code to a live system sounds like a black magic.
Yeah, I don't think for most use cases this would be done. A new image would be built and deployed with the relevant code changes applied.
Every developer has their own image. It's easy to set up an image (though I always need to check the company docs on how to exactly do it), but then you download your own image. These images can be different from each other as well, as only the code checked in to git is the same.
Smalltalk has a object-oriented programming model (OOP) with notable differences to the more familiar OOP model from languages like Java and C#. Smalltalk also has an windowing IDE (eschews separate text files), a consistent model, and minimal syntax (just 3 keywords). It's a very interesting language.
Here's a Smalltalk demo from the talk: Four Languages from Forty Years Ago (2018) (44min mark): https://youtu.be/0fpDlAEQio4?t=2641
This only applies to Smalltalk-72 (which is celebrated this year). The Smalltalk we know today started with Smalltalk-76; like Simula or Java it has inheritance and compiled virtual methods (i.e. no longer passing tokens to objects for interpretation). Smalltalk-80 celebrated its 40 years in 2020 on which occasion I implemented a couple of tools and VMs to study its inner workings, see https://github.com/rochus-keller/Smalltalk.
> a consistent model, and minimal syntax
Which is mostly beneficial for the parser writer; implementing an efficient VM for Smalltalk is still an art today, because nearly everything is a closure and the control flow has to be guessed; in any case Smalltalk can at least pride itself on having initiated a development that led e.g. to Java Hotspot and the V8 engine.
Off topic: the documentary seems interesting, but I hate the narrative: basically, "Jobs/Gates stole" and "we were the rightful knights inventing computing, but now it's used for Games/Porn/Chat/Leisure ergo it's bad". Kind of gatekeeping. Computers evolved and they're everywhere. Sequencing protein chains and also behind Candy Crush.
To get around some of the common pitfalls of new Oses it could use a rump kernel and leverage the drivers from Netbsd, and it could be developed on an SBC making it easily accessible to people to run on actual hardware
Recently I’ve thought about making a Smalltalk- or Common Lisp-based operating system with the features you mentioned, but I ended up changing direction when dealing with the problem of interoperability among different languages. As appealing as Smalltalk and Common Lisp are, many people prefer different languages, and unfortunately different languages have different semantics, making interoperability difficult. I prefer a protocol-based approach to interoperability. I’m right now experimenting with Plan 9, an operating system designed by many of the same people who worked on Unix at Bell Labs, and seeing how I can implement reflection and metaprogramming through Plan 9’s “everything is a file” facilities, and also how I can take advantage of the 9P protocol to enable component-based software design. Some more of my ideas can be found at www.mallowos.com.
1. https://github.com/nopsys/nopsys
2. https://github.com/nopsys/CogNOS
Though, from the outside, it's not particularly clear what's what amongst all the differently named versions, and which direction it's being driven in these days.
https://livingcomputers.org/Computer-Collection/Vintage-Comp...
[1] https://en.wikipedia.org/wiki/Python_(programming_language)
Which is wrong. See e.g. http://python-history.blogspot.com/2013/10/origin-of-metacla...: "I was only vaguely aware of Smalltalk at the time; I remember being surprised by its use of metaclasses (which is quite different from that in Python or Ruby!) when I read about them much later."
Which language influenced Python most, if there is one?
https://mail.python.org/pipermail/python-dev/2000-August/008...
Our CTO knows companies that use Pharo in production. I'm sure there are also people using VisualWorks in production. All of these languages are Smalltalk descendants.
The strongest thing that Smalltalk has is that you'll feel really powerful to deal with changes in the rules of scenarios that are high in complexity. So speed in adapting to change fast is what I see as its most valuable trait.
You could say that of any experts in any system. They will be extremely productive.
There is really nothing special about Smalltalk that makes its developers automatically more productive (especially not the IDE, which is vastly outclassed today by the likes of IDEA, XCode, and Visual Studio).
But no, the occasional oops need to rebuild the world, still happens.
And they also do so much more than the rrb.
To affirm otherwise only reveals lack of experience on the matter.
No Smalltalk environment has ever shown an error message about not being able to do edit-continue/hot-reload/whatever.... after doing a code change in a debug session.
Nor are they capable of transparently exposing their internal structures in the debugging session.
It's also something that you should probably never do, so not really that useful or worth considering as a major advantage.
https://www.jrebel.com/blog/limitations-of-hotswap
https://www.jrebel.com/learn/does-jrebel-support-my-framewor...
On the .NET, I will let Microsoft's own words speak for itself,
https://devblogs.microsoft.com/dotnet/introducing-net-hot-re...
> No matter how you use .NET Hot Reload please be aware that some changes are not supported at runtime and will prompt you with a rude edit dialog and require you to restart your app in order to apply. We’re still working on the feature and the documentation to detail what edits are supported. For now, start by reviewing our existing list of Edit and Continue (EnC) equivalent capabilities. Since Hot Reload is powered by EnC this will give you a good starting point for better understanding this new feature. For details see: EnC documentation.
In Smalltalk environments since the early 80's, it always works, there are no buts and ifs, or extra products to install.
As mentioned on another replies, it only shows you never used Smalltalk in production.
So... moving the goal posts now.
https://wiki.squeak.org/squeak/1287
Most Smaltalk implementations have such tooling in place, that is just a possible one.
As a developer, I found the system really nice to work on, despite an antiquated Smalltalk implementation at the base (end of lifed in ‘99). Since the IDE is integrated into the running application, the development process was extremely smooth for a desktop application like that. But the process was an acquired taste, not all the developers got into the groove.
Some of what we covered:
- OOP is message passing
- The interactive environment
- Surprising things about Smalltalk
- Did Smalltalk achieve its goals?
- Failure of Enterprise SmalltalkNo longer true since Smalltalk-76, which has virtual method dispatch like Java. What you refer to is probably Kay's philosophy which is something else than the Smalltalk implementation we know today.
That's how you can trivially have distributed objects, instances responsing to methods they don't directly declare and know about, etc.
In this case, even acceptaing post-76 Smalltalk doesn't implement "real" message passing unver the covers, we not only call it that anyway -- so one would be justified to say:
"real X is what we call X, not what originally we call X, or what the etymology of X implies"
but it also behaves like it. So one would be doubly justified to say it is (in the "if it walks like a duck, and quacks like a duck" sense).
In other words, in this, I think you're making the same mistake you accuse Kay of making with regards to OOP ("C++ and co is not real OOP" -- well, it is now, as that's what we describe as OOP nowadays).
> accuse Kay of making with regards to OOP
You likely mean this talk: https://youtu.be/oKg1hTOQXoY?t=636 He says: "actually I made up the term object-oriented and I can tell you I did not have C++ in mind, so the important thing here is I have many of the same feelings about smalltalk". Have a look at https://news.ycombinator.com/item?id=32649622, https://news.ycombinator.com/item?id=32651863, https://news.ycombinator.com/item?id=32654863 and https://news.ycombinator.com/item?id=32651366 and you will (hopefully) understand why he said that. It also explains well why Ingalls was the sole author on the Smalltalk-76 paper.
Not even
5 perform: #factorial
?'perform' is indeed a msg. The integer object doesn't need a 'perform' method in order to do something with that call. Its entirely up to each object to decide how it wants to deal with a msg. Including those msgs for which there isn't a corresponding method.
In other words, the caller has NO way of knowing (or enforcing) what the object its sending a msg to, does with that msg. Eg: based on certain runtime conditions, an object can reconfigure itself at runtime, and simply proxy certain messages to another object, potentially running on a different machine, and relay the results back.
How is that not message passing?
But there is also a pertinent body of knowledge that is taught and tested at universities, which includes an accepted terminology.
The relevant classes in the Smalltalk-80 source code are even called "CompiledMethod" and "MethodDictionary".
See also primitivePerformWithArgs, lookupMethodInClass and executeNewMethod in part 4 of the bluebook.
- Send: prepares a message to be sent and negotiates with the receiver
- Accept: negotiates with the sender
- Queue: can save accepted messages to be handled later
- Receive: deals with queued messages
- Protocol: can associated the selector in a message with executable code
- Execution: knows how to used system resources to actually do what the message asked
The default metaobjects are 100% compatible with Smalltalk-80 base level code but his thesis show several interesting alternatives.
There are non messaging parts in Smalltalk-80, like assignment. The Self variant of Smalltalk goes quite a bit further in using message passing for everything.
Well, speaking of universities, can you find a univercity-level course/book that doesn't characterize Smalltalk (post 76 too) as having message passing?
Do you mean like Erlang?
Not at all; but you can look at the Smalltalk-72 source code.
> Do you mean like Erlang?
Examples of "true" message passing are e.g. SOAP or MPI. Erlang is an example where message passing is indeed part of the language; another example are Go channels.
If your interest is point-scoring maybe say Smalltalk-80 is simulated message passing or faux message passing ;-)
It's a shame that the more simplistic branch didn't endure, perhaps as an alternative to Logo.
Scratch was originally built in Smalltalk (newer versions use JS)
A rival to Scratch, which is also written in Smalltalk and is 'closer' to 'proper Smalltalk' is EToys http://squeakland.org
Pharo is a descendant of Smalltalk, forked from Squeak. Free books are available at https://books.pharo.org/