159 points · by pjmlp · 4y ago · 92 comments
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!
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.
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.
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/