Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

What's Up at Kaleida?

What's Up at Kaleida?

In a year when multimedia companies have each enjoyed their 15 minutes of fame, one of Silicon Valley's more intriguing companies--Kaleida Labs--has remained in the background. Kaleida, a blue-chip startup born with a silver spoon in its mouth, was founded with great expectations on the part of its uppercrust corporate parents, Apple and IBM. After its unveiling a year ago at the Digital Media show, the company shed 25 percent of its workforce this spring as part of a new, pragmatic emphasis on completing the multimedia development environment and scripting language known as "ScriptX," while relegating grandiose plans, such as the set-top hardware and operating system, back to the parent companies.

Currently, ScriptX is in beta (on Macintosh and Windows platforms) and is due for a fall shipment. This article is a quick look at the current system and should be read with the usual skepticism required for any beta software.

It is always interesting to examine the results of what deep pockets and a clean slate can provide. In the case of startups like Kaleida, with the resources to round up a critical mass of talented programmers/

designers and persuade them to work in hothouse secrecy for several years, the result is a veritable feast (or at least a well-stocked dessert tray) of new software technologies. In this respect, Kaleida resembles other technology-intensive startups--General Magic, Next, Go Corporation, 3DO, and Rocket Science all come to mind. Kaleida's efforts provide a glimpse of where multimedia may be headed. Whether or not the company prevails, it's likely that its juiciest designs will be imitated and incorporated into the mainstream.

Unlike packages such as MacroMind Director or Asymetrix Toolbook, ScriptX is not an authoring tool for multimedia titles. Rather it is a general-purpose, object-oriented, multiplatform development environment which includes a powerful dynamic language and a well-rounded class library. You can use the ScriptX system to implement client/server applications just as easily as creating a multimedia shoot-'em-up game--in fact, given the system's current resource requirements, perhaps more easily. You can also use ScriptX as a toolkit to create your own authoring tools. The package includes the Kaleida Authoring Player, an authoring tool that fills the same need as Director or similar tools. The system design is flexible enough that you are not restricted to a particular

authoring metaphor: You can use a stack/card, timeline-based, score/cast, or document-oriented metaphor. Or you can mix these approaches.

To get the equivalent expressive power in a conventional development environment, you'd need to have, say, the Borland or Microsoft C/C++ compiler--plus the OWL or MFC application frameworks, plus a library of multimedia routines (such as Lenel's MultimediaWorks), a persistent-object storage system (such as Object

Design's ObjectStore), and some system extensions that provide multithreading. The documentation for such a combination would total more than 12,000 pages. ScriptX's integrated design results in a much smaller learning surface: The documentation weighs in at about 2000 pages, yet is very complete.

Smalltalk or Lisp/CLOS programmers will immediately feel at home with ScriptX, even though the syntax and libraries are significantly different. And if you don't have Smalltalk experience, the system is dynamic enough that you can start trying out stuff right away. Not that Kaleida expects authors of multimedia titles to be programmers. The manual states: "It is expected that most ScriptX programs will be generated by authoring tools or development environments specialized for multimedia title and tool development."

The ScriptX Language

The ScriptX language is a blend of concepts found in Smalltalk, Dylan, Hypertalk, Lisp, Coral Object Logo, C++, and Pascal. Most of the borrowing seems intentional and explicit, rather than haphazard or unconscious. The resulting blend is a well-balanced, well-integrated mix that feels natural and consistent.

The language is small. You can specify ScriptX syntax in about 60 BNF rules, compared with about 150 for C and perhaps double that for C++. The Kaleida design decouples syntax from semantics, as does Apple's OSA, so that you can have multiple syntactic surfaces overlaying a common semantic structure. In theory, this would allow you to write code using the English version of ScriptX, then have a smart text editor prettyprint it in Japanese ScriptX (or Basic or Lisp dialects).

As it is in Smalltalk, everything in ScriptX is an object--including integers, strings, methods, classes, and functions. Source code compiles into a machine-independent bytecode that is interpreted by a bytecode interpreter, similar to the Virtual Machine interpreter in classic Smalltalk. There is therefore no distinction, at this level of representation, between user-defined objects and classes and those supplied by the system; every entity has equivalent first-class status. The Virtual Machine approach facilitates cross-platform portability. A title created with ScriptX consists of scripts in bytecode form, plus media content (digital video and audio data), fed to the platform-specific Kaleida Media Player (KMP).

There are no statements in ScriptX; every construct is an expression that returns a value. So instead of block statements, you have block expressions. Likewise with iteration and conditionals, which consist of the usual suspects--if, then, else, while, repeat, case, and so on. Variable scoping is lexical in nature, and block expressions can be used to generate new variable scopes. As in Hypertalk, you can use the local and global keywords to explicitly specify variable scope. There is also a larger-granularity way of setting scope, via the module keyword, roughly equivalent to the recently added namespace construct in C++.

Similar to Hypertalk, the ScriptX language allows for variant constructs (syntactic sugar) that add an English-like feel to the language. For example, instead of saying anObject.instanceVar (as you would in C++), you can use the possessive form: anObject's instanceVar. A related mechanism allows for operator overloading similar to that in C++. Also, ScriptX allows you to specify the parameters to a method invocation by position or by keyword.

You may be pleased (or possibly dismayed) to note that ScriptX supports multiple inheritance. ScriptX also allows you to specialize behavior not just via classes, but also at the level of particular objects and individual methods. You can call this a truly object-oriented approach, contrasted with the class-oriented paradigm used by Smalltalk, C++, and most other OO languages.

Going further, ScriptX combines the

OO model with the applicative-language paradigm by allowing free-standing functions--behavior that is not bound to a method of a particular class. This allows for anonymous functions (similar to lambda functions in Lisp) that can then be applied to objects. The construct (a b --> a + b) 4 5 defines an anonymous function that is applied to the objects 4 and 5. Anonymous functions can be assigned to variables, passed as arguments, or used in the apply construct (as in Lisp).

As in Smalltalk, there is a metaclass hierarchy that parallels the class hierarchy. Likewise, certain objects have an "immediate" implementation: For example, instances of class ImmediateInteger are implemented as a 32-bit longword with a low-order tag bit set. The kernel uses a right bit-shift to obtain the immediate object's value. Multiple tag bits are used, resulting in a maximum value of 229 for ImmediateInteger. Instead of object-table indexes, ScriptX object handles are basically 32-bit pointers into a paged virtual-memory space.

Memory allocation is automatic, as is deallocation. A garbage-collector thread continually reclaims memory from objects that are no longer referenced. The patent-applied-for garbage collector is an advance over those found in current Smalltalk and Lisp implementations, which use variants of the Baker-Hewitt generation-scavenging algorithm. The ScriptX garbage collector needs to satisfy the real-time constraints of multimedia playback, which does not tolerate sudden stops to collect garbage.

The kernel of ScriptX consists of objects written in compiled C. Like Go's PenPoint, Kaleida has defined an object-oriented dialect of C called "Objects-in-C" (OIC), implemented by a set of preprocessor macros, libraries, and programming conventions. The membrane between objects written in C and those in ScriptX is thoroughly permeable: Code written in one language can access objects and instance variables written in the other.

The ScriptX Core Classes

From the point of view of a developer creating a multimedia title or commercial app, the details of language syntax are often the least important aspect of the development environment. The heavy lifting gets done by the class library or application framework.

The ScriptX Core Class library consists of about 240 classes and perhaps 2000 methods. A significant part of the class library provides general-purpose facilities such as you might find in app frameworks like OWL, MFC, zApp, MacApp, and C++/Views. The Core Classes provide support for: text, fonts, streams, graphics, events, menus, scrolling lists, push buttons, scrollbars, files, properties, numerics, error-handling, arrays, B-trees, hash data structures, and so on.

The most important aspect of the core classes is the use of the classic Model/ View/Controller (MVC) paradigm, first used in Smalltalk-80 and since incorporated into many app frameworks with slight variations. ScriptX parlance uses the terms model, presenter, and controller; in addition, "space" is used to refer to a portion of the model. A space provides the virtual environment in which content objects live and interact. Depending on the application you are designing, a space can be geometrical in nature (a canvas or surface) or non-geometrical (a stack of cards or a cast sheet of actors). A controller manipulates objects in a space, often during some elapsed time period. A presenter translates the abstract definition of content objects into forms that users can see, hear, or otherwise experience.

Unlike many classic MVC-based apps, ScriptX titles make greater use of the notion of time. The Clock class is an important component that provides facilities for synchronizing timed action sequences and can be used to drive simulations, control media playback, and coordinate activities within a timing hierarchy (in which one clock drives subordinate clocks).

There are several other families of classes in ScriptX that provide powerful facilities needed to implement a wide range of multimedia titles. These class families include a persistent-object storage facility based on Apple's Bento design (which is also used in the OpenDoc app framework), a search engine to provide retrieval of objects within large-scale models, facilities for spawning and synchronizing multiple threads, a rich set of exception-handling mechanisms, and (in the future) support for distributing objects across networks. Each of these components merits its own discussion, but space does not permit that here.

Designers at Kaleida feel that existing multimedia titles offer only "a fixed universe of behaviors and portrayals." Existing tools can only superficially simulate--instead of "directly model"--complex behavior. Company documents state:

Unlike today's metaphor-based authoring frameworks, ScriptX provides simulation-based building blocks that let developers have real models behind their scenes, instead of being essentially a movie with a few twists.

To illustrate this approach, designers at Kaleida implemented a sample title called "PlayFarm." This title is a kid-oriented simulation of a barnyard, with playful eccentric characters such as ducks and sheep. In PlayFarm, each character runs in a separate thread, interacting with the others in virtual space. Unlike existing point-and-click commercial titles, the behavior of the system is not predetermined and immutable, but dynamic and easily changed. You can design a new character offline and then load your creation into PlayFarm on the fly, while the simulation is running. Your new character can then interact with the existing inhabitants of the virtual space.


ScriptX is an impressive piece of work. But it is not yet clear if it will prevail in the marketplace. As with any beta, there exist the usual concerns about robustness, efficiency, and on-schedule delivery. Plus, in the case of a new platform, there is the issue of garnering sufficient industry support. History shows that most blue-chip, technology-intensive startups seem to stop short of success (witness the stories of Go and Next). However, with its advanced, innovative, and well-designed technology, Kaleida just may beat the odds.

BCG??? does the rest belong

Programming Microcontrollers in C by Ted Van Sickle has been released by HighText Publications. The book, which has its roots in the Van Sickle's article "C Programming for the 68HC05 Microcontroller" (DDJ, August 1991), focuses on the Motorola MC68HC05, MC68HC11, and MC68HC16 controllers. In support of these devices, Van Sickle bases his discussion on the Byte Craft and Intermetric C compilers.

The book provides a background of C, ranging from fundamental topics such as type declarations, to advanced subjects such as multidimensional arrays and memory management. On the hardware side, both 8- and 16-bit systems are covered in terms of timers, analog-to-digital conversion, pulse-width modulation, and the like. Van Sickle provides listings for header files and other source code. The book (ISBN 1-878707-14-0) sells for $29.95.

HighText Publications

P.O. Box 1489

Solana Beach, CA 92075


The Banking Solutions Vendor Council has released the beta version of its SDK for the Windows Open Services Architecture (WOSA) Extensions for Financial Services (XFS) v1.1. The WOSA/XFS specification and SDK are designed for branch-banking application development based on Microsoft Windows.

The WOSA/XFS provide a common, open architecture for branch banking applications within the financial enterprise. The WOSA extensions specification and SDK provide a standard way for Windows-based applications to access devices such as passbook and validation printers, personal-identification number (PIN) keypads, magnetic-card readers and writers, check readers or scanners, and cash dispensers.

WOSA comprises a set of open interfaces and associated development tools, including ODBC for standard access to databases, MAPI for standard access to mail systems, the TAPI for integration of PC and telephone networks, and six others. A related specification includes the WOSA Extensions for Real-Time Data (XRT) which is targeted at the real-time financial-market information. Both the XFS and XRT specifications are available on CompuServe in the Windows Extensions (WINEXT) Forum.

Microsoft Corporation

1 Microsoft Way

Redmond, WA 98052


Applied Voice Technology has released the CallXpress3 Access SDK for developing applications to be integrated with CallXpress3-based call-processing software. Third-party developers can use the SDK to develop computer-telephony applications that take advantage of OS/2-based CallXpress3's voice messaging, fax messaging, and audio record/playback capabilities. The SDK includes documentation on CallXpress3's API, plus a library of C routines. Among other things, the API includes support for telephone-line control via a LAN, as well as the ability to create, open, delete, and save audio recordings.

You can create applications under Windows using any programming language, including C++ and Visual Basic, that supports calls to a Windows DLL. OS/2 developers can use any 32-bit OS/2 compiler. CallXpress3 Access sells for $1350.00 and includes unlimited license to distribute applications created using the CallXpress3 API, and to distribute the CXAPI.DLL.

Applied Voice Technology

11410 NE 122 Way

Kirkland, WA 98083


Navigating the Networks, the compiled proceedings of the 1994 Meeting of the American Society for Information Science, has been released by Learned Information. The 255-page book, edited by Deborah Anderson, Thomas Galvin, and Mark Giguere, includes papers such as "Creating and Sustaining Value on the Internet" by Thomas Martin, and "Planning for and Evaluating an Internet Connection" by Philip Doty. Navigating the Networks (ISBN 0-938734-85-7) sells for $29.95.

Learned Information

143 Old Marlton Pike

Medford, NJ 08055


WinScope 1.2 has been released by the Periscope Company. New features of this Windows debugging tool includes enhanced event capture which lets you monitor and debug software that uses TAPI, ODBC, MAPI, and OLE2. Enhanced event capture also lets you monitor system drivers such as HPPCL, SOUND, MSNET, and other functions called via GetProcAddress.

Other v1.2 features include enhanced trace display for showing full parameter names and enumerated fields and messages, trace-file crash recovery to see the events that led up to a system crash, and multiple project directories for setting up separate directories and to run WinScope from a read-only network directory. WinScope sells for $149.00. Upgrades are available.

The Periscope Company

1475 Peachtree Street, Suite 100

Atlanta, GA 30309


Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.