»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! | YAPC::NA talk submissions due end of Month. Have you submitted your talk? Set by toddr_ on 18 March 2013. |
|||
00:00
cognominal left
|
|||
diakopter | r: say q:to('\'');' | 00:02 | |
p6eval | rakudo 897636: OUTPUT«␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀S␀␀␀O␀␀␀R␀␀␀R␀␀␀Y␀␀␀!␀␀␀␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀␀␀␀C␀␀␀o␀␀␀u␀␀␀l␀␀␀d␀␀␀n␀␀␀'␀␀␀t␀␀␀ ␀␀␀fxE2x90 | ||
00:03
cognominal joined
|
|||
japhb_ | .u ALIAS | 00:03 | |
yoleaux | No characters found | ||
japhb_ | .u SAME | ||
yoleaux | U+05E1 HEBREW LETTER SAMEKH [Lo] (ס) | ||
U+FB41 HEBREW LETTER SAMEKH WITH DAGESH [Lo] (xEFxADx81) | |||
U+1084E IMPERIAL ARAMAIC LETTER SAMEKH [Lo] (𐡎) | |||
diakopter | .u BIND | ||
yoleaux | U+0A01 GURMUKHI SIGN ADAK BINDI [Mn] (◌ਁ) | 00:04 | |
U+0A02 GURMUKHI SIGN BINDI [Mn] (◌ਂ) | |||
U+1BFC BATAK SYMBOL BINDU NA METEK [Po] (᯼) | |||
00:05
pecastro joined
|
|||
FROGGS | gnight all (will read backscroll) | 00:06 | |
00:08
cognominal left
00:10
BenGoldberg joined
00:15
cognominal joined
|
|||
BenGoldberg | pugs: say $?OS | 00:17 | |
p6eval | pugs: OUTPUT«darwin» | ||
BenGoldberg | p6: say $?OS | ||
p6eval | niecza v24-35-g5c06e28: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object at Niecza.StashCursor.Core (System.String key, Boolean final, Niecza.StashCursor& sc, Niecza.Variable& v, Niecza.Variable bind_to) [0x00000] in <file… | ||
..rakudo 897636: OUTPUT«===SORRY!===Variable '$?OS' is not declaredat /tmp/ZZETwDElq3:1------> say $?OS⏏<EOL> expecting any of: postfix» | |||
japhb_ | p6: say $*OS | 00:18 | |
p6eval | niecza v24-35-g5c06e28: OUTPUT«Unix» | ||
..rakudo 897636: OUTPUT«linux» | |||
japhb_ | BenGoldberg, ^^ | 00:19 | |
BenGoldberg | Ahh, I see :) | ||
00:21
cognominal left
|
|||
BenGoldberg | Well, regardless, why does niecza throw a System.NullReferenceException, whereas rakudo complains about $?OS being undeclared? | 00:21 | |
Surely only of those one behaviors is correct, no? | 00:22 | ||
adu_ | ok so apparently <keyword:sym<break>> is equivalent to <keyword> which I don't like | ||
diakopter | BenGoldberg: it appears niecza is dieing during its parsing phase | 00:23 | |
(ungracefully) | |||
colomon | std: say $?OS | ||
p6eval | std 86b102f: OUTPUT«ok 00:00 42m» | ||
BenGoldberg | std: say $*OS | 00:24 | |
p6eval | std 86b102f: OUTPUT«ok 00:00 42m» | ||
japhb_ | BenGoldberg, an NRE, like a Java NPE or Parrot NPMCA, is a bug anytime you see it. A low-level error like that should not be allowed to bubble up to the user. | ||
(Well, not in raw form, at least.) | |||
BenGoldberg | So how do I report the bug? | 00:27 | |
diakopter | niecza's not fixing bugs like that right now | ||
00:28
cognominal joined
|
|||
diakopter | niecza's not being currently developed | 00:28 | |
00:29
ChanServ sets mode: +o diakopter,
diakopter sets mode: -o diakopter
|
|||
diakopter | urp | 00:29 | |
00:30
benabik joined
00:32
fildon joined
|
|||
japhb_ | r: sub r1($s) { my %*C; %*C{$s} = %*C.elems + 1; r2($s); }; sub r2($s) { return r1($s) unless %*C; r1("c"), r1("d"); say %*C; }; r2("a"); r2("b"); | 00:32 | |
p6eval | rakudo 897636: OUTPUT«maximum recursion depth exceededcurrent instr.: 'print_exception' pc 108115 (src/gen/CORE.setting.pir:48762) (src/gen/CORE.setting:9521)called from Sub 'defined' pc 157863 (src/gen/CORE.setting.pir:68905) (src/gen/CORE.setting:720)called from Sub '' pc 11528 (sr… | ||
japhb_ | r: sub r1($s) { my %*C; %*C{$s} = %*C.elems + 1; r2(); }; sub r2($s?) { return r1($s) unless %*C; unless $s { r1("c"); r1("d"); }; say %*C; }; r2("a"); r2("b"); | 00:34 | |
p6eval | rakudo 897636: OUTPUT«maximum recursion depth exceededcurrent instr.: 'print_exception' pc 108115 (src/gen/CORE.setting.pir:48762) (src/gen/CORE.setting:9521)called from Sub 'at_key' pc 296880 (src/gen/CORE.setting.pir:130376) (src/gen/CORE.setting:6689)called from Sub 'at_key' pc 18… | ||
00:34
cognominal left
00:35
cognominal__ joined
|
|||
BenGoldberg | r: srand( 10 ); say sort { rand }, 1..20 | 00:42 | |
p6eval | rakudo 897636: OUTPUT«17 14 5 3 11 4 16 12 8 19 9 7 20 13 2 1 6 10 15 18» | ||
BenGoldberg | std: srand( 10 ); say sort { rand }, 1..20 | ||
p6eval | std 86b102f: OUTPUT«ok 00:00 44m» | ||
00:42
cognominal__ left
|
|||
BenGoldberg | std: say 1 | 00:43 | |
p6eval | std 86b102f: OUTPUT«ok 00:00 41m» | ||
japhb_ | Gah. The 'my %*CACHE' thing doesn't work right for mutual recursion to more levels: | ||
r: sub r1($i) { my %*C; %*C{$i} = %*C.elems + 1; r2($i - 1); }; sub r2($i?) { return r1($i) unless %*C; say %*C; r1($i - 1) if $i > 0 }; r2(4); r2(3); | |||
p6eval | rakudo 897636: OUTPUT«("4" => 1).hash("2" => 1).hash("0" => 1).hash("3" => 1).hash("1" => 1).hash» | ||
japhb_ | Changing to state doesn't help, of course: | ||
r: sub r1($i) {state %*C; %*C{$i} = %*C.elems + 1; r2($i - 1); }; sub r2($i?) { return r1($i) unless %*C; say %*C; r1($i - 1) if $i > 0 }; r2(4); r2(3); | 00:44 | ||
p6eval | rakudo 897636: OUTPUT«("4" => 1).hash("4" => 1, "2" => 2).hash("4" => 1, "2" => 2, "0" => 3).hash("4" => 1, "2" => 2, "0" => 3, "3" => 4).hash("4" => 1, "2" => 2, "0" => 3, "3" => 4, "1" => 5).hash» | ||
japhb_ | temp gives a strange error: | ||
r: sub r1($i) { temp %*C; %*C{$i} = %*C.elems + 1; r2($i - 1); }; sub r2($i?) { return r1($i) unless %*C; say %*C; r1($i - 1) if $i > 0 }; r2(4); r2(3); | |||
p6eval | rakudo 897636: OUTPUT«Can only use 'temp' on a container in sub prefix:<temp> at src/gen/CORE.setting:12871 in sub r1 at /tmp/2OlMhchjQ1:1 in sub r2 at /tmp/2OlMhchjQ1:1 in block at /tmp/2OlMhchjQ1:1» | ||
japhb_ | I'm assuming it means a scalar container there. | 00:45 | |
Time to go ruminate on it over dinner, I think. | 00:46 | ||
00:46
japhb_ left
|
|||
BenGoldberg | r: temp $*C = 1; say $*C | 00:46 | |
p6eval | rakudo 897636: ( no output ) | ||
00:47
cognominal__ joined
00:48
adu_ left
|
|||
raiph | lue: thoughts on slang syntax (in response to gist.github.com/lue/5241230 ): | 00:59 | |
just 1 thought really. might it work well to view an action as a phaser? | 01:01 | ||
01:04
adu_ joined
|
|||
adu_ | ok, so it thinks 'main' in 'int main();' is a typedef, and so it never backtracks, so the parse fails | 01:04 | |
diakopter | rn: temp $_[0]; say "alive" # rakudo exits ungracefully | ||
p6eval | rakudo 897636: ( no output ) | ||
..niecza v24-35-g5c06e28: OUTPUT«alive» | |||
diakopter | rn: temp $_; say "alive" | 01:05 | |
p6eval | rakudo 897636: ( no output ) | ||
..niecza v24-35-g5c06e28: OUTPUT«alive» | |||
01:08
cognominal__ left
|
|||
BenGoldberg | p6: exit 0 | 01:08 | |
p6eval | rakudo 897636, niecza v24-35-g5c06e28: ( no output ) | ||
BenGoldberg | p6: exit 1 | ||
p6eval | rakudo 897636, niecza v24-35-g5c06e28: ( no output ) | ||
01:08
cognominal joined
|
|||
adu_ | so basically, I'm trying to match "aa" with /a+a/ | 01:09 | |
BenGoldberg | p6: print 'aa' ~~ /a+a/ | ||
p6eval | rakudo 897636: OUTPUT«aa» | ||
..niecza v24-35-g5c06e28: ( no output ) | |||
BenGoldberg | Twould be nice if p6eval outputed the exit code of whichever perl6 program it's using | 01:12 | |
adu_ | BenGoldberg: how do you do that with complicated a's | ||
BenGoldberg | p6: print 'abcabd' ~~ /(ab.)\1/ | 01:13 | |
p6eval | niecza v24-35-g5c06e28: OUTPUT«===SORRY!===Unsupported use of the 1-based special form '\1' as a backreference; in Perl 6 please use the 0-based variable '$0' instead at /tmp/qaN2BPoJYB line 1:------> print 'abcabd' ~~ /(ab.)\1⏏/Action method ba… | ||
..rakudo 897636: OUTPUT«===SORRY!===Unrecognized backslash sequence: '\1'at /tmp/YoZdB0vQeV:1------> print 'abcabd' ~~ /(ab.)\⏏1/ expecting any of: postfix infix stopper infix or meta-infix prefix or term … | |||
BenGoldberg | p6: print 'abcabd' ~~ /(ab.)$0/ | 01:14 | |
p6eval | rakudo 897636, niecza v24-35-g5c06e28: ( no output ) | ||
BenGoldberg | r: say rx/a+a/ | 01:20 | |
p6eval | rakudo 897636: OUTPUT«» | ||
BenGoldberg | n: say rx/a+a/ | ||
p6eval | niecza v24-35-g5c06e28: OUTPUT«regex ANON(Any \self) { ... }» | ||
adu_ | woot | 01:26 | |
gist.github.com/andydude/5274854 | |||
BenGoldberg | r: print 'abcabd' ~~ m:p5/(ab.)\1/ | 01:32 | |
01:32
drbean left
|
|||
p6eval | rakudo 897636: OUTPUT«===SORRY!===Unrecognized backslash sequence: '\1'at /tmp/9vlxQHUtLQ:1------> print 'abcabd' ~~ m:p5/(ab.)\⏏1/ expecting any of: colon pair (restricted) infix stopper» | 01:32 | |
BenGoldberg | Hmm... both rakudo and niecza die ungracefully when I use $0, and neither supports the :p5 modifier to ask for perl5 regexes. | 01:34 | |
01:34
drbean joined
01:35
cognominal left
|
|||
adu_ | hmm | 01:36 | |
geekosaur | seems to work here in rakudo | 01:37 | |
BenGoldberg | Which one? | 01:38 | |
p6: print 'abcabd' ~~ m:p5/(ab.)\1/ | |||
p6eval | rakudo 897636: OUTPUT«===SORRY!===Unrecognized backslash sequence: '\1'at /tmp/DFB64HTUue:1------> print 'abcabd' ~~ m:p5/(ab.)\⏏1/ expecting any of: colon pair (restricted) infix stopper» | ||
..niecza v24-35-g5c06e28: OUTPUT«===SORRY!===Unrecognized adverb :p5(1) at /tmp/yCMpej6mpm line 1:------> print 'abcabd' ~~ m⏏:p5/(ab.)\1/Unsupported use of the 1-based special form '\1' as a backreference; in Perl 6 please use the 0-based variabl… | |||
geekosaur | I didn't try the p5 one | 01:39 | |
BenGoldberg | p: print 'abcabd' ~~ /(ab.)$0/ | ||
p6eval | pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) { unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.20120717/blib6/pugs/perl5/lib'; eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;}'Pugs::Runtime::Match::HsBridge'"*** Can't locate P… | ||
BenGoldberg | p6: print 'abcabd' ~~ /(ab.)$0/ | ||
p6eval | rakudo 897636, niecza v24-35-g5c06e28: ( no output ) | ||
geekosaur | the p6 one worked as it did here. (note that it does not repeat the regex, but the matched string) | ||
p6: print 'abcabd' ~~ /(ab.)**2/ | |||
p6eval | rakudo 897636: OUTPUT«abcabd» | ||
..niecza v24-35-g5c06e28: OUTPUT«abc abd» | |||
BenGoldberg | Ahh | 01:40 | |
p: print 'abcabcabd' ~~ /(ab.)$0+/ | |||
p6eval | pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) { unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.20120717/blib6/pugs/perl5/lib'; eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;}'Pugs::Runtime::Match::HsBridge'"*** Can't locate P… | ||
BenGoldberg | p6: print 'abcabcabd' ~~ /(ab.)$0+/ | ||
p6eval | niecza v24-35-g5c06e28: OUTPUT«abc» | ||
..rakudo 897636: OUTPUT«abcabc» | |||
geekosaur | pugs doesn;t do any of this, it's ancient | ||
BenGoldberg | I just keep typing p instead of p6 by accident ;) | 01:41 | |
01:41
cognominal joined
|
|||
geekosaur | maybe someday I will have enough haskell chops to not get utterly lost in its source... | 01:41 | |
BenGoldberg | p6: print 'abcabdabd' ~~ /(ab.)$0+/ | 01:43 | |
p6eval | niecza v24-35-g5c06e28: OUTPUT«abd» | ||
..rakudo 897636: OUTPUT«abdabd» | |||
01:50
cognominal left
01:54
cognominal joined
02:01
cognominal left
|
|||
lue | raiph: action as phaser seems interesting, although it might be a stretch to call it a phaser at that point. (But something phaser-like is an interesting idea) | 02:07 | |
unless you meant "actions under one phaser" instead of "each action method its own phaser" | |||
02:09
cognominal joined
02:14
BenGoldberg left
|
|||
lue | (then again, it seems actions are phaser-like by nature, but it might still help to think of actions as them) | 02:21 | |
02:29
tgt left
02:32
FROGGS_ joined
02:33
rindolf joined
|
|||
adu_ | how do I do [1:-1] | 02:35 | |
lue | r: my @a = 1,2,3; say @a[0..*-1]; | 02:36 | |
p6eval | rakudo 897636: OUTPUT«1 2 3» | ||
02:36
FROGGS left
|
|||
adu_ | what's *-1 mean? | 02:36 | |
02:36
cognominal left
|
|||
lue | r: say *.WHAT; | 02:36 | |
p6eval | rakudo 897636: OUTPUT«(Whatever)» | ||
adu_ | r: * | 02:37 | |
p6eval | rakudo 897636: ( no output ) | ||
adu_ | r: 3; * | ||
p6eval | rakudo 897636: OUTPUT«WARNINGS:Useless use of constant integer 3 in sink context (line 1)» | ||
02:37
census left
|
|||
lue | it's a Whatever object; in this case, *-1 refers to the last element in the array | 02:37 | |
adu_ | r: my $x = 3; say * | ||
p6eval | rakudo 897636: OUTPUT«*» | ||
adu_ | I don't get it | ||
lue | (*-2 second-to-last, etc.) | ||
adu_ | how is that different from [0..-1] | ||
sorear | adu_: * is a placeholder symbol of type Whatever | 02:38 | |
lue | The array subscripts substitute the * for the size of the array | ||
adu_ | in this case it stands for the array? | ||
ok | |||
thanks | |||
lue | r: my @a = 1,2,3; say @a.elems; # the number from @a.elems is what gets put in place of * when you do @a[*-1]; | 02:39 | |
p6eval | rakudo 897636: OUTPUT«3» | ||
labster | r: my $a = 'gfoo'; $a ~~ s@gf@f@; | 02:40 | |
p6eval | rakudo 897636: OUTPUT«===SORRY!===Variable '@f' is not declaredat /tmp/hTstr3dCxL:1------> my $a = 'gfoo'; $a ~~ s@gf@f⏏@;» | ||
labster | r: my $a = 'gfoo'; $a ~~ s@gf@ f@; | 02:43 | |
p6eval | rakudo 897636: OUTPUT«===SORRY!===Non-declarative sigil is missing its nameat /tmp/HoxY52AaTi:1------> my $a = 'gfoo'; $a ~~ s@gf@⏏ f@; expecting any of: postfix infix stopper infix or meta-infix prefix or term… | ||
02:43
PacoAir left
|
|||
labster | does s/// require slashes now, or is that some sort of LTA error? | 02:44 | |
adu_ | r: my %h = {a => 'b'}; say %h:exists{'a'} | ||
p6eval | rakudo 897636: OUTPUT«("a" => "b").hash» | ||
adu_ | r: my %h = {a => 'b'}; say %h:exists{'c'} | ||
p6eval | rakudo 897636: OUTPUT«("a" => "b").hash» | ||
adu_ | r: my %h = {a => 'b'}; say %h{'a'}:exists | ||
p6eval | rakudo 897636: OUTPUT«True» | ||
adu_ | r: my %h = {a => 'b'}; say %h{'c'}:exists | 02:45 | |
p6eval | rakudo 897636: OUTPUT«False» | ||
lue | r: my $a = 'gfoo'; $a ~~ s¢gf¢f¢; say $a; | 02:46 | |
p6eval | rakudo 897636: OUTPUT«foo» | ||
02:46
shachaf_ joined,
cognominal joined,
shachaf_ left,
shachaf_ joined
|
|||
lue | labster: No, but I wouldn't recommend any single characters that have special meaning in regexes :) | 02:46 | |
02:47
shachaf left,
shachaf_ is now known as shachaf
|
|||
labster | r: my $a = 'gfoo'; $a ~~ s★gf★g★; | 02:47 | |
p6eval | rakudo 897636: ( no output ) | ||
sorear | n: s@gf@f@ | ||
p6eval | niecza v24-35-g5c06e28: OUTPUT«Unhandled exception: Unable to resolve method subst in type Any at /tmp/jhKfCZijEV line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4299 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4300 (module-CORE @ 583)  at /home/… | ||
labster | well, that does work better, sure. | ||
sorear | n: ($_ = "helogf") ~~ s@gf@f@; say $_ | 02:48 | |
p6eval | niecza v24-35-g5c06e28: OUTPUT«helof» | ||
sorear | rakudobug | ||
labster | niezca++ | ||
niecza++ (my spelling)-- | |||
lue | A very quick glance shows it's not reported, so if no-one else is doing it, I'll submit it. | 02:50 | |
02:50
telex left
02:51
telex joined,
cognominal left,
xinming joined
|
|||
adu_ | uh oh | 02:53 | |
"Dynamic variable $*TYPEDEF_CONTEXT not found" | |||
02:55
xinming_ left,
huf left,
apejens left,
renormalist left
02:59
apejens joined
03:00
huf joined
03:01
orafu left
03:02
orafu joined
03:06
daudibaldr joined
03:13
preflex left
03:14
preflex_ joined,
preflex_ is now known as preflex
|
|||
labster | thanks lue | 03:19 | |
lue | you're welcome :) | ||
labster | rn: "foo" ~~ m#f#; | ||
p6eval | rakudo 897636: OUTPUT«===SORRY!===Null regex not allowedat /tmp/555Qc6LXz4:1------> "foo" ~~ m#f#;⏏<EOL> expecting any of: postfix infix stopper infix or meta-infix prefix or term prefix or meta-prefix»… | ||
..niecza v24-35-g5c06e28: OUTPUT«===SORRY!===No delimiter found at /tmp/BcbpfRkv7o line 1 (EOF):------> "foo" ~~ m#f#;⏏<EOL>Parse failed» | |||
lue | # now always starts a comment, unless it's inside a string | 03:20 | |
labster | that makes lots of sense, really. There's just a lot of old perl5 code which is... well, I don't envy FROGGS trying to figure out the regex situation for use v5;. | 03:21 | |
lue | It makes the job on syntax highlighters easier too (and anything needing to parse Perl(6), really). | 03:22 | |
diakopter | .u CLAPPING | 03:26 | |
yoleaux | U+1F44F CLAPPING HANDS SIGN [So] (👏) | ||
diakopter | .u 270b | 03:27 | |
yoleaux | U+270B RAISED HAND [So] (✋) | ||
lue | [otoh, it's an effective way to keep those awful Perl 6-ers from trying to run your beautiful Perl 5 code through their interpreters ] | ||
03:29
rindolf left
|
|||
labster | yes. that exactly. | 03:29 | |
03:36
armitage81 joined
03:44
dmol joined
03:47
fildon left
03:49
adu_ left
|
|||
labster | r: sub foo ($bar :D) { 1; } | 03:51 | |
p6eval | rakudo 897636: OUTPUT«===SORRY!===invoke() not implemented in class 'QAST::Op'» | ||
labster | I guess I want Mu:D there. But definitely LTA error message. | 03:54 | |
sorear | rakudobug. internal error. | 03:55 | |
labster | r: sub x ($y :qwerty) { 3; } | 03:57 | |
p6eval | rakudo 897636: OUTPUT«===SORRY!===invoke() not implemented in class 'QAST::Op'» | ||
labster | r: sub x ($y qwerty) { 3; } | 03:58 | |
p6eval | rakudo 897636: OUTPUT«===SORRY!===Missing blockat /tmp/gHtxH4GsMT:1------> sub x ($y ⏏qwerty) { 3; } expecting any of: statement list prefix or term prefix or meta-prefix new name to be defined formal pa… | ||
labster | looks like the colon triggers it. | ||
labster submits rakudobug | 04:00 | ||
04:01
daudibaldr left
|
|||
diakopter | r: sub foo ($bar:) { }; foo(3) | 04:02 | |
p6eval | rakudo 897636: OUTPUT«Lexical 'self' not found in sub foo at /tmp/F7HfOSNhH2:1 in block at /tmp/F7HfOSNhH2:1» | ||
diakopter | probably already submitted... | 04:03 | |
labster | Didn't see anything. That error message at least tells you what not to do. | 04:04 | |
diakopter | r: sub foo ($bar:D{ eat a trout }) { }; foo(3) | 04:05 | |
p6eval | rakudo 897636: OUTPUT«===SORRY!===invoke() not implemented in class 'QAST::Op'» | ||
diakopter | WAT. | 04:10 | |
r: sub foo (\self:){ say $_ }; foo(55) | |||
p6eval | rakudo 897636: OUTPUT«(Any)» | ||
diakopter | r: sub foo ($_:){ say $_ }; foo(55) | ||
p6eval | rakudo 897636: OUTPUT«Lexical 'self' not found in sub foo at /tmp/Ci48x8gUyb:1 in block at /tmp/Ci48x8gUyb:1» | ||
diakopter | r: sub foo (\self:){ say self }; foo(55) | ||
p6eval | rakudo 897636: OUTPUT«===SORRY!==='self' used where no object is availableat /tmp/pYzAechRtH:1------> sub foo (\self:){ say ⏏self }; foo(55) expecting any of: argument list prefix or term prefix or meta-prefix»… | ||
diakopter | r: sub foo (\self:){ say eval('self') }; foo(55) | ||
p6eval | rakudo 897636: OUTPUT«55» | ||
diakopter | O_O_O | ||
04:11
arlinius left
|
|||
labster | What just happened there!? | 04:14 | |
diakopter | I grew a third eye, and it opened wide | ||
04:15
armitage81 left
|
|||
lue | r: sub foo(\bar:) { say eval('bar') }; foo(42); | 04:15 | |
p6eval | rakudo 897636: OUTPUT«Lexical 'self' not found in sub foo at /tmp/YPYvtEk7WO:1 in block at /tmp/YPYvtEk7WO:1» | ||
lue | r: sub foo(\bar:) { say eval('self') }; foo(42); | 04:16 | |
diakopter | see? :) | ||
p6eval | rakudo 897636: OUTPUT«Lexical 'self' not found in sub foo at /tmp/nO55rgen2v:1 in block at /tmp/nO55rgen2v:1» | ||
lue | std: sub foo ($bar:) { }; foo(3) | ||
p6eval | std 86b102f: OUTPUT«Potential difficulties: $bar is declared but not used at /tmp/UcJok_jRiU line 1:------> sub foo (⏏$bar:) { }; foo(3)ok 00:00 44m» | ||
labster | Oh, once I open my third eye it's completely obvious. | ||
std: sub foo ($bar:) { $bar }; foo(3) | 04:17 | ||
p6eval | std 86b102f: OUTPUT«ok 00:00 45m» | ||
lue | n: sub foo ($bar:) { $bar }; say foo(3) | 04:18 | |
p6eval | niecza v24-35-g5c06e28: OUTPUT«3» | ||
04:27
thou joined
04:37
araujo left
04:45
am0c joined
|
|||
dalek | rl6-roast-data: cc74847 | coke++ | / (4 files): today (automated commit) |
04:50 | |
04:54
Chillance left
04:55
bluescreen10 left
|
|||
dalek | gs.hs: 522c5c8 | coke++ | t/spectest.data: run passing testfile |
05:08 | |
kudo/nom: ba5e04f | coke++ | t/spectest.data: run test we already pass |
05:12 | ||
05:22
ikrs joined
05:54
crab2313 joined
06:03
dmol left
06:04
dmol joined
06:05
xinming left
06:07
xinming joined
06:22
thou_ joined,
thou left
06:24
crab2313 left
06:29
thou_ left,
thou joined
06:30
Targen left
06:43
thou left,
thou_ joined
06:45
thou joined,
thou_ left
07:05
thou_ joined,
thou left
07:15
thou joined,
thou_ left
07:18
thou_ joined,
thou left
07:22
thou joined,
thou_ left
07:29
thou left,
thou joined
|
|||
ikrs | does perl6 have a while loop or do you have to use a loop with a last statement? | 07:30 | |
07:32
ikrs left,
ikrs joined
07:33
thou_ joined,
thou left
|
|||
sorear | ikrs: perl 6 has a lot of while loops | 07:35 | |
ikrs: i get the impression you may have tried it and run into a problem? | 07:36 | ||
r: my $i = 10; while $i { say $i-- } | |||
p6eval | rakudo ba5e04: OUTPUT«10987654321» | ||
sorear | ^ correct syntax | ||
r: my $i = 10; while ($i) { say $i-- } # also correct | 07:37 | ||
p6eval | rakudo ba5e04: OUTPUT«10987654321» | ||
sorear | r: my $i = 10; while($i) { say $i-- } # this is wrong | ||
p6eval | rakudo ba5e04: OUTPUT«===SORRY!===Word 'while' interpreted as 'while()' function call; please use whitespace instead of parensat /tmp/c3T2CNvVYz:1------> my $i = 10; while⏏($i) { say $i-- } # this is wrongUnexpected block in infix position (two t… | ||
sorear | r: my $i = 10; while ($i){ say $i-- } # so is this | ||
p6eval | rakudo ba5e04: OUTPUT«===SORRY!===Missing blockat /tmp/I6iR0QiI3Q:1------> 10; while ($i){ say $i-- } # so is this⏏<EOL> expecting any of: postfix statement end statement modifier statement modifier loop … | ||
sorear | r: my $i = 10; while ($i) say $i--; # so is this | ||
p6eval | rakudo ba5e04: OUTPUT«===SORRY!===Missing blockat /tmp/5PLEyCl5Xk:1------> my $i = 10; while ($i) ⏏say $i--; # so is this expecting any of: postfix infix stopper infix or meta-infix parameterized block»… | ||
ikrs | sorear: thanks, don't know what i was doing wrong but that helped | 07:38 | |
07:38
thou_ left
07:39
thou joined
|
|||
sorear | this is one of the places where perl 6 relies on whitespace, new people often trip over it | 07:39 | |
while( # when you glue the ( to a word, it forces the word to be taken as a function, not a keyword | 07:40 | ||
while $i{ # when you glue the { to the variable, it forces interpretation as a postfix operator. perl is now trying to parse a hash index! | |||
07:41
thou_ joined,
thou left
|
|||
ikrs | ah, that makes sense now. i had a similar issue with if statements | 07:42 | |
sorear | welcome to #perl6, if appropriate | 07:44 | |
07:47
anant_ joined,
thou_ left
07:49
thou joined
07:55
thou left,
thou joined
08:08
xinming left
08:10
xinming joined
08:11
thou left
08:13
thou joined
08:15
thou_ joined,
thou left
08:20
SamuraiJack joined,
thou_ left,
thou joined
08:21
ikrs left
|
|||
labster | yes, we have a while loop | 08:22 | |
erm... I was a page up, nvm | 08:23 | ||
08:23
thou_ joined,
thou left
08:24
thou joined,
thou_ left
|
|||
labster | aw lame, 'is cached' doesn't work on methods. Oh well, a state variable will do the trick. TIMTOWTDI. | 08:36 | |
dalek | : fbfa1ac | (Tobias Leich)++ | lib/Perl6/P5 (2 files): prepare to handle __DATA__ and __END__ blocks Currently we only capture the content, but this way scripts having this term are parseable. |
09:11 | |
09:13
sftp left,
sftp joined
|
|||
anant_ | I was reading S02, and under "Type Objects", found this statement "Any type name used as a value is an undefined instance of that type's prototype object". Should it not have been written "Any type name used as a value *refers to the singular instance* of that type's prototype object"? | 09:16 | |
FROGGS_ | r: say Int.defined | 09:18 | |
p6eval | rakudo ba5e04: OUTPUT«False» | ||
moritz | yes, that would be better | ||
anant_: if you want to fix it, tell me your github ID, and I can give you commit access | |||
anant_ | anant-sogani | 09:20 | |
moritz | anant_: welcome to the club. Have the appropriate amount of fun! | 09:22 | |
anant_ | moritz: Thanks! I'm still confused about the type object though. Why does type object.defined return a FALSE? | 09:29 | |
moritz | anant_: definedness is just the property that distinguishes types from instances | 09:30 | |
named like that for historical reasons, basically | 09:31 | ||
think of .defined as .is-instance instead, and the confusion goes away (I hope) | |||
anant_ | moritz: oh ok. So, my re-write "... refers to the singular instance of that type's prototype object" is then incorrect | 09:33 | |
moritz | uhm, why? | 09:34 | |
it removes the "undefined", which wasn't wrong | 09:35 | ||
but IMHO it still makes it clearer that the type object is a singleton | |||
anant_ | moritz: I think removing the "instance" word makes it clearer. Something like "... refers to the type's prototype object" .. which I hope conveys the singleton idea as well | 09:38 | |
sorear | either way it's wrong because it implies that the thing returned is something other than the prototype | ||
modern p6think is that the type *is* the prototype object | |||
Int used as a term returns the undefined prototype object named "Int" | 09:39 | ||
09:42
woolfy left
09:45
rindolf joined,
woolfy joined
09:59
_nyuszika7h_ joined
10:01
_nyuszika7h_ left
|
|||
dalek | : 197949f | (Tobias Leich)++ | lib/Perl6/P5 (2 files): added __LINE__ and __FILE__ |
10:01 | |
sorear | sleep& | 10:02 | |
FROGGS_ | gnight sorear | ||
say $?PACKAGE | 10:04 | ||
r: say $?PACKAGE | |||
p6eval | rakudo ba5e04: OUTPUT«(GLOBAL)» | ||
FROGGS_ | $ perl6 -e 'print $?PACKAGE' | 10:05 | |
use of uninitialized variable $v of type GLOBAL in string context in block at -e:1 | |||
dalek | ecs: ea0af47 | moritz++ | S02-bits.pod: [S02] unconfuse wording about type objects since a type object is the opposite of an instance, it is confusing to call it an instance of soemthing. anant++, sorear++ |
10:06 | |
moritz | anant_: I hope this commit makes it less confusing | 10:07 | |
10:07
renormalist joined
|
|||
anant_ | moritz: yes! | 10:10 | |
moritz: thanks for doing the correction so fast! | 10:11 | ||
masak | good forenoon, #perl6 | ||
FROGGS_ | hi masak | 10:14 | |
10:28
araujo joined
|
|||
dalek | : 206cb36 | (Tobias Leich)++ | lib/Perl6/P5 (2 files): add __PACKAGE__, not perfect yet though |
10:28 | |
moritz | \o masak, FROGGS_ | 10:35 | |
masak: how's the t2 review coming along? | 10:36 | ||
dalek | : 082a2a3 | (Tobias Leich)++ | lib/Perl6/P5 (2 files): implement length() |
10:46 | |
10:51
kaare__ joined
10:58
spider-mario joined
|
|||
masak | moritz: I'm reviewing now. | 10:58 | |
11:22
PacoAir joined
11:28
SamuraiJack_ joined
11:30
SamuraiJack left
11:31
tgt joined,
census joined
11:33
pmurias joined
|
|||
pmurias | FROGGS_: hi | 11:33 | |
FROGGS_ | hi pmurias | 11:34 | |
pmurias | FROGGS_: what should I type in v5 to run the tests? | 11:40 | |
make spectest? | |||
FROGGS_ | right | 11:41 | |
this should always pass | |||
pmurias: it passes 6 test files so far | 11:44 | ||
dalek | : 8e169cc | (Pawel Murias)++ | README.md: Update README.md |
||
pmurias | FROGGS_: we don't run perlito tests? | 11:46 | |
FROGGS_ | not by default, no | 11:48 | |
but we could add them to spectest.data as well | 11:49 | ||
11:52
PacoAir left
11:54
PacoAir joined
11:58
PacoAir left,
PacoAir joined
12:15
gfldex joined,
felher joined
|
|||
lizmat | FROGGS: with regards to 082a2a3433, I'm not sure we can get away with not implementing "use bytes" | 12:16 | |
within a scope where use bytes is active, "length" is actually number of bytes | 12:17 | ||
not number of chars | |||
so maybe add a #TODO there ? | 12:18 | ||
(even though I know "use bytes" is going to be deprecated / removed in Perl 5.18+, we would still need to support it from older versions) | 12:19 | ||
anant_ | moritz: I rewrote the contents of the 'Type Objects' section to look like this: gist.github.com/anant-sogani/5276483 | 12:20 | |
masak | tadzik: I submitted two talks to plpw. | 12:21 | |
pmurias | FROGGS_: spectests pass here | 12:23 | |
12:27
colomon left,
SamuraiJack_ left
|
|||
lizmat | masak: giving any talks at YAPC::NA ? | 12:29 | |
tadzik | masak: awesome :) | 12:32 | |
lizmat | tadzik: I have one lightning talk for PLPW, do I need to submit that now already ? | 12:33 | |
(already given at GPW and SPW by the way) | 12:34 | ||
tadzik | lizmat: not neceserilly, but would be great :) | ||
also, registering would be great as well :) | |||
12:35
SamuraiJack joined
|
|||
pmurias | FROGGS_: should I add perlito tests to roast5? | 12:36 | |
lizmat | tadzik: done both | 12:38 | |
tadzik | \o/ lizmat++ | 12:39 | |
12:39
SamuraiJack left
|
|||
lizmat | Ah, I see masak and jnthn are also coming, cool! | 12:40 | |
tadzik | yep :) | ||
pmurias | tadzik: what's the deadline for submitting talks to PLPW? | 12:41 | |
12:41
SamuraiJack joined
|
|||
tadzik | pmurias: 14th of april | 12:42 | |
as noted in act.yapc.eu/plpw2013/news/1006 | 12:43 | ||
lizmat | afk& | 12:51 | |
FROGGS: have you seen the ""Perl 5 specification" test suite" target for the QA Hackathon? (2013.qa-hackathon.org/qa2013/wiki?n...on-Targets ) | 12:56 | ||
13:08
thou left
13:13
kivutar joined,
leprevost joined
|
|||
pmurias | FROGGS_: why do we use a Perl6::P5World naming convention instead of Perl5::World? | 13:22 | |
lizmat | perhaps because it's inheriting from Perl6::World ? | 13:27 | |
which would make the naming more logical ? | |||
FROGGS_ | pmurias: what lizmat said, there id one method we are overriding... and I guess there will be more in future | 13:38 | |
lizmat: about 'use bytes': good point, I can add the feature right away... | |||
lizmat | can you? | 13:39 | |
FROGGS_ | lizmat: I think so, yes | ||
lizmat | wouldn't that require implementing the hints hash %^H ? | ||
and something akin to local() ? | 13:40 | ||
FROGGS_ | I've seen right now that .chars is wrong when we have umlauts in the code and ' use utf8' is missing... | ||
so, we need good tests for that | |||
lizmat | so you mean perl 6's .chars is wrong ? | ||
FROGGS_ | lets say it doesn't do the same like perl 5 does | 13:41 | |
perl -e 'print length "äbc"' | |||
4 | |||
13:41
crab2313 joined
|
|||
FROGGS_ | perl -e 'use utf8; print length "äbc"' | 13:41 | |
3 | |||
in perl6 we have utf8 by default | |||
but what I wanted to do right now is to call .bytes instead of .chars if 'use bytes' is in use | 13:42 | ||
but we have to make a Buf first to do that | |||
lizmat | and how would you know that "use bytes" is in use? | 13:43 | |
13:43
dwoldrich joined
|
|||
lizmat | (as that is lexical) | 13:43 | |
moritz | same as any other lexical information, really | ||
lizmat | fwiw, I can live with using .chars and a #TODO | 13:44 | |
FROGGS_ | set a dynamic variable? | ||
$*USE_BYTES | |||
moritz | for example | ||
lizmat | and parsing "use bytes" or "no bytes" would set /unset that var at compile time ? | ||
that would work in the short term | 13:45 | ||
moritz | why only in the short term? | ||
it's how we do most lexically changed behavior | |||
FROGGS_ | lizmat: it is the same for Use/no strict | ||
moritz | a dynamic variable in the compiler has the same scope a lexical pragma in the code | ||
FROGGS_ | so you can proper build the ast | 13:46 | |
lizmat wonders whether implementing the hints hash wouldn't be more flexible then | |||
as otherwise making caller() work will become very difficult indeed with regards to (caller(N))[10] | 13:47 | ||
(aka the hints hash from somewhere down the stack) | 13:48 | ||
FROGGS_ | pmurias: if you put them in a subdir, yes | ||
13:53
fhelmberger joined
|
|||
lizmat | FROGGS: but please, please don't let me interrupt the flow of your work… a #TODO is al I really wanted :-) | 13:53 | |
FROGGS_ | lizmat: that's what I did so far | 13:54 | |
the rest is a bit too complicated atm to do that properly for me | |||
pmurias | FROGGS_, lizmat: if a ruby compiler was inheriting from Perl6::World would Perl6::RubyWorld be a good name ? ;) | 14:01 | |
FROGGS_ | pmurias: yesh! | 14:02 | |
lizmat | FROGGS: maybe setting up the %^H hash would be a nice project to sink my teeth into | 14:03 | |
FROGGS_ | lizmat: go ahead :) | ||
moritz | the hints hash has the advantage of being accessible at run time | ||
lizmat | indeed, and I know that some of TheDamian's modules use that | 14:04 | |
(as shown recently at the SPW) | |||
tricky bit with $^H is that each call level has its own version | 14:05 | ||
s/call level/subroutine/ | |||
FROGGS_ | lizmat: btw, you fiddle something in the grammar, please rerun 'make spectest' before committing | 14:06 | |
lizmat | ack | ||
I wouldn't want to mess up things for other people :-) | |||
moritz | lizmat: though you know atatically at which point it's used, so you can generated it on demand | 14:07 | |
*actually | |||
erm | |||
*statically | |||
is what I wanted to wrote ;-) | |||
*write | |||
moritz should just give up typing | |||
FROGGS_ | it is just that little changes to the grammar can make a single test work, but break everything else (precedence of the tokens and such) | ||
pmurias | lizmat: wouldn't treating %^H as compile time contextual an setting it every time we start a new scope give as Perl5 semantics? like %*LANG? | 14:09 | |
lizmat | I guess the current sub has an ID that I could use as a key in a hash | ||
14:09
colomon joined
|
|||
lizmat | pmurias: I would want to prevent setting it at every new scope | 14:10 | |
but I guess I should say: current scope, rather than current sub | |||
so does the current scope have an ID? | |||
14:12
grondilu joined
|
|||
dalek | : 3a7bddc | (Tobias Leich)++ | lib/ (3 files): make simple (really simple) match work |
14:12 | |
: b9439f2 | (Tobias Leich)++ | lib/Perl6/P5Actions.pm: add TODO about "use bytes" for length() |
|||
pmurias | lizmat: look how %*LANG is implemented | ||
lizmat | ack, I will | 14:13 | |
grondilu | yet an other Rosalind problem where Perl6 is too slow: gist.github.com/anonymous/5276828 I suspect 'X-' is to blame. | ||
it's too bad because it is a nice use-case for perl6: lots of P6 idioms | 14:14 | ||
moritz | also gather/take tends to be slowish | 14:16 | |
14:17
lichtkind joined
|
|||
grondilu | I'm pretty sure the main issue is X-, though. I tried with only one protein and it took ages. | 14:17 | |
for those who don't know, the rosalind problem is: rosalind.info/problems/prsm/ | 14:18 | ||
pmurias | lizmat: also %^H seems to be a BEGIN time thing: pastie.org/7178779 | 14:23 | |
14:23
Psyche^ joined
14:24
pjcj left,
pjcj joined
|
|||
lizmat | pmurias: yes, but also a runtime thing through (caller(N))[10 | 14:25 | |
] | |||
14:26
pjcj left,
pjcj joined,
Patterner left,
Psyche^ is now known as Patterner
|
|||
lizmat | errands& | 14:35 | |
14:36
colomon left
14:53
grondilu_ joined
14:54
grondilu_ left
14:56
grondilu left
|
|||
arnsholt | Whoa, Rakudo parsed itself \o/ | 15:00 | |
tadzik | woot | 15:01 | |
arnsholt | Now I get to dig around in the optimizer =D | 15:02 | |
15:08
am0c left
|
|||
arnsholt | Oooh, all the way to codegen now =D | 15:12 | |
moritz | .oO( all the way to reno ) |
15:14 | |
arnsholt | ^_^ | ||
15:21
pmurias left
|
|||
moritz | arnsholt: I want to see commits :-) | 15:21 | |
dalek | p/vmarray-list: 17e5ba6 | (Arne Skjærholt)++ | src/ (3 files): Add splice to REPROps_Positional and add VTABLE for it to sixmodelobject.pmc. Also implements splice in VMArray.c. |
15:24 | |
kudo/vmarray-list: 38178b5 | (Arne Skjærholt)++ | src/Perl6/Optimizer.pm: A few tweaks to the optimizer to make it work with the changed NQP. |
|||
arnsholt | Happy now? =p | 15:25 | |
15:26
toddr__ joined
|
|||
moritz | yes. | 15:27 | |
arnsholt | MAnaged to avoid killing dalek this time, as well ^_^ | ||
moritz | push early! Mind the dalek! | 15:30 | |
15:38
leprevost left,
mtk left
|
|||
dalek | p/vmarray-list: fbe94c9 | (Arne Skjærholt)++ | src/QAST/Operations.nqp: Make a list into list_s in QAST/Compiler.nqp. |
15:41 | |
toddr__ | So I'm curious. Is there a Perl6 bot yet? Is that what dalek is? | ||
arnsholt | moritz++ is working on a logging bot in Perl 6 (ilbot6) | 15:42 | |
moritz | speaking of which, where has it gone? | 15:45 | |
arnsholt | You tell us =) | ||
moritz | Malformed UTF-8 string | ||
in method get at src/gen/CORE.setting:8365 | |||
15:45
mtk joined
|
|||
moritz | died tonight at 00:51H CET | 15:46 | |
15:46
ilbot6 joined
|
|||
arnsholt | Sounds unfun | 15:50 | |
15:52
leprevost joined
16:02
thou joined
|
|||
dalek | : 4041e53 | (Tobias Leich)++ | t/spectest.data: add moore passing tests |
16:02 | |
16:03
thou_ joined,
thou left
16:06
thou_ left
16:07
thou joined
16:11
thou_ joined,
thou left
16:12
kivutar left
16:14
crab2313 left
16:17
thou joined,
thou_ left
16:20
dmol left
16:29
dmol joined
16:31
thou left
16:32
thou joined,
kivutar joined
|
|||
[Coke] yawns and drinks some uninspiring coffee. | 16:36 | ||
16:36
thou left,
thou joined
|
|||
moritz trolls perlmonks with a Perl 6 answer: www.perlmonks.org/?node_id=1026278 | 16:37 | ||
[Coke] | r: say eval("0", :lang<perl5>) | 16:38 | |
p6eval | rakudo ba5e04: OUTPUT«No compiler available for language 'perl5' in sub eval at src/gen/CORE.setting:598 in sub eval at src/gen/CORE.setting:593 in block at /tmp/zGyjPv7O66:1» | ||
16:39
dmol left,
n0den1te joined,
dmol joined
16:40
thou left
16:41
thou joined
16:43
dmol left
|
|||
[Coke] ponders a new class of todo/skip tests that count as skips when any in a block fail, but count as passing todo if they all pass. | 16:49 | ||
16:52
dmol joined
16:57
dmol left
17:01
thou_ joined,
thou left
17:06
aindilis joined,
dmol joined
17:12
dmol left,
leprevost left
|
|||
moritz | "todip" or "skido" | 17:13 | |
17:15
thou_ left
17:16
dmol joined
17:20
thou joined
17:21
thou_ joined,
thou left,
pib1990 left,
n0den1te left,
n0den1te joined
|
|||
raiph | re anant's "real objects" suggestion ( gist.github.com/anant-sogani/5276483 ): | 17:22 | |
I don't like "real objects" | |||
I'm guessing s/he considered "instances" but felt an undefined prototype object was an instance. I'd be sorely tempted to go with "instance" regardless. | |||
Fwiw I think both the following are LTA (less than awesome): | 17:23 | ||
o "defined" vs "DEFINITE" | |||
o "prototype" vs "proto" (vs p5 "prototype") | |||
what about abstract/concrete? | |||
"Every type has an abstract object associated with it. It is responsible for creating concrete objects of that type, among other things" | |||
diakopter | nqp-jvm: say(nqp::isconcrete(raiph)) | 17:24 | |
p6eval | nqp-jvm: OUTPUT«0» | ||
raiph | heh. i'm curious what isconcrete tests | 17:25 | |
diakopter | jnthn's preferred term is concrete | ||
for "instances" | |||
"type object" for non-concrete | 17:26 | ||
17:26
adu_ joined
|
|||
adu_ | .u 1F4A9 | 17:26 | |
yoleaux | U+1F4A9 PILE OF POO [So] (💩) | ||
moritz | is yoleaux the new phenny? | 17:27 | |
adu_ | who is phenny? | ||
diakopter | yoleaux: tell diakopter do it | 17:28 | |
n0den1te | official secretary | ||
moritz | our previous bot who delivered messages and listed Unicode characters | ||
diakopter | you only live eaux | ||
n0den1te | err, adu_: ^^ | 17:29 | |
adu_ | that's not how you spell once | ||
diakopter | but it's an acronum | 17:31 | |
acronym | |||
adu_ | oh I get it eaux is pronounced o | ||
diakopter wonders who named it | |||
adu_ | where is it running? | 17:32 | |
n0den1te | o.O( you only live "unix" ? ) | ||
diakopter | heh, see its whois | ||
dalek | osystem: 3fbb334 | mrhdias++ | META.list: Was added the perl6-IUP module. |
||
osystem: a992925 | (Henrique Dias)++ | META.list: Merge pull request #24 from mrhdias/master Add the perl6-IUP module. |
|||
adu_ | Real Name: "Yoleaux L. Only-Once" | ||
n0den1te | YOLO? | ||
moritz | yolo ono | 17:33 | |
diakopter | dpk: ? | ||
adu_ | hmm, it's a UK address | ||
diakopter | seems dpk | 17:34 | |
adu_ | who is dpk? | ||
diakopter | /whois dpk | ||
dpk | ohai | ||
adu_ | David Kendal? | ||
dpk | sbp is not running phenny any more | ||
that is me | |||
moritz | dpk: thanks for sending in a replacement | 17:35 | |
dpk | yoleaux is the pseudo-official successor | ||
adu_ | dpk: did you name yoleaux? | ||
diakopter | 'tis a cute name | ||
moritz | yoleaux: tell diakopter foo | ||
17:35
adu_ is now known as adu
|
|||
dpk | I may have had some hand in its naming | 17:35 | |
moritz | dpk: is there a chance to get messenging feature back? | ||
dpk | .tell diakopter foo | ||
yoleaux | dpk: I'll pass your message to diakopter. | ||
dpk | reforms | ||
moritz | ok, thanks | ||
diakopter | cool | ||
yoleaux | 17:35Z <dpk> diakopter: foo | ||
moritz | .help | 17:36 | |
yoleaux | moritz: I'm yoleaux. Type .commands to see what I can do, or see dpk.io/yoleaux for a quick guide. | ||
adu | .tell dpk nice name | ||
yoleaux | adu: I'll pass your message to dpk. | ||
dpk | thx | ||
yoleaux | 17:36Z <adu> dpk: nice name | ||
moritz | dpk++ | ||
17:36
fhelmberger left
|
|||
n0den1te | .mangle You only live once | 17:37 | |
yoleaux | You only live once | ||
n0den1te | .mangle yolo | ||
yoleaux | Iolo | ||
dpk | hehe | ||
n0den1te | dpk: nice work. :) | ||
.mangle perl | |||
yoleaux | pèrl | ||
dpk | thanks | ||
diakopter | dpk: what language(s)/environment is yoleaux | 17:38 | |
moritz | .tr :de :sv Zimtschnecke | ||
diakopter | oh nm | ||
yoleaux | Zimtschnecke (de → sv) | ||
diakopter sees on github | |||
moritz | .rfc 1918 | ||
dpk | rubby | ||
yoleaux | RFC 1918 - Address Allocation for Private Internets: tools.ietf.org/html/rfc1918 | ||
dpk | though I kind of wish I'd used Pythong now | 17:39 | |
n0den1te | dpk: you too? I spell python as pythong way too many times to count (muscle memory stuck) | ||
geekosaur seems to prefer "pythin" for some reason | |||
dpk | Rubby and Pythong | ||
n0den1te | .tr en de "beer" | 17:40 | |
yoleaux | and the " bear " (nl → en) | ||
n0den1te | heh | ||
.tr :en :de "beer" | |||
yoleaux | "Bier" (en → de) | ||
moritz | .ping | ||
yoleaux | There is no ping command; nor can this be construed as a response. | ||
moritz | :-) | ||
n0den1te | yoleaux! | ||
yoleaux | n0den1te! | ||
n0den1te | that's ping enough for me. :) | 17:41 | |
diakopter | .command-help . . | ||
yoleaux | diakopter: Sorry, that command doesn't seem to exist! | ||
diakopter | .command-help ' . | ||
yoleaux | diakopter: Sorry, that command doesn't seem to exist! | ||
adu | .tr :ja :en 頑張る | ||
yoleaux | Go (ja → en) | 17:42 | |
17:42
thou_ left
|
|||
n0den1te | .wa sine curve | 17:42 | |
17:42
dmol left,
thou joined
|
|||
yoleaux | sine curve (English phrase): Definition: noun: the curve of y=sin x; Synonym: sinusoid; Broader terms: undulation: wave | 17:42 | |
n0den1te | .botsnack | ||
yoleaux | :D | ||
n0den1te | you should not rest now. right... | ||
.botsnack | 17:43 | ||
yoleaux | :D | ||
adu | yoleaux! | ||
yoleaux | adu! | ||
adu | :D | ||
17:43
dmol joined
|
|||
n0den1te | .decode <a href="perl6.org">perl6</a> | 17:44 | |
yoleaux | <a href="perl6.org">perl6</a> | ||
n0den1te | .ety mango | ||
yoleaux | "1580s, from Portuguese manga, from Malay mangga, from Tamil mankay, from man "mango tree" + kay "fruit." Mango trees were brought from Timor to British gardens in Jamaica and St. Vincent 1793 by Capt. Bligh on his second voyage." — etymonline.com/index.php?search=mango | ||
n0den1te | .pick 1, 25, 42 | 17:45 | |
yoleaux | 25 | ||
n0den1te | .pick 1, 42, 25 | 17:46 | |
yoleaux | 25 | ||
moritz | ♪ underneath the mango tree me honey and me ♫ | ||
diakopter | .head perl6.com | 17:47 | |
yoleaux | diakopter: Sorry, that command (.head) crashed. | ||
diakopter | o_O | ||
dpk | aww man | ||
n0den1te | .head perl6.org | ||
yoleaux | 200, text/html; charset=UTF-8, 4507 bytes | ||
diakopter | so the hdd is ruined cuz the head crashed? | 17:48 | |
n0den1te | moritz: yep, that's part of how I remembered it. but kay isn't fruit. it's "raw" fruit or a vegetable. :) | ||
"raw" as in unripe. | 17:49 | ||
adu | yoleaux should also accept .. for character ranges | ||
www.unicode.org/faq/blocks_ranges.html | |||
diakopter | .head i.i | ||
yoleaux | diakopter: Sorry, that command (.head) crashed. | ||
dpk | hmm. yeah, .head needs better error handling | 17:50 | |
adu | .chars 2200-2210 | ||
yoleaux | ∀ ∁ ∂ ∃ ∄ ∅ ∆ ∇ ∈ ∉ ∊ ∋ ∌ ∍ ∎ ∏ ∐ | ||
diakopter | .head github.com/dpkendal/yoleaux | ||
yoleaux | 200, text/html; charset=utf-8, 41673 bytes | ||
adu | .chars 2200..2210 | ||
yoleaux | . 0 1 2 | ||
dpk | hehe | ||
yeah, wil add that | |||
*will | 17:51 | ||
diakopter | .u CLAPPING | ||
yoleaux | U+1F44F CLAPPING HANDS SIGN [So] (👏) | ||
adu | .u POO | ||
yoleaux | U+1434 CANADIAN SYLLABICS POO [Lo] (ᐴ) | ||
U+1435 CANADIAN SYLLABICS Y-CREE POO [Lo] (ᐵ) | |||
U+A576 VAI SYLLABLE POO [Lo] (ꕶ) | |||
diakopter | .u ASPLODE | 17:52 | |
yoleaux | No characters found | ||
adu | .u PILE | ||
diakopter | .u No characters found | ||
yoleaux | No characters found | ||
adu | .u PILE | 17:53 | |
n0den1te | .u goo | ||
yoleaux | U+1F4A9 PILE OF POO [So] (💩) | ||
U+A591 VAI SYLLABLE GOO [Lo] (ꖑ) | |||
U+1F645 FACE WITH NO GOOD GESTURE [So] (🙅) | |||
dpk | haha, nice character name | ||
diakopter | .u olo | 17:54 | |
yoleaux | No characters found | ||
adu | .u st | 17:55 | |
yoleaux | U+FB06 LATIN SMALL LIGATURE ST [Ll] (st) | ||
FROGGS_ | .u POO | 17:56 | |
yoleaux | U+1434 CANADIAN SYLLABICS POO [Lo] (ᐴ) | ||
U+1435 CANADIAN SYLLABICS Y-CREE POO [Lo] (ᐵ) | |||
U+A576 VAI SYLLABLE POO [Lo] (ꕶ) | |||
n0den1te | .mangle poo | 17:57 | |
yoleaux | bloom | ||
n0den1te | :D | ||
[Coke] | .tw cokefloats | 17:59 | |
yoleaux | I'm going to #replacereader with #Feedly www.replacereader.com/ been using it since the announcement, love it. (@cokefloats) | ||
[Coke] | .tw chromatic-x | ||
yoleaux | [Coke]: Sorry, that command (.tw) crashed. | ||
diakopter | ha | ||
.tw quietfanatic | 18:00 | ||
yoleaux | @anocelot Can it do translation too? (@quietfanatic) | ||
diakopter | .tw dpkendal | ||
yoleaux | @splorp Happy birthday, Mr. Hutchinson! Enjoy thy celebrations! (@dpkendal) | ||
diakopter | it doesn't get retweets | 18:01 | |
dpk | should it? | ||
diakopter | .tw bobobobobobobobo | 18:02 | |
yoleaux | diakopter: Sorry, that command (.tw) crashed. | ||
18:02
thou left
|
|||
diakopter | .tw .tw | 18:02 | |
yoleaux | diakopter: Sorry, that command (.tw) crashed. | ||
18:02
thou_ joined
|
|||
dpk | i thought if you wanted a retweet you should use the id of the tweet, or the name of the account of the person who tweetefd | 18:02 | |
18:02
pib1979 joined
|
|||
diakopter | sgtm | 18:02 | |
_sri wonders if perl6 has any features that make it a better language for templates than perl5 | |||
dpk | the .tw command is going to break soon anyway. it still uses Twitter API 1.0 | 18:03 | |
_sri | Template::Mojo seems to still be missing all the interesting features | ||
dpk | it should have broken when they said they'd turn it off, earlier this month. but obviously they haven't actually done that yet | ||
diakopter | is yoleaux live-patchable? | ||
does it remember messages across restarts? | |||
dpk | .reload will pick up the latest changes to the command sources | 18:04 | |
yoleaux | dpk: Reload done (took 1.989s). | ||
moritz | _sri: perl 5 propagates context inwards, which means you have to decide whether to put stuff in scalar or list context. | ||
dpk | yes, it does | ||
moritz | that's not the case with perl 6. | ||
flussence | _sri: as someone heavily OCD about neat-looking output, heredocs and .indent are probably killer features for me | ||
diakopter | dpk: cool :) | ||
_sri | masak: true, that will be really nice | ||
umm, moritz | |||
moritz | despite popular confusion, masak and me still aren't quite the same person :-) | 18:05 | |
_sri | i was thinking more about blocks, <% do_stuff begin %>lalala<% end %> | ||
18:05
cooper_ joined
|
|||
_sri | in the perl5 version that gets compiled to "do_stuff sub { 'lalala' };" | 18:06 | |
18:06
cooper_ left
|
|||
_sri | a bit magical, ruby and lua are a lot better at it than perl atm | 18:07 | |
timotimo | r: sub flub(*&a) { a(1) }; flub { say $^a }; | 18:10 | |
18:10
toddr__ left
|
|||
p6eval | rakudo ba5e04: OUTPUT«1» | 18:10 | |
[Coke] | r: say StrPos.WHAT | ||
p6eval | rakudo ba5e04: OUTPUT«===SORRY!===Undeclared name: StrPos used at line 1» | ||
18:10
n0den1te left
|
|||
_sri | guess in the end all languages with curlies are not very good for templates ;p | 18:11 | |
timotimo | that's what slangs are for~ | 18:12 | |
18:12
cooper_ joined
18:14
cooper_ left
18:16
kivutar left
|
|||
_sri | google doesn't have much information on slangs | 18:17 | |
arnsholt | Well, it's a very fuzzy part of the spec | ||
18:17
thou_ left
18:18
thou joined
|
|||
arnsholt | Mostly hypothetical I think | 18:18 | |
_sri | could it be used to have a version of perl6 with do/end blocks instead of curlies? | ||
arnsholt | Possibly. I think so | ||
_sri | wow, that could be amazing for templates indeed | 18:19 | |
arnsholt | Why do you need to change the curlies to begin/end for templates though? | ||
_sri | <% do_stuff sub { %>lalala<% } %> | ||
not cool | 18:20 | ||
while in ruby you have <% do_stuff do %>lalala<% end %> | |||
arnsholt | In the simple case there, it'd be pretty simple to do the munging in the templating engine, so I assume you can have arbitrarily complex stuff inside the <%%>? | 18:21 | |
_sri | yes, Mojo::Template in perl5 does it that way | ||
moritz | well, in Perl 6 you could write <% do-stuff { %> lalala <% } %> # without the 'sub' | ||
_sri | to my knowledge there has been only one successful template engine using curlies, and that is pretty much impossible to highlight outside of visual studio | 18:23 | |
(it's Razor btw.) | |||
arnsholt | I can't help but feel that Wadler's law of language design is relevant here, though | 18:24 | |
18:26
thou left
18:27
cooper_ joined,
thou joined
18:28
cooper_ left,
cooper_ joined
|
|||
_sri | just trying to get an overview of the capabilities of perl6 to plan the mojolicious port | 18:29 | |
18:29
adu left
|
|||
_sri | cargo culting workarounds for perl5 limitations that aren't necessary anymore would be silly | 18:30 | |
lue | hello world o/ | ||
you *might* be able to make the do/end thing happen with macros, but I don't know macros in any way, so I can't help. | 18:43 | ||
anant_ | raiph: Yes, "real object" was bad. Replaced it with "concrete object" (gist.github.com/anant-sogani/5276483). | 18:46 | |
18:47
thou left,
thou joined
19:07
thou left,
thou joined
|
|||
timotimo | that IUP thing interests me | 19:14 | |
lue: when "is parsed" hits rakudo, you can totally do that. until then it'll be quite tricky i imagine | 19:15 | ||
lue | yeah (I tried a quick experiment with macros a little while ago to do what I suggested, to no avail) | 19:16 | |
timotimo | is mrhdias on this channel? | 19:19 | |
lue | not currently, it seems | ||
timotimo | seen mrhdias | 19:20 | |
19:20
thou left
|
|||
timotimo | is there some bot here that has some kind of syntax for that action? | 19:20 | |
!seen mrhdias | |||
19:20
thou_ joined
|
|||
benabik | There was. Aloha is homeless right now though. | 19:20 | |
19:22
nobu95 joined
|
|||
lue | you could search perlgeek.de's logs by username. IIRC, last occurrences come first. | 19:23 | |
nwc10 | dear Perl 6, can I have a klorthobot? | ||
19:24
awwaiid left
|
|||
timotimo | what is that? | 19:24 | |
19:25
nobu95 left
|
|||
nwc10 | well, I'd like to be able to give it a word of phrase, and it tells me all the advice from Klortho that matches | 19:25 | |
yes, I know that it *could* be done in Perl 5 | |||
but, well, if the first one is written in Perl 6, no-one else will need to bother | |||
and I think it would be popular | |||
timotimo | oh, it's that thing | 19:27 | |
today i'll develop a system utility that will make my life a little bit easier, using perl6 | |||
and it'll be only one line :P | |||
(it disables the touch and gesture inputs on my wacom tablet, because they turn wonky after a couple of minutes of use and interfere with normal usage) | 19:31 | ||
19:35
awwaiid joined
|
|||
arnsholt | timotimo: I don't think he's ever been here, unfortunately | 19:37 | |
Maybe I should suggest it in one of the bug threads | |||
timotimo | sure why not :) | 19:38 | |
19:40
thou joined,
thou_ left
19:41
p5eval joined
19:45
pecastro left
19:51
thou left
19:55
rindolf left,
rindolf joined
19:56
rindolf left
19:59
adu joined
|
|||
arnsholt | Rakudo setting compiled! \o/ | 19:59 | |
FROGGS_ | \o/ | ||
arnsholt | Onwards to the restricted one =) | ||
lue | .oO(CORE.setting takes far longer than any other part of the process by far) |
20:00 | |
arnsholt | Tru dat | ||
I'm hunting compile errors, though =) | |||
timotimo | oh, this is vmarray work again! | 20:01 | |
cool beans | |||
20:02
gcole left
20:03
gcole joined
|
|||
FROGGS_ | my tonight's goal: proper support for p5's eval! | 20:04 | |
lizmat | block or string ? | 20:05 | |
FROGGS_ | both | ||
lizmat | cool! | 20:07 | |
FROGGS_ | too many tests use it, so I'm kinda forced to do that next | 20:08 | |
20:08
anant_ left
|
|||
timotimo | sounds like a good decision | 20:10 | |
lizmat | meanwhile wrt to use bytes and hints hash | 20:11 | |
I was mixing up $^H and %^H | |||
anything that uses $^H, can be replaced by an ad-hoc solution, such as $*USE_BYTES (for use bytes) | 20:12 | ||
raiph | idea: an AST phaser. runs every block exit. modify or generate ast for block. crazy? | 20:17 | |
[Coke] | perl.org infrastructure required for planetsix is going away; looks like planeteria is a reasonable alternative if we still want a sixplanet. | ||
raiph | (planetsix) i can imagine this being an opportunity to move back towards perl5 | 20:20 | |
lue | raiph: you could accomplish that with existing phasers and macros, methinks | ||
adu | raiph: are you the guy who made libart? | 20:21 | |
raiph | adu: no | ||
adu | just checking | ||
so what am I doing wrong: "Dynamic variable $*TYPEDEF_CONTEXT not found" | 20:22 | ||
raiph | adu: did you create $*TYPEDEF_CONTEXT? i'm guessing not so that's a bug in a compiler | 20:25 | |
adu | r: grammar G { my $*CTX = False; token ident { <.alpha> <.alnum>* { $*CTX = True; } }; }; say G.parse('test'); | ||
p6eval | rakudo ba5e04: OUTPUT«No such method 'TOP' for invocant of type 'G' in method parse at src/gen/CORE.setting:10953 in block at /tmp/7r61ZidWm3:1» | ||
adu | r: grammar G { my $*CTX = False; token TOP { <.alpha> <.alnum>* { $*CTX = True; } }; }; say G.parse('test'); | ||
p6eval | rakudo ba5e04: OUTPUT«Dynamic variable $*CTX not found in method <anon> at src/gen/CORE.setting:10627 in at src/gen/Metamodel.pm:2501 in any find_method_fallback at src/gen/Metamodel.pm:2489 in any find_method at src/gen/Metamodel.pm:937 in regex TOP at /tmp/4jmZPCstes:1 in… | ||
FROGGS_ | r: grammar G { :my $*CTX = False; token TOP { <.alpha> <.alnum>* { $*CTX = True; } }; }; say G.parse('test'); | 20:27 | |
p6eval | rakudo ba5e04: OUTPUT«===SORRY!===Two terms in a rowat /tmp/02kND6AtbZ:1------> grammar G { :my ⏏$*CTX = False; token TOP { <.alpha> <.al expecting any of: pair value postfix infix stopper infix or meta-infix … | ||
FROGGS_ | hmm, looks like I'm mixing up nqp and perl6 | 20:28 | |
adu | FROGGS_: heh | ||
FROGGS_ | r: grammar G { token TOP { :my $*CTX = False; <.alpha> <.alnum>* { $*CTX = True; } }; }; say G.parse('test'); | ||
p6eval | rakudo ba5e04: OUTPUT«「test」» | ||
FROGGS_ | see | ||
I'm not mixing up | |||
just was the wrong position :o) | |||
adu | so how do I make it available to other regex's | ||
20:29
ikrs joined
|
|||
FROGGS_ | adu: it will be available in every token that is "after" TOP | 20:29 | |
adu | ah | ||
FROGGS_ | like alpha and alnum you used there | ||
adu | ok | ||
timotimo | rather "further down the 'call stack'" | ||
FROGGS_ | yeah | ||
timotimo | (down or up, depending on the direction your stack grows in) | ||
adu | FROGGS_: I'm confused because STD.pm6 puts them above everything | 20:30 | |
why does it work for STD.pm6 but not for me | |||
r: grammar G { my $*CTX = False; token TOP { <ident> { $*CTX = True; } }; token ident { <.alpha> <.alnum>* <?{ ($*CTX) }> }; }; say G.parse('test'); | 20:33 | ||
p6eval | rakudo ba5e04: OUTPUT«#<failed match>» | ||
adu | r: grammar G { token TOP { { my $*CTX = True; } <ident> }; token ident { <.alpha> <.alnum>* <?{ ($*CTX) }> }; }; say G.parse('test'); | 20:34 | |
p6eval | rakudo ba5e04: OUTPUT«#<failed match>» | ||
lizmat was wondering: is there going to be a rakudo star 2013.03 release ? | 20:35 | ||
adu | that should have succeeded | ||
FROGGS_ | r: grammar G { token TOP { :my $*CTX = True; <ident> }; token ident { <.alpha> <.alnum>* <?{ $*CTX }> }; }; say G.parse('test'); | 20:37 | |
p6eval | rakudo ba5e04: OUTPUT«「test」 ident => 「test」» | ||
FROGGS_ | AFAIK {} stops LTM, but since there is just one token... dunno why it doesnt like that | 20:38 | |
adu | r: grammar G { token TOP { :my $*CTX = True; <ident> }; token ident { <.alpha> <.alnum>* <?{ ($*CTX) }> }; }; say G.parse('test'); | ||
p6eval | rakudo ba5e04: OUTPUT«「test」 ident => 「test」» | ||
adu | YEY | ||
LTM? | |||
FROGGS_ | longest token matching | 20:39 | |
adu | hmm | ||
FROGGS_ | hold on | ||
maybe $*CTX is just valid within the block? | |||
makes sense to me | |||
and since <ident> is not within that block it wont be there | 20:40 | ||
adu | so I have to use :my | ||
FROGGS_ | r: grammar G { token TOP { { :my $*CTX = True; } <ident> }; token ident { <.alpha> <.alnum>* <!{ ($*CTX) }> }; }; say G.parse('test'); | ||
p6eval | rakudo ba5e04: OUTPUT«===SORRY!===Two terms in a rowat /tmp/SVauG6ogio:1------> grammar G { token TOP { { :my ⏏$*CTX = True; } <ident> }; token ident { expecting any of: pair value postfix infix stopper infix or… | ||
FROGGS_ | r: grammar G { token TOP { { my $*CTX = True; } <ident> }; token ident { <.alpha> <.alnum>* <!{ ($*CTX) }> }; }; say G.parse('test'); | ||
p6eval | rakudo ba5e04: OUTPUT«「test」 ident => 「test」» | ||
FROGGS_ | yes, so that it is seen from the tokens within that token | 20:41 | |
r: { my $x = 7; say $x } | |||
p6eval | rakudo ba5e04: OUTPUT«7» | ||
FROGGS_ | r: { { my $x = 7; }; say $x } | ||
p6eval | rakudo ba5e04: OUTPUT«===SORRY!===Variable '$x' is not declaredat /tmp/Obw9BBrsCV:1------> { { my $x = 7; }; say $x⏏ } expecting any of: postfix» | ||
FROGGS_ | see | ||
it's not php :o) | |||
adu | ok | ||
timotimo | lizmat: well, we did have a compiler release already, someone probably was going to make a star release, too | 20:44 | |
FROGGS_ | pmichaud: said that | ||
timotimo can't tell who was going to be the release manager for 03 | 20:46 | ||
FROGGS_ | I believe there was none so masak did it | 20:47 | |
r: try { say 1/0 }; say $!.Str.substr(0,10); say "alive" | 20:49 | ||
p6eval | rakudo ba5e04: OUTPUT«Divide by alive» | ||
FROGGS_ | I think I'll use that for eval BLOCK | ||
timotimo | divide by alive, eh? | 20:50 | |
FROGGS_ | :o) | ||
it's more like: devide by newline | |||
timotimo | :) | ||
can't test my wacom script thingie because apparently i displaced all of my damn microusb cables yet again :( | 20:55 | ||
diakopter | r: my $x .=Int; | 20:56 | |
p6eval | rakudo ba5e04: OUTPUT«No such method 'Int' for invocant of type 'Any' in method dispatch:<.=> at src/gen/CORE.setting:1014 in block at /tmp/f4UbDCkwYX:1» | ||
diakopter | r: my $x .=WHAT; | ||
p6eval | rakudo ba5e04: OUTPUT«No such method '' for invocant of type 'Any' in method dispatch:<.=> at src/gen/CORE.setting:1014 in block at /tmp/5544WelhAv:1» | ||
diakopter | o)o | 20:57 | |
ha | 20:59 | ||
r: say my $x .=max; | |||
p6eval | rakudo ba5e04: OUTPUT«-Inf» | ||
diakopter | r: say my $x .=min; | 21:00 | |
p6eval | rakudo ba5e04: OUTPUT«Inf» | ||
diakopter | hm. | ||
timotimo | oh, that's cute | 21:01 | |
21:01
kaare__ left
21:02
SamuraiJack left,
thou joined
21:04
dmol left,
dmol joined,
dmol left
21:07
dmol joined
|
|||
dalek | : d3afde4 | (Tobias Leich)++ | lib/Perl6/P5Actions.pm: make "eval BLOCK" work, this sets $@ |
21:07 | |
FROGGS_ | does somebody know how to get the value of an environment var within nqp? | 21:08 | |
21:09
dmol left,
dmol joined
21:10
kivutar joined
|
|||
lizmat | FROGGS: wrt to + make QAST::Var.new( :name('$!'), :scope('lexical') ) | 21:11 | |
s/\$!/\$@/ ? | |||
FROGGS_ | this $! is Perl 6's variable, $@ later dispatches to $! | 21:12 | |
lizmat | aha, ok... | ||
FROGGS_ | IMO it is good to keep $!, because: | ||
{ use v5; eval { 1/0 }; } use v6; say $! | 21:13 | ||
something like that | |||
lizmat | but { use v5; eval { 1/0 }; say $@ } would also work, then, right? | 21:14 | |
FROGGS_ | it does already | ||
sorear | .oO( use 5.010 ) |
||
lizmat | ack, gotcha | ||
is there a reason you want to emulate 5.10.0 rather than e.g. 5.14.0 | |||
? | |||
FROGGS_ | no | 21:15 | |
I just typed in something | |||
lizmat | ok | ||
FROGGS_ | sorear: ? | ||
lizmat | also: I think we can get away with not supporting smart match in p5 | ||
FROGGS_ | why? will it be removed? | 21:16 | |
lizmat | the way I read p5p, is that indeed it will be deprecated and removed at some point | ||
FROGGS_ | sad | 21:17 | |
since we could do it right *g* | |||
labster | It doesn't mean there won't be code with smart match out there. I've used it in P5 code. | 21:18 | |
FROGGS_ | me too | ||
21:19
thou left
|
|||
FROGGS_ | but just in one project | 21:19 | |
lizmat | yes, I did as well | ||
timotimo | having almost no clue about P5, what is it that makes smartmatch so bad for p5? is it the lack of object system in stock perl5? | ||
lizmat | but because p5 can't get it right because of lack of a type system | ||
labster | rn: my \m = 'foo'; say m.defined; | 21:21 | |
p6eval | niecza v24-35-g5c06e28: OUTPUT«===SORRY!===Regex missing terminator (or semicolon must be quoted?) at /tmp/RoILhePQLs line 1 (EOF):------> my \m = 'foo'; say m.defined;⏏<EOL>Parse failed» | ||
..rakudo ba5e04: OUTPUT«␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀S␀␀␀O␀␀␀R␀␀␀R␀␀␀Y␀␀␀!␀␀␀␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀␀␀␀U␀␀␀n␀␀␀r␀␀␀e␀␀␀c␀␀␀o␀␀␀g␀␀␀n␀␀␀i␀␀␀z | |||
lizmat | wrt to smartmatch in p5: rt.perl.org/rt3//Public/Bug/Displa...?id=116913 | 21:22 | |
timotimo | whoooops :D | ||
labster really needs to stop using regex starters as variable names | |||
that makes me sad. I've used given/when in P5 code quite a bit. | 21:26 | ||
FROGGS_ | yeah, given/when is quiet nice | 21:27 | |
I mean, I just put regexes and string in when clauses, this should work right, no? | 21:28 | ||
lue | .oO(It does in Perl 6, *cough* *cough*) |
21:31 | |
FROGGS_ | :o) | ||
lue: ya, if we could get XS right, rakudo/perl5 with the sixmodelobjects could release the 5.24 :P | 21:33 | ||
labster | quick, let's ask p5p to all stop what they're doing and start working on rakudo | ||
lizmat | labster: there, you got the right idea | 21:34 | |
lue | Introducing our latest release of Rakudo Star, named "version 5.24". This is because it now has P5 support, and then goes above and beyond existing versions of the standard Perl 5 compiler. | ||
lizmat | much better then arguing for *weeks* about how to implement subroutine signatures *sugar* | ||
sorear | FROGGS_: in perl 5, "say" is only a keyword if an explicit "use v5.10" or greater is in scope (or "use feature 'say'", but nobody does that) | 21:35 | |
FROGGS_ | sorear: I do that | 21:36 | |
labster | I do that | ||
FROGGS_ | hehe | ||
sorear | timotimo: p5 copied the old perl 6 smartmatch that nobody here likes anymore, not the new smartmatch | ||
FROGGS_ | sorear: at some point I'll read the feature lists and will activate these keywords only then | ||
timotimo | oh, i'm not perl6-old enough to know what the old smartmatch was like | 21:37 | |
lue is almost tempted to respond with "look at Perl 5" :) | |||
sorear | timotimo: There was this crazy idea that smartmatch should be symmetrical. /oo/ ~~ "foobar" | ||
when ("foobar") { # matches "foobar", also matches rx/oo/ | 21:38 | ||
21:38
dwoldrich left
|
|||
lue | gah. No wonder they want to get rid of it from P5. | 21:38 | |
timotimo | oh, that's weird | 21:39 | |
lizmat | what is? | ||
21:39
mathw_ is now known as mathw
|
|||
FROGGS_ | mathw: \o/ | 21:40 | |
mathw | hi | ||
:) | |||
adu | what does this mean: "Cannot call 'Real'; none of these signatures match: :(Mu:U \v: Mu *%_)" | ||
lichtkind | FROGGS_: thanks again for help @ gpw | ||
FROGGS_ | lichtkind: thanks for your talk :o) | 21:41 | |
lizmat | yeah, it was really good! | ||
lichtkind | thank you | ||
FROGGS_ | mathw: have you seen? there is already some perl5<->perl6 work going on | 21:42 | |
lichtkind | i hope th eversion in kiev will be better | ||
adu | oops, it means I was using [] instead of {} | ||
lizmat | lichtkind: practice makes perfect! | ||
mathw | FROGGS_: such as? | ||
FROGGS_: I'm a little out of touch at the moment, been busy. | |||
FROGGS_ | mathw: github.com/rakudo-p5/v5 | ||
perl 5 blocks (and pure perl 5 modules) within perl 6 code | 21:43 | ||
mathw | oh | ||
ooh | |||
ooooooh | |||
FROGGS_ | I'm not working at blizkost though | ||
lizmat | indeed: rakudo-p5 does not require a standard perl 5 lib | 21:44 | |
mathw | perl 6 grammar mutability ftw | ||
FROGGS_ | ohh yeah, it is pretty awesome | ||
(hard for code highlighters though) | |||
mathw | Perl never was easy for highlighting | 21:45 | |
lizmat | those on the bleeding edge always suffer :-) | ||
mathw | even when there was only one language in each file | ||
adu | mathw: lol | ||
lichtkind | mathw: as author of an editor you got my proof perl has the hardest highlighting of all :) | ||
mathw | Well I read some things a few years back about how you can't parse Perl 5 properly without at least partially executing it | 21:46 | |
timotimo | at this point, it would be swell if one could pepper the sourcecode with hints for the highlighter | ||
mathw | Which is a bit tricky in an editor | ||
timotimo | "i know you think this is inside the quote, but the quote has long ended. you are now inside a block. please highlight my code again?" | ||
mathw | I was writing a load of Lisp a couple of months back, highlighting that's fairly easy :) | ||
timotimo | mathw: yeah, but there isn't terribly much info to be gleaned from the highlighting IMO | 21:47 | |
adu | mathw: unless you have to include racket | ||
mathw: or scribble | |||
mathw | timotimo: true... not much info in Lisp syntax at all | ||
timotimo | one can say that's a good or bad thing. a matter of taste, clearly | ||
mathw | although my biggest issue with Lisp is the dynamic typing, the syntax is quite easy to deal with really | 21:48 | |
21:50
pmurias joined
|
|||
adu | ok, I think the only thing I have left to do is escape-sequence, then I can upload my C11 grammar | 21:50 | |
FROGGS_ | cool | ||
mathw | need to do some more Perl 6 again soon | ||
timotimo | C11? is that like C++11, but without the ++? | 21:51 | |
pmurias | if I have token version { $<vstr>=[<vnum>+ % '.' '+'?] } parse '5.16' how do I extract the '5'? | ||
adu | timotimo: no, C11 is the latest C standard, C++11 is the latest C++ standard, completely different beasts | ||
timotimo | mhm | ||
adu | it was easier when the latest was C99 and C++03 | 21:52 | |
timotimo | r: token version { $<vstr>=[<vnum>+ % '.' '+'?] }; "5.16" ~~ &version; say $<vstr>; | ||
p6eval | rakudo ba5e04: OUTPUT«Useless declaration of a has-scoped method in mainline===SORRY!===Undeclared name: &version used at line 1. Did you mean 'Version'?» | ||
FROGGS_ | pmurias: should be $<vnum>[0].ast | ||
timotimo | oh, hmm. | 21:53 | |
adu | I wonder if I should use gnu's cpp instead of trying to do it myself... | ||
arnsholt | adu: If you wanna do stuff with C, I think the LLVM libs are your best bet | 21:58 | |
adu | arnsholt: I've looked into it, their XML format sucks | 21:59 | |
and if I'm going to have to write my own thing, then I'd rather do it in Perl6 instead of C++ | 22:00 | ||
mathw | mmm | 22:01 | |
Spirit is good, but Perl 6 grammars are better | |||
adu | mathw: indeed | ||
spirit is boost/C++ which I hate | |||
arnsholt | adu: I haven't tried the XML stuff, but libclang looked reasonable from what little I looked at it | ||
adu | the ONLY runner up I've found anywhere to Perl6 grammars is ANTLR | ||
arnsholt | It's C, not Perl 6 though. Upside is, you don't have to parse at all, just munge the AST | 22:02 | |
adu | libclang isn't C it's C++ | ||
arnsholt: again, I've looked into it, and I've done more in a couple days with Perl6 than I could have in a couple months with libclang, because that's how long I tried to use libclang | 22:03 | ||
arnsholt | The guts are C++, AFAIK, but there's a perfectly serviceable C API | ||
Fair 'nuff. Just figured I mention it | |||
adu | all I'm trying to do is get an XML dump of C/C++ code | 22:04 | |
I've also tried GCCXML, which does just that, but the XML format sucks | 22:08 | ||
FROGGS_ | XML always sucks | 22:09 | |
adu | true | ||
but it's quite powerful, being able to transform structures without knowing what they're made of | |||
arnsholt | What do you want the XML for, OOC? | 22:15 | |
adu | a long project | 22:20 | |
I've been working on it for the past 20 years, and probably for the next 70 years | |||
arnsholt | Fair 'nuff =) | ||
I wanted to extract typedefs and stuff from header files | 22:21 | ||
adu | to document the equivalencies of different things | ||
arnsholt | But ATM I'm sidetracked on (yet another) yak shave =) | ||
adu | yak? | 22:23 | |
22:24
colomon joined
|
|||
arnsholt | www.catb.org/jargon/html/Y/yak-shaving.html | 22:25 | |
pmurias | if a module emulates an old api how can it determine which api version it is imported as? | ||
arnsholt | I've got a couple of yaks pushed on my stack, to be honest =) | 22:26 | |
mathw | FROGGS_: my new job have got me lined up to write two giant XSLTs soon. One targetting HTML, the other XSL-FO (which I don't know yet). That'll be fun! | ||
adu | arnsholt: for example, andmap: docs.racket-lang.org/reference/pair...dmap%29%29 and predicate_on_list: www.openmath.org/cd/fns2.xhtml#predicate_on_list are not equivalent, but can both be used to implement nary comparison | 22:27 | |
FROGGS_ | :o) | ||
adu | arnsholt: are you calling my project a yak shave? | 22:28 | |
arnsholt | And you want to compare code for equivalence? | ||
adu | arnsholt: eventually | 22:29 | |
arnsholt | adu: No, no! I'm calling -my- project a yak shave | ||
22:29
colomon left
|
|||
arnsholt | In fact I'm shaving a yak, to better shave another yak to do what I started out doing | 22:29 | |
Although, that top-level task may be best considered atrophied and I've just changed primary focus | |||
For comparing code for equivalence, I assume you're familiar with Rice's theorem? | 22:30 | ||
adu | arnsholt: and to be precise, sub predicate_on_list(&proc, @list) { return and_map(&proc, most(@list), rest(@list)); } | ||
[Coke] | planeteria.org/perl6/ is starting to get perl 6 content. | 22:32 | |
adu | arnsholt: nope | 22:34 | |
arnsholt: I just read the wikipedia article on Rice's theorem, and it's about classification, not equivalences | 22:37 | ||
arnsholt | Well, one of the things that follow from it is that you can't (in the general case, anyways) prove equivalence of two arbitrary pieces of code | 22:38 | |
Which is why things like static analysis and optimisation are so hard: there are only special cases | 22:39 | ||
adu | arnsholt: I've heard that before | ||
arnsholt: I didn't know what it was called | |||
arnsholt: but I don't care, I'm doing it | |||
that's like saying oh, parsing languages won't work, because we might get syntax errors | |||
so we might as well not build a compiler... | 22:40 | ||
lizmat is calling it an early night to accommodate for DST starting this night (in Europe) | 22:43 | ||
[Coke] | I'm going to take this opportunity to cull some of the feeds in the sixplanet. | 22:46 | |
22:48
spider-mario left
|
|||
dalek | : a351fdc | (Tobias Leich)++ | lib/Perl6/P5 (2 files): make "eval EXPR" und "eval" work |
22:48 | |
timotimo | very cool :) | ||
masak | lizmat: yes, I'm giving talks at YAPC::NA. \o/ (I hope) | 22:49 | |
lizmat | masak: do you know of any perl 6 related talks that should be given at YAPC::NA, but are not currently submitted ? | 22:50 | |
s/should be given/you think should be given/ | 22:51 | ||
FROGGS_ wishes to see a talk about perl6 on android | 22:52 | ||
lizmat | that would be cool | 22:53 | |
timotimo | is that a thing already? | ||
22:53
ikrs left
|
|||
masak | lizmat: I know diakopter++ has been coordinating a lot, and from what I've seen of the program, it looks very promising. | 22:55 | |
timotimo | masak: for my ADT module, do you think with a macro i can cause the classes to be available "at compile time" for things like multiple dispatch? i couldn't do it with a BEGIN block. (or perhaps it would have had to be something else than BEGIN? to be "at compile time"?) | 22:57 | |
22:59
cognominal joined
|
|||
arnsholt | BEGIN is compile-time | 23:00 | |
23:00
kivutar left
|
|||
arnsholt | INIT is the one that's similar to Perl 5 BEGIN, IIRC | 23:00 | |
timotimo | i need to try that out again. | ||
isn't there also CHECK time? | |||
arnsholt | And CHECK, yeah | ||
masak | timotimo: macros are conceptually at BEGIN time, yes. | 23:04 | |
dalek | ecs: 59052ef | chansen++ | S32-setting-library/Temporal.pod: Renamed weekday-of-month to day-of-week-in-month Weekday usually means any day of the week other than a day that occurs in the weekend unless the API is constrained by struct tm. Which uses wday. |
23:05 | |
ecs: d01495e | (Carl Mäsak)++ | S32-setting-library/Temporal.pod: Merge pull request #34 from chansen/master Renamed weekday-of-month to day-of-week-in-month |
|||
23:05
dmol left
23:06
dmol joined
|
|||
masak | [Coke]: re rt.perl.org/rt3/Ticket/Display.html?id=67122 and "is this the right behavior" -- I don't know. I wouldn't mind some discussion here. | 23:06 | |
timotimo | how do i properly set the Branch type up at compile time when i have my %result = create_adt(...) and i have %result<Branch>? | 23:07 | |
my \Branch := %result<Branch> doesn't seem to help | |||
masak | the two possible behaviors I see are (a) the one exhibited now, "invalid UTF-8 character for UTF-8 encoding", or (b) shouldn't be able to .succ into an invalid character range, and just skip above it. | 23:08 | |
timotimo | i get "invalid typename in parameter declaration" in that case | ||
23:17
cognominal left
23:21
pmurias left
23:28
cognominal joined
23:34
pmurias joined,
cognominal left
|
|||
adu | gist.github.com/andydude/5278826 | 23:36 | |
I'm getting "Type 'ExternalDeclaration' is not declared" | |||
23:37
cognominal joined
|
|||
adu | am I doing something wrong? | 23:37 | |
masak | adu: yes -- referencing a type before declaring it. | 23:38 | |
23:38
Chillance joined
|
|||
masak | std: class A { has B $.b }; class B {} | 23:38 | |
p6eval | std 86b102f: OUTPUT«===SORRY!===In has declaration, typename 'B' must be predeclared (or marked as declarative with :: prefix) at /tmp/Sli17QBHl9 line 1:------> class A { has B⏏ $.b }; class B {}Malformed has at /tmp/Sli17QBHl9 line 1:------> [3… | ||
diakopter | rn: class A { has ::B $.b }; class B {} | 23:45 | |
p6eval | rakudo ba5e04: ( no output ) | ||
..niecza v24-35-g5c06e28: OUTPUT«===SORRY!===GLOBAL::B does not name any package at /tmp/Mkh51QV3OF line 1:------> class A { has ::B⏏ $.b }; class B {}A type must be provided at /tmp/Mkh51QV3OF line 1:------> class A { has ::B⏏ $.b… | |||
diakopter | r: class A { has ::B $.b }; class B {}; print B.new; print A.new.b.new | 23:47 | |
p6eval | rakudo ba5e04: OUTPUT«B<-905822265>No such method 'new' for invocant of type 'B' in block at /tmp/TluLYMLqwz:1» | ||
diakopter | masak: ^^ hmm | ||
masak | :/ | ||
that looks wrong. | |||
looks like it's retaining the stub, and not replacing it with the real B. | 23:48 | ||
masak submits rakudobug | |||
diakopter | r: class B {}; class A { has B $.b }; print B.new; print A.new.b.new | ||
p6eval | rakudo ba5e04: OUTPUT«B<1785303324>B<1791592750>» | ||
diakopter | r: class B {}; class A { has ::B $.b }; print B.new; print A.new.b.new | ||
p6eval | rakudo ba5e04: OUTPUT«B<-931868390>No such method 'new' for invocant of type 'B' in block at /tmp/ovh8hRY1hT:1» | ||
masak | interesting. | 23:49 | |
so it has nothing to do with forward references. only with :: | |||
diakopter | I suppose so, yes | ||
r: my ::A $b; print $b.new | 23:53 | ||
p6eval | rakudo ba5e04: OUTPUT«No such method 'new' for invocant of type 'A' in block at /tmp/uGlnpdofBU:1» | ||
diakopter | r: my ::A $b; print $b.^methods | ||
p6eval | rakudo ba5e04: OUTPUT«No such method 'dispatch:<.^>' for invocant of type 'A' in block at /tmp/A5Yaky5mSc:1» | ||
diakopter | r: my ::A $b; print $b.WHAT | 23:54 | |
p6eval | rakudo ba5e04: OUTPUT«Cannot type check against type variable A in any type_check at src/gen/Metamodel.pm:303 in method print at src/gen/CORE.setting:7824 in sub print at src/gen/CORE.setting:7640 in block at /tmp/XXubY15ovw:1» | ||
23:57
adu left
|