You
can find a reference for owl in the GNU directory. See here!
The Wikipedia reference for owl 0.7.2. (now gone) is available here in pdf format...
A small hook is still present at esoteric.voxelperfect.net, and precisely here.
I'm very pleased that in the Russian Wikipedia there's a page for FALSE,
in which also owlis explained
For any subject, write to
tbin@libero.it Last version: 0.7.6
Well, I don't ask money for the
programs I create.
But if you want to support my work, feel free to
donate whichever amount,
using the PayPal button down below. In any case, happy surfing!
Intro: what
is owl?
owl means Obfuscated Weird Language, and it's
my main project
regarding obfuscated programming languages. It was born from the ashes
of bogusforth (another older language of mine, not longer maintained), but it's
a
different thing. Its
foundations are simplicity, strength and power. You can
download it here.
Let's see
some of its
features.
owl
was inspired by the great false
programming language by Wouter van Oortmerssen, which in turn lies on
forth constructs; therefore owl
itself lies on forth constructs;
owl
has only 64-bits integer numbers;
owl
has a
simple 64-bits integer stack;
owl
has 26 variables for numbers (letters A-Z) and 26 for
functions (letters a-z);
owl
has a
simple set of math operators and functions and a subset of
bitwise/logic operators;
owl is
simple but powerful (you'll discover how much!)
Hello world!
Let's write the clause that any language must support:
"Hello, world!"
It's the simplest way (that belongs to false
too): a string prints itself. owl
recognizes most of C escape characters, so:
"\tWritten on a sunny \'morning\', listening to America\'s \"A Horse With No Name\"\n"
prints
Written on a sunny 'morning', listening to America's "A Horse
With No Name"
(notice the starting tab, the single and double quotes and the New
Line).
The Fibonacci
numbers series
Let's see something more intriguing: a program to calculate
all the
Fibonacci numbers available on the environment running owl:
Let's see in detail what happens:
- the ["\n"]c,
group stores
(,) in c a
function whose only scope is emitting a new line ("\n")
- after
the title (which is printed), the loop begins (in forth it would be a
BEGIN WHILE
REPEAT cycle) with two values on TOS (a couple of ones)
- the two functions that manage this cycle are [%0>]
(the control syntax would sound "until
the number on top of stack is positive") and [%.c@%2'2'+]
(this is the actual algorithm for calculating Fibonacci
numbers)
- the cycle is executed by the ! command
- the c@
sequence
executes the
function in c
(new line)
- the 2'
sequence is a ROT (namely a 2
ROLL in forth style)
- the symbol %
is the DUP command
- the dot . prints top of stack (TOS) consuming it
- the cycle
stops when the number on TOS is negative (see the control function [%0>])
- the ;
drops value on TOS
This program (actually a program
line)
works on
all systems that resolve an integer overflow as a
negative
number (e.g., for what about 64 bits numbers managed by owl
9223372036854775807 + 1 =
-9223372036854775808, which is treated as a negative number [but
there'd be something to say, here! Read the pdf manual!]).
If you want to get amused, see the 99bottles.owl
source example, in which the 99 bottles algorithm can be achieved in owl in no more than
4 lines of code, three of which are strings storing:
[" bottles of
beer"]a,[" bottle of beer"]b,[" on the wall, "]c, [".n"]d,[".nn"]e,["Take
one down and pass it around, "]w, ["no more bottles of
beer"]z,[%1>[a@][b@]?]y, 99[%][%.y@c@%.y@d@w@1-%%%0>[.]?1>[a@][%[b@][z@]?]?e@]!;;
This program returns the following (excerpt):
99 bottles of beer
on the wall, 99 bottles of beer. Take one down and
pass it around, 98 bottles of beer.
98 bottles of beer
on the wall, 98 bottles of beer. Take one down and
pass it around, 97 bottles of beer.
97 bottles of beer
on the wall, 97 bottles of beer. Take one down and
pass it around, 96 bottles of beer. ... ... 3 bottles of beer on
the wall, 3 bottles of beer. Take one down and
pass it around, 2 bottles of beer.
2 bottles of beer on
the wall, 2 bottles of beer. Take one down and
pass it around, 1 bottle of beer.
1 bottle of beer on
the wall, 1 bottle of beer. Take one down and
pass it around, no more bottles of beer.
An even more compact version of this
algorithm (by Marinus Oosters) may be found here.
Documentation
Documentation for owl consists of
these
documents:
a manual,
in which owl
basics are explained. Many examples are present. Text format.
the man page,
which is installed by make
install,
and which is actually the quick reference table present into the manual
before version 0.7.4, transformed for man (best viewed into an 80
columns screen or terminal)