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.4
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, 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 integer numbers;
owl
has a
simple integer stack;
owl
has 26 variables for numbers (letters A-Z) and 26 for
functions (letters a-z);
owl
has a simple math operators: basic operations,
powering and rooting, bitwise/logic test;
owl is
powerful, even if simple (you will know 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 rain \'morning\', listening to Colosseum\'s \"Valentyne Suite\"\n"
prints
Written on a rain 'morning', listening to Colisseum's "Valentyne Suite"
(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)
- the two functions that manage this cycle are [%0>]
(the control syntax sounds like "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 marked 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 cycle
stops when the number on TOS is negative (see the control function [%0>])
This program (actually a line)
works on
all systems that resolve an integer overflow as a
negative
number (e.g., for what about 32bit machines, my eMac G4
performs
2147483647 + 1 =
-2147483648, which is a perfectly legal number).
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,[".\n\n"]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 (all in txt format, maintained with vi):
a manual,
in text format, in which owl
basics are explained. Many examples are present
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)
white documents
for owl,
in
which some of its features are treated, all in text format (not yet
ready)
I planned to build a pdf manual. Who knows when? Who cares? owl may be
downloaded here.
Examples
Some examples are here.
Some
of them are commented, so you can learn from them. Choose the package
accordingly to the owl
version you're using.
SEND ME YOUR owl SOURCES!
I'll enclose them in the examples packages!
(Specify owl version in the listing.)