Zoem

an interpretive macro/programming language

Zoem: <Dutch> The sound made by electrical devices and flying bugs. Pronounced: zoom or zum; the vowel is short.

Zoem is an interpretive macro/programming language that is evaluated by the macro processor called zoem. It is among other things the engine behind the mini-languages supported by Portable Unix Documentation. Portable Unix Documentation is currently shipped with zoem.

Some aspects of the Zoem language highlighted

This pertains to the core zoem language, not to the packages built on top of it.

- 
two-stage processing: macro evaluation and character filtering
- 
simplicity in design
- 
a single first-level meta character
- 
a single way of delimiting strings and scopes
- 
generic building blocks
- 
macros can be easily treated as data
- 
strict syntax, no fuzzy context rules
- 
inside out evaluation if needed
- 
arithmetic environment
- 
data storage environment (multi-dimensional hashes)
- 
iteration/list construct (apply macro)
- 
exception framework integrated with error framework, applicable to arbiratrily deeply nested expressions, enabling e.g.
\catch{towel}{\while{1}{..deep-stuff..\throw{towel}..}} idiom.
- 
interactive mode fully recovering from errors
- 
interactive mode can be started from the command line, from within a file, or triggered when an error occurs during processing.
- 
easy and comprehensive IO, control operators, dictionary stacks, system commands, comprehensive tracing
- 
line-based text formatting capabilities, including positional alignment (left, centered, right), substring alignment, background padding, and virtual length specification (byte/glyph mismatch compensation).
- 
regexp environment
- 
fast
- 
autotooled (courtesy Joost van Baal), should build on all Unix platforms

Documentation

- 
The Zoem User Manual (html only). The definition of the zoem language.
- 

Download Zoem

Download from micans.org and install from source.

Look at the ChangeLog.

Debian
Zoem is now shipped with Debian, courtesy Debian developer (and zoem autoconfiscator) Joost van Baal.

OpenBSD
Andreas Kahari built an OpenBSD port. Hopefully that link is sufficient to get interested OpenBSD people going.

Release log

Here is the zoem ChangeLog.

Some TODO items

! 
enter zoem in the Unicode age. Read more further below.
  
- 
fix the inspect macro interface and semantics (regular expression functionality).
- 
more accessible syntax for nested anonymous or regular macros to facilitate staged processing (pipes).
- 
customizable escape character (requires demand first)
- 
more power in the filtering language (requires demand first)
- 
separate macro packages from zoem package
- 
man and FAQ macros depend on ascii character encoding (in specifying filter rules)
- 
too large doc manual (pending on writing chapter mode macros).
- 
printf, substr, length, split, pack macros (requires demand first)
- 
doc package: could be made much more modular, more hooks for user.

Regarding Unicode, I have no clue yet what the sane ideas and requirements are. This project is postponed until at least a quarter-clue has emerged. Now let us call a hypothetical Unicode-enabled zoem successor zoef. Should zoef be encoding-agnostic, or is it reasonable to assume UTF-8? The current zoem language basically enables mapping ascii and custom ascii encodings to other character sets. Should zoef aspire to map Unicode to other encodings (unlikely)?. Should zoef just expand ascii maps and custom encodings with a Unicode target, perhaps adding explicit syntax for Unicode characters? Note that the current zoem is perfectly capable of handling UTF-8 input, with the caveat that it treats the input stream as a byte stream.

Author

zoem the language and zoem the interpreter were written by Stijn van Dongen. zoem's build environment was created by Joost van Baal.

Mailing list

For subscribing to or searching the archives from the zoem-devel mailing list, go here. zoem-devel is a forum where anything zoem-related can be asked.

Miscellaneous

This page used to list a number of macro and mark-up processors and converters. That section has now got its own page.