Questions tagged [bee-smalltalk]

Bee Smalltalk is a self-hosted Smalltalk dialect, meaning that it does not use a separate Virtual Machine. Instead, it supports itself through a Dynamic Metacircular Runtime (DMR). Bee Smalltalk runs on Windows and it is a 64-bit Unicode application. It is Open Source under the MIT license.

Bee Smalltalk

This is Bee Smalltalk, a self-hosted Smalltalk dialect. Bee does not use a separate Virtual Machine. Instead it supports itself through a Dynamic Metacircular Runtime (DMR).

Supported platforms

The main supported platform is Windows 64-bit. We also use it on Linux through wine. Linux native port is work in progress. Maybe wine could be used in MacOs too (if you try, tell us the results).

CURRENTLY, ONLY A TECHNOLOGY PREVIEW IS AVAILABLE

Layout of Bee file structures

Bee DMR does not use a monolitic image; it is made of projects and clusters. Projects basically contain classes and method extensions to external classes. Clusters group other projects or other clusters. Projects are then saved into so-called Bee Smalltalk libraries (.bsl), which are binary representations of all the objects in the project (classes, methods, globals, pool dictionaries, class variable values, and so on). The format of smalltalk libraries is designed to load quickly.

The main Bee project is SKernel, which is compiled into bee.exe, a standard Windows PE/COFF executable that can be directly run by the operating system (or wine). Other libraries are stored as .bsl files, in subdirectories such as like baselib, bee, lib, dev, sunit.

For each project there are also .stp and .prj files, storing all the contents of the project in source form. Once the project is "built", a .bsc file containing method sources is generated, which is referenced from aforementioned .bsl.

Clusters are defined in .bnd text files which are simple lists of projects and other clusters.

Running

To launch Bee just execute bee.exe.

Generally, you can pass a script file bee.exe - the script will be then compiled and executed

Workflow

In a typical workflow, you will open Bee IDE and code in your own project. To create a project, open PM Tools from the menu and pick Project Browser. In that browser open Project menu and then New. Write the name of your project and accept. You may also want to select a cluster where to hang your project (when that cluster gets loaded it will load your project).

To add your first classes, select the appropriate superclass, right click on it and select New subclass. You can also modify any class definition and Alt+s it.

When you are done with your changes you can save your project. In the project browser select your project and click Build Project. Then go to the cluster browser, right click the cluster where you put your project and select Save.

IDE tips

To see all the changes done in the current session, got to PM Tools and choose Browse All System Changes. You can file out and file in changesets (for the open sourced version there is no VCS supported right now). There is some support for loading fileouts from Squeak and Pharo, YMMV.

You may notice that classes, methods, projects and clusters are sometimes wrapped by (). This means they have been modified and not saved in any library yet.

It is common to add bind hooks to projects. To do so, open your project in the Project Browser and in Project menu choose Edit Settings. There you will find entry fields to set a bind and an unbind action. You sould enter a class method with 0 arguments there, like this:

MyClass class>>myProjectJustLoaded

Keyboard shortcuts

  • Alt+s - accept code
  • Ctrl+p - print it
  • Ctrl+d - do it
  • Ctrl+u - debug it
  • Ctrl+i - inspect it
  • Alt+m - implementors
  • Alt+n - senders
  • Alt+b - browse selected class
  • F2 - rename selection
  • Del - delete selected method
1 questions
2
votes
1 answer

Instance behavior in Bee Smalltalk

Is there any way of changing the behavior of particular instances of a class without affecting the rest of the instances (i.e., they still behave according to the behavior of the class)? For instance, I would like the instance a to have a different…