Hyper Talk

The language used in Apple's Mac-only RAD HyperCard.

HyperTalk was designed by BillAtkinson to encourage 'programming for the rest of us'. It is a deceptively powerful and extensible language that introduced a lot of people to the basics of programming through a simple English-like syntax, making it easy to learn quickly enough to write off the top of your head, then hack around while you're actually using the result. By being part of a RAD, it also preserves the programmer from having to specify user interface components like buttons and text fields by providing empty components that can be dragged around on a screen. Each component can carry its own HyperTalk instructions (e.g. 'on mouseUp do whatever end mouseUp', but can also be controlled from code elsewhere.

One of HyperTalks best features is the built-in debugger which comes into action on encountering any checkpoints you append. You can then step through problematic code line by line, etc., while minding the values of variables and checking commands using two bundled XCMDs, Variable Watcher and Command Watcher. The latter neatly indents system messages sent by your code so you can see which subroutine has sent which command.

Non-Apple implementations of the language are known as xtalk. See the Open Source xTalk Interpreter archive The New Hacker's Dictionary JargonFile mentions HyperTalk under the entry 'candygrammar' to describe:
"A programming-language grammar that is mostly syntactic sugar [...] COBOL, Apple's HyperTalk language, and a lot of the so-called '4GL' database languages share this property."
http://catb.org/~esr/jargon/html/C/candygrammar.html

However, HyperTalk does contain
"A requirement to write end if, end while, end do, etc. to terminate the last block controlled by a control construct (as opposed to just end)"
http://catb.org/~esr/jargon/html/S/syntactic-salt.html

which, paradoxically, means that although HyperTalk tastes of syntactic sugar it's also seasoned with the tang of syntactic salt. Kind of sweet-sour.

I seem to remember the parser would fill in the tag on the "end" if you left it out -- or maybe I'm misremembering and that feature was added in AppleScript.

In its standard state, it has limitations: e.g. no arrays (although they can be emulated) and no test-case structure (forcing deeply nested if-thens or more creative solutions). However, it accepts XCMDs and XCFNs, which vastly extend its capabilities. Often written in C, these also tend to work with HyperCard clones like SuperCard and MetaCard. So if HyperTalk doesn't do something you want out of the box, you can usually get an XCMD or XCFN to do it for you, or write one yourself.

It was ideal for doing just about anything on the Mac, two reasons why HyperCard gained a vocal and very active user group. I once even heard of a web browser written using HyperTalk. -- DaveEveritt

Yes, you can indeed do just about anything with HyperCard. I have not come across a HyperCard stack that literally renders HTML like a Web browser, but there are indeed many Web things you can do with HyperCard. Mac CGI programs of all kinds. I am, as of matter of fact, the author of a HyperCard-based Web solution where the pages of the site are generated and personalized in real-time, according to a student-model that observes the student's behavior. You also have some Web site generators that batch-produce an entire site once you have made all your changes to the Web site's HyperCard stack. With an XCMD, you can do FTP, SMTP, POP, HTTP and other Internet protocols. Examples and ready-made reusable HC solutions are available FREE, notably from the HyperCard Pantechnicon: [http://www.lca.uqam.ca/pan/pmwiki.php] -- Alain Farmer

But Apple has failed to promote this rather venerable but very smart product adequately, although it has promised to maintain it for future versions of the Mac OS. -- DaveEveritt

Sadly true, but have you heard of FreeGUI and FreeCard [http://www.lca.uqam.ca/pan/pmwiki.php/FreeCard/HomePage] ?. The users of HyperCard have launched a project that will "clone" the GUI of HyperCard, and its HyperTalk scripting language. FreeGUI is the GUI of course (public-domain), and FreeCard is the application itself ("The FreeCard License" which appears to be apache-ish). Both of these are thus open-source, and free in every sense of the term "free". FreeCard's source and info are located in SourceForge, and FreeGUI is in [http://groups.yahoo.com/group/freegui/]. -- Alain Farmer (license update by Toby Cabot)

Yes I have, and I'm looking forward to seeing it, once I can import my existing HyperCard stacks. I tried Runtime Revolution, but the translation process needs a lot of tweaking -- Dave Everitt

There's also another project going on to clone HyperCard called WildFire [http://www.lca.uqam.ca/pan/pmwiki.php/WildFire/HomePage]. First it was just an IDE on top of HyperCard, then it was a project to clone HyperCard in RealBasic, and now it's a project to clone HyperCard in C++. AFAIK we're a lot further along as far as actual working code than FreeCard. -- Rebecca Bettencourt

(An update on that: WildFire turned into Project XI, which is no longer in development. -- Rebecca Bettencourt)

However, a new clone of HyperTalk has since appeared, called OpenXION ([http://code.google.com/p/openxion/], [http://www.openxion.org]) - XION was the name of Project XI's scripting language. -- Rebecca Bettencourt

I was an early HyperCard user/programmer and did a serious multi-user business application using it and HyperTalk. It was (and I'm glad to hear, still is) great. I've read several articles about the birth of HyperCard (I seem to recall one was by Bill Atkinson), and they described how HyperTalk was something that came about well into the Hyper Card project, and the person who should get a lot of credit for the language development (making me feel bad that I can't recall his name; does a first name of Dan ring bells for anyone else?)

I'm pretty sure it's DanWinkler; Dan Gelder wrote Serf -- CarlManaster

Bill's application which pre-dated HyperCard was named "Wild Magic", which is also the name of the company he started after leaving Apple.

(Actually, I think his company was called "General Magic." -- Rebecca Bettencourt)

(I still seem to remember "Wild Card" - as I recall it was one of the very first desk accessories, and was included with the original Mac OS - the one that was installed on the 128K Mac.)

If you typed "magic" into the message box of a certain version of HC which was only intended to be a reader, it would unlock the full program... though it was never actually locked; doing this only affected the Home Stack. You still had to provide your own documentation, too. If memory serves, this was the version distributed with the pre-7.5 versions of OS 7; in 7.5 and later, the reader incorporated restrictions which prevented it from being used for development. I don't think any HC environment is available for OS X.

The day I actually did this was the day I began programming, thanks for reminding me of the 'magic' keyword! -- DaveEveritt

(I second the recommendation of this book, especially the edition for HC 2.0. HyperCard is no more, but the book does a good job of showing what it was all about for the historically-minded. Like almost all documents of archaeological significance, that wasn't its intended purpose, of course. :) -- DanielKnapp)

HyperCard still exists, and is actually on Apple's 'maintain' list, but with no plans for a rewrite for OsX, which it really needs. SuperCard's SuperTalk is related, offers a migration path, and has been rewritten for OsX, but it isn't quite as elegant. See HyperCard for HC alternatives, including AlanKay's SqueakSmalltalk. -- DaveEveritt

Apple shipped the full version of the application on floppy #7 (of 7 total) of the System 7.0.1 package, and on the user level card in the home stack, they just put a blank button over the top of the 3, 4 and 5 buttons, so they couldn't be seen or clicked. Using the 'magic' keyword doesn't do anything in that version (at least not in my copy of it), but any HyperTalk-savvy user could just open the message box and type 'set userLevel to 5' and voila--a fully functional, unlocked version of the program...! -- BenScripps


CategoryProgrammingLanguage CategoryHypercard

EditText of this page (last edited October 9, 2012) or FindPage with title or text search