Raven Manual - Interactive Console

Given zero command line arguments Raven prints a simple header listing the system version, and starts in interactive mode.

me@host~$: raven
Raven 20070119, Copyright (C) 2005-2007 Sean Pringle, mythago.net
Raven comes with ABSOLUTELY NO WARRANTY; for details type LICENSE
> _

Besides the header text, the only differences between interactive mode and executing a script are:

  • The contents of the data stack are automatically printed to the screen after code is executed.
  • The programmer must enter a trailing \ (backslash) to enter multiple lines of code.
me@host~$: raven
Raven 20070119, Copyright (C) 2005-2007 Sean Pringle, mythago.net
Raven comes with ABSOLUTELY NO WARRANTY; for details type LICENSE
> 1
1
> 'hello world'
hello world
> 'a,b,c' ',' split
list (3 items)
 0 => "a"
 1 => "b"
 2 => "c"
> 'a,b,c' ',' split ':' join
a:b:c
> 10 each as $i\
>  $i print
0123456789
> bye
me@host~$: _

To see the available core word set, enter CORE words.

> CORE words
! != % & * */ + +: +as +is +set , - . / /% : < << = > >> ARGS BL CORE CR
CRLF ENVS FALSE FILE FILES GLOBAL INI LF LICENSE MODULES NULL PATH STACK
STATE STDERR STDIN STDOUT TAB TRUE VERSION [ ] ^ abs acos acosh add
affected and as asin asinh assign atan atan2 atanh break bye call cat
catch cbrt cede ceil chdir child choose chr class close collect combine
continue copy cos cosh date define delete difference div divmod drop
dump dup each else empty eq erase escape exists exit exp exp10 exp2
expect expm1 extend extract fetch fields find float floor flush format
get group gt halt hash id if import in include index info input insert
inserted int intersection into inv is isdir isfile join keys leave
length line list location lock log log10 log1p log2 lower lt ltrim mail
master match max md5 merge microtime min mkdir mod ms mul muldiv ne neg
new nip not object off on open or ord over pair pause pid pop pow prefer
print prompt push query range read regex remove repeat replace require
resume reverse rmdir round rtrim scope seek selected self serialize set
shell shift shl shove shr sin sinh slave sleep sort split sqrt stack
start status stop sub swap tan tanh target task tell this throw time
trim try type union unique unlock unserialize until upper use values
wake was while words wrap write xor zip |

Automatic printing of the contents of the data stack may be toggled in the INI hash, allowing a more traditional Forth or HP calculator RPN behavior:

> INI
hash (4 items)
     warnings => 1
      notices => 1
    autoprint => 1
 location_tmp => "/tmp"

> INI 'autoprint' off

> 1

> STACK print
stack (1 items)
 0 => 1

> 2 + print
3
Get Firefox!