On September 13rd, saturday morning, I assisted to Smalltalking group meeting. This time, the meeting was in a coffee store, near the National Library buildign, here, in Buenos Aires, Argentina. The group is small but enthusiast, and the talkings were interesting.

The first one to arrive was Leonardo de Marco, that is changing his job to dedicate full time to Smalltalk development. Alejandro Reimondo, the “chief” of the group, was present. Other members that assisted were Esteban Lorenzano, Diego Coronel, Matías Castilla and Juan (no lastname, it’s only Juan… :-).

Alejandro is a reference in the field of Smalltalk development, around the world. He is a chemist, that is working with Smalltalk since the eighties. He is the founder of Smalltalking group, dedicated to the difussion and discussion of software development in an virtual object environment.

Esteban Lorenzano is teaching project architecture in information technology, in Universidad Tecnológica Nacional, Buenos Aires. The page of the cathedra is:

http://apit.wikidot.com/

He is one of the founder of Smallworks, a new firm dedicated to software development using Smalltalk.

Diego Coronel has a company Informagine (I guess the URL is http://www.informagine.com ), that works with Smalltalk, here in Argentina, and actually, in México. He is living between the two countries.

Matías Castillas is a student. He cames from La Plata (70 km from Buenos Aires). We missed another member from La Plata, Elvio Fernandez, that this time could not assist to the meeting.

There were many discussions, about the sustainability of open source development, the situation of education of object and architecture concepts in Argentina, the scarcity of human resources, in Smalltalk and other technologies, the rotation of the developers in companies, and the high salaries of junior developers, since the global situation and exchange rate in Argentina.

Alejandro commented his travel to Postdam, where he assisted to

Workshop on Self-Sustaining Systems (S3) 2008

The Workshop on Self-sustaining Systems (S3) is a forum for discussion of topics relating to computer systems and languages that are able to bootstrap, implement, modify, and maintain themselves. One property of these systems is that their implementation is based on small but powerful abstractions; examples include (amongst others) Squeak/Smalltalk, COLA, Klein/Self, PyPy/Python, Rubinius/Ruby, and Lisp. Such systems are the engines of their own replacement, giving researchers and developers great power to experiment with, and explore future directions from within, their own small language kernels.

He was impressed by the work of Richard Gabriel, of IBM (personal web page of Gabriel here). You can see the work presented by Gabriel on Sustaining Self at:

http://www.tele-task.de/page50_lecture3625.html

But the star of the meeting, was Claus Gittinger, founder of Exept Software AG, and the creator of Smalltalk/X. If you read his LinkedIn full profile, you’ll find impressive works of Claus, since the eighties, in many companies in technologies. In 1995, he founded Exept Software, that:

provides solutions, advice and consulting services in the Telecom, Automation, Automobile and other technology oriented software areas.

Products include a state of the art OO-development framework and environment (www.smalltalk-x.de) and frameworks for Test- and Qualitymanagement (www.expecco.de)

Claus skills includes

Architecture, Project Management, Team Building and Leading, Coaching, Teaching, Testing, Test Management, Prototyping,

Programming Language Implementation, VM design & Implementation, Compiler Construction, IDE Design & Implementation, GUI Framework Design & Implementation, OS-Kernel, OO, Smalltalk, ESUG

He is visiting my country, accompained by Félix Madrid, an argentinian developer that works for Exept in Germany. It’s Claus’ first visit to Argentina, so I hope he enjoy the trip.

Smalltalk/X

Claus was a kindly man, that gaves us a complete demo of his product, Smalltalk/X:

Smalltalk/X, a product from eXept Software AG, is a complete implementation of the programming language, class library and development environment, providing: An object-oriented programming language

Graphic development environment with editors, browsers, debuggers, GUI builders, etc.

Incremental compilation, byte code interpreter and dynamic (just in time) compiler

Static compilation and DLL generation, controlled by make-files

Comprehensive class library with ready-to-use modules for applications

Open Smalltalk source code Implementation of the language and class library complies with the draft ANSI standard and the industry standard.

Claus showed us the compilation of .st files directly to C language, in many platforms (in Windows, you can compile the full system with Borland C or with Microsoft Visual C++). In this way, you can produce native executables from your Smalltalk project. The features from the documentation:

ST/X Smalltalk is a complete implementation of the Smalltalk language. Smalltalk/X is not based on the original ST-80 virtual machine implementation and has been written from scratch. However, the API, class libraries and language semantic is highly compatible to ST-80 based smalltalks, such as VisualWorks, Squeak and others. Smalltalk/X consists of both an integrated environment for program development AND a standalone smalltalk compiler(1), which generates true machine code, shared code libraries and binary executables without a need for a so called “image”. However, traditional image-based development is also supported and typically used for program development. The programming environment includes editors, browsers, compiler and debugger and a large library of ready to use building blocks for application writers.

The standalone compiler generates true machine code from smalltalk source files – and can be used in a batch environment for production/delivery. Features Language syntax and semantic compatible to the industry standard, including arbitrary precision arithmetic and automatic number conversion , exception handling , automatic memory management , threads , contexts , blocks (block closures) , metaprogramming and much more.

and , , , , , , and much more. Additional (mostly backward compatible) extensions to the smalltalk language include: private classes , multiple namespaces , method privacy and end of line comments .

, , and . A comprehensive threadsafe library of basic classes, including collection classes , numeric classes , streams , lightweight processes , exception handling and metaclass hierachy .

, , , , and . Many user interface widget classes usable as building blocks for graphical applications. These are fully (non-polling) event driven , multithreaded and support multiple displays , parametrized view styles , wide characters (unicode) and national languages .

, and support , , and . Integrated programming environment including browsers with sophisticated refactoring and code generation support , GUI- and Menu builders , monitors and symbolic debugger for efficient program development.

with sophisticated , , and for efficient program development. The additional Scripting Engine allows for command-line execution of smalltalk scripts. These script files can be generated by any other editor, or alternatively by saving code from the IDE (file-out from the browser).

Debug once – run everywhere !

complete Source- and Byte-Code compatibility between Unix and Windows versions. Write your application once, run it without change on Win-NT, Linux, Alpha-OSF, Sun-solaris, HPUX, AIX, Silicon-Graphics IRIX(4).

complete Source- and Byte-Code compatibility between Unix and Windows versions. Write your application once, run it without change on Win-NT, Linux, Alpha-OSF, Sun-solaris, HPUX, AIX, Silicon-Graphics IRIX(4). Many demo and ‘how-to’ example programs

Online HTML documentation and class documentation generator, visualized by the ST/X HTML document viewer.

Well documented classes and methods.

HTML document viewer. Well documented classes and methods. Very liberal licensing conditions Implementation hilights Incremental compilation to internal bytecodes for short turn around cycles during development.

Binary files containing bytecode are portable across different machine architectures.

Binary files containing bytecode are portable across different machine architectures. Dynamic (just-in-time) compilation from internal bytecodes to machine code (2).

Except for the faster execution, this is transparent to the program or user.

Except for the faster execution, this is transparent to the program or user. Batch compilation to real machine code for high performance production code, enabling the creation of binary object modules, class libraries or even shared class libraries.

Since more optimizations and code analysis are performed by this (offline) compiler, the resulting code executes faster – even when compared to dynamic compiled machine code. Although static compiled machine code leads to bigger executables, the main advantage (beside faster execution) is the deterministic runtime behavior, which cannot always be guaranteed, if bytecodes are compiled dynamically at execution time.

In addition, big applications benefit from static compilation by the sharability of this compiled code among multiple applications, if shared libraries and/or shared text segments are supported by the operating system. Applications can (and do) use a mix of precompiled machine code classes and interpreted bytecode classes – this is transparent to the program or programmer. If supported by the operating system (3), machine compiled modules can be dynamically added to and removed from the running system.

Since more optimizations and code analysis are performed by this (offline) compiler, the resulting code executes faster – even when compared to dynamic compiled machine code. Easy creation of standalone executables and applications without graphical user interfaces. This includes self-extracting installation code for windows platforms (null-soft self installing executables).

Easy binding to C-language by allowing inline c code (even inline assembler by using asm statements) or via the ffi-callout mechanism to dynamically loaded shared libraries (dll’s).

Sophisticated window interface combining event and process driven techniques.

ST/X supports multiple display devices – you can work with others in the same object environment, or write applications which serve multiple screens.

Your application can even run on a display-less host, serving multiple xTerminals or client applications via TCP connections.

supports multiple display devices – you can work with others in the same object environment, or write applications which serve multiple screens. Your application can even run on a display-less host, serving multiple xTerminals or client applications via TCP connections. Additional protocol provided in the process, semaphore and processor classes, for better thread synchronization. ST/X’s process handling includes additional mechanisms for recovery (semaphore cleanup) in exceptional situations, which is required in technical applications. The ST/X’s process scheduler supports timeSlicing and dynamic thread priorities. This allows for better response behavior in multiwindow applications and allows progress of background processes even in case of busy foreground processing.

process handling includes additional mechanisms for recovery (semaphore cleanup) in exceptional situations, which is required in technical applications. The process scheduler supports timeSlicing and dynamic thread priorities. This allows for better response behavior in multiwindow applications and allows progress of background processes even in case of busy foreground processing. Modern generational garbage collector, with dynamic adjustable newSpace, adaptive tenuring, both incremental and non-incremental collectors for the oldSpace, both copying and non-copying compressors for the oldSpace.

Object finalization via the WeakArray mechanism; in addition, a number of other collection classes are available with weak references (WeakSet, WeakDictionary etc.)

Both ANSI compliant class based exceptions and (VW-) backward compatible Signal-based exceptions are supported.

In addition, process specific and global default exception handlers are avaliable, to allow for non scoped, global exception handling.

In addition, process specific and global default exception handlers are avaliable, to allow for non scoped, global exception handling. The byteCode interpreter and just-in-time compilers support multiple bytecode sets, for total integration of different languages into a single unified system.

In the current release, this feature is used to support execution of compiled Java code.

Claus showed the command line compilation of .st files to .c, and the on the fly compilation of byte codes in native code during development. His implementation has departures from the classic Smalltalk, the product is not a direct reimplementation of the classic VM in other Smalltalks. For example, the context calls are in the C stack, and if you add a new variable in a class, the previously created instances are not affected, and become instances of the old class definition. become: implementation is tricky. The VM does not uses an object table. The garbage collector is a mark-and-sweep variant.

You can download the binaries of the system, or you can access and check out the company CVS (be prepared to a big download: more than 20000 files, >180 megas).

We asked Claus many details about the VM implementation (I was the more curious in the group: I’m very interested in VM implementation, since my AjTalk work in progress). One interesting thing, is that in the .st files, we can include C language fragments. For example, in Object.st file the basicAt: implementation has C language code included:

basicAt:index " return the indexed instance variable with index, anInteger... " ... % { /* NOCONTEXT */ REGISTER int nbytes, indx; OBJ myClass; REGISTER char * pFirst; REGISTER int n; ... if (__isSmallInteger(index)) { myClass = __qClass(self); indx = __intVal(index) - 1 ; n /* nInstVars */ = __intVal(__ClassInstPtr(myClass) -> c_ninstvars); n /* nInstBytes */ = OHDR_SIZE + __OBJS2BYTES__(n /* nInstVars */ ); nbytes = __qSize(self) - n /* nInstBytes */ ; pFirst = ( char * )(__InstPtr(self)) + n /* nInstBytes */ ; ... } %

Claus showed the GUI environment, with workspaces, browsers, implemented directly in Smalltalk. You can design GUI forms. And the product includes an HTTP server, so you can create web pages with Smalltalk. This part of the demo would deserve more space in this post, but you can check the product page for more info.

If you are interested in Smalltalk, you must visit the links page and documentation (with free books on Smalltalk).

Thanks to Claus Gittinger, for sharing his time and knowledge, with our group. It was a very interesing meeting.

Angel “Java” Lopez

http://www.ajlopez.com/en