Speak is the name of the language that all TileStack's use to describe what should happen when someone interacts with a stack you've created. It is directly related to the HyperTalk language that was used by HyperCard for the same purpose.
Similar to HyperTalk, Speak allows you to describe things in a language that is very close to natural English. This allows people to pickup and understand Speak very quickly because everything is written in plain English phrases.
At this point we haven't expanded or added much to the language beyond what HyperTalk offered, so most of the references that exist about HyperTalk should provide a good idea of how to work with Speak.
How similar is Speak to plain old English?
So close it might surprise you. Here are some examples:
set the name of card field 1 to "My Field"
go to the next tile
get the first word in field "First Name"
if there is a tile field "My Field" then put "Hello" into tile field "My Field"
if the color of me is "blue" then set the color of me to "green"
hide button 1 of the next tile
Additionally, the language supports aliases and variations for a number of words and phrases. Consider the various ways you can go to the previous tile:
go to the previous tile go to previous tile go to prev tile go previous tile
Why is another language necessary?
Because we're not building this for programmers. TileStack is for non-programmers and it's much easier for most people to read a natural language like Speak then it is for them to read a bunch of syntax. Now we also think that programmers will find TileStack incredibly useful as well because it lets you quickly prototype things and get stuff done fast.
Further, the Speak language runs within the web browser, not on the server. Yes, you read that correctly, Speak code runs in the browser... just like JavaScript. And while client-side JavaScript can be wicked cool, it can also be a royal pain in the butt to pull off what should be really simple things.
Thats just a couple reasons why Speak owns.
Technically, how does this language run in the browser?
Warning: Geek Speak Ok... so your probably a geek if your reading this. But technically, we don't run Speak within the browser because you can't get away with that without a browser plugin of some sort. Instead, we actually translate the Speak language on the server to pure JavaScript. [geekasm]
Since we translate the Speak phrases you write directly to JavaScript, this means that once you load a stack into your browser, it runs entirely disconnected from the server and only communicates with the server to update it with any state changes. This also means that our stacks run on the iPhone because there is no client-side dependency besides JavaScript.[double geekasm]
What is Speak?
Similar to HyperTalk, Speak allows you to describe things in a language that is very close to natural English. This allows people to pickup and understand Speak very quickly because everything is written in plain English phrases.
At this point we haven't expanded or added much to the language beyond what HyperTalk offered, so most of the references that exist about HyperTalk should provide a good idea of how to work with Speak.
How similar is Speak to plain old English?
set the name of card field 1 to "My Field"go to the next tileget the first word in field "First Name"if there is a tile field "My Field" then put "Hello" into tile field "My Field"if the color of me is "blue" then set the color of me to "green"hide button 1 of the next tileAdditionally, the language supports aliases and variations for a number of words and phrases. Consider the various ways you can go to the previous tile:
go to the previous tilego to previous tilego to prev tilego previous tileWhy is another language necessary?
Further, the Speak language runs within the web browser, not on the server. Yes, you read that correctly, Speak code runs in the browser... just like JavaScript. And while client-side JavaScript can be wicked cool, it can also be a royal pain in the butt to pull off what should be really simple things.
Thats just a couple reasons why Speak owns.
Technically, how does this language run in the browser?
Since we translate the Speak phrases you write directly to JavaScript, this means that once you load a stack into your browser, it runs entirely disconnected from the server and only communicates with the server to update it with any state changes. This also means that our stacks run on the iPhone because there is no client-side dependency besides JavaScript.[double geekasm]