Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 67 lines (44 sloc) 1.849 kB
7a42594 @masak initial commit
authored
1 = Yapsi -- Yet Another Perl Six Implementation
2
3 This is an implementation of a Perl 6 compiler-and-runtime in Perl 6. It
4 currently runs off the old, pre-refactor branch of Rakudo known as 'alpha'.
49e6a6b @masak [README] some more guidance about alpha
authored
5 You need to have an old version of Rakudo installed (say, the 2010-01
6 release), and available in your path under the name 'alpha'.
7a42594 @masak initial commit
authored
7
b74b719 @svatsan Add more info about building yapsi and make the
svatsan authored
8 == Building Yapsi
9
10 This assumes that you have a working installation of alpha somewhere in
11 your $PATH. Yapsi currently works on top of alpha, an older branch of rakudo.
12 If you have not built alpha yet, please build it by doing a git clone from
13 <git://github.com/rakudo/rakudo.git> and "git checkout origin/alpha".
14
15 To build Yapsi:
16 * type make in the directory where you've cloned Yapsi.
17 * copy the generated lib/Yapsi.pir to $PERL6LIB or ~/.perl6/lib folder.
18
19
20 == Features currently available in Yapsi
21
7a42594 @masak initial commit
authored
22 Right now you can do things like this:
23
24 $ ./yapsi -e 'say 42'
25 42
26
c92d82d @masak [README] updated
authored
27 $ ./yapsi -e 'my $a; { $a = 5 }; say $a'
7a42594 @masak initial commit
authored
28 5
29
c92d82d @masak [README] updated
authored
30 $ ./yapsi -e 'my $a = 5; my $b := $a; $b = 41; ++$b; say $a'
7a42594 @masak initial commit
authored
31 42
32
c92d82d @masak [README] updated
authored
33 In other words, Yapsi currently handles declaration, immediate blocks,
34 assignment, binding, prefix increment, and a very basic 'say' instruction.
7a42594 @masak initial commit
authored
35
36 The compiler also detects use-before-declaration and syntax errors.
37
38 $ ./yapsi -e '$a; my $a'
39 Invalid. $a not declared before use
40
41 $ ./yapsi -e 'say say'
42 Could not parse
43
44 == Near-future directions
45
46 Things we hope to implement in the immediate future:
47
48 * If statements
49 * Loops
50 * Function calls
c92d82d @masak [README] updated
authored
51 * BEGIN, CHECK, INIT and END phasers
7a42594 @masak initial commit
authored
52
6758414 @masak [README] e with a ^ on it
authored
53 == Raison d'être
7a42594 @masak initial commit
authored
54
55 Besides being useful as a p6-in-p6 implementation, Yapsi also might work as
56 a fast vehicle for exploring the following underexplored areas of the Perl 6
57 spec:
58
59 * Phasers
60 * Constant folding
61 * Early catching of errors
62 * Increased communication between compiler and runtime
63
64 == License
65
66 Yapsi is released under Artistic 2.0. See LICENSE.
Something went wrong with that request. Please try again.