»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! | Rakudo Star Released!
Set by moderator on 4 August 2010.
00:13 lucas_ joined 00:16 Alias joined
sorear rt.perl.org is now being used to report try.rakudo.org problems? 00:28
kid51 sorear: All I know is that if I file a bug via rakudobug@perl.org, it ends up at rt.perl.org 00:46
If I am working my way through the Using Perl 6 book draft downloaded from github, where is the best place to post questions/comments about the book itself? 00:47
00:47 plobsing joined
snarkyboojum kid51: here or #perl6book perhaps 00:51
00:58 envi^home joined 00:59 LaVolta joined
kid51 snarkyboojum: And people will pick it up from backscroll? (I don't expect to spend very much time here myself.) 01:03
i.e., posting here would be better than email to some address? 01:04
(p. 6 of the book lists various email addresses, but none specifically for the book)
Exodist in perl6 grammars/regexes non-word_alpha_underscore characters are considered meta... what does it do if a character that is not a word character and has no meaning as a meta character is used in a pattern? 01:09
01:23 Intensity joined, rurban joined
avuserow Exodist: those characters are reserved, so it's just an invalid pattern, as I remember 01:23
Exodist perlcabal.org/syn/S05.html#Nothing_is_illegal 01:25
that title seems to imply otherwise, but I will read it againto make sure I did not gloss over it
avuserow that statement does not mean that everything is legal 01:26
it means that having a regex of "nothing" (e.g. //) is invalid
Exodist std: my $x = "a"; $x ~~ m/⎋/; 01:31
p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Bogus term at /tmp/EO3wpJyVg2 line 1:␤------> [32mmy $x = "a"; $x ~~ m/[33m⏏[31m⎋/;[0m␤Undeclared routine:␤ 'm' used at line 1␤Parse failed␤FAILED 00:01 117m␤»
Exodist star: my $x = "a"; $x ~~ m/⎋/;
p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "$x ~~ m/\\u238b/"␤»
01:31 lue joined
Exodist star: my $x = "a"; say "blah" if $x ~~ /⎋/; 01:32
p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "if $x ~~ /"␤»
Exodist star: my $x = "a"; say "blah" if $x ~~ /\\⎋/;
p6eval star 2010.07: ( no output )
Exodist star: my $x = "a"; say "blah" unless $x ~~ /\\⎋/;
p6eval star 2010.07: OUTPUT«blah␤»
Exodist star: my $x = "a"; say "blah" unless $x ~~ /⎋/; 01:33
p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "unless $x "␤»
Exodist star: my $x = "a"; say "blah" unless $x ~~ /枉/;
p6eval star 2010.07: OUTPUT«blah␤»
Exodist ok, so unescaped non-word unicode is errer, escaped is fine, unescaped word char works fine. 01:34
avuserow *nod* and escaped word char that doesn't mean anything should also error.
Exodist star: my $x = "a"; say "blah" unless $x ~~ /\\枉/; 01:35
p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "unless $x "␤»
Exodist hmm, indeed
avuserow rakudo: my $x = "a"; say "blah" unless $x ~~ /\\c/; 01:36
p6eval rakudo 0e5edb: OUTPUT«===SORRY!===␤Unrecognized \\c character at line 22, near "/;"␤»
avuserow rakudo: my $x = "a"; say "blah" unless $x ~~ /\\d/;
p6eval rakudo 0e5edb: OUTPUT«blah␤»
avuserow bleh, can't remember which [a-zA-Z] ones are not meaningful :)
rakudo: my $x = "a"; say "blah" unless $x ~~ /\\y/;
p6eval rakudo 0e5edb: OUTPUT«===SORRY!===␤Confused at line 22, near "unless $x "␤»
Exodist star: token metachar:sym<⎋> { \\w }; my $x = "a"; say "blah" if $x ~~ /⎋/; 01:38
p6eval star 2010.07: OUTPUT«Useless declaration of has-scoped token in a module; add our or my to install it in the lexpad or namespace␤===SORRY!===␤Confused at line 22, near "if $x ~~ /"␤»
Exodist star: my token metachar:sym<⎋> { \\w }; my $x = "a"; say "blah" if $x ~~ /⎋/;
p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "if $x ~~ /"␤»
Exodist I must be doing that wrong.. I am trying to define it as a meta...
avuserow star: my token metachar:sym<⎋> { \\w }; my $x = "a"; say "blah" if $x ~~ /⎋/; 01:39
p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "if $x ~~ /"␤» 01:40
avuserow star: my token metachar:sym<⎋> { 'a' }; my $x = "a"; say "blah" if $x ~~ /⎋/;
p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "if $x ~~ /"␤»
avuserow star: my token metachar:<⎋> { 'a' }; my $x = "a"; say "blah" if $x ~~ /⎋/;
p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "if $x ~~ /"␤»
avuserow looks like a case of not implemented?
sorear Exodist: You can't define metachars, sorry
avuserow: it's not even in the spec
Exodist perlcabal.org/syn/S05.html#Grammars 01:41
er, I mean: perlcabal.org/syn/S05.html#Syntactic_categories
sorear, am I misinterpreting the spec? 01:42
or is that example of a metachar declaration an illusion :-)
sorear Exodist: if you search the rest of the spec, you won't find a definition of "augment slang" concrete enough to be implementable
01:42 leprevost joined
sorear there is a lot of pie-in-the-sky speculation mixed in with the hard spec 01:43
01:48 skyheights joined 01:51 aya1 joined
aya1 Hmm is there for perl6 some xml parser? like xml simple? module from 5 return invoke error :( 01:51
literal you're turning to Perl 6 because you couldn't figure out how to use some Perl 5 XML parser? 01:57
aya1 nope i'm know how use but it return error, one sec i'm give you more info 01:58
$!response = XML::Simple.new().XMLin($response);
return me error Null PMC access in invoke()
I'm look around and found so in perl6 this is a bug
it why i'm seek for perl6 xml parser :)
skyheights Has anyone successfully 'use MiniDBI;' with mysql yet? I'm getting a "The native library 'libmysqlclient' required for 'mysql_affected_rows' could not be located" error from NativeCall.pm6. 01:59
Exodist were you trying to use a perl5 xml parser in perl6?
aya1, ^
aya1 becouse perl6 have only xml writer module
not parser
Exodist perl5 modules do not work in perl6
aya1 Exodist work, but as i'm look not all 02:00
tylercurtis exodist: I expect aya1 was using Blizkost.
aya1 if you use :from<perl5>
tylercurtis yup exactly
perl6 not have some important modules to me like hmac
tylercurtis aya1: does the xml module at github.com/krunen/xml/ work? 02:01
02:01 masonkramer joined
aya1 one sec i'm look 02:01
tylercurtis it with err :( 02:09
whan you use it 02:10
02:10 drbean joined
aya1 in perl6 have some dump feature? 02:22
for fast debug
sorear .perl method 02:24
aya1 ok
sorear also, you're probably using blizkost wrong.. it is NOT at all user friendly
aya1 yup i'm know so it not at all user friendly :) 02:25
It just in usage of XML simple return error :) in standart usage
02:30 molaf joined
aya1 sorear, is there a way make v5 array to v6 ? 02:33
XML::Parser return array but whan i'm try use it it get too invoke err
sorear you need to do the indexing in Perl 5 code 02:41
eval('$array[0]', :lang<perl5>)
aya1 aha let me try :)
sorear for efficiency it would be better to do the eval once, and construct a sub
my $indget = eval('sub { $_[0][$_[1]] }', :lang<perl5>); 02:42
$indget($array, 5);
aya1 :) trying now
Exodist whats blizkost? 02:47
LaVolta Exodist: Blizkost - enables some Perl 5 modules to be used from within Rakudo Perl 6 02:53
Exodist yeah, sorry, I looked it up just after asking, should not have asked. 02:54
sorear one of my older projects. absolutely horrible 02:58
03:33 risou joined 03:40 Alias joined 03:42 aya joined
aya sorear sorry i'm reconnect 03:43
Your method not work normally :(
in eval it return but if i'm need hash or array from eval v5 to v6, it still same trouble :(
but anyway thanks :)
sorear timbunce is using arrays from v5 in v6
aya how? :) 03:44
one sec i'm show you mine code
sorear look at dbdi
aya my $indget = eval('sub {($r) = @_;$re=XML::Simple->new()->XMLin($r); return $re;}', :lang<perl5>);
my $x=$indget($response);
print $x.{'test2'};
dalek ecza: fb6d136 | sorear++ | (4 files):
Remove old LValue/Variable split

time.
03:45
ecza: abf6908 | sorear++ | (2 files):
Prototype Any!butWHENCE, basic tests, add ::=
ecza: 1bdc9f1 | sorear++ | Kernel.cs:
Implement binding cases of autovivification
ecza: 74c8460 | sorear++ | (5 files):
Implement assignment autovivification; fold autoviv into main code
sorear aya: you NEED to move the $x.{'test2'} part into perl5
not just the part that makes the hash 03:46
03:55 mberends joined 04:02 _jaldhar_ joined
mberends phenny, tell masak you're sleeping in late! Proposed meeting point at about 8am: maps.yahoo.com/#mvt=m&lat=43.72...C10.398518 04:05
phenny mberends: I'll pass that on when masak is around.
mberends now back to bed ;) 04:06
04:08 ashleydev joined
sorear uh oh, what are masak and mberends going to do... 04:09
04:14 redicaps joined 04:26 macroron joined 04:41 redicaps left 04:56 saaki joined 05:17 desertm4x joined 05:22 alester joined
sorear ok. now I have @array[5] working in niecza, more generally autovivification 05:23
next: hashes
after that: roles? regex subrule calls? 05:24
05:25 LaVolta joined
dalek ecza: 8c9188f | sorear++ | (2 files):
Start prototyping postcircumfix:<[ ]>, implement <> word splitting
05:29
ecza: ed4b778 | sorear++ | (2 files):
Implement calls of postcircumfix operators
ecza: 45b736d | sorear++ | (2 files):
Implement proper autovivifying array access
ecza: 5593309 | sorear++ | (3 files):
Array autovivification goes live
05:34 hanekomu joined
frooh rakudo: sub foo { return 1, 2 }; bar($x, $y) { say "$x $y" }; bar(foo()); 05:39
p6eval rakudo 0e5edb: OUTPUT«===SORRY!===␤Confused at line 22, near "bar($x, $y"␤»
frooh rakudo: sub foo { return 1, 2 }; sub bar($x, $y) { say "$x $y" }; bar(|foo());
p6eval rakudo 0e5edb: OUTPUT«1 2␤»
frooh rakudo: sub foo { return 1, 2 }; sub bar($x, $y) { say "$x $y" }; bar(foo());
p6eval rakudo 0e5edb: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in 'bar' at line 22:/tmp/Sfndhwz46r␤ in main program body at line 22:/tmp/Sfndhwz46r␤»
frooh rakudo: sub foo { return |1, 2 }; sub bar($x, $y) { say "$x $y" }; bar(foo());
p6eval rakudo 0e5edb: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in 'bar' at line 22:/tmp/GWPKCPMrd8␤ in main program body at line 22:/tmp/GWPKCPMrd8␤»
melte rakudo: sub foo { return 1, 2 }; sub bar($x, $y) { say "$x >> $y" }; bar(|foo());
frooh hm.
p6eval rakudo 0e5edb: OUTPUT«===SORRY!===␤Unsupported use of >> to do right shift; in Perl 6 please use +> or ~> at line 22, near "$y\\" }; bar"␤»
melte keke 05:40
frooh I wish there were a way to "pre-explode" arguments
what's our term for that?
that is, what | does
rcfox Junction? 05:41
frooh no
prefix |
not infix |
rcfox shrugs. 05:42
sub foo { return (1, 2) }; sub bar($x, $y) { say "$x $y" }; bar(foo());
frooh scratches ear
rcfox rakudo: sub foo { return (1, 2) }; sub bar($x, $y) { say "$x $y" }; bar(foo());
p6eval rakudo 0e5edb: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in 'bar' at line 22:/tmp/VGus57Ezxr␤ in main program body at line 22:/tmp/VGus57Ezxr␤» 05:43
frooh rcfox: you forgot the |
rakudo: sub foo { return 1, 2 }; sub bar($x, $y) { say "$x $y" }; bar(|foo());
p6eval rakudo 0e5edb: OUTPUT«1 2␤»
rcfox Oh. 05:44
rakudo: sub foo { return 1, 2 }; say |foo().WHAT; 05:46
p6eval rakudo 0e5edb: OUTPUT«␤»
rcfox rakudo: sub foo { return 1, 2 }; say (|foo()).WHAT;
p6eval rakudo 0e5edb: OUTPUT«Capture()␤»
05:49 NiiHiiL joined
frooh hmm 05:49
rakudo: sub foo { return (|1, 2) }; sub bar($x, $y) { say "$x $y" }; bar(foo()); 05:50
p6eval rakudo 0e5edb: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in 'bar' at line 22:/tmp/secJqrZJkK␤ in main program body at line 22:/tmp/secJqrZJkK␤»
05:50 mberends joined
mberends \\o going to Firenze (Florence) 05:51
05:52 masak joined
masak morning, #perl6! 05:52
phenny masak: 04:05Z <mberends> tell masak you're sleeping in late! Proposed meeting point at about 8am: maps.yahoo.com/#mvt=m&lat=43.72...C10.398518
masak :)
05:53 newbie_ joined
frooh star: my @f; say 1 if @f; say 2; 05:54
p6eval star 2010.07: OUTPUT«2␤»
frooh hmm 05:56
anyone know if heredocs are supposed to work yet?
[particle] not yet 05:58
masak they're implementable now, though.
frooh hm 06:01
rakudo: say qq(yo); 06:02
p6eval rakudo 0e5edb: OUTPUT«Could not find sub &yo␤ in main program body at line 22:/tmp/Gi0_rznCdL␤»
frooh rakudo: say qq<yo[C>);
p6eval rakudo 0e5edb: OUTPUT«===SORRY!===␤Confused at line 22, near ");"␤»
frooh rakudo: say qq<yo>;
p6eval rakudo 0e5edb: OUTPUT«yo␤»
sorear niecza: say q:to(EOF);␤Hello␤EOF␤ 06:11
p6eval niecza d274387: OUTPUT«[31m===[0mSORRY![31m===[0m␤(Possible runaway string from line 1)␤Couldn't find terminator ; at /tmp/rgKbCfY7Fq line 3 (EOF):␤------> [32mEOF[33m⏏[31m<EOL>[0m␤Undeclared name:␤ 'EOF' used at line 1␤Parse failed␤»
sorear niecza: say q:to[EOF];␤Hello␤EOF␤
p6eval niecza d274387: OUTPUT«MAIN.cs(26,55): error CS1502: The best overloaded method match for `Niecza.IP6.Invoke(Niecza.Frame, Niecza.LValue[], System.Collections.Generic.Dictionary<string,Niecza.LValue>)' has some invalid arguments␤/home/p6eval/niecza/Kernel.dll (Location of the symbol related to
..previous e…
sorear oh *nice*
wait.
I have tests for this.
niecza: say Q:to/EOF/;␤Hello␤EOF␤ 06:12
p6eval niecza d274387: OUTPUT«MAIN.cs(26,55): error CS1502: The best overloaded method match for `Niecza.IP6.Invoke(Niecza.Frame, Niecza.LValue[], System.Collections.Generic.Dictionary<string,Niecza.LValue>)' has some invalid arguments␤/home/p6eval/niecza/Kernel.dll (Location of the symbol related to 06:13
..previous e…
sorear um? it works locally 06:14
frooh rakudo: sub foo { say 1 }; foo(); ::foo(); main::foo(); 06:17
p6eval rakudo 0e5edb: OUTPUT«1␤Can not find sub ::foo␤ in main program body at line 1␤»
frooh rakudo: sub foo { say 1 }; foo(); main::foo();
p6eval rakudo 0e5edb: OUTPUT«1␤Can not find sub main::foo␤ in main program body at line 1␤»
frooh rakudo: sub foo { say 1 }; foo();
p6eval rakudo 0e5edb: OUTPUT«1␤»
sorear there is no main
frooh rakudo: sub foo { say 1 }; eval 'foo()';
p6eval rakudo 0e5edb: OUTPUT«1␤»
frooh is there a way to do that w/o eval? 06:18
sorear do what
frooh run a function given a string
in p5 I'd do main->can('foo')->();
or __PACKAGE__->can ...
sorear in p6 subs are not methods
frooh yes I know this 06:19
sorear if you want a method, use a method
frooh I don't want a method
I want to run a sub given a strong
string*
I'm just telling you HOW I did it before
and note:
that is *not* a method
sorear considering that subs go into the lexpad, that's not going to be easy
frooh main isn't the invocant
sorear I suggest rethinking your design
frooh ok
tell me how to reduce this code:
sorear a sub, declared ordinarily, cannot be called by name without eval 06:20
06:20 am0c joined
sorear moritz_: ping 06:20
frooh paste.scsys.co.uk/47707 06:21
frooh dislikes the eval hammer
06:22 wamba joined
sorear for &Dlog-trace, &Dlog-error, &Dlog-warn, &Dlog-info, &Dlog-trace -> &fun { 06:22
my @foo = fun sub ...
sorear dislikes the strings hammer
frooh well 06:23
note that they should match with a string lower on
Dlog-trace prints [trace]
etc
but if that will work I can hack it together
sorear then loop over a bunch of pairs 06:24
frooh that's what I'm doing now 06:25
sorear rakudo: sub Dlog-trace { }; say (:&Dlog-trace).perl
p6eval rakudo 0e5edb: OUTPUT«"Dlog-trace" => { ... }␤»
sorear you may find this syntax usefulk
frooh wait...
what is that?
:&?
the name of the method? 06:26
sorear :$var is short for :var($var)
frooh oh nice
hadn't seen that
sorear rakudo: sub foo { 1 }; sub bar { 2 }; for { :&foo, :&bar }.kv -> $key, &fun { say "$key: { fun }" } # I wonder if this will work 06:27
p6eval rakudo 0e5edb: OUTPUT«foo: 1␤bar: 2␤»
sorear rakudo: sub foo { 1 }; sub bar { 2 }; for ( :&foo, :&bar )>>.kv -> $key, &fun { say "$key: { fun }" } # I wonder if this will work 06:29
p6eval rakudo 0e5edb: OUTPUT«foo: 1␤bar: 2␤»
frooh paste.scsys.co.uk/47708 <-- ideas? 06:34
06:36 snearch joined
sorear frooh: the sub is lexically scoped, so it doesn't escape the eval 06:44
try
also, the $old_ stuff is completely wrong 06:46
$_ is my-scoped now
gist.github.com/512527
frooh sorear: erm
hm
star: $_ = 06:47
p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "$_ ="␤»
frooh star: $_ = "frew"; sub bar { say $_; $_ = "baaz"; } say $_; bar; say $_; 06:48
p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "sub bar { "␤»
frooh star: $_ = "frew"; sub bar() { say $_; $_ = "baaz"; } say $_; bar; say $_;
p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "sub bar() "␤»
frooh star: sub bar() { say $_; $_ = "baaz"; } $_ = "frew"; say $_; bar; say $_;
p6eval star 2010.07: OUTPUT«===SORRY!===␤Confused at line 22, near "sub bar() "␤» 06:49
frooh rakudo: sub bar { say $_; $_ = "baaz"; } $_ = "frew"; say $_; bar; say $_;
sorear need ; after }
p6eval rakudo 0e5edb: OUTPUT«===SORRY!===␤Confused at line 22, near "sub bar { "␤»
sorear ; or \\n
frooh rakudo: sub bar { say $_; $_ = "baaz"; }; $_ = "frew"; say $_; bar; say $_;
p6eval rakudo 0e5edb: OUTPUT«frew␤frew␤baaz␤»
frooh yeah, that's NOT dynamic scoping, which is what I'm after
I want it to automatically change back after the sub runs
like local does (called temp in p6)
PerlJam frooh: you want temp
which is NYI 06:50
frooh NYI
I know
sorear frooh: but it's not visible to the sub!
frooh we had this discussion a week ago :-)
sorear: yes it is
it works
I have tests
PerlJam frooh: so ... you've had a week to develop temp :)
sorear make a test case then
frooh PerlJam: hah
sorear because it's absolutely not supposed to
frooh I have a test case :-) 06:51
sorear or I'll do it
frooh but I'm not showing anyone
because I want it to work :D
PerlJam frooh--
frooh :-P
karma frooh
is the bot dead?
sorear: so we don't get a misc global in p6 huh? 06:52
sorear the bot which responded to karma was never on this channel
06:52 gfx joined
frooh orly? 06:52
did not know
sorear we had a bot which responded to buubot: karma, and a bot which responded to @karma
the latter was banned years ago, the former is unreliable
frooh weird. 06:53
so no $_ then?
Tene what do you mean "no $_"?
frooh no misc global
sorear $_ exists, it's just lexical
Tene $_ should not be global, no.
frooh is there a global? 06:54
Tene If you want a global, make a package-scoped var.
frooh heh
Tene just like always
frooh Dlog-debug { "data_structure_of_the_week: $Log::Contextual::GLOBAL" }, $ds # <-- bummer 06:55
Dlog-debug { "data_structure_of_the_week: $_" }, $ds # <-- better
:D
Tene my $x = $Log::Contextual::GLOBAL 06:56
sorear Dlog-debug { "data_structure_of_the_week: $ds" } # <-- better still
frooh rakudo: my $ds = <foo bar baz>; say "lolz! $ds"; 06:57
p6eval rakudo 0e5edb: OUTPUT«lolz! foo bar baz␤»
frooh rakudo: my $ds = (foo => bar); say "lolz! $ds";
p6eval rakudo 0e5edb: OUTPUT«Could not find sub &bar␤ in main program body at line 22:/tmp/GlAB5wAlx_␤»
frooh rakudo: my %ds = ('foo' => 'bar'); say "lolz! %ds";
p6eval rakudo 0e5edb: OUTPUT«lolz! %ds␤»
frooh ?
Tene % does not interpolate in "" 06:58
sorear rakudo: my %ds = ('foo' => 'bar'); say "lolz! %ds{}"
Tene rakudo: my %ds = ('foo' => 'bar'); say "lolz! {%ds}";
p6eval rakudo 0e5edb: OUTPUT«lolz! bar␤»
rakudo 0e5edb: OUTPUT«lolz! foo bar␤␤»
Lasse_ I’ve been playing with Perl6. I don’t understand sigils. Why must I differentiate between e.g. hashes and arrays? Reading the specs I see no motivation I understand. Sigils may be compiler friendly, but how do they help me? And is this a forum for questions like this?
frooh sorear: so when you said : $ds was better, did you have an idea on how to do that, because that doesn't seem to be working at all
sorear frooh: According to p6eval it works fine. 06:59
Tene Lasse_: arrays with an @ sigil behave differently in various contexts. Interpolate in lists, for example.
consider:
sorear Lasse_: my @foo; is shorter than my $foo = Array.new(); Both work.
frooh sorear: you saw my code, it's not supposed to print out "foo bar" it's supposed to print out "{ foo => 'bar' }"
Tene rakudo: my $a = (1..5); for $a -> $i { say "i: " $i.perl }; 07:00
p6eval rakudo 0e5edb: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
sorear rakudo: my %ds = ('foo' => 'bar'); say "lolz! %ds.perl"
Tene rakudo: my @a = (1..5); for @a -> $i { say "i: " $i.perl };
p6eval rakudo 0e5edb: OUTPUT«lolz! %ds.perl␤»
rakudo 0e5edb: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
sorear rakudo: my %ds = ('foo' => 'bar'); say "lolz! {%ds.perl}"
p6eval rakudo 0e5edb: OUTPUT«lolz! {"foo" => "bar"}␤»
Tene rakudo: my $a = (1..5); for $a -> $i { say "i: " ~ $i.perl };
rakudo: my @a = (1..5); for @a -> $i { say "i: " ~ $i.perl };
p6eval rakudo 0e5edb: OUTPUT«i: 1..5␤»
rakudo 0e5edb: OUTPUT«i: 1␤i: 2␤i: 3␤i: 4␤i: 5␤»
frooh Tene: I know the user can do that 07:01
but the idea here is to do it for them
Tene Lasse_: when it's $a, it's a single item that happens to be an array. When it's @a, it's a collection.
frooh: why not pass it as an argument to the block? Then users can just use placeholder vars. 07:02
Dlog-debug { "foo: $^x" }, $ds;
frooh Tene: I'm ok with that, but the reason we don't do that now is that the args are what's passed to the funciton
so
Tene frooh: I don't actually have any context at all for what you're trying to do here, or what Dlog-debug is, etc. 07:03
frooh Dlog-debug { "foo: $^x, $^y" }, 1, 2;
Tene: I realize that :-)
if you're curious the p5 version is search.cpan.org/perldoc?Log::Contextual
I'm porting it to p6 to see what's different, what p6 is like, etc
Tene nods.
frooh: you could use a named placeholder.
$:whatever 07:04
frooh Tene: see, the problem is that then theres a lot more boilerplate
Dlog-debug sub (:$ds) { "foo: $^x, $^y" }, 1, 2;
:-(
Tene uh... what?
no. 07:05
sorear what?
no.
frooh what?
no.
Tene Dlog-debug { "foo: $^x, $^y, $:whatever" }
1, 2
frooh oh right
I clearly forgot about the introspection
Tene You actually *can't* have both a signature and placeholders.
frooh ok
sorear rakudo: sub Dlog-debug($bl, *@args) { say $bl.(|@args); @args; }; Dlog-debug { "foo: $^x, $^y" }, 1, 2;
frooh I like this idea the bst 07:06
p6eval rakudo 0e5edb: OUTPUT«foo: 1, 2␤»
sorear rakudo: sub Dlog-debug($bl, *@args) { say $bl.(|@args); @args; }; Dlog-debug { "foo: $_" }, 5;
p6eval rakudo 0e5edb: OUTPUT«foo: 5␤»
frooh so...
sorear that looks like what p5 Log::Contextual is doing
frooh well 07:07
close
$_ == Dumper(@args_
and @_ == @args
sorear rakudo: sub Dlog-debug($bl, *@args) { say $bl.(|(@args>>.perl)); @args; }; Dlog-debug { "foo: $_" }, "x";
p6eval rakudo 0e5edb: OUTPUT«foo: "x"␤»
Tene frooh: so maybe something like: $bl.(|@args, :args(@args.perl))
sorear that better?
Tene then use $^args in the block
pmichaud good morning, #perl6 07:08
frooh Tene: yeah, I'll tweak the name probably, but yeah, I like that
pmichaud: hah, good morning
Tene pmichaud: morning.
sorear hmm, at_key is in Any-list.pm 07:09
Tene rakudo: $_ = "a"; sub foo { print $_; $_="b"; }; print $_; foo(); print $_;
p6eval rakudo 0e5edb: OUTPUT«aab»
Tene pmichaud: looks like rakudo has some problems with scoping of $_; 07:10
sorear Tene: I think what's happening is that Rakudo is generating an automatic my $_ at the UNIT level
Lasse_ Thanks, I still do not see the good of sigils, but I'm new to perl maybe I just have practice more. Anyway Perl6 is great, but hard, it's so many new constructs (for me) I have to master. 07:12
sorear good morning pmichaud
pmichaud yes, it definitely looks like a problem with $_ 07:13
there are tickets filed? 07:14
Tene Lasse_: $ variables act as single items, where @ variables are treated as collections at the language level.
pmichaud: No. I'm just stopping by, and saw someone feed that to p6eval.
Could probably use tests.
pmichaud hmmmm. for some reason, sub { ... } doesn't think it's a return. 07:17
*routine 07:18
07:19 miso joined
miso evalbot usage: 'perl6: say 3;' 07:20
perl6: say 3;
p6eval pugs, rakudo 0e5edb: OUTPUT«3␤»
07:24 janosik joined 07:33 janosik left 07:46 M_o_C joined 07:50 Su-Shee joined
sjohnson perl hackers of the midnight hour 07:54
well.. my time :)
LaVolta rakudo: my $str = "'test'"; $str ~~ s/'//g; $str.perl.say; 07:55
p6eval rakudo 0e5edb: OUTPUT«===SORRY!===␤Confused at line 22, near "$str ~~ s/"␤»
LaVolta rakudo: my $str = "'test'"; $str.substr(1, -2).perl.say; 07:57
p6eval rakudo 0e5edb: OUTPUT«"tes"␤»
LaVolta rakudo: my $str = "'test'"; $str.substr(1, -1).perl.say; 07:58
p6eval rakudo 0e5edb: OUTPUT«"test"␤»
08:00 risou joined
sorear with the infrastructure for arrays, hashes were a cake walk 08:03
now in
and now over 200 tests
sjohnson hi
sorear (my $foo; $foo<bar> hashes that is; the % sigil is NYI)
sjohnson sorear: what are your thoughts about no printf in p6? is it on purpose? 08:06
i kinda like busting out that technology every now and then, and was surprised to see only sprintf on rakudo star 08:07
dalek ecza: 8a0b8ba | sorear++ | (2 files):
Prototype hash access and autovivification
08:08
ecza: 0e24f40 | sorear++ | (2 files):
Implement $foo<bar> subscripting form
ecza: 5cb73b8 | sorear++ | (3 files):
Hashes go live
LaVolta sjohnson: no printf?
star: printf("%x", 16); 08:10
p6eval star 2010.07: OUTPUT«10» 08:11
sorear fmt and say together are as short as printf
LaVolta there is...
sjohnson wow. it wasn't working earlier
could be me though
could be i was too fancy
star: "let the %s times roll".printf(<good>)
p6eval star 2010.07: OUTPUT«Method 'printf' not found for invocant of class 'Str'␤ in main program body at line 22:/tmp/qaFB8XhrBo␤»
sjohnson thats what kind of threw me for a loop. why wouldn't that work?
star: "let the %s times roll".sprintf(<good>).say 08:12
p6eval star 2010.07: OUTPUT«let the good times roll␤»
Tene say "let the %s times roll.fmt('good')
sjohnson say "let the %s times roll".fmt('good')
Tene Oops, got that backwards.
sjohnson and double quote :)
sorear sjohnson: why do you keep trying to call printf as a method?
Tene rakudo: say 'good'.fmt('let the %s times roll')
p6eval rakudo 0e5edb: OUTPUT«let the good times roll␤»
sjohnson sorear: i thought you could be flexible like that, since it works with sprintf
Tene Perl 6 used to have unification and fallback between methods and subs, but not anymore. 08:13
not for quite a while.
sjohnson: afaik, there's no printf method in the spec. You could add it if you like.
or submit a patch, or whatever. 08:14
sjohnson would that be to pugs or rakudo
seems that pugs is the one
as far as commit access goes etc
sorear sjohnson: printf is an I/O operation, it is a method on IO
sjohnson never really knew the answer to that question
sorear rakudo: $*OUT.printf('%x', 17)
p6eval rakudo 0e5edb: OUTPUT«11»
sjohnson Tene: has there ever been any disagreements on p6 specs? i wouldn't mind adding a couple things.. but they might be too radical
Tene perl6: "foo".say; 08:15
p6eval pugs, rakudo 0e5edb: OUTPUT«foo␤»
sorear sjohnson: if it's radical, talk to somebody first
Tene sjohnson: the specs are kept in the pugs repo. There certainly have been disagreements, but there are also parts of the spec that have received far too little attention.
sorear TimToady, pmichaud, jnthn, colomon, maybe me 08:16
Tene sorear: strings have .print and .say methods, that just forward to $*OUT
sjohnson i've mentioned a few of them to mr. Toady but only got an answer half the time. maybe too many questions
Tene so IMO .printf method wouldn't be too out of place.
pmichaud with .printf I'd also wonder which one is the format string :-) 08:17
*always
Tene sjohnson: He's been slowly working on an answer to a question of mine for months. :)
sorear sjohnson: toady is bad ADD, you need to chase him down and extract his undivided attention for a few minutes if you want him to do anything useful
sjohnson interesitng. ok well here's one idea i had
pmichaud welllllll.... sometimes the question requires a lot more thought than can be given by a quick+simple answer 08:18
especially if the notion is a bit radical
sjohnson for given when, i was thinking of an opposite to the word "when", that would be "when not". much like if/unless statements
i had a good idea for it, but i forgot it. i guess "aint" would be too slang :)
sorear these days I handle radical stuff by just implementing it in niecza without asking anybody first 08:19
pmichaud sjohnson: we've discussed the possibility many times here.
sjohnson pmichaud: interesting. what were the verdicts / general consensus?
pmichaud sjohnson: the standard answer at the moment is that it should be when none(...) { ... }
snarkyboojum when't :P
sorear I treat the nonexistant, ambiguous and nonsensical parts of the spec as a License to Make Stuff Up
sjohnson haha 08:20
sorear niecza: say $?ORIG
p6eval niecza d274387: OUTPUT«MAIN.cs(24,55): error CS1502: The best overloaded method match for `Niecza.IP6.Invoke(Niecza.Frame, Niecza.LValue[], System.Collections.Generic.Dictionary<string,Niecza.LValue>)' has some invalid arguments␤/home/p6eval/niecza/Kernel.dll (Location of the symbol related to
..previous e…
sorear ok.
moritz_: your niecza autobuilder is still broken 08:21
moritz_ good morning
snarkyboojum hehe.. I like how he does that
sorear maybe I should get my own evalbot, that way when it becomes useless I won't have anyone to blame
sjohnson another idea i thought that diakopter seemed to be interested in was... if (defined(%somebighonkingvar{<key>}) { $x = $what_is_defined }
not sure how hard that would be to do.
sorear that's already in the spec 08:22
sjohnson they stole my idea!
sorear %somebighonkingvar<key> andthen -> $x { ... }
moritz_ nieca: say $?ORIG 08:23
niecza: say $?ORIG
sjohnson wow
Tene sjohnson: iirc, I've used "when't" as an example for lexical grammar modifications.
p6eval niecza 5cb73b8: OUTPUT«say $?ORIG␤␤»
sjohnson thats awesome
sorear moritz_: is there anything I can do to make the autobuilder more effective?
moritz_ sorear: I have no idea what's wrong... the script does 08:24
cd ~/niecza/
git pull
xbuild
sorear Does the script log anywhere? 08:25
moritz_ and the log shows that the git pull is executed
but the xbuild doesn't produce any output
sorear not even the banner?
moritz_ nothiing in the log 08:26
sjohnson Tene: i had a good idea but can't remember it. *sad face*. oh well. all the words that are good sound like poor grammar without their appos'. cant, isnt, aint, whent.. :(
maybe it wasn't that good ;) 08:27
sorear sjohnson: ' is legal in identififiers now
sjohnson we'll i'll be
learn something (about p6) everyday
sorear moritz_: but when you run it normally in the same root directory, it's fine?
moritz_ yes 08:28
08:28 oha joined
sorear is the script running in a screen, or redirected </dev/null >log? 08:29
moritz_ h, it doesn't capture STDERR
my bad
08:37 pmurias joined 08:38 am0c joined
sorear hello pmurias 08:42
sorear settles on "regex improvements" 08:43
pmurias sorear: hi
phenny pmurias: 06 Aug 18:41Z <sorear> tell pmurias SOREAR
08:46 jfried joined
pmurias sorear: made you a comaintainer of all my modules 08:51
ruoso: hi 08:55
sorear ok. 08:57
I'll see about keeping the cpan STD to follow pugsstd 08:58
(which takes away the main reason not to use cpan STD in niecza)
08:59 tadzik joined
tadzik morning #perl6 08:59
pmurias sorear: if you want to switch to using SVN revision as version numbers feel free to try that
09:01 risou_ joined 09:05 Guest23195 joined
tadzik moritz_: github.com/moritz/perlgeek.de/commi...4e3d#L0R35 -- Friday 09:10
pmichaud one of the reasons for preferring when none(...) to something like "when't" is that the same pattern would be used in signatures 09:11
sub foo($x where none(Int)) { ... }
Tene obviously we just need "wheren't" too. :P 09:16
Oh! 'nt should be meta.
replace 'unless' with "ifn't"
pmichaud is that why TimToady is always missing the "n't" key
tadzik nice idea for Perl 7 09:17
avar sorear: You're using a lisp-like language to implement the guts: github.com/sorear/niecza/commit/559...f8f0a521eb ?
sorear that reminds me, I still haven't implemented metaoperators
avar: yes 09:18
oha pmichaud, i'm still confused on :i and alternations in regex
sorear avar: it's really more like s-expression POST literals than a separate language, though
oha say 'X' if 'bar' ~~ /:i FOO || BAR/; # matches
sorear avar: it bypasses most of the compiler and feeds nodes directly into the code gen 09:19
oha say 'Y' if 'Y' ~~ /:i || FOO || BAR/; # also matches (but nothing)
pmichaud oha: it's possible I misremembered :-(
avar sorear: neat-o, so it's a simple AST for p6?
hrm, ast syntax
oha pmichaud, you were clear based on what i've asked, the problem is i did the wrong question :)
09:20 lue joined
oha apart the fact that i expected that :i is higher prec then || (but i could be wrong) 09:20
sorear avar: it's lower level than that
avar: I also have an AST for p6, but I don't need literals for that since I can just write p6 directly 09:21
oha if the X test is correct then i feel the Y test should fail, isn't it?
pmichaud oha: (re-reading spec) 09:22
sorear :i is higher prec than ||
oha sorear, then the X example above must fail
sorear according to STD.pm6
pmichaud oha: okay, I must've misinterpreted something earlier 09:23
S05 has
m/:s alignment '=' [:i left|right|cent[er|re]] /
so, I'd think that
sorear it's also possible std is being buggy here
TimToady it's possible that adverbs are misplaced currently by STD 09:24
pmichaud / :i || FOO || Bar/ should be the same as /:i FOO || BAR /
sorear STD interprets :i as a funky metacharacter
it groups like ^
Perl 5 handled adverbs as a special thing that binds to the inside of groups
S05 is harkening back to (?i: ) in that 09:25
while STD is evoking more of the consistant { use ignore_case; } form
oha then i should consider [:i A|B] similar to [i [A|B]]
but then, i expected that [:i |B] would be the same as [:i [|B]] but it isnt 09:26
sorear we could always say that an adverb with no space before it binds to the grouper, but with space it's free floating
pmichaud oha: I suspect there's a bug. 09:27
sorear oha: the inconsistency is clearly a bug
pmichaud sorear: there were *long* discussions about modifiers many years ago.
(and how they interact with whitespace)
sorear pmichaud: 5? 10? 15? 20? 25?
pmichaud sorear: closer to 5
definitely closer to 5 than to 0 :-)
TimToady the intent was that :i scope itself to the (rest of the) surrounding [] or (), but STD doesn't parse it right
or rather, scopes the semantics incorrectly 09:28
09:28 desertm4x joined
oha TimToady, that means that [ A :i B | C ] will match C case insensitive rite? 09:28
pmichaud what about / abc | def | ;i ghi | jkl ] ?
what about / abc | def | ;i ghi | jkl ] /?
*:i
TimToady I can see where people would then make opposite mistake 09:29
pmichaud oha: [ A :i B | C ] would act like [A [:i B | C]]
sorear ...reakky>
TimToady so perhaps we could constrain it somehow
pmichaud constrain +1
oha pmichaud, oh!!!
pmichaud one of the problems we had with modifiers in the past was handling whitespace around them (especially under :sigspace/rule) 09:30
rokoteko rakudo: my @list = <a b a c d>; { my $previous; my @uniq = gather for @list { $previous = take $_; next if $_ === $previous; $previous = take $_ }; @uniq.perl.say } # trying to follow the S04 gather+take uniq example.
p6eval rakudo 0e5edb: OUTPUT«["a", "b", "a", "c", "d"]␤»
sorear pmichaud: duh, unspace.
rokoteko what goes wrong there?
TimToady but I need to look at the usage of, say, :my and :dba before we decide how to constrain it
sorear :my currently has very funky scoping 09:31
std: / :my $frog = 2; /; $frog++
TimToady and some things could change to fake rules if they really need atom scoping
p6eval std 31912: OUTPUT«ok 00:01 117m␤»
TimToady std: "foo $(my $bar) $baz"; $bar++ 09:32
p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable $baz is not predeclared at /tmp/mRRD3TF65b line 1:␤------> [32m"foo $(my $bar) $baz[33m⏏[31m"; $bar++[0m␤Check failed␤FAILED 00:01 115m␤»
TimToady std: "foo $(my $bar) baz"; $bar++
p6eval std 31912: OUTPUT«ok 00:01 115m␤»
sorear $() ? 09:33
TimToady std: "foo @(my $bar) baz"; $bar++
p6eval std 31912: OUTPUT«ok 00:01 115m␤»
TimToady std: "foo %(my $bar) baz"; $bar++
p6eval std 31912: OUTPUT«ok 00:01 115m␤»
TimToady right now the scoping rules for my are very simple; it responds only to curlies and comp unit boundaries 09:35
sorear should babble treat curlies specially?
pmichaud oha: you've stumbled upon a place where we need some spec improvement. :)
sorear std: qq{ foo $(my $bar) baz }; $bar++ 09:36
p6eval std 31912: OUTPUT«ok 00:01 115m␤»
dalek kudo: 6ebba85 | pmichaud++ | src/Perl6/ (2 files):
Fix handling of $_ scoping in routines (broke due to $*IN_DECL change in
TimToady s/curlies/non-quote curlies/
oha pmichaud, happy to have helped in some ways, if i may do something lemme know!
TiMBuS i meant to ask yesterday: how do you submit a new rakudo patch? I recall you don't like git pull requests 09:37
pmichaud oha: could you file a rakudo bug ticket for the :i problems you're seeing (so we don't forget to fix rakudo, std, and the spec?)
oha: mail to rakudobug@perl.org :-)
oha pmichaud, sure
i'll write as i expected to be, so you can correct cauz i fear i still do not understood exactly how :i is supposed to be :) 09:38
pmichaud oha: that's all we need :) 09:39
(and is exactly what we need)
oha yup
pmichaud TiMBuS: create a diff and mailto rakudobug@perl.org with [PATCH] in the subject
(I think there's "how to submit a patch" in the README :) 09:40
avar Or a pull request ? 09:41
TiMBuS i never like mailing the rt and i dont know why.
pmichaud so far we haven't been able to make pull requests on github work well. 09:42
sorear Where do you draw the line between "Needs a CLA" and "Doesn't"? 09:43
pmichaud the fork queue is very unfriendly to reviewing and applying pull requests
sorear: commit bits to Rakudo compiler require CLA
that's pretty much the line.
TiMBuS pmichaud, that's a pity, because if they were better then git could be used more to its potential 09:44
pmichaud TiMBuS: sure, I agree.
also, github's fork queue doesn't lend itself to sending comments on proposed patches
i.e., if I want to say "this patch is close but we also need ...." there's not a good public mechanism for it
so, we stick with RT for now
oha submitted #77064 09:45
TiMBuS bug github about it! they're always looking for new features to put them ahead of gitorious 09:46
pmichaud TiMBuS: that's a reasonable idea. I think others have proposed similar already, though.
sorear pmichaud: How closely does Rakudo track STD.pm6 these days? 09:48
pmichaud sorear: as closely as we can, always (more)
sometimes STD.pm6 gets refactors that take a little while for us to catch up in Rakudo 09:49
sometimes STD.pm6 makes assumptions that work for parsing but not necessarily for codegen
avar pmichaud: You don't need to use the fork queue if you use pull requests. Those requests are just "get xyz from URL". You can then pull that over git, send suggestions over e-mail etc.
avar uses github, but not the fork queue thingy
pmichaud avar: it's much easier (for me at least) if the requests are already in an email thread, though 09:50
if I send suggestions back to a single person (the submitter), that's not nearly as helpful as having it go to a forum
sorear pmichaud: hmm, hopefully I can help in the latter 09:51
pmichaud sorear: sure, you've already helped there I suspect
sorear niecza is currently committed to using STD.pm6
pmichaud sorear: that's also why I always talk about "convergence with STD.pm6" as opposed to "adoption of STD.pm6". Sometimes Rakudo comes up with ideas that are worthy for STD.pm6 :-)
sorear any changes it requires will be made upstream
:) 09:52
pmichaud (I'm still proud of <O(...)> :-)
avar: perhaps we could get github to send pull requests to RT, though :)
s/send/forward/
sorear Are block-regexes subject to placeholder variables? 09:54
my regex foo {:i $^a }
09:54 meppl joined
avar pmichaud: What I'm saying is that you can have people do that. I.e. push to their fork and /then/ send a request to RT. That gives you ease of applying a patch series, at least. 09:55
But meh, I don't care. Just saying, there's ways to work around github's default suckery.
pmichaud avar: sure; but not everyone keeps a fork on github to do their work.
but yes, I understand the point. 09:56
sorear .u U+E001 09:59
phenny sorear: Sorry, no results
sorear .u E001
phenny U+E001 (No name found)
sorear apparently, vim thinks that this is c + /
moritz_ std: my Regex foo {:i $^a } 10:01
p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Multiple prefix constraints not yet supported at /tmp/O_aB4Q_ApT line 1:␤------> [32mmy Regex [33m⏏[31mfoo {:i $^a }[0m␤Malformed my at /tmp/O_aB4Q_ApT line 1:␤------> [32mmy Regex [33m⏏[31mfoo {:i $^a }[0m␤ expecting any of:␤
..multi_declara…
moritz_ std: my regex foo {:i $^a }
p6eval std 31912: OUTPUT«ok 00:02 116m␤»
10:02 plol joined 10:03 risou joined 10:04 Trashlord joined 10:16 KenGuru joined 10:20 whiteknight joined 10:30 kda joined 10:38 lue joined 10:40 briang joined
moritz_ rakudo: sub abc($x, $y, $_, $z) { say "$x $y $_ $z"; }; abc(1,2,3,4); 10:42
p6eval rakudo 0e5edb: OUTPUT«2 3 1 4␤»
sorear niecza now has grammars 10:43
sorear out. 10:44
10:45 Grrrr joined
KenGuru 2(sorear2): woohaa 10:47
10:47 pmurias joined
dalek ecza: fc986c6 | sorear++ | (2 files):
Unbitrot regexes and put them under the new workflow
10:48
ecza: e74a2d3 | sorear++ | (5 files):
Refactor handling of Regex/Sub split, prototype regex blocks
ecza: 5313337 | sorear++ | (3 files):
implement grammars properly
ecza: 8f98e61 | sorear++ | (3 files):
Regexes and grammars are now live
KenGuru will have to setup the dependencis to try it out 10:52
pmichaud moritz_: I found the bug... spectesting it now. 10:56
(the $_ bug)
gfldex and i was so happy that there was only one bug left :) 10:57
moritz_ gfldex: the one bug is "Rakudo doesn't implement Perl 6.0.0 corrrectly yet" 10:58
gfldex :D
11:02 risou_ joined 11:04 rbaumer joined, Grrrr joined
TiMBuS moritz_, related to the autovivifying bug you dug up yesterday. should Any implement .push() and mutate to an array? or should push convert an uninit'd Any to an array/list 11:06
or both?
rakudo: my $a; push $a, 1; 11:07
moritz_ TiMBuS: I don't know. pmichaud is the one who knows
p6eval rakudo 6ebba8: OUTPUT«Method '!fill' not found for invocant of class ''␤ in 'List::push' at line 2609:CORE.setting␤ in main program body at line 22:/tmp/jJS9JxqcBP␤»
pmichaud Any implements .push. 11:11
but you have to check for definedness, too.
11:11 azert0x joined
pmichaud If defined, then nextsame. 11:11
moritz_ FYI, I'll be gone for the rest of the day 11:15
dalek kudo: e569d66 | pmichaud++ | src/Perl6/Compiler/Signature.pm:
Remove "$_ is always first argument" from Perl6/Compiler/Signature.pm, fixing RT

I'm not entirely certain why it was being put as the first argument in the first place, but all of the spectests pass without it (and we now resolve the RT ticket).
moritz_ ciao
snarkyboojum čao 11:16
KenGuru 2(sorear2): will perl 5.12 work as dependency as well? 11:18
x3nU is there Getopt for perl6? 11:19
sorear yes
I use 5.12.0
tadzik x3nU: there is MAIN sub
sorear Getopt will exist 11:20
it might already
KenGuru which perl5 distribution do you recommend 11:23
11:28 thebird joined
Tene x3nU: generally you just want to put a signature on a MAIN sub instead of using something like getopt. 11:29
x3nU: you can have type constraints, you get a usage message automatically, etc. 11:30
sub MAIN(Int $x, Str $y, :$message, *@files) { ... }
rakudo: sub MAIN(Int $x, Str $y, :$message, *@files) { ... }
p6eval rakudo 6ebba8: OUTPUT«Usage:␤/tmp/wAXecrrwup [--message=value-of-message] x y files [more [...]]␤»
Tene x3nU: you can even do multi subs for MAIN 11:31
rakudo: multi sub MAIN($file, :$msg!) { ... }; multi sub MAIN($x, $y, *@foo) { ... } 11:32
p6eval rakudo 6ebba8: OUTPUT«Usage:␤/tmp/tKqVzjhNj0 --msg=value-of-msg file␤or␤/tmp/tKqVzjhNj0 x y foo [more [...]]␤»
x3nU thanks guys 11:34
Tene x3nU: if you actually want real getopt-style, Parrot has a getopt library, but it's awkward to use from Rakudo.
11:35 araujo joined 11:38 araujo joined 11:41 molaf joined 11:43 aya joined 11:45 patrickas joined
pmichaud well, time for me to head out 11:49
see you all whenever I get home and online again 11:50
afk # travel
11:51 Ken-Guru joined
szbalint see you :) 11:51
heh. I can actually say that IRL! 11:52
12:06 zby_home joined
patrickas has there been any known regression with building rakudo master? I am getting some errors when doing perl ./Configure --gen-parrot on win32 (but it could be something I messed up in my setup) 12:09
s/Configure/Configure.pl/ 12:10
12:10 macroron joined
aya argh, is there way covert hash from v5 to v6 :(( 12:16
tadzik you can serialize it, to JSON or something
aya hm think it get work? 12:17
tadzik why not?
aya it just return invoke err if i'm use it in v6
tadzik How about just Data::Dumping it and evaling in 6?
aya already 1 sec show 12:18
my $indget = eval('sub {($r) = @_;$re=XML::Simple->new()->XMLin($r); return $re;}', :lang<perl5>);
my $x=$indget($response);
print $x.{'test2'};
But after eval returned same v5 hash :-D
:) Possible eval to get some value in hash, but it not comfort 12:19
tadzik ew
I don't get it
gimme a sec
aya sure :) 12:20
i'm explain a bit to easy get
snarkyboojum aya: didn't sorear already explain that you need to do the hash lookup in perl 5 for this to work via blitzkost? irclog.perlgeek.de/perl6/2010-08-07#i_2673175
blizkost even :) 12:21
tadzik aya: no need to eval even
aya 1) Make in var eval function with Simple XML construction($indget)
2) Execute this function with xml stirng($response)
snarkyboojum :) i'm know, i'm can move $x.{'test2'} part to eval
tadzik aya: wklej.org/id/373774/
seems to work fine for me 12:22
aya But it be very uncomfort
To get each value throught eval
So it not correct way :)
snarkyboojum why not "correct"? because it's not easy to use? :D
aya tadzik - in this case yup, you need get hash from v5 code or method, in this all key 12:23
tadzik aya: no, you can print it with Data::Dump(er)
aya snarkyboojum, becouse it not KISS :) and i'm think a lite crazy heal head throught broke leg 12:24
tadzik as I did in re.pl
snarkyboojum aya: have you checked out github.com/timbunce/DBDI/commit/155...dc76fd65d5 ?
aya tadzik :) 1 min
snarkyboojum aya: not saying it's the "best" way, just that it's the way it works currently - but I don't understand the details to be honest 12:25
aya snarkyboojum 10 min i'm look :) 12:27
tadzik, it not normally output in usage, whan you use not dump
also pel6 methods not work on v5 blizkost
tadzik aya: So 1) what do you have and 2) what do you want to have? 12:28
I fail to understand your problem
aya tadzik: 12:29
1) I'm have hash or array returned from v5 module, throught XML simple
2) I'm need convert it to v6 hash or array, becouse v6 provide err if you try use this hash
tadzik aya: why can't You use XML module from Perl 6? 12:30
* for
aya tadzik perl6 have only writer module, i'm not find parser module
tadzik aya: how about github.com/krunen/xml/ ? 12:31
aya it not work, code with err, yesterday i'm already try it
tadzik hmm
snarkyboojum I can't get that module to make/test either
aya in this all thing :) it like strings from v5, but for this pplz from channel help me 12:32
snarkyboojum: hmm looked in code, not sure hod dbdi help me get hash :) 12:33
maybe i'm miss some? :)
12:34 KenGuru joined
snarkyboojum aya: not sure - haven't played with it, but thought it might provide inspiration :) 12:36
aya :) nope 12:37
tadzik: just try this code to catch problem:
my $r = '<test><test2>2</test2></test>';
my $x = XML::Simple.new().XMLin($r);
print $x.{'test2'};
tadzik I see 12:38
aya :) catch it? 12:39
tadzik I did $x<test>, but same effect
aya In this all trouble, only method to get values from $x is eval, but it so uncomfort :(
tadzik it'd be nice to fix the XML module 12:40
snarkyboojum aya: what is line 109 doing of the github commit doing? 12:42
aya one sec
tadzik what is <.ident> in grammars?
aya snarkyboojum, it like same as before :) eval to get values from array / hash 12:44
arnsholt It's like <ident> except it doesn't create an entry in $/
snarkyboojum yeah, but installing a sub to do it or something right?
aya: so this is a way to do it, you just don't like it? :) 12:45
aya yup as i'm in 1st example
tadzik oh, arnsholt, I wanted something about one of Your modules yesterday
aya I'm not like method to get values, like if in big list
It not native :) and not good :)
arnsholt tadzik: Hopefully one of the ones I'm willing to acknowledge having perpetrated =)
snarkyboojum aya: isn't this a limitation in the blizkost implementation though?
arnsholt What did you need?
tadzik arnsholt: I think it was failing tests for Algorithm::Viterbi, let me check once again 12:46
aya snarkyboojum: maybe :) but for strings have solution, so i'm hope to hashes too :)
tadzik yep
arnsholt: wklej.org/id/373797/
12:46 MAK__ joined
MAK__ hi 12:47
Not sure whether to ask this question on #parrot or here
tadzik MAK__: go on, in the worst case we will redirect You :)
snarkyboojum aya: my understanding is that this isn't supported yet as per sorear's comment earlier, but good luck
MAK__ Im trying to put a set of print statments in the src/Perl6/Compiler.pir and check how the execution flows 12:48
aya snarkyboojum :) but there must be some methods to typecast :) like for string ~
MAK__ but when i put a simple say statement and rebuild it ... the build fails
snarkyboojum aya: sounds like an improvement would be needed to blizkost, in which case, patch away :)
aya snarkyboojum i'm mean in v6 :) 12:49
arnsholt tadzik: Thanks! I've been thinking of making sure Viterbi works with a recent Rakudo but haven't gotten around to it yet
I'll get on it
MAK__ any idea whats going wrong
tadzik arnsholt: nice, thanks
MAK__: are you sure the code is valid PIR? 12:50
MAK__ I just added a say "from inside main" inside the main function in Compiler.pir 12:51
snarkyboojum aya: but what are you casting from exactly... a perl 5 hash - that would need to be supported from within blizkost from my limited understanding
tadzik afk for a while 12:52
snarkyboojum perhaps not ;)
in which case I apologise if I've confused the issue
bbl
12:54 teeeeeeeeeeeeeee joined
MAK__ gist.github.com/512785 12:55
12:55 _jaldhar_ joined
aya snarkyboojum :) need just type cast method :) like see: if return v5 string to v6 12:56
1) ~$string work,
2) but other methods like .Str not work :)
MAK__ isn't the say statement a valid pir statement?
snarkyboojum aya: unless jnthn or sorear are here to answer your question I can only suggest perusing and understanding the blizkost source 12:57
TiMBuS MAK__, that's odd, it looks valid. 12:58
it also compiles for me 12:59
MAK__ :(
the very same thing? 13:00
TiMBuS well i have one more space on my indentation
lol
aya snarkyboojum: or write recursive method to parse array :-D a bit crazy but may work 13:02
TiMBuS yeah i dont get it. have you modified something else?
MAK__ just checked the current rakudo snapshot and built it, thats it ... nothing else 13:03
13:03 risou joined
TiMBuS um.. =/ 13:04
sorear KenGuru: Distribution? I just downloaded the .tar.gz from perl.org and used that
TiMBuS can you gist the `git diff` ?
MAK__ ok
arnsholt tadzik: Fixed. I had a workaround from when Rakduo didn't do autovivification, and removing that fixed the problem 13:05
tadzik++
MAK__ gist.github.com/512792
aya hmmm probably better write crazy oldschool preg match parser :) 13:09
:-D
TiMBuS MAK__, must be a parrot error?
or does it compile without the patch 13:10
MAK__ Shall i ask it there?
it compiles without the change
13:10 kid51 joined
TiMBuS ok then. im stumped 13:10
#parrot might know then 13:11
kid51 Are there recommended .vim plugin/indent/syntax files for Perl 6? 13:12
KenGuru i'm on windows. will use strawberry 13:13
TiMBuS oh hey i got the error after applying your patch MAK__
KenGuru, good choice
MAK__ k 13:14
snarkyboojum kid51: there's github.com/petdance/vim-perl 13:18
MAK__ #parrot is on freenode right? 13:20
snarkyboojum irc.perl.org afaik
13:28 azert0x joined 13:47 thebird joined
sorear rakudo: grammar G { token TOP { <.a> }; token a { <b> }; token b { x }; }; G.parse("x").perl.say 13:48
p6eval rakudo 6ebba8: OUTPUT«Match.new(␤ # WARNING: this is not working perl code␤ # and for debugging purposes only␤ from => 0,␤ orig => "x",␤ to => 1,␤)␤»
sorear viv generates a b capture for that
which is right?
13:49 isBEKaml joined, kda left 13:50 LaVolta joined
isBEKaml OHHAI,#perl6! :) 13:52
YAPC went well? :)
13:55 jasonmay joined, lithos joined
lithos rakudo: my @a = 1, 2, 3; @a[*+0] = 4; say ~@a; 14:00
p6eval rakudo 6ebba8: OUTPUT«1 2 3 4␤»
lithos rakudo: my @a = 1, 2, 3; @a[*] = 4; say ~@a;
p6eval rakudo 6ebba8: OUTPUT«Can't take numeric value for object of type Whatever␤ in 'Any::Numeric' at line 1351:CORE.setting␤ in 'infix:<<>' at line 6573:CORE.setting␤ in 'Any::postcircumfix:<[ ]>' at line 1665:CORE.setting␤ in main program body at line 1␤»
lithos hello #perl6! is @a[*] supposed to work for indexing the one-past-last element of an array? 14:01
sorear no 14:02
TimToady * means all the indexes
sorear TimToady: Do you know why <.ws> never seems to produce 'comment' captures? 14:03
TimToady so it should mean @a[0,1,2] = 4
lithos ah, thanks
TimToady because the . throws it away?
lithos rakudo: my @a = 1, 2, 3; @a[*] = (4, 5, 6); say ~@a; 14:04
sorear in simpler cases, <.foo> causes all of foo's captures to be flattened into the current
p6eval rakudo 6ebba8: OUTPUT«Can't take numeric value for object of type Whatever␤ in 'Any::Numeric' at line 1351:CORE.setting␤ in 'infix:<<>' at line 6573:CORE.setting␤ in 'Any::postcircumfix:<[ ]>' at line 1665:CORE.setting␤ in main program body at line 1␤»
sorear I take it this is a bug?
14:05 risou_ joined
LaVolta anyone interested in criticizing my first perl 6 script? :) 14:11
aya lol writing parser is fun :-D
sorear LaVolta: yes
LaVolta ok, it's here: github.com/horus/Elgmeo/blob/master/elgmeo.p6 14:12
TimToady no, <.foo> always throws away foo's captures
LaVolta very ugly
szbalint rakudo: my (:$odd, :$even) := (1..10).classify({ $_ % 2 ?? "odd" !! "even" }) 14:14
p6eval rakudo 6ebba8: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤ in 'infix:<:=>' at line 1␤ in main program body at line 22:/tmp/xBfGD6uM90␤»
sorear doesn't look too awful to me
14:15 thebird joined
LaVolta sorear: I guess it is awful in some ways :-P 14:15
originally intended to write a omegle chat client
but failed, nobody seems to have patience to wait my response
and there's a Perl 5 version, i think the speed's faster :) 14:16
lithos submitted #77072 [BUG] @a[*] does not work as slice of all indexes 14:17
sorear grammar Test1; token TOP { <.ws> }; token ws { <.unv>* }; token unv { <comment> }; token comment { '#' } 14:20
this is the minimal example
a very, very distilled version of STD.pm6's whitespace rule
matching a single # it produces no captures
if the * is removed from token ws, this changes
and a 'comment' capture is produced 14:21
14:22 ashleydev joined 14:24 Su-Shee left
lithos am I doing something wrong here? I would expect to get a WhateverCode: 14:26
rakudo: (map {$_+1}, *).WHAT 14:27
p6eval rakudo 6ebba8: ( no output )
lithos hm, locally I get "List()"
sorear WhateverCode generation is syntactic
lithos has much to learn 14:30
14:31 alester joined 14:33 MAK__ joined
aya sorear you have 5 minutes? :) 14:40
14:45 lithos left
sorear sorry, I can't help well with blizkost 14:46
aya not with it :)
i'm writed oldscool regexp parser :) 14:47
just 2 things annoynig me :-D
mathw o/
tadzik \\o 14:48
14:49 _jaldhar_ joined 14:55 jferrero joined 15:02 mjk joined 15:04 risou joined 15:12 araujo joined
aya hmm in perl6 changed regex rules 15:38
?
15:39 alester joined
tadzik yep, they're not like in Perl 5 15:40
aya :( bad
15:40 soupdragon joined 15:42 am0c joined
aya crazy logic :( not allow backslash < character 15:45
than how implement it o_O
sorear TimToady, I'll let you take this one
jasonmay is there extensive doc anywhere on the perl6 MOP? 15:47
TiMBuS saying/typing 'uninitialized Any' is a mouthful (handful?). but I'm not allowed to say undef. is there a term for it? 15:48
sorear jasonmay: The perl6 MOP is not yet defined in a cross-implementation way
jasonmay sorear: ah
sorear TiMBuS: undefined object
TiMBuS: or just undef 15:49
undef is no longer a single keyword, but it still exists as a concept
TimToady aya: I have no idea what you're talking about with backslash and <
aya TimToady
sorear jasonmay: though, really, if you're interested in MOPs you came a bit too soon. The talented MOP people all jumped ship after Moose was forked
aya try this $xml~~m/\\<.+?\\>/) 15:50
TiMBuS Thanks sorear! I'm terrible at terminology
aya it not allow backslash before < or > sybmol but how to pass it :(
TimToady that looks fine to me
std: $xml~~m/\\<.+?\\>/ 15:51
p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable $xml is not predeclared at /tmp/yCO_Tx6Lg6 line 1:␤------> [32m$xml[33m⏏[31m~~m/\\<.+?\\>/[0m␤Check failed␤FAILED 00:01 116m␤»
aya hm strange
for me nope
TimToady std: '<foo>' ~~ m/ \\< .+? \\> /
p6eval std 31912: OUTPUT«ok 00:01 115m␤»
TimToady rakudo: say '<foo>' ~~ m/ \\< .+? \\> /
p6eval rakudo 6ebba8: OUTPUT«<foo>␤»
TimToady works fine
aya hm strange
TimToady you trying to do it from the command line, maybe? 15:52
aya maybe
TimToady could be shell interference then
aya :)
oha i felt free to submit another issue about aliasing and lazy map on rakudobug: #77074 15:57
i've already wrote it here, but i didn't submitted the bug by the time being 15:58
TiMBuS why the heck is my font on rt so huge? 15:59
am i meant to set it smaller somewhere
TimToady dinner & # and likely not internet upon return...
aya crazy new rules :( 16:01
if("hello"~~m:i/Hello/) {
print 'hello';
}
>Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 25
lol :-D and crazy new documentation
jasonmay I see minutes from june 30 about work on the parrot metamodel... is MOP stuff a part of that? 16:04
oh "metamodel for parrot objects" ... looks like yes :) 16:05
16:05 risou_ joined 16:06 redicaps joined 16:11 hanekomu_ joined
aya how use the modifers in perl6 ? 16:12
as in documentation it just not work
m:i return always err and m:ignorecase too just return err
sorear aya: you need to put a space between if and ( 16:13
alteratively, remove the parens entirely
aya same Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 25
whan i'm use modifer it return me always it 16:14
sorear You put the space in the wrong place.
aya if not use all passed
sorear Also, modifiers aren't implemented in rakudo.
jasonmay: yeah jnthn's work is directed towards getting a sane MOP developed for Perl 6/Rakudo
aya oh, so regex in v6 not work?
at all?
with modifers
sorear "at all" in English is a superlative, it shouldn't be used with restrictions 16:15
but yes
aya is there some method in this case use v5 regex with modifers and syntax of v5? 16:16
Sorry my English is not native :)
16:18 redicaps left, tylercurtis joined
sorear making mistakes is nothing to apologize for 16:18
it's how we learn
aya :)
sorear: say plz there is in rakudo have way to use v5 regex ?
TiMBuS modifiers work inside the regex, i think
aya TiMBuS too tryed as in doc :( too no luck 16:19
TiMBuS rakudo: say 'test' ~~ /:i[TeSt]/
p6eval rakudo 6ebba8: OUTPUT«test␤»
aya if ( "hello"~~m/:i:g:ii Hello/ ) { 16:21
analog to /sig in v5
Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 25
rakudo: say 'test' ~~ /:i:g[TeSt]/
p6eval rakudo 6ebba8: OUTPUT«===SORRY!===␤Confused at line 22, near "say 'test'"␤»
sorear use .comb 16:22
aya sorear: where?
:)
tylercurtis rakudo: say 'test' ~~ /:i :g TeSt/
TiMBuS say 'test' ~~ /:g[test]/
p6eval rakudo 6ebba8: OUTPUT«===SORRY!===␤Confused at line 22, near "say 'test'"␤»
frettled sorear: otherwise, it might get hairy ;)
TiMBuS ah
rakudo: say 'test' ~~ /:g[test]/
aya :)
p6eval rakudo 6ebba8: OUTPUT«===SORRY!===␤Confused at line 22, near "say 'test'"␤»
TiMBuS :g nyi
aya or :P5 16:23
or :Perl5
as in doc :) too not work
rakudo: say 'test' ~~ /:ii[test]/
p6eval rakudo 6ebba8: OUTPUT«␤»
aya rakudo: say 'test' ~~ /:s[test]/ 16:24
p6eval rakudo 6ebba8: OUTPUT«test␤»
TiMBuS i know someone had :ii working yesterday, on their local copy
aya :ii work, :g now work
rakudo: say 'test' ~~ /:P5[test]/
and :P5
p6eval rakudo 6ebba8: OUTPUT«===SORRY!===␤Confused at line 22, near "say 'test'"␤»
aya rakudo: say 'test' ~~ /:Perl5[test]/
p6eval rakudo 6ebba8: OUTPUT«===SORRY!===␤Confused at line 22, near "say 'test'"␤»
aya rakudo: say 'test' ~~ /:i:ii[TeSt] 16:26
p6eval rakudo 6ebba8: OUTPUT«===SORRY!===␤Confused at line 22, near "say 'test'"␤»
aya rakudo: say 'test' ~~ /:is[TeSt]
p6eval rakudo 6ebba8: OUTPUT«===SORRY!===␤Confused at line 22, near "say 'test'"␤»
aya rakudo: say 'test' ~~ /:i :s[TeSt]
p6eval rakudo 6ebba8: OUTPUT«===SORRY!===␤Confused at line 22, near "say 'test'"␤»
aya and look like more than 1 too not work :(
TiMBuS rakudo: say 'test' ~~ /:i[:s[TeSt]]/ 16:31
p6eval rakudo 6ebba8: OUTPUT«test␤»
TiMBuS feels like using perl 5 again
aya TiMBuS yup but if more than 1 modifer not work :( and P5 modifer too 16:35
crazy
rakudo: say 'test' ~~ /:s[:s[TeSt]]/
p6eval rakudo 6ebba8: OUTPUT«␤»
aya rakudo: say 'test' ~~ /:i[:s[:g[TeSt]]]/ 16:36
p6eval rakudo 6ebba8: OUTPUT«===SORRY!===␤Confused at line 22, near "say 'test'"␤»
aya argh
tylercurtis rakudo: say 'test' ~~ /:i :s[TeSt] / 16:37
p6eval rakudo 6ebba8: OUTPUT«test␤»
aya rakudo: say 'test' ~~ /:i :s :g[TeSt]
p6eval rakudo 6ebba8: OUTPUT«===SORRY!===␤Confused at line 22, near "say 'test'"␤»
aya rakudo: say 'test' ~~ /:i :s :g [TeSt] 16:38
p6eval rakudo 6ebba8: OUTPUT«===SORRY!===␤Confused at line 22, near "say 'test'"␤»
tylercurtis aya: you're leaving off the terminator of your regex.
rakudo: say 'test' ~~ /:i :g :s[TeSt] /
p6eval rakudo 6ebba8: OUTPUT«===SORRY!===␤Confused at line 22, near "say 'test'"␤»
aya rakudo: say 'test' ~~ /:i :s :P5 [TeSt]
tylercurtis although :g doesn't appear to work.
p6eval rakudo 6ebba8: OUTPUT«===SORRY!===␤Confused at line 22, near "say 'test'"␤»
aya yup
and P5
rakudo: say 'test' ~~ /:i :s :Perl5 [TeSt]
p6eval rakudo 6ebba8: OUTPUT«===SORRY!===␤Confused at line 22, near "say 'test'"␤»
aya and Perl5 too
tylercurtis aya: you're not terminating your regexes. /:i :s :P5 TeSt/ 16:39
rakudo: say 'test' ~~ /:i :s :P5 TeSt/
p6eval rakudo 6ebba8: OUTPUT«===SORRY!===␤Confused at line 22, near "say 'test'"␤»
aya :)
tylercurtis Although it doesn't work. :)
aya i'm try diff variations
yup
so with xml parse on regex in this case too no luck :( 16:40
tylercurtis std: say 'test' ~~ /:i :P5 TeSt/ 16:45
p6eval std 31912: OUTPUT«Can't locate object method "p5sigil" via package "STD::P5::Regex::_X_Ssendargs" at STD_P5.pm line 27526.␤FAILED 00:02 130m␤»
aya :) 16:46
tylercurtis aya: I suspect at least part of the reason :P5 isn't implemented is that parsing a Perl 5 regex implies parsing Perl 5 code... Which is not exactly the easiest project.
aya :)
16:46 GeneralMaximus joined
aya lol rewrite in this case to v6 mine regexp be crazy "m/\\<(.+?)(\\s.*?)?\\>(.+?)\\<\\/\\1\\>/sig" 16:46
:)
tylercurtis aya: How does that handle processing instructions, CDATA blocks, and doctypes? 16:49
aya it simple variant :) i'm no need all
only attributes and tags :)
tylercurtis rakudo: '<foo bar="five"></foo>' ~~ / '<' $<tag>=.+? [<.ws> $<attributes>=.*?]? '>' .*? '</' $<tag> '>' /; say 'success' if $/; say $<tag>; say $<attributes>; 16:55
p6eval rakudo 6ebba8: OUTPUT«success␤foo␤bar="five"␤»
tylercurtis aya: ^^ not a perfect solution by any means, but it's pretty much what your P5 regex does. 16:56
aya let me play with it :-D thanks a lot ^_^ 16:57
tylercurtis rakudo: '<foo bar="five">fish</foo>' ~~ / '<' $<tag>=.+? [<.ws> $<attributes>=.*?]? '>' $<content>=.*? '</' $<tag> '>' /; say 'success' if $/; say $<tag>; say $<attributes>; say $<content> 16:58
p6eval rakudo 6ebba8: OUTPUT«success␤foo␤bar="five"␤fish␤»
tylercurtis Slightly improved with a named capture for the tag's content.
aya :)
tylercurtis actually, that <.ws> might need to be \\s+, since ws does a zero-width match on word boundaries. 17:01
So, for more exotic tag names, it mightn't work.
17:06 risou joined
aya tylercurtis strange :( it loops eternal 17:08
while( $xml ~~ m/ '<' $<tag>=.+? [<.ws> $<attributes>=.*?]? '>' $<content>=.*? '</' $<tag> '>' /) {
on same iteration 17:09
pugssvn r31920 | radus++ | [t/spec] added test for RT 77072 @a[*] does not work as slice of all indexes
tylercurtis Are you doing anything to change the $xml variable?
aya one sec i'm paste mine v5 parser 17:10
tylercurtis: it v5 pastebin.com/4vEQ5EST 17:11
i'm trying now port it to v6, just for v5 write faster :) so i'm make v5 version
v6 now without recursion 17:12
loops only on while
17:12 darkop joined
tylercurtis Oh. That's because the V6 version wasn't global. 17:12
aya oh lol yeah 17:13
:-D
17:14 newbie_ joined
newbie_ rakudo?? 17:15
rakudo?
aya tylercurtis: hmm replace in v6 work same method? 17:21
tylercurtis aya: What do you mean? 17:22
aya $t ~~ s/$s+/$d/; ?
reokace regexp :)
replace :)
sorry type err 17:23
tylercurtis Yeah. 17:27
aya so same way
pugssvn r31921 | radus++ | [t/spec] Added test for RT 77010 use hypers with local scoped user defined operators. 17:31
17:34 isBEKaml joined 17:35 __rnddim__ joined 17:38 crazed left 17:39 darkop joined 17:41 masak joined
masak ahoy! 17:41
17:42 ashleydev joined 17:47 synth joined 17:48 GeneralMaximus left
tylercurtis locally: 17:53
> my @array = 1..5
1 2 3 4 5
> @array[*-1]
5
masak yes...?
tylercurtis wow.... I need to check that things are unimplemented before I start implementing them apparently... 17:55
masak "Rakudo: more implemented than you'd think"
isBEKaml rakudo: my @a=1...5; @a[*].perl.say; 17:57
p6eval rakudo 6ebba8: OUTPUT«Can't take numeric value for object of type Whatever␤ in 'Any::Numeric' at line 1351:CORE.setting␤ in 'infix:<<>' at line 6573:CORE.setting␤ in 'Any::postcircumfix:<[ ]>' at line 1665:CORE.setting␤ in main program body at line 1␤»
isBEKaml I didn't do any numeric ops, I could just say @a.perl.say, but the error looks LTA to me. :|
17:58 fod joined
tylercurtis isBEKaml: it's because @foo[*] is NYI. 17:58
masak according to S09, @array[*] equals @array[0 .. *]
tylercurtis I think.
masak tylercurtis: yes.
isBEKaml rakudo: my @a=1..5; @a[*+1].perl.say; # so is this
p6eval rakudo 6ebba8: OUTPUT«Any␤»
tylercurtis That's correct, I think.
isBEKaml masak: yes, I just read about a[*] :)
tylercurtis: I'm thinking a[*+1] can't be used, since that would mean we are looking for values beyond the list's last position. 17:59
tylercurtis isBEKaml: so? You can do my @array = 1..5; @array[20] 18:00
masak isBEKaml: or writing to a value there.
there are definitely use cases for @a[* + 1]
isBEKaml I'm sure we can do assignment since we are dealing with mutable variables here, my question was more about access. I think we could do more than just tossing "Any" blandly. :) 18:01
18:02 alester joined
masak sure. we toss the type object of the .of value of the array :) 18:02
i.e. Int for 'my Int @a'
18:03 [synth] joined
isBEKaml masak: my Int @a is NYI? 18:03
rakudo: my Int @a=1..5;
p6eval rakudo 6ebba8: ( no output )
isBEKaml rakudo: my Int @a=1..5; @a.perl.say 18:04
masak rakudo: my Int @a; push @a, "foo"
p6eval rakudo 6ebba8: OUTPUT«[1, 2, 3, 4, 5]␤»
rakudo 6ebba8: ( no output )
masak huh.
isBEKaml :)
It ate it. :)
masak it doesn't error locally either.
so yah, probably NYI.
18:08 risou joined
isBEKaml rakudo: my @a = 1,,23,,4,5,6,,,,7; @a.perl.say; (+@a).perl.say 18:08
p6eval rakudo 6ebba8: OUTPUT«[1, 23, 4, 5, 6, 7]␤6␤»
masak std: my @a = 1,,23,,4,5,6,,,,7; 18:09
p6eval std 31912: OUTPUT«[31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix , instead at /tmp/EyvLacUE4g line 1:␤------> [32mmy @a = 1,[33m⏏[31m,23,,4,5,6,,,,7;[0m␤Parse failed␤FAILED 00:01 116m␤»
isBEKaml :)
masak: I think this is already known? 18:10
masak it is.
18:11 jaldhar joined
pmichaud rakudo: for <a b>.kv -> $k, $_ { .perl.say } 18:17
p6eval rakudo 6ebba8: OUTPUT«0␤1␤» 18:18
masak heh. just made my first hotel reservation through booking.com :) this sponsoring thing really works!
pmichaud: that's wrong, right?
pmichaud evalbot is wrong, yes. it's working locally, though. 18:19
I'm wondering why evalbot is out of date
github has e569d66 as the latest version
jferrero rakudo: my @a = 1 .. 12; say [+] @a 18:20
p6eval rakudo 6ebba8: OUTPUT«78␤»
pmichaud pmichaud@plum:~/rakudo$ ./perl6
> my @a = 1,2,3; say @a[*];
123
> my @a = 1,2,3; @a[*] = 4,5,6; say @a[*]
456
>
jferrero rakudo: my @a = 1,,23,,4,5,6,,,,7; say @a.perl; say [+] @a 18:21
p6eval rakudo 6ebba8: OUTPUT«[1, 23, 4, 5, 6, 7]␤46␤»
tylercurtis needs to pick more obscure features to try to implement. 18:22
masak tylercurtis: or just find a bet bug on RT to fix. many open tickets are not obscure at all. 18:23
18:23 leprevost joined
pmichaud I'll start marking tickets with [LHF] again 18:24
I'm looking forward to be home to review the RT queue :)
tylercurtis masak: I meant "obscure" more in the sense of something that hasn't just had a ticket submitted in the last day or two.
pmichaud: what does [LHF] mean? 18:27
pmichaud "low hanging fruit"
tickets that I think are likely for others to be able to resolve quickly
18:28 araujo joined
pmichaud for example: rt.perl.org/rt3/Public/Search/Simpl...6+lhf+open 18:29
looks like 57790 can be closed with just a test of some sort. 18:31
(I'm unable to push tests from my machine atm) 18:32
masak food & 18:34
18:40 kid51 joined
dalek kudo: fca2d32 | pmichaud++ | src/core/Any-list.pm:
Fix Whatever in .[*] and .{*} . Fixes RT #77072.
18:40
pmichaud afk, food 18:41
18:43 ashleydev joined 18:48 jferrero joined 18:53 desertm4x joined 18:57 plobsing joined 19:06 cono joined, Casan joined
aya lol dies on recursion :-D 19:13
aya think so for normal usage rakudo very very draft
:-D lol now it start recursion without any call 19:21
aya think so rakudo self think what to do, and not listen coder
19:24 alester joined 19:28 __rnddim__ joined
tylercurtis aya: what problem are you having? 19:38
aya :-D i'm catch fine bug with recursion, but it already solved. If use in while vars getted from regexp it drops in recursion for eternal :) 19:39
19:40 plol joined
aya It get me lot of laught :-D and many other lite and not light things 19:41
like not creation of vars on fly, or always passing var as reference in other case it be RO and etc :) 19:42
Not comfortable things :)
lue hello o/
19:42 s1n joined 19:44 masak joined
masak just had a very enjoyable vindaloo 19:44
lue
.oO(today is a good day I think for raising questions about module-related P6 things.)
19:45
hai masak o/ 19:46
aya tylercurtis :) and with regexp bit trobules :) in v5 ? means non greedy, rakudo just ignore it :)
masak hellue!
lue 1) Can I avoid having UFO compile my P6 modules to PIR?
masak sure.
sjohnson masak: hi!
masak just don't use ufo :)
sjohnson! \\o/
sjohnson rakudo star seems to be a big deal 19:47
lue main reason I don't want it to is because I'm writing P6 modules, not Parrot modules :)
sjohnson i'm starting to think p6 christmas release is getting pretty soon
tylercurtis aya: rakudo doesn't just ignore ?.
masak lue: do you want ufo for the test target? or is there some other reason you're wanting ufo without wanting to build to PIR?
lue: I'm writing p6 modules too, but I want the startup speedup that building to PIR provides.
aya tylercurtis: remember query that you give me :) m/ '<' $<tag>=.+? [<.ws> $<attributes>=.*?]? '>' $<content>=.*? '</' $<tag> '>' /
tylercurtis aya: yes. 19:48
aya you have on content .*? in perl 5 it means non greedy :)
tylercurtis In Perl 6, it also means non-greedy.
masak a good term for 'non-greedy' is 'frugal'. it's used by STD.pm6. 19:49
aya in this all fun :)
lue I was just looking at it, and I don't want to compile to PIR, so I won't use ufo. No big deal.
masak (because technically, non-backtracking is non-greedy too) :)
lue: another happy non-customer. :P
aya tylercurtis: if launch 1 times on xml '<test>asdf</test><test>asdf2</test>
it comes fine :)
But :) if you get it in value, pass it to recursion and try execute, it ignore it 19:50
and not split by tag :)
19:50 ashleydev joined
tylercurtis aya: can you provide an example of the code you're running and what output it's giving? 19:50
masak (as a nopaste)
aya yup :) 5 sec i'm post to pastebin 19:51
it a bit dirty :)
frettled masak o/ — happy?
lue 2) Why, for module A::B, do people tend to store it as lib/A/B.pm and then in B.pm declare something like class A::B; ? Is there any reason other than `just because' ?
[ I'm likely being thick here :) ] 19:52
masak frettled: yes. now I'm seating for two reasons. :)
frettled masak: oooh?
masak frettled: (1) Italian evening temperature, (2) just nommed vindaloo
frettled masak: aha!
tylercurtis lue: because Rakudo doesn't understand nested module definitions properly, IIRC.
masak lue: it seems a very reasonable way to do things from my perspective. what about it don't you like? 19:53
aya tylercurtis: pastebin.com/erDVWRxx
It commented where is problem :)
Basically it must work exact same, cos code on value is inside parent tag
tylercurtis lue: Or, if you are asking why A::B maps to A/B.pm, it's just how Perl 6(and 5, iirc) turns module names in "use" into paths.
frettled masak: I'm settling for a really warm Norwegian evening temperature (≈ 19-20 °C), a liter of choc milkshake, followed by a nommy summer drink. Cheers for happiness! 19:54
aya But it work not as appears.
But if you launch same but not in recursion it still work fine :)
lue I think it's just me not wanting to have people type stuff like Temporal::Julian.new [if it were a class]. Since I know A::B means A/B.pm, this seems... weird to me.
I get the oddest feeling I'm confusing myself here :)
masak frettled: yes, cheers!
masak clinks glasses with frettled
tylercurtis What does \\$ mean in a signature?
frettled lue: are you thinking that it should perhaps be: class B; and class Julian;? 19:55
19:55 shade_ joined
aya tylercurtis: it question to me? :) 19:55
frettled lue: chances are, that if you're feeling confused, you are confused.
tylercurtis rakudo: say :(\\$foo).perl;
p6eval rakudo 6ebba8: OUTPUT«:(Mu \\|$foo)␤»
19:55 briang left
frettled (Confusius say) 19:55
aya tylercurtis is pass by reference :)
frettled except that we don't have references except for ;) 19:56
tylercurtis aya: Nope. That's a parcel binding.
aya strange, in v5 it be passing by reference, in v6 if i'm not wrong too
give me a minute i'm paste origin v5 code 19:57
so you can see
masak aya: you're wrong. :)
references as you know them don't exist in Perl 6.
frettled didn't mean to imply that «;)» is a reference
masak frettled: I'm not sure what you meant to imply. is there a significant empty string in there?
frettled masak: nopes. 19:58
tylercurtis rakudo: sub foo ($s is rw) { $s = 5; }; my $a = 4; say $a; foo $a; say $a;
p6eval rakudo 6ebba8: OUTPUT«4␤5␤» 19:59
lue I've been looking at various modules at modules.perl6.org and it's always done this way. It doesn't help my already muddy understanding of the module system.
frettled masak: But it makes a bit of sense to say that parcels are similar to references, and perhaps a bit of confusion could be avoided if we said that «well, we don't call them references, because they do much more than references, but they are that, too» — unless I'm mistaken about how they work, that is.
masak lue: it's how it's done in Perl.
aya tylercurtis: pastebin.com/KPEHrEGu v5 origin
masak lue: what would you like to do instead?
lue [If it's similar enough, maybe a P5 `guide' to how modules work would help] Please remember I have no prior experience in Perl. This A::B stuff is new to me. :) 20:00
masak frettled: s/parcels/captures/?
frettled masak: er, yes, neat typo there
…wish I could blame the alcohol
masak lue: the basic principle is that in Foo/Bar.pm, you expect to find a type called Foo::Bar. 20:01
lue: and maybe some other stuff too, but that's usually not exported.
aya masak: hm strange i'm think exist :( maybe i'm wrong 20:02
masak aya: you're wrong. :)
aya but few things in v6 really annoing, maybe it helpfully but annoyng
tylercurtis masak: that's not always the case, though. For example, there's no NativeCall type(that I'm aware of) in NativeCall.pm[6?] in Zavolaj. 20:03
aya if comape v6 with ruby, ruby more fast and comfort to type :)
masak aya: I disagree. but you're free to have that opinion.
lue I think it's that lib/A/B.pm containing a declaration (class|module|package) A::B { is not how I would set it up, and the fact that "everybody's doing it" makes it seem like it has to be done this way.
frettled Of course, «Perl 6» is six characters, «Ruby» is merely four. Perl 6 is therefore a 50% improvement over Ruby, but at a minor cost. ;)
aya masak: i'm not mean so v6 bad :-D it have a lot of good features 20:04
masak tylercurtis: rightright. it's just a first approximation of a rule.
lue: everybody's doing it because the system works, and people like it.
aya masak: but many things in v6 annoying like defenition of rw or ro vars in each function and etc
masak aya: you don't need to define ro. 20:05
just write nothing after the variable. very easy.
aya masak: but always need to define rw :)
masak yes.
that's because you shouldn't. :)
we're activaly discouraging you from doing that.
making you type a little extra as a punishment if you do.
aya and this too big annoying thing :)
:-D for my case
masak aya: I'm glad you think that.
aya better is make some switcher 20:06
masak aya: stop writing 'is rw' and the problem is solved.
you'll be happier, too.
"some switcher"?
aya Like in v5 you can define vars on fly without "my"
frettled aha
aya Or use strict and do always with my
switcher :) to choise :)
lue continues to weaken Perl 6 community practices by questioning them :)
frettled aya: consider P6 as having «use strict» as a standard 20:07
masak aya: consider using strict as a default.
really.
aya frettled: i'm know :) i'm mean isn't it good have a switcer?
frettled is still trying to teach colleagues to stop using ampersands in front of subroutine calls.
tylercurtis aya: eventually, a non-strict mode will be implemented that will be indicated by a bare "v6;" at the beginning of the script.
aya Many switchers to many things :)
tylercurtis Or at least, that's planned.
aya :)
frettled aya: you mean something that lets you turn on and off such features on demand?
aya: I believe the better English term for that might be «(feature) toggle» 20:08
aya frettled: yup :) some kind off :) sory if i'm explain bad :)
tylercurtis That method of indicating strict is because a bare literal in sink context at the start of the file should give a warning in non-strict mode.
frettled aya: no problem, as long as we can talk about it to figure out what we mean to say, a bit of misunderstanding is perfectly fine!
aya frettled: yup toggle :) Like toggle for "IF" loop, cos whan i'm first time use it, i'm just not come crazy, becouse need add space below { 20:09
frettled: or strict thing :) or rw thing :) many other things :)
masak aya: you could use the word 'pragma' instain 'switcher'.
aya If it be toggle it Off or On it be really comfortable :)
masak: thanks ;)
masak aya: did I explain adequately why it's a good thing to have explicit 'is rw'?
aya: it's because of the optimizer. and because of clean code. 20:10
aya masak: yup i'm know why it need :) but sometimes it annoing :)
tylercurtis aya: I'm going to try writing up a more Perl 6-y version of your original Perl 5 script. although I won't go all out and write an XML grammar(although that's the straight-forward Perl 6 way to do it).
frettled aya: Considering how Perl 6 works in general, I think it would cause major problems to disable strict mode, much more so than in Perl 5.
masak aya: I don't find it that annoying. but tastes differ.
aya masak: it like type casting, it good in some cases, but in most cases enought be auto type cast like in Php :)
tylercurtis: thanks :) it can be bad writed :-D i'm know v5 just a week :-D 20:11
masak aya: right. but you can't auto-'is rw' anyway.
frettled aya: and in most cases, types are automatically cast
masak aya: 'is readonly' (the default) and 'is rw' have different effects on the code.
frettled yup, and «is rw» isn't exactly a type
aya masak: it just what i'm mean :) so if be toggle be more comfort :)
frettled: it just as example :) not exact to v6 :) 20:12
20:12 twik joined
masak aya: ok. there's really nothing to stop you from writing a pragma that does that. 'use rw-params' or something. 20:12
frettled I think this is a matter of fundamental OO philosophy.
masak aya: I wouldn't recommend such a pragma, but it's perfectly culturally acceptable.
frettled: it has some relation to OO? I don't see it. :)
frettled In some languages, you go the exact other way: nothing is private unless you specifically say so.
masak: oh, yes, it's a principle of object encapsulation(? — my terminology is a bit iffy these days) 20:13
aya masak: some things need be crazy :) i'm get smoke and tell you a lite story about Php :-D about 1 crazy thing :)
masak frettled: are we still talking about routine parameters and 'is rw'? 20:14
frettled masak: yup, I'm just trying to use a slightly different perspective 20:15
masak aya: smoke by all means, but do you have to tell stories about PHP? :P
frettled I guess I could've started babbling about call by value, call by reference, and call by name.
masak we know PHP is crazy already. that's why we're doing Perl. :)
frettled masak: yup! 20:16
aya masak: :-D it crazy but comfort :)
masak frettled: I'm very eager to see how all these pieces fit together for you. they don't for me. :)
aya masak: see, once times i need parse xml in php to array
masak: i'm just like arrays, more comfort work with it :) in php it get just few strings, open string, parse by sax, get level of node and pass by reference to recursion (sorry if explain bad) :) 20:17
masak s/i'm just like/I just like/
I'm with you so far. 20:18
aya masak: and crazy thing is in method, arrays in Php same for hashes and not hashes, and sax return level always :)
masak I like your English. it's brutal but completely understanable.
s/stan/stand/
aya masak: later i'm try reproduce it in python :) it be really hell, cos hashes and not hashes have different methods, and no xml parser like sax with level idention, some who write xml parser to python not think so it be useful know current level :) 20:19
masak: in this all sugar :) crazy + crazy, but gives sometimes awesome results :)
masak I'm glad that story had a happy end. 20:20
aya masak: it why i'm very love ruby too :) it have same access to associative array and standart array :)
sometimes it more comfortable :) maybe not so good to read but comfortable :) 20:21
masak "same access"?
aya same way to access
masak you're talking about a[] for both?
aya yup :)
masak ok.
I don't like that, so we'll have to disagree on that one. 20:22
aya many pplz many opinions :)
it why i'm like switchers and toggles in this case :)
masak see beginning of use.perl.org/~masak/journal/40431 for why I like it. :)
aya: Perl 6 will be very customizable. you will be able to make it as crazy as you like.
aya masak: be good :-D 20:23
masak tries
tylercurtis aya: a question: what is $parent in your parse_xml sub? I don't see any declaration of it ever.
nevermind 20:24
forget about sigil variance
s/forget/forgot/, rather
aya masak: yup i'm like perl sigil to types :) but sometimes be better if have one method to access :) let make it more easy to write :0
tylercurtis: v5 just have small bug, on array length :) but nevermind it :) just to notice :)
frettled masak: Well, in OOP, some languages have only read-only accessors for variables/methods, and does not allow implicit modification/masking of those variables/methods. P6's default behaviour of immutable (unless «is rw») parameters to subroutines is similar to that behaviour, avoiding several problems that you might get with other call-by-value and call-by-reference schemes. 20:25
masak frettled: ok, granted. different systems, but same underlying optimisation/security/cleanness concerns.
frettled++ # thinking laterally
frettled I do try, occasionally. :D 20:26
aya comes get coffe
aya back 20:29
masak: i'm just can have this opinion becouse i'm like from OOP as it exist now only 10% of features :-D
frettled BTW, call by name can be pretty cool. I think the example in Wikipedia for the ∑ function in Simula can be slightly confusing, but it might illustrate the idea to those not familiar with it (en.wikipedia.org/wiki/Simula#Call_by_name). Perl 6 has closures, so we don't really care, do we? 20:30
aya masak: or maybe becouse i'm have a rule, not use code if you not know how it work :-D
masak aya: I like that rule. 20:31
aya: but I didn't understand what you said before that.
aya: (also, every time you've said "i'm" so far, you really mean "I". please start writing the latter and I'll be slightly less confused.) :)
aya masak: OOP, i'm not like 90% of as it exist now :) All interfaces in OOP abstract etc, it looks like shield from fool :)
oh :) sorry i'm just think so i'm is right whan you talk about self :-D 20:32
masak aya: well congrats. Perl 6 has neither interfaces or abstract classes.
frettled aya: ah, so basically, you think most of OOP is about protecting the programmers from themselves?
aya masak: and it good :-D
frettled: Yes :) Absolutelly right :) Many no needable things
frettled dislikes some of Java's, ahem, features.
I guess that comes from learning OOP from Simula and LPC (Lars Pensjö's C) 20:33
aya frettled: I just remember dolphin code, it be awesome crazy :-D So many inheritance for light actions
masak Java is good for making bland software by big teams of replaceable coders.
aya very very like php documentation :-D perl need some like it, current perl docs is crazy really 20:34
frettled masak: even better, my previous employer had a tool called Genova, which autogenerated code from — among other things — UML.
masak frettled: :(
frettled aya: oh, yes, the PHP documentation is nice, when it's correct, clear and understandable. But the best part is probably the user comments.
masak: nono, _smile_, it's good. It means you can focus on more important things than trivial code. 20:35
aya frettled: aha :) comments and examples, and glossary good :) and most good is function search throught url :)
frettled You don't need to bother with creating the stupid classes and accessor methods for your data structures.
aya: yup
masak frettled: oh.
masak produces a forced smile
aya frettled: even better docs than i'm see in my life :-D
frettled heh
aya :) 20:36
frettled masak: do you enjoy coding the stuff that the computer could make for you? :)
20:37 mberends joined
masak frettled: that's a trick question. why am I using a language in which the code solving my problem is so repetetive as to need autogenerating? 20:37
frettled masak: quite 20:38
masak: but that's how _a lot_ of programming is done, regardless of language, be it Perl or Java, PHP or Ruby, Python or C.
masak I'm not saying it's wrong... 20:39
frettled Mind you, this programming tool dates back to the eighties.
masak I'm asking why :)
this wasn't the Lisp dream we had back then.
what happened? where did we take a wrong turn?
frettled masak: it solved problems, and I suppose it still does, even when the company hiring your services insists that you use Java to «better integrate with existing services» 20:40
Oh, no, we didn't take _a_ wrong turn. We took many wrong turns, and several right ones, too.
masak code generation is just capy/pasting of code, by a robot.
20:40 orafu joined
frettled It's a bit more sophisticated than that. 20:40
masak oh, ok. fairynuff. 20:41
frettled Considering large software projects, you might be dealing with a great deal of ORM (object-role modeling) or similar techniques to organize your data.
That would be sensible to do in some sort of tool.
masak sighs 20:42
I'd sure like to learn more about this.
frettled If that tool, while you model, also generated the code for classes/objects, accessor methods, etc., plus the relevant database tables and relations, you save a great deal of work.
…and that's what it does.
The principle is simple, but putting it into real, working, mostly bug-free code is not entirely trivial. 20:43
masak nod.
aya dream, so perl 6 be a framework to build language, with many features to toggle off and on :-D 20:44
frettled :)
aya lol :)
frettled use MONKEY_TYPING; # Engage inifinite monkeys
aya frettled: :-D some like this :)
tylercurtis frettled: even better would be if your programming language code could be written such that it concisely did all that. Say, by just writing a class definition with "is orm" or "(:metaclass persistent-metaclass)".
aya but really :) so many languages, so many goodies, but ... in diffrenet langs :) 20:45
some good in one, some good in next, some good in third :)
frettled tylercurtis: that would be pretty cool :) If we were discussing on comp.lang.lisp during the late nineties, I bet some boffin would say «I have code for that».
tylercurtis frettled: common-lisp.net/project/elephant/
frettled Slightly unrelated, but recommended reading: the-programmers-stone.com/the-origi...-thinking/
masak tylercurtis: class Employee does Persistence { ... } 20:46
tylercurtis: or something like that.
frettled tylercurtis: heh
tylercurtis masak: Can a role do enough magic to make that happen?
frettled idles for a while, possibly until Monday. :D 20:47
masak frettled: that is a good article. I read it once, I think.
frettled Thanks for a stimulating hour!
aya :)
masak tylercurtis: I'm pretty sure it can. if not, a trait probably can.
frettled: thank you! 20:48
masak sleeps
aya come to smoke 20:50
tylercurtis aya: gist.github.com/513192 20:54
aya one sec
lol awesome :) give me 10 min to execute :) 20:55
Also say please your contacts :) so i'm add big thank to this part of code :)
like "Big Thank to tylercurtis from <contact here>, to rewrite xml parser from v5 code to v6" :) 20:56
20:58 Juerd joined
tylercurtis Just "tylercurtis from #perl6" would be fine. 20:58
aya okay :) 20:59
#Big Thank to tylercurtis from #perl6 channel on (irc.freenode.net), to rewrite code from v5 to v6 :) 21:00
lol
tylercurtis: oh you found how use global :)
tylercurtis Indeed. m:g// didn't seem to work, and even if it does, it confuses my emacs. :) 21:03
aya :) but :global work :)
tylercurtis :g works, too, if you use .match instead of ~~. 21:05
aya my error be in 3 things :)
1) i'm use old v5 methods on v6, there is all absolute difference :) need forgot use v5 construtcionts
2) i'm use wrong defenition in function, instead of use default assing throught %parent = {} i'm use just {}, it make me on wrong way
3) i'm miss how use :global :-D need use .matchh instead of ~~ :) it be mine critical error :)
aya comes to complete perl6 API class :) 21:10
aya happy 21:11
21:17 mantovani joined
aya tylercurtis: maybe you can submit it for perl6 modules? If someone seeking for it like me :) 21:18
21:19 araujo joined
tylercurtis aya: I'm hoping to get around to writing a serious XML parser (following the spec to the letter) sometime soon. If I do that, I'll release that as a module. 21:20
aya oh :) good idea :)
21:20 Guest23195 left
aya uff API done :-D lol v6 version now too fine :) Thank again tylercurtis :) 21:24
21:26 allbery_b joined
tylercurtis aya: glad to help. 21:27
aya :)
now need just write crazy variant of API to Javascript :-D but it easy task :-D 21:28
21:28 dju joined 21:32 dju joined 21:33 __rnddim__ joined 21:34 trek1s joined 21:38 Trashlord joined 21:44 ashleydev joined 22:24 hanekomu joined
sorear Given a Match object, is there any way to find out what grammar it came from in Perl 6? 22:34
22:35 xomas joined 22:51 mjk joined 22:56 skyheights joined
rcfox rakudo: say ~(Match.new.^methods); 23:12
p6eval rakudo 6ebba8: OUTPUT«Method 'methods' not found for invocant of class 'P6metaclass'␤ in main program body at line 22:/tmp/hVe7am4sLb␤»
rcfox :o 23:13
23:23 drbean joined
sorear rakudo: say ~(('x' ~~ m/x/).^methods(:local)) 23:29
p6eval rakudo 6ebba8: OUTPUT«defined perl of Str list at_key hash at_pos caps ast new chunks Bool␤»
sorear rakudo: say ~(('x' ~~ m/x/).^parents(:local))
p6eval rakudo 6ebba8: OUTPUT«Regex::Match() Cool()␤»
moritz_ Regex::Match is a Rakudo/NQP-rx hack 23:30
23:38 melte joined 23:58 melte joined 23:59 Psyche^ joined