Learn to program using Kaya

The following tutorials on Kaya are available and are intended to quickly outline the various parts of the Kaya language and where and why you might use them. They are not intended to teach you how to program from scratch – some experience of imperative programming (C, Perl, PHP, etc) in general is assumed. Please let us know if there’s something you think is missed out or needs more detail.

For basic use of Kaya, you probably only need to read the first three tutorials (first four and some or all of the fifth if you intend to use Kaya for web applications).

  1. The basics: Using the compiler, basic Kaya syntax, short programs, functions and constants, built-in data types, exception handling.
  2. Data types: Algebraic data types, polymorphic data types, defining new data types, function overloading.
  3. Kaya modules: The Kaya module system, the standard library, writing modules, global variables.
  4. Using functions: Advanced function use, partial application, anonymous functions.
  5. Web programming: Writing web applications, state handling, security and ‘rekey’, images, CGI and webapp models, file uploads..
  6. Foreign functions: Accessing C library functions from Kaya, writing glue libraries.
  7. Compiler options: Command-line options for kayac.

In addition to the tutorials, the library reference documents all functions in the Kaya standard library.

The following conventions are used in the Kaya tutorials (and elsewhere on the Kaya site)

  • Text like a = 5; represents program code. The style expression; is used to represent a block of code with a particular purpose.
  • Text like kayac hello.k represents sample input or typed commands.
  • Text like Hello World! represents sample output.

Recent Comments

No comments to show.