This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> my $a = 3; my $b := $a; say $a =:= $b | |
Too many positional parameters passed; got 2 but expected 1 | |
the code: | |
our multi infix:<=:=>(Mu \$a, Mu \$b) { | |
pir::issame__IPP($a, $b) ?? True !! False; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/cheats/relops.pir b/src/cheats/relops.pir | |
index 416b5ab..c6a0bd1 100644 | |
--- a/src/cheats/relops.pir | |
+++ b/src/cheats/relops.pir | |
@@ -35,23 +35,6 @@ src/cheats/cmp.pir - Perl6 comparison builtins | |
# .tailcall '&prefix:!'($P0) | |
.end | |
- | |
-.sub '&infix:<=:=>' :multi(_,_) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pdflatex \\nonstopmode\\input summerjournal.tex | |
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) | |
%&-line parsing enabled. | |
entering extended mode | |
LaTeX2e <2005/12/01> | |
Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh | |
yphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak, german, ng | |
erman, danish, esperanto, spanish, catalan, galician, estonian, farsi, finnish, | |
french, greek, monogreek, ancientgreek, croatian, hungarian, interlingua, ibyc | |
us, indonesian, icelandic, italian, latin, mongolian, dutch, norsk, polish, por |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl6 | |
my $phrase = prompt "Enter what you wish to anagram: "; | |
say "Removing everything except letters"; | |
$phrase ~~ s:g/<-alpha>//; | |
die("You didn't enter any letters!") if $phrase.chars == 0; | |
say "String to be anagrammed: $phrase"; | |
$phrase = $pharse.lc; | |
say "{[*] 1..$phrase.chars} possibilities (counting the original string)"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
grammar Markov { | |
token TOP { | |
[<comment>|<command>]+ | |
} | |
token comment { | |
^^ '#' \N* \n | |
} | |
token command { | |
^^ $<item>=[\S+] <ws> '->' <ws> $<stop>=['.'?] $<replacement>=[\N+] \n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env perl6 | |
use v6; | |
use Tardis; | |
use Yapsi; | |
my $program; | |
if @*ARGS == 2 && @*ARGS[0] eq '-e' { | |
$program = @*ARGS[1]; | |
} | |
elsif @*ARGS == 1 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 34abc6a8675e09c5895fec09274d9148936791fa Mon Sep 17 00:00:00 2001 | |
From: lue <rnddim@gmail.com> | |
Date: Sun, 7 Nov 2010 15:00:53 -0800 | |
Subject: [PATCH] Added string functionality and some tests to match. | |
--- | |
lib/Yapsi.pm | 3 ++- | |
t/compiler.t | 8 ++++++++ | |
2 files changed, 10 insertions(+), 1 deletions(-) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Pea { | |
has $.directive; | |
has $.blocktype; | |
has $.contents is rw; | |
method new($directive, $blocktype, $contents) { | |
self.bless(*, :$directive, :$blocktype, :$contents); | |
} | |
method addline($stuffz) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class QuantumMechanics is Nature { | |
# Nature has $experiment | |
method new($experiment) { | |
self.bless(*, :$experiment); | |
} | |
method sane() { | |
no; # Nature contains this as an enum | |
} | |
method experiments() { | |
given $experiment.lc { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grammar AQUA { | |
# protoregexes | |
proto token block { {*} } # maybe {*} would be better? | |
# now for the normal stuff | |
token document { <block>+ } | |
multi token block:sym<delimited> { | |
<delimited> <extraconfig>* <content>+ <delimend> | |
} |