ToonTalk facts for kids
Paradigm | Concurrent constraint logic |
---|---|
Designed by | Ken Kahn |
Developer | Ken Kahn |
First appeared | 1995 |
Stable release |
3.0 / {2009}
|
Platform | Desktop is Microsoft Windows and ToonTalk Reborn is HTML5 |
License | Versions 1.0 and 2.0 had commercial licenses from several different publishers worldwide, but version 3.0 is now free. ToonTalk Reborn is BSD 3.0 |
Filename extensions | .tt for Desktop ToonTalk |
Major implementations | |
ToonTalk IDE and ToonTalk Reborn for the Web | |
Dialects | |
Desktop ToonTalk and ToonTalk Reborn for the Web | |
Influenced by | |
Janus; Actor model |
Paradigm | Concurrent constraint logic |
---|---|
Designed by | Ken Kahn |
Developer | Ken Kahn |
First appeared | 1995 |
Stable release |
3.0 / {2009}
|
Platform | Desktop is Microsoft Windows and ToonTalk Reborn is HTML5 |
License | Versions 1.0 and 2.0 had commercial licenses from several different publishers worldwide, but version 3.0 is now free. ToonTalk Reborn is BSD 3.0 |
Filename extensions | .tt for Desktop ToonTalk |
Major implementations | |
ToonTalk IDE and ToonTalk Reborn for the Web | |
Dialects | |
Desktop ToonTalk and ToonTalk Reborn for the Web | |
Influenced by | |
Janus; Actor model |
ToonTalk is a special computer programming system. It was designed to help children learn how to code. The "Toon" part of its name comes from "cartoon." This is because the system uses animated characters. These characters include robots that you can teach by showing them what to do. ToonTalk is one of the few successful programming systems outside of universities that uses a method called concurrent constraint logic programming.
Contents
What is ToonTalk?
ToonTalk was created by Kenneth M. Kahn in 1995. It was first released as part of a software package called the ToonTalk IDE. This software was sold around the world from 1996 to 2009. After 2009, the way ToonTalk works was shared with everyone. The software itself became free to use.
ToonTalk for the Web
In 2014, a new version of ToonTalk was released. It is called ToonTalk Reborn for the Web. This version uses JavaScript and HTML5. This means it can run in almost any modern web browser. It is a bit different from the older desktop version.
How ToonTalk Reborn Works
ToonTalk Reborn programs can work with parts of a web page. They can also use many browser features. These include sound, video, and even speech input and output. You can also connect ToonTalk Reborn to web services like Google Drive. This web version is free and its code is open source. This means anyone can see and change how it works.
How ToonTalk Programs Work
ToonTalk was inspired by other programming ideas. These include the Janus computer language and the Actor model. A main way things communicate in ToonTalk is through "bird/nest" pairs.
Birds and Nests
Imagine you have a bird and its nest. When you (or a robot) give something to a bird, it flies to its nest. The bird then puts the item into the nest and flies back. If there are already items in the nest, the new item goes underneath them. This bird/nest system helps different parts of your program talk to each other.
Robots and Boxes
A ToonTalk program is made of a series of "rules." Each rule has a "head" and a "tail." The head is like a pattern. It looks for a specific type of "box." In ToonTalk, a rule looks like a robot. A whole program is like a team of robots. A "box" is like a container that can hold different things. These things can be numbers, text, other boxes, or even birds and nests.
How Robots Follow Rules
A "process" in ToonTalk is a box with a team of robots working on it. The robots try to match the box with their rule patterns. If no robot's pattern matches the box, the process stops for a moment. If a pattern matches, the first robot whose rule matches "fires." This means it performs its actions. The end of a rule can either stop the process or let it continue with the same robot team.
Waiting for Information
Sometimes, a robot's pattern might need something specific in a nest. If the nest is empty, the process waits. It waits until a bird puts something into that nest. This usually happens because another part of the program is working. When something is in the nest, the robot sees only the top item, not the whole nest. This way, nests can be used to handle things that will happen in the future.
ToonTalk's Design Ideas
ToonTalk can be understood in two ways: as telling the computer exactly what to do (imperative) or as describing what you want to happen (declarative). If we ignore parts that handle input and output, ToonTalk doesn't let different parts of the program change the same memory directly.
Communication in ToonTalk
The bird/nest system is similar to how communication works in the Actor model. However, ToonTalk lets you pass nests around. A process can also hold more than one nest, which is also true in the Janus language. One key difference is that ToonTalk keeps messages in the order they were sent. But it can also mix up message streams if needed.