Before you beginYou need the cluck CLI, a Pollosoft account, and a coop to work in. No prior experience required. Curiosity and a mild fondness for chickens are helpful.
Overview
A quick tour of the Cluck language, from hello world to async eggs. The whole thing takes about 18 minutes, and the commands below are the ones you will use along the way.
$ cluck new hello.cluck
$ cluck run hello.cluck
$ cluck preen hello.cluck
Steps
- Hello, coop. A Cluck program starts with bawk. The line bawk "hello" prints hello, loudly.
- Variables and eggs. Declare values with lay: lay count = 12. Eggs (immutable values) are the default. Use hatch for mutable state.
- Control flow. if, else, and peck-until loops. There is no goto, only goto-the-feeder.
- Async eggs. An egg is a value that will exist later. await it with crack. Unresolved eggs do not block the thread.
Commands used
Keep going
- Testing: do not count your chickens before they hatch (12 min)
- Hatching a project with Hatchback (7 min)
- Cluck in CI (8 min)
Stuck? Check the error codes, the FAQ, or the glossary.