Skip to content

Instantly share code, notes, and snippets.

@Siddhant
Siddhant / terminal output
Created February 11, 2012 22:44
running bootstrap.sh for panda
siddhant@siddhant-laptop:~/panda$ sh ./bootstrap.sh
use of uninitialized value of type Command in string context
--2012-02-12 04:05:50-- http://feather.perl6.nl:3000/list
Resolving feather.perl6.nl... 193.200.132.135, 2a02:2308:10::f:1
Connecting to feather.perl6.nl|193.200.132.135|:3000... failed: Connection timed out.
Connecting to feather.perl6.nl|2a02:2308:10::f:1|:3000... failed: Network is unreachable.
Any()
Method 'at_key' not found for invocant of class 'Any'
in block <anon> at bin/panda:12
in method postcircumfix:<{ }> at src/gen/CORE.setting:1195
@Siddhant
Siddhant / bootstrap.sh output
Created February 11, 2012 23:35
panda installed !
siddhant@siddhant-laptop:~/panda$ sh ./bootstrap.sh
use of uninitialized value of type Command in string context
==> Installing panda from a local directory '.'
==> panda depends on File::Tools, JSON::Tiny, Test::Mock
==> Fetching File::Tools
==> Building File::Tools
==> Testing File::Tools
t/01-file-find.t ...... ok
t/02-shell-command.t .. ok
All tests successful.
@Siddhant
Siddhant / gist:1986576
Created March 6, 2012 14:34
temporarily confused !
> for map { $_, $_}, 1..3 { .say;}
Confused
> for map {$_, $_}, 1..3 {.say;}
1
1
2
2
3
3
> for map { $_, $_}, 1..3 { .say;}
@Siddhant
Siddhant / gist:1986826
Created March 6, 2012 15:34
niecza errors
siddhant@siddhant-laptop:~/niecza/run$ mono Niecza.exe
[auto-compiling setting]
Unhandled exception: System.Exception: Unhandled nam operator command_qx
at Niecza.CLRBackend.NamProcessor.Scan (System.Object node) [0x00000] in <filename unknown>:0
at Niecza.CLRBackend.NamProcessor.<NamProcessor>m__33 (Niecza.CLRBackend.NamProcessor th, System.Object[] zyg) [0x00000] in <filename unknown>:0
at Niecza.CLRBackend.NamProcessor.Scan (System.Object node) [0x00000] in <filename unknown>:0
at Niecza.CLRBackend.NamProcessor.<NamProcessor>m__20 (Niecza.CLRBackend.NamProcessor th, System.Object[] zyg) [0x00000] in <filename unknown>:0
at Niecza.CLRBackend.NamProcessor.Scan (System.Object node) [0x00000] in <filename unknown>:0
at Niecza.CLRBackend.NamProcessor+<MakeTotalHandler>c__AnonStorey1B.<>m__81 (Niecza.CLRBackend.NamProcessor th, System.Object[] zyg) [0x00000] in <filename unknown>:0
at Niecza.CLRBackend.NamProcessor.Scan (System.Object node) [0x00000] in <filename unknown>:0
@Siddhant
Siddhant / gist:2000992
Created March 8, 2012 13:30
niecza make
...
cd src && NIECZA_KEEP_IL=1 mono ../boot/run/Niecza.exe -C NieczaActions
Potential difficulties:
Unsupported use of \ with sigil; nowadays please use \ without sigil at /home/siddhant/niecza/src/NieczaActions.pm6 line 2583:
------> for @p -> \$param⏏ {
cd src && NIECZA_KEEP_IL=1 mono ../boot/run/Niecza.exe -C NieczaFrontendSTD
cd src && NIECZA_KEEP_IL=1 mono ../boot/run/Niecza.exe -C NieczaPassSimplifier
cd src && NIECZA_KEEP_IL=1 mono ../boot/run/Niecza.exe -C OptBeta
cd src && NIECZA_KEEP_IL=1 mono ../boot/run/Niecza.exe -C NieczaPathSearch
@Siddhant
Siddhant / gist:2001038
Created March 8, 2012 13:44
cut-paste weirdness
> my @primes;
for 2..100 {
if is_prime($_) {
push @primes, $_;
}
}
say join " ", @primes; # "2 3 5 7 11 13..."
> Unable to parse blockoid, couldn't find final '}' at line 3
> Unable to parse blockoid, couldn't find final '}' at line 3
> use of uninitialized value of type Any in string context
@Siddhant
Siddhant / gist:2017093
Created March 11, 2012 16:44
Langton's ant
siddhant@siddhant-laptop:~/perl6 code$ perl6 Langton\'s\ ant
use of uninitialized value of type Mu in string context
use of uninitialized value of type Mu in string context
===SORRY!===
error:imcc:syntax error, unexpected IDENTIFIER, expecting '(' ('ant')
in file '(file unknown)' line 17
@Siddhant
Siddhant / gist:2044727
Created March 15, 2012 15:13
balanced brackets
siddhant@siddhant-laptop:~/perl6 code$ perl6 balanced\ brackets
Number of brackets4
[][][][] is well-balanced
siddhant@siddhant-laptop:~/perl6 code$ perl6 balanced\ brackets
Number of brackets3
[][][] is well-balanced
siddhant@siddhant-laptop:~/perl6 code$ perl6 balanced\ brackets
Number of brackets7
[][][][][][][] is well-balanced
siddhant@siddhant-laptop:~/perl6 code$ perl6 balanced\ brackets
@Siddhant
Siddhant / p6directory.md
Created April 1, 2012 05:27
perl6 hackers and personalities

Perl6 people

other keywords
IRC nick name perl6 blog wikipedia page perl6 keywords
@Siddhant
Siddhant / gist:2462010
Created April 22, 2012 06:29
modifying readonly arrays
use v6;
{
my $x = 2;
my @x = 2, 3, 4;
say foo(@x);
say bar($x);
}
sub foo(@z) {