Tibco MarketSheet Script
MarketScript was the postfix command language embedded in MarketSheet, the real-time trading-room display product built by Teknekron Software Systems (later TIBCO) around 1990. Traders wrote scripts like INDU find select red fill on buttons and price alerts to recolour, hide, move and navigate the live market-data sheets on their screens; it had no arithmetic, no variables and no control flow, and it survives today almost entirely inside a patent
Created by Teknekron Software Systems, Inc. of Palo Alto, California, the company Vivek Ranadive founded in 1985 to build The Information Bus and which became TIBCO. MarketScript was not designed as a language in its own right and no designer is named for it anywhere; it is the scripting facility of one application, MarketSheet, whose invention is credited in the US patent to Jeffrey S. Risberg
MarketScript is the scripting language nobody set out to write. It is the macro facility of MarketSheet, the real-time display application that Teknekron Software Systems - later TIBCO - put on trading-room screens from around 1990, and it exists for one reason: a trader who had spent an afternoon laying out a sheet of live quotes wanted a button that would turn all the Dow Industrials red.
It is genuinely a language, with a documented grammar, a named command set, a user-extensible glossary and an interpreter of its own in a file called script.c. It is also almost invisible. It was never sold, never versioned, never given a manual of its own, and never escaped the product it lived in. Practically everything anyone can now say about it comes from a single unlikely source: a patent that quotes the MarketSheet 2.1/2.2 user manual at length, including the four pages that document the scripting language.
What MarketSheet was
To understand the language you have to understand the screen it drove.
In 1990 a trading floor was a wall of dedicated terminals - the “green screens” - each one wired to a single vendor’s feed and each one showing what that vendor decided it should show. Teknekron’s pitch, built on The Information Bus, was subject-based addressing: an application asks for “long bond yield” and the middleware works out which service on which server currently publishes it. As the patent puts it, if the source of the information changes, “users need not change their screens and programmers need not change their programs.”
MarketSheet was the client that cashed that promise in. It gave a trader a blank sheet and a toolbox, and the tools created what the patent calls Active Objects:
| Tool | What it puts on the sheet |
|---|---|
| Label | Static text; annotations, sheet titles, hand-written help screens |
| Quote | A live issue, in styles from “brief” (price only) to comprehensive |
| Ticker | A selective or block ticker, upticks and downticks in colour |
| Page fragment | Any rectangle clipped out of a page-based feed such as Telerate or Reuters |
| Time-based graph | Price against time, axes scalable to minutes or seconds and to 1/8 or 1/32 of a dollar |
| Data-set graph | Multiple instruments at once - a yield curve, for instance |
| Table | Position blotters, currency lookup tables |
| Publisher | Publishes the user’s own numbers back onto the network for other desks |
| Button | Runs a script |
A file was a stack of such sheets, one visible at a time. Everything about an object’s appearance - pen, fill, border, font, position, size, visibility - was a property, and everything a user could do through a menu, a script could do too. That is the whole design of the language in one sentence.
The language
A script is a sequence of words, whitespace-separated, read strictly left to right. Operands come before the verb they belong to. The manual describes a script as being entered “as a sentence”, and the examples read like one:
Governments find sheet
Find the sheet named Governments and show it. Compare doing it by hand: open the index dialog, scroll the list, select the entry.
next sheet next sheet
Advance two sheets. There is no loop construct and no repeat count, so you repeat the phrase.
INDU find select red fill
Select every object named INDU and fill it red. This is the shape of most real scripts: a selection phrase, then one or more editing verbs that act on whatever the selection phrase left selected.
Selection
Almost every verb is implicitly about “the selected items”, and a script builds that selection itself:
| Phrase | Effect |
|---|---|
all select | every object on the current sheet |
none select | nothing |
self select | the object that is running this script |
<item_name> find select | every object carrying that name |
<class name> class select | every object of that class, e.g. Quote class select |
<region bounds> region select | everything inside a region |
Names are the key idea, and they are deliberately not the same thing as displayed text: the manual is explicit that “the name of a label, for instance, is different from the text shown by the label.” Names are also not unique. Tag ten quote objects INDU and five UTIL, and INDU find select addresses the first ten as a group. The same trick works for sheets - duplicate sheet names are explicitly allowed so that repeated find sheet calls will walk a series.
Verbs
The documented command set is small enough to list, and its boundaries are revealing:
- Restacking and visibility:
front,back,hide,show,toggle visibility,clear highlight - Appearance:
<color_name> pen,<color_name> fill,<color_name> borderColor,<integer> borderWidth - Geometry:
<xXy> move,<dxXdy> move,<widthXheight> size,<dwidthXdheight> rsize,<x> alignLeft,<x> alignRight,<y> alignTop,<y> alignBottom - The sheet itself:
<color_name> background,on gridLines,off gridLines,toggle gridLines - Navigation:
next sheet,<name> find sheetand their relatives - Environment:
on toolBox,off toolBox,toggle toolBox, and the same three forgridTool - Execution:
beep,<milliseconds> pause, and<UNIX command> execute
Note what is not there. No arithmetic. No comparison. No variables. No conditionals. No user-defined procedure with parameters. A MarketScript script cannot read a price, cannot compute anything from one, and cannot decide anything. It can only do things, and the deciding is done elsewhere.
Where the deciding happens
The deciding happens in the alert machinery, and this is what makes MarketScript more interesting than a keyboard-macro recorder. Every quote object is a two-state machine - normal and alert - with a user-set upper and lower limit on a chosen field, and it carries four scripts rather than one:
- normal update - runs on each tick that does not breach a limit
- begin alert - runs on the tick that breaches one, moving the object into the alert state
- alert update - runs on each subsequent tick while still breached
- end alert - runs on the tick that comes back into range, and is followed by the normal update script
Graph objects get a two-script version of the same idea, with the alert triggered when the plot line leaves a channel drawn between two trend lines.
So the conditional logic is declarative and lives in the dialog box; the script is purely the consequent. It is a clean separation, arrived at by a product team rather than a language designer, and it is why the language could get away with having no if.
Syntax rules, in full
The manual’s SCRIPTING NOTES section is four paragraphs long and effectively constitutes the rest of the specification:
- Commands are case-sensitive and “must be entered exactly as shown.”
- Any item name, sheet name, command or colour name containing a space must be quoted. Single or double quotes both work, and each can contain the other.
- All geometry is in pixels. The manual offers the calibration that there are “roughly 80 pixels per inch on a workstation screen.”
- The selection is saved on entry to a script and restored on exit - because scripts fire on price updates at unpredictable moments and must not steal the selection out from under a user who is mid-edit. As a consequence, a script that opens with
all selectdoes not need to close withnone select.
That last rule is a small piece of real language design. It is a dynamic-extent save/restore of the one piece of global state the language has, motivated entirely by the fact that this language’s programs run concurrently with the user’s own editing.
Escaping the sandbox
Two features give MarketScript far more reach than its command list suggests.
The first is execute, which runs a UNIX command in the background. The patent is enthusiastic about what this bought clients: alert scripts could perform operations “such as changing a color, flashing an object, sounding an audible alarm or executing an external program”, and “the latter capability provides great flexibility by enabling clients to program features such as the ability to telephone a beeper service when an alert occurs.” A bond desk in 1990 could wire a limit breach to a pager. The patent also notes that a scripted command sequence “can also include commands to the operating system, the network communication software and other processes running on the same host or elsewhere on network.”
The second is the glossary, described twice in the patent: a facility “whereby the user can define new commands and add them to the script language”, and which also lets users customise the menus. No syntax for it is given anywhere, and this is the single largest gap in what survives. A user-extensible word set in a postfix language is exactly the Forth arrangement, and if the glossary was as general as the sentence implies, MarketScript was a considerably more serious language than its documented command table shows. There is no way now to find out.
Buttons as hypertext
The other thing MarketScript was for is navigation, and the patent describes it in terms that were not yet ordinary in 1990: buttons “allow creation of hypertext links between different sheets”, the worked example being a link from a security to its options pricing. Buttons came in rectangular, rounded, shadow, check box and radio button styles - the last two for grouped buttons - and because the left mouse button ran the script, you had to use the middle or right button to open a button’s own dialog and edit it.
The idiom the manual teaches for building a detail overlay is a fair sample of how the whole thing felt in practice. Put a set of explanatory labels on the sheet, bring them to the front, give them all the name DETAIL, and then make two buttons:
DETAIL find select show
DETAIL find select hide
That is a show/hide toggle on a real-time financial dashboard, built by a trader, in eight words, in 1990.
Why it disappeared
MarketScript’s fate was never in its own hands. The chronology is corporate throughout: Reuters agreed to buy Teknekron Software Systems in December 1993 for a reported $125 million, a sale other accounts date to 1994; the company was renamed TIBCO in or around 1996; in January 1997 it split, with TIBCO Software taking the middleware toward its 1999 IPO and TIBCO Finance Technology keeping the financial desktop. MarketSheet went with the finance half. TIBCO Software’s own S-1 lists TIB/Rendezvous, TIB/ObjectBus, TIB/MessageBroker, TIB/IntegrationManager and the rest of the TIB/ActiveEnterprise suite; MarketSheet is not in it.
On the Reuters side, Marketsheet spent the late 1990s in a straight fight with Reuters’ own Kobra and with Bridge Information Systems’ Bridge Active1 - Waters called it a “display application war” in January 1999 - and it was competing against a sister product inside its own parent company. Kobra won: it shipped as the client software of the Reuters 3000 Xtra terminal, released in 1999, and the trading-room desktop consolidated there. MarketSheet was not so much killed as absorbed, which is why there is no end-of-life notice to point at.
The language went with it. Nothing was open-sourced, no clone was written, no successor borrowed the syntax, and no MarketSheet binary or sheet file is publicly available. Language catalogues that carry an entry for “Tibco MarketSheet Script” generally date it to the 2000s, which is a decade or more late and comes from dating the TIBCO brand rather than the software.
Why it matters
MarketScript is worth a page for three reasons, none of them about influence.
It is a clean specimen of the embedded application language. Not a general-purpose language cut down, and not a DSL designed from a semantics outward, but a language that grew because a graphical product had a command set and someone realised the command set could be typed as well as clicked. HyperTalk, spreadsheet macro languages, AutoLISP and the whole lineage of in-app scripting come from the same pressure. MarketScript shows that pressure operating in an unusually constrained corner - financial market data on X11 workstations - and arriving at a Forth-shaped answer without, so far as anyone can tell, meaning to.
Its division of labour is instructive. By putting the predicate in a dialog box and the consequent in a script, MarketSheet let a language with no conditionals drive genuinely reactive behaviour. That is the same bargain made by CSS media queries, by spreadsheet conditional formatting, and by every rules engine with a form-based condition editor. It is also why the language could stay small enough for a trader to learn between the open and the close.
Its survival is an object lesson in the archaeology of software. MarketScript ran on trading desks at named global banks - Teknekron’s software as a whole was reportedly on more than 10,000 of them - and left essentially nothing behind - no source, no binary, no manual, no mailing list, no newsgroup thread. What preserved it was a lawyer’s decision, some time in 1990, to paste the user manual into a patent application in order to satisfy the enablement requirement. Patent databases turn out to be one of the better archives of vanished commercial software, precisely because they are full of documents whose authors had a legal incentive to explain exactly how the thing worked.
Timeline
Notable Uses & Legacy
ABN Amro Bank
Standardised on the Teknekron Information Bus and Marketsheet display software across nine sites internationally, covering 1,400 dealing positions, under a contract being finalised when Waters reported it on 5 February 1996. Its Chicago operation, the bank's US headquarters, had gone first roughly two years earlier. This is the largest named MarketSheet deployment in the public record
Fidelity Investment Services
A long-time user of Teknekron's UNIX-based digital market-data distribution platforms, and the named beta site for Marketsheet for Windows when Waters reported the PC port on 4 February 1994
Morgan Stanley
Reported by Waters on 20 October 1997 to be reviewing Marketsheet for Windows against three competing trading workstations for its equities traders and analysts in New York and London - a firm that had, in the same report's words, long prided itself on proprietary trading room solutions. What it eventually chose is not on the record; the significance is that by 1997 Marketsheet was one of four packages a bulge-bracket desk would seriously shortlist
Salomon Brothers, Goldman Sachs and J.P. Morgan
Named by the International Directory of Company Histories among the firms running Teknekron's software, which was on more than 10,000 desktops worldwide within five years of launch. The directory names the firms and the product line together rather than tying each firm to MarketSheet specifically, so this is best read as the shape of the installed base rather than as four confirmed MarketSheet sites
Alert automation on the trading floor
The use the language was actually built for, described in the manual rather than in any customer story: a quote object carries four scripts - begin alert, alert update, end alert, and normal update - which fire as a price crosses a limit and crosses back. Minimally such a script beeps and inverts a colour. The patent notes that because a script can invoke an external program, clients used this to do things like telephone a beeper service when an alert fired, which in 1990 was about as close to a mobile push notification as a bond desk could get