07 Dec 2006 14:22:12 UTC
- Distribution: Acme-Ook
- Module version: 0.11
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (0)
- Testers (566 / 1 / 0)
- KwaliteeBus factor: 0
- 76.60% Coverage
- License: unknown
- Activity24 month
- Download (8.88KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
- AUTHOR, COPYRIGHT, LICENSE
Acme::Ook - the Ook! programming language
use Acme::Ook; my $Ook = Acme::Ook->new; $Ook->Ook($Ook);
As described in http://www.dangermouse.net/esoteric/ook.html
Since the word "ook" can convey entire ideas, emotions, and abstract thoughts depending on the nuances of inflection, Ook! has no need of comments. The code itself serves perfectly well to describe in detail what it does and how it does it. Provided you are an orang-utan.
Here's for example how to print a file in reverse order:
Ook. Ook. Ook! Ook? Ook. Ook? Ook. Ook! Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook? Ook. Ook. Ook! Ook. Ook? Ook. Ook! Ook! Ook? Ook!
The language specification can be found from the above URL.
Despite the above, the interpreter does understand comments, the #-until-end-of-line kind.
The Acme::Ook is the backend for the Ook interpreter.
The constructor. One optional argument, a string of Ook! that will be executed before any code supplied in Ook().
The interpreter. Compiles, optimises and executes the Ook! code. Takes one or more arguments, either filenames or IO globs, or no arguments, in which case the stdin is read.
The compiler. Takes the same arguments as Ook(). Normally not used directly but instead via Ook() that also executes the code. Returns the intermediate code.
The optimiser. Takes the intermediate code from the compiler and optimises it slightly. Currently it creates better code for runs of repeated increment or decrement.
The interpreter is the frontend to the Acme::Ook module. It is used as one would imagine: given one (or more) Ook! input files (or none, in which case stdin is expected to contain Ook!), the interpreter compiles and executes the Ook.
There are three command line options:
Some example programs look better if an extra newline is shown after the execution.
Use the optimiser on the intermediate code.
If you want to see the intermediate code.
To re-ook the Ook you can use the
O!class methods. Not that you should.
If your code doesn't look like proper Ook!, the interpreter will make its confusion known, similarly if an input file cannot be read.
Jarkko Hietaniemi <email@example.com>
Copyright (C) 2002,2006 Jarkko Hietaniemi
This is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
The sample programs (the ook/ subdirectory) are Copyright (C) 2002 Lawrence Pit (BlueSorcerer) from http://bluesorcerer.net/esoteric/ook.html except for the bananas, coffee, and ok.ook, which are Copyright (C) 2002 Nicholas Clark.
I never called anyone a monkey. Honest.