Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Baja

Baja is a Synchronet module compiler and BASIC-like language for creating programmable command shells and modules for Synchronet versions 2 and 3.

Most Synchronet command shells are currently written in Baja.

Note:
The Programmable Command and Menu Structure implementation (basically, the compiled .bin file interpreter) in the Synchronet Terminal Server is unlikely to be enhanced in the future. Synchronet's programability and extensibility is primarily through JavaScript modules and services and future script development should be focused there.

Source

Baja source files (*.src, *.inc) are plain ASCII text files (IBM CP437 characters may also be used). The Baja language is documented here.

Baja source files are normally stored in the Synchronet exec directory.

Includes

Baja source files may include other source files (usually named *.inc) using the Baja !include directive. Included files are normally stored in the same directory as the *.src files but you can direct the Baja compiler to look in a different directory for included files by either defining the BAJAINCLUDE environment variable or by using the '-i' command-line option.

By forcing the Baja compiler to look in a different directory (e.g. sbbs/exec) for !included files, you could, for example, compile .src files in your mods directory which still !include files from the exec directory.

Compiling

Synchronet modules written “in baja”, rely on the baja utility to compile their “source” into an “executable” (interpretted) binary format (.bin file).

Note: There is a corresponding unbaja utility, created by Deuce, for decompiling Baja .bin files into somewhat readable (and modifiable) Baja source (.src) files.

Usage

usage: baja [-opts] file[.src]

 opts: -d display debug during compile
       -c case sensitive variables, labels, and macros
       -o set output directory (e.g. -o/sbbs/exec)
       -i set include directory (e.g. -i/sbbs/exec)
       -q quiet mode (no banner)
       -p pause on error

Example

To compile the Baja source file exec/default.src into the executable module exec/default.bin, from the Synchronet exec directory, type:

baja default

Trivia

The marketing name “Baja”, was coined by Dr. Seuss and inspired by vacations at our father's house in Baja California.

See Also