Repository navigation
Quick Start
tiko is distributed as a toolchain: the compiler, its headers, its runtime libraries and its packages in one directory. Toolchains are published ready-built, so getting started is a download, not a build.
-
A toolchain. Download the newest release titled tiko toolchains from Releases:
tiko-windows-x86_64-<commit>.zipfor Windows,tiko-linux-x86_64-<commit>.tar.gzfor Linux,tiko-macos-arm64-<commit>.tar.gzfor macOS on Apple Silicon. Unpack it anywhere; it holds one directory,tiko-lang/, on every system. -
tkEdit, the editor, comes in the same directory, beside the compiler:
tiko-lang\tkedit.exeon Windows,tiko-lang/tkediton Linux,tiko-lang/tkEdit.appon macOS -- in the top of the directory on every system. It is one file -- its fonts, themes and libraries are inside it -- and it finds the compiler next to itself or inbin/. It has a debugger too:F9sets a breakpoint andF6runs to it (see Debugging). -
clang 18 or newer. It is not bundled: tiko uses it to compile and to link. tiko takes the first it finds of
TIKO_CLANG, thenC:\Program Files\LLVM\bin\clang.exeon Windows,/usr/bin/clangon Linux or/opt/homebrew/opt/llvm/bin/clangon macOS, thenclangonPATH.
tiko-lang\tiko.exe hello.tiko
hello.exetiko-lang/bin/tiko hello.tiko
./helloThe same on Linux and macOS. No flags are needed. tiko finds its headers and libraries relative to its own executable, and the default target is the host's: windows-x86_64 on Windows, linux-x86_64 on Linux, macos-arm64 on macOS.
tiko runs on Apple Silicon Macs with macOS 13 or newer.
-
Xcode's Command Line Tools:
xcode-select --install. Every link uses the macOS SDK and Apple's linker from them. -
Homebrew's LLVM:
brew install llvm. Homebrew does not put this clang onPATH, and tiko does not need it there: it looks in/opt/homebrew/opt/llvm/binitself. - Clear the download quarantine before the first run. A browser marks what it downloads, and macOS then refuses the unsigned compiler: it hangs rather than failing. Unpack, then:
xattr -dr com.apple.quarantine tiko-langAn archive fetched with curl or gh release download is not marked.
Optional, also from Homebrew: openssl@3 for std/tls and std/http, and sdl3 (with sdl3_image, sdl3_ttf, sdl3_mixer) for vendor/SDL3. There is no graphics library on macOS (SCREEN, PSET), as on Linux.
#import "std/containers"
'' generics
type Box( of T )
as T value
end type
dim b as Box( of int32 )
b.value = 7
'' a typed container, and for each over it
dim names as containers.Array( of ustring )
names.Push( "ada" )
names.Push( "grace" )
for each n as ustring in names
print n
next
'' multiple return, by tuple
function MinMax( ) as (min as int32, max as int32)
return (3, 9)
end function
var (lo, hi) = MinMax( )
print lo, hi
'' defer runs on the way out of the scope, on every path
scope
defer print "cleaned up"
print "working"
end scopeIt prints:
ada
grace
3 9
working
cleaned up
Only needed to work on the compiler itself. From Git Bash on Windows, or from Linux, WSL or macOS:
git clone https://github.com/PaulSquires/tiko-lang.git
cd tiko-lang
sh seed/fetch-seed.sh
bash build/package.sh --verifytiko builds tiko: the build compiles it with a seed, the earlier tiko release that seed/seed.lock pins. sh seed/fetch-seed.sh downloads it (through gh while the repository is private) and checks its SHA-256 before unpacking it into seed/cache/. package.sh then builds the compiler, the runtime and the graphics library, and assembles toolchains/tiko-windows/ or toolchains/tiko-linux/. It compiles and runs a program per target and records the result in MANIFEST.txt.
- Feature Index — every language feature and library, with its reference page.
- Compatibility — what changes for FreeBASIC code you already have.
- Keyword Index — every keyword, A–Z.
tiko-lang · Home · Feature Index · Keyword Index · License
FreeBASIC manual pages reproduced under the GNU FDL 1.3.
- Generics
- Interfaces
- For Each
- Iterators
- Tuples
- Array Results
- Defer
- Lambdas
- Block Strings
- String Slices
- Embed
- Typed Variadics
- C Header Import
- Foreign Library Linking
- UString
- Fixed-Width Types
- Nullptr
- String Library
- Format
- Array
- Map
- Set
- LinkedList
- OrderedMap
- OrderedSet
- Sorting
- Optional
- Result
- Smart Pointers
- Date and Time (Chrono)
- Filesystem
- File Streams
- Config (INI and TOML)
- Codec
- Hash
- UUID
- OS
- Process
- Net
- HTTP and TLS
- Math Library
- Finance
- Logging
- Terminal TUI Library
- PsControls
- tkControls
- sys/win
- Goroutines and Channels
- LLVM Backend
- tiko build
- TIKO_COMPILER
- Variable Declarations
- Standard Data Types
- User Defined Types
- Procedures
- Operators
- Control Flow Statements
- Converting Data Types
- Array Functions
- String Functions
- Mathematical Functions
- Bit Manipulation
- Date and Time Functions
- File I/O Functions
- Console Functions
- User Input (Runtime Library)
- User Input Functions (Graphics Library)
- Screen Functions
- 2D Drawing Functions
- Graphics Library Reference
- Graphics Keyword List
- Memory Functions
- Threading Support Functions
- Error Handling Functions
- Operating System Functions
- Preprocessor
- Intrinsic Defines
- Miscellaneous Keywords
- Modularizing