Install

fble-0.5 (2025-07-13,fble-0.4-212-ga8f8ad0f)

This tutorial shows you how to install fble for use with subsequent tutorials.

The latest release of fble is available as a source tarball on github at https://github.com/ruhler/fable. To install fble you'll need to download or checkout the source and manually build and install.

Source

The source code for fble is available from github at https://github.com/ruhler/fable. Download and extract the latest release, or run the following to check out the latest source code:

git clone https://github.com/ruhler/fable.git

Requirements

The README file included with the source code has the definitive list of requirements for fble. On a debian-based system, the following command can be used to get all required packages for fble:

apt install \
  expect binutils bison coreutils \
  gcc gdb diffutils grep groff-base \
  ninja-build libgl-dev libsdl2-dev tcl8.6

Build

Fble comes with a configure script to initialize the build scripts and specify where to install fble. You can choose whether to install fble in a standard system location, such as /usr/local, or in your own home directory in some location. For this example, we'll install fble to an 'install' directory alongside the source code.

cd fable
mkdir install
INSTALL=`pwd`/install
./configure --prefix=$INSTALL
ninja && ninja install

Documentation

Documentation is generated and installed by default. You can find the generated man pages in the $INSTALL/man directory. You can find generated html documentation in the $INSTALL/share/doc/fble directory, including html generated for these tutorials.

Tests

If you would like to run the full test suite, you can also run:

ninja check

If all tests are passing, it should output a line that looks something like this:

Test Summary: 1406 passed, 4 xfailed, 0 failed, 1410 total

Some tests are marked as 'xfailed', which means they are known to fail. Those expected failures can safely be ignored.

Environment Setup

Subsequent tutorials all assume the environment has been set up for easy access to the fble installation. If you haven't installed to a standard install path, you can manually set up the environment by modifying PATH and LD_LIBRARY_PATH environment variables.

The following environment setup makes use of the INSTALL variable defined above:

export PATH=$INSTALL/bin:$PATH
export LD_LIBRARY_PATH=$INSTALL/lib:$LD_LIBRARY_PATH

To test your environment is properly set up, try running a hello world program that ships with the fble installation.

fble-stdio -p core -m /Core/Stdio/HelloWorld%

If all goes well, you should see "hello, world" printed to the terminal. Make sure to use the full command, including the final % character which is part of the syntax for identifying the hello world program.

You're now ready to work through the rest of the fble tutorials to learn all about fble.

Vim Syntax Highlighting

Fble ships with syntax files for use with the Vim text editor. If you are a Vim user, you can install the Vim files from the top level of the source directory using:

mkdir -p ~/.vim/ftdetect ~/.vim/ftplugin ~/.vim/indent ~/.vim/syntax
cp vim/ftdetect/* ~/.vim/ftdetect
cp vim/ftplugin/* ~/.vim/ftplugin
cp vim/indent/* ~/.vim/indent
cp vim/syntax/* ~/.vim/syntax

Now when you open up a .fble file in Vim, you'll get pretty syntax highlighting.

It's also useful to set the path to be able to find .fble files from their module paths. For example, add the following to your ~/.vimrc file:

autocmd BufNewFile,BufRead *.fble setlocal path=$INSTALL/share/fble/*

That way you can type gf with the cursor over a module path to jump to the code for that module.

Next Steps

Head over to the HelloWorld tutorial to write your very own hello world program in fble.