RETRO is a modern, pragmatic Forth drawing influences from many sources. It's clean, elegant, tiny, easy to grasp, and adaptable to many tasks.

It's not a traditional Forth. Drawing influence from colorForth, it uses prefixes to guide the compiler. From Joy and Factor, it uses quotations (anonymous, nestable functions) and combinators (functions that operate on functions) for much of the stack and flow control. It also adds vocabularies for working with strings, arrays, and other data types.


Latest Source (recommended)

2021.1 Release


Read the RETRO Handbook

Glossary (text)

Glossary (Browsable, HTML)


Open Source

The source and documentation are distributed under the ISC license.


RETRO runs on a virtual machine. Implementations are provided in C, Python, Pascal, C#, JavaScript, Nim, and RETRO.

RETRO has been built and used on many systems including DOS, Windows, Linux, FreeBSD, NetBSD, Haiku, macOS, and iOS. Tested host CPU architectures include x86 (16 and 32 bit), x86-64, ARM, and PowerPC.

Self Contained

The standard binaries are entirely self contained and need only standard system libraries to run.


RETRO is small, in both source and binaries.

A minimal C implementation of the VM is 250 lines (without comments). The full implementation with an embedded image isunder 3,000 lines. On FreeBSD x86-64, the binaries can range from 55k to 128k in size depending on configuration.

Code Sample

LISP provides a function, `defstruct`, which creates a data
structure and functions for accessing various fields in it.
This can be useful, so I'm doing something similar here.

(defstruct book title author subject book-id )

  :make-helper (nsq-)  [ d:create , ] dip does ; 
  :make-struct (ns-)
    d:create , [ here swap fetch allot ] does ; 
  :defstruct (sa-) 
    dup a:length 
    [ n:dec swap 
      [ 'ab 'aabab reorder 
        '@ s:append [ fetch + fetch ] make-helper 
        '! s:append [ fetch + store ] make-helper 
      ] a:for-each drop 
    ] sip swap make-struct ; 

'book { 'title 'author 'subject 'book-id } defstruct

book 'A const
'The_Hobbit     &A title!
'J.R.R._Tolkien &A author!

:info (a-)
  [ subject@ ] [ author@ ] [ title@ ] tri
  '%s_by_%s_is_a_%s_book. s:format s:put nl ;

&A info

View more examples.

This site is served by Casket, an HTTP server written in RETRO.