Skip to content
This repository has been archived by the owner on Aug 13, 2020. It is now read-only.
olaan edited this page Jun 10, 2015 · 10 revisions

The Compiler, the Deployer, and the Actor Store

The compiler, cscompile will compile a CalvinScript source file into a JSON representation. By default, the output will be written to a file with the same name as the input file, but with the extension replaced by 'json' instead of whatever extension the input file had (if any).

For up-to-date information, run it with an -h argument.

In general, most of the time the deployer is used instead of directly invoking the compiler.

Invoking

$ csdeploy <scriptfile>

with a CalvinScript file as argument will invoke the compiler for you, and then run the resulting application. It will be silent except for prints to standard output by default. Include -v to get more detailed information on the execution. Also note that the program will exit after 3 seconds.

Finally, the actor store is where we can find documentation about actors.

$ csdocs std.Join

will show the documentation for Join in the std namespace:

std.Join(): Join two streams of tokens
Inputs: token_1, token_2
Outputs: token

It is also possible to get a more verbose description in markdown format:

$ csdocs --format detailed std.Join

#### std.Join()

Join two streams of tokens


##### Inputs

token_1
:    first token stream

token_2
:    second token stream

##### Outputs

token
:    resulting token stream

For components, additional information on which actors they make use of is included:

$ csdocs std.DelayedCounter

std.DelayedCounter(delay): Counts from 0 and up, waiting 'delay' seconds between numbers
Requires: std.Delay, std.Counter
Outputs: integer
Clone this wiki locally