8th Tutorial

Learn 8th step by step!

Before you begin…

8th is a cross-platform development environment which lets you concentrate on your application’s logic instead of worrying about differences between platforms. It lets you write your code once, and simultaneously produce applications running on multiple platforms. Its built-in encryption helps protect your application from hackers. You’re probably here because you want to learn a bit about how to use 8th; if you’re impatient you can just jump right in!

While it can be useful to have a background in programming, you needn’t be a programmer to learn to use 8th. Because it is derived from a language called Forth, if you are familiar with any other Forth you will find the concepts used in 8th familiar as well. This tutorial aims to make you productive with 8th in a reasonable amount of time. Take your time to play around with it, and don’t worry if you don’t “get it” all at once.

How to use this tutorial

This tutorial is intended to be read from beginning to end, in order to familiarize the reader with the 8th language. Even if you are an experienced programmer, you should proceed chapter by chapter to get a fuller understanding of how things fit together (but you can always skip around).

You should start 8th and work through the tutorials as you go, rather than just reading the text. This will help you absorb how things work much more quickly. If you have not already done so, please follow the installation instructions in the manual.

We estimate you should only require a few days to become reasonably familiar with 8th, and after a week or so you should be able to handle any normal task. Soon you’ll be able to capitalize on your knowledge to produce applications which run on all the most popular platforms.

Typographic conventions

When you are expected to type something it will appear like this:

this is user input
while the computer’s responses will appear like this:
this is computer’s response

Any built-in data types will appear like this, while other computer text displays like this.

Glossary of terms

8th uses a special vocabulary. So that you understand what we’re talking about, we present a short glossary of terms:

  • asset — any data packaged along with the application
  • invoke — what you do to a “word”; same as “call” in other languages
  • item — any of the built-in data types
  • namespace — a vocabulary of (usually) related words
  • phrase — a small group of words which accomplish some task
  • whitespace — any of the characters “space”, “tab”, “carriage-return”, “line-feed”
  • word — the same as “function” in other languages

Table of contents:

  1. Starting and stopping
  2. The console
  3. RPN and the stack
  4. Manipulating the stack
  5. Data types in 8th
  6. Namespaces and exceptions
  7. Words
  8. More data types in 8th
  9. Conditionals and loops
The tutorial is being actively worked on… please check back later for more!