»ö« | perl6-projects.org/ | evalbot: 'perl6: say 3;' | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by moritz_ on 17 June 2009.
lichtkind is anybody here who have the mercy to check my next p6 blogpost? 00:38
s/is/has/
grrr
its late here
ingy hi 00:40
phenny ingy: 24 Jun 21:12Z <masak> tell ingy looking forward to pairing up and working on that YAML port.
lichtkind ingy: hi good to see you again since so long :)
ingy phenny: tell masak I wanted help on a TestML port. First anyway. 00:41
phenny ingy: I'll pass that on when masak is around.
ingy hi lichtkind
lichtkind: you know how to best install rakudo on a mac?
lichtkind ingy: im still taking care of perl6::Doc
ingy ok, where's the install doc? :) 00:42
lichtkind ingy: nope sir never did such madness and never had a mac
not yet :)
last ingy: you can normally just get Rakudo from git and build it following the instructions there. 00:42
ingy last: ok, I'm starting to remember now :) 00:43
lichtkind ingy: yes its pretty detailed, win folcs can be lazy since there are precompiled binaries
last ingy: Last I checked (this morning, I think) it failed "make test", but I got it working today by updating the parrot it gets by hand and then finishing the build like now. 00:44
ingy I seem to have a git clone of rakudo....
last: patch?
oh I see
last ingy: I just cd'ed to the parrot directory and did "svn update" and "make" 00:45
ingy ok
:) 00:46
trying now.
last: this wasn't on a mac, was it?
wayland76 lichtkind: I can have mercy on you and check your blog post, but I should warn that I'm no big Perl 6 expert :)
last ingy: it was on a mac 00:47
ingy yay! 00:48
last ingy: I can walk you through it if need be.
ingy while this is building... what's the best way to learn perl6? :)
I want to port some stuff from p5
lichtkind wayland76: thank you , you don't have to 00:49
ingy hopefully moritz_ json parser works
lichtkind wayland76: didn't see my provate msg?
ingy: still in json buisness? .)
ingy ?
wayland76 lichtkind: Yes, I saw it, but my response time is sometimes a bit delayed due to doing other things 00:50
last ingy: I've just been playing with Perl 6, writing scripts in my spare time, checking the specs a lot, following people's blogs, and asking questions here when needed.
ingy I have a grammar encoded in json that I need to load into p6
lichtkind ingy: dont listen im sleepy and speaking nonesense, its almost 3am here
ingy :)
lichtkind :) 00:51
ingy lichtkind: where is here?
lichtkind ingy: center germany
ingy nod
lichtkind :)
ingy GMT+1?
lichtkind true
ingy config worked. running make now. 00:52
make worked. now make test. 00:57
All tests successful.
last :)
ingy I thought rakudo had more than 236 tests. :P
last It does -- definitely more than a thousand tests now. 00:59
"make test" doesn't do them all (obviously).
ingy > ./perl6 Configure.pl 01:00
Can't find ./strict in @*INC
in Main (src/gen_setting.pm:445)
lambdabot <no location info>: parse error on input `./'
ingy ;)
buu INGY 01:04
ingy hi buu 01:08
where do perl6 modules live? 01:13
lichtkind ingy: a recent debate tries to decide that 01:15
ingy lichtkind: are there any core modules? 01:17
lichtkind ingy: i dont know of any, the only 2 module i know of have their own githup repo
ingy lichtkind: which ones? 01:18
I just cloned moritz/json 01:19
lichtkind ingy: web.pm and HTML::Template
wayland76 Wow! Can you clone jnthn and pmichaud too? We could get Perl 6 done really quickly :) 01:20
ingy git clone git://github.com/moritz/json.git # :P
wayland76 ingy: Perl 6 is trying to have no core modules except what appears in the spec. There are a few of these, and some of them appear in Rakudo 01:21
ingy makes sense
wayland76 sub where-do-modules-live { return Undefined; } 01:22
ingy I see a Safe.pm 01:23
I see stuff in src/setting 01:26
but perl6 only has './' in @*INC
I need masak!
wayland76 Or moritz_ :) 01:27
Or pmichaud or jnthn or someone
ingy moritz_: help!
TimToady might know some stuff :)
he should be here at yapc
is there a PERL6LIB variable support? 01:29
lichtkind ingy: he is at YAPC 01:30
ingy one could argue that @*INC should only honor that...
TimToady: you here at YAPC??
show thyself
wayland76 @seen TimToady 01:31
lambdabot TimToady is in #perl6. I last heard TimToady speak 3h 25m 9s ago.
ingy oh wow 01:32
TimToady stirs from his grave
ingy > PERL6LIB='.:fooooo' perl6 -e 'say @*INC.perl'
[".", "fooooo", "."]
lambdabot <no location info>: parse error on input `='
ingy that's all I need :) 01:33
TimToady I don't know much of anything about rakudo
ingy I'll even put PERL6LIB 'make install' support into my modules
ingy is in da Perl6 haus, yo 01:34
TimToady: what do you think of the idea that perl6 only gets @*INC from PERL6LIB? :) 01:35
it's very purist :) 01:36
TimToady I think @*INC should only represent the user's private dirs, not the library's dirs 01:38
the official library should act more like a database query 01:39
wayland76 Hmm. What if there were one base path for the global libraries, and one for the individual user, and Perl6 does it's query stuff relative to that base path? 01:42
TimToady there should be a placeholder for the official libarary, I suppose 01:43
wayland76 TimToady: I guess I'm also wondering if the user path should be queryable in a database-like fashion too :) 01:47
TimToady I have also wondered that, but we can burn that bridge when we get to it 01:57
wayland76 Ok, just pre-emptively taking prisoners or something :) 01:59
sjohnson TimToady: words to live by ;P 02:12
azawawi good morning # +2gmt zone 02:22
sjohnson hi 02:26
pugs_svn r27244 | azawawi++ | [S:H:P6] A bit of class/methods/subs scoping. 02:46
r27245 | azawawi++ | [S:H:P6] A variable is now detected. 02:51
r27246 | azawawi++ | [S:H:P6] viv.pl -> emit_tokens_viv.pl 02:53
pmichaud rakudo: say "\c[NEGATED DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE]";
p6eval rakudo 6c43f9: OUTPUT«⊯␤»
wayland76 Can someone give me some git advice? I'd like to get a diff of all the changes made to the "ins" branch of Rakudo 03:13
I'm suspecting that rather than doing it through github, I might need to check it out and then do the diff. If that's so, I need to know how to check out the branch instead of the HEAD 03:14
pugs_svn r27247 | azawawi++ | [S:H:P6] cleanup... 03:15
azawawi wayland76: hi! and sorry; im not a git user...
wayland76: what are you working on these days? 03:16
wayland76 Well, at the moment, I'm still working on improving the Rakudo RPM. Some parts work, and some parts don't 03:21
It seems (both in Parrot and Rakudo) that some work is finally being put into making the install process work.
azawawi wayland76: nice 03:30
wayland76: this is what i have been working on for refactoring support and better syntax highlighting. gist.github.com/136289 03:32
wayland76 That looks useful-ish :) 03:35
azawawi wayland76: sort of PPI for Perl 6 03:36
wayland76 I never really got the hang of most of the Perl 5 debugging stuff; I use print and Data::Dumper :) 03:38
But I should change that :)
azawawi wayland76: me too :) 03:39
skids print STDERR "me 3"
wayland76 Ooh, STDERR. Must be fancy :) 03:41
sjohnson i can finally see how useful p6's pick method is going to be 03:46
im trying to write yet another Japanese quiz in p5
and frothing at the mouth in excitement for p6
sjohnson yells loudly from his parents basement 03:47
KyleHa The last test in S03-operators/misc.t looks wrong to me. With that 'join' there, I'd expect the pipe to show up in the result. 04:12
perl6: my @a=1,2,3,4; my @b=9,8,7,1; say (@a minmax @b).perl 04:14
p6eval pugs: OUTPUT«*** No such subroutine: "&infix:minmax"␤ at /tmp/n419zXarWG line 1, column 36-48␤» 04:15
..rakudo 6c43f9: OUTPUT«Statement not terminated properly at line 2, near "minmax @b)"␤in Main (src/gen_setting.pm:3225)␤»
..elf 27247: OUTPUT«Undefined subroutine &GLOBAL::infix_minmax called at (eval 124) line 5.␤ at ./elf_h line 5881␤»
TimToady KyleHa: I agree, it looks bogus 04:16
pugs_svn r27248 | kyle++ | [t/spec] Fix a wrong test 04:18
KyleHa Should this work?: my @a=1,2,3,4; my @b=9,8,7,1; say (@a minmax @b).perl 04:20
Pm says in email that minmax is constrained to have two elements on either side, so it wouldn't.
TimToady we could, I suppose, change it to be an even number, and take it as min,max,min,max... 04:21
KyleHa I think I don't get what the operator does anyway. 04:22
If it gave the min and max from some arbitrary list, that would make sense. 04:23
TimToady the point is to be able to do $a1 min $b1, $a2 max $b2 in parallel
KyleHa So, if I were writing tests for it, it should accept "@a minmax @b" only if @a and @b have exactly two elements each? 04:37
KyleHa Or it takes "(1,2) minmax (1,2)". 04:38
TimToady it's list infix, so 1,2 minmax 1,2 works 04:40
KyleHa ...and it won't work between arrays of any size? 04:41
TimToady so far it's just intended for two values on each side, but as I already said above, we could generalize it a bit maybe
KyleHa Maybe I'm too tired to get this now. It doesn't seem as if it ought to be as hard as I'm making it.
wayland76 TimToady says that, at the moment, it's only specified for lists of two elements, but that we could CHANGE THE SPEC to make it work for any array with an even number of elements 04:43
eternaleye PerlJam: About giving blood, maybe it was mmhg - your blood pressure. Millimeters mercury. 05:09
THe metric equivalent(ish) of inches mercury
pugs_svn r27249 | azawawi++ | [S:H:P6] preserve old unit.. 05:18
dalek ok: 8c143b6 | (Hinrik Örn Sigurðsson)++ | MANIFEST:
Fix the MANIFEST

  * Remove a directory I accidentally added
05:21
pugs_svn r27250 | azawawi++ | [S:H:P6] Simplify :: in Scope to : 05:26
r27251 | lwall++ | [STD etc.] implement setting compilation to produce CORE.yml from CORE.pm 05:28
Sexygirl can anyone help me with a script? 05:29
i need to understand wheter it right or wrong its called everyauction?
TimToady std: 1 05:32
p6eval std 27249: OUTPUT«ok 00:02 37m␤»
Tene std: 2
p6eval std 27249: OUTPUT«ok 00:02 35m␤»
Tene std: 3
p6eval std 27249: OUTPUT«ok 00:02 35m␤»
Sexygirl # SUB: Send E-mail
# This is a real quick-and-dirty mailer that
# should work on any platform. It is my first
# attempt to work with sockets, so if anyone
# has any suggestions, let me know!
#
# Takes:
# (To, Subject, From, Message)
sub sendemail {
my ($to,$from,$subject,$message) = @_;
my $trash;
if ($config{'mailhost'}) {
Tene Sexygirl: Please don't paste large amounts of content into the channel. 05:33
Sexygirl print $remote "RCPT To:<$to>\r\n"; 05:33
$trash = <$remote>;
Sexygirl print $remote "QUIT\r\n"; 05:33
}
else {
open MAIL, "|$config{'mailprog'}";
print MAIL "To: $to\r\nFrom: $from\r\nSubject: $subject\r\n\r\n$message\r\n\r\n";
Tene Ack! Why won't it stop?!
Sexygirl close MAIL;
}
TimToady obviously you are a mysogynist :) 05:35
std: 42
p6eval std 27249: OUTPUT«ok 00:02 35m␤»
Tene Obviously.
TimToady std: 51 05:38
p6eval std 27249: OUTPUT«ok 00:02 35m␤» 05:39
Tene std: 19
TimToady hmm, maybe I broke it
p6eval std 27249: OUTPUT«ok 00:02 35m␤»
TimToady moritz_: if it doesn't update you might have to glare at it a bit. could just be running out of time compiling the setting additionally, I suppose 05:41
Tene std: 1e17 05:42
p6eval std 27251: OUTPUT«ok 00:02 37m␤»
TimToady aha
moritz_: nm
now running with the new CORE.pm
(probably)
Tene std: 76 05:45
TimToady or rather, the new CORE.setting
p6eval std 27251: OUTPUT«ok 00:02 35m␤» 05:46
dalek ok: 753b231 | (Hinrik Örn Sigurðsson)++ | (2 files):
Fix sharedir path
05:53
ok: 8ae3d00 | (Hinrik Örn Sigurðsson)++ | (4 files):
Bump version to 0.05
literal hm 06:00
is dalek's source in the pugs repo?
pugs_svn r27252 | lwall++ | [STD] missing a filename indirection 06:02
TimToady std: class DEBUG::EXPR {}
p6eval std 27251: OUTPUT«Use of uninitialized value in string eq at STD.pm line 604.␤Argument "CORE.pad" isn't numeric in numeric ne (!=) at STD.pm line 617.␤##### PARSE FAILED #####␤Illegal redeclaration of package symbol EXPR (from CORE.pad line 25) at /tmp/owjngEIF41 line 1:␤------> class
..DEBUG::EX…
pugs_svn r27253 | lwall++ | [CORE.pad] didn't update old pad's filenames to new structure 06:23
r27253 | lwall++ | [STD] undef warning suppression
TimToady std: class DEBUG::EXPR {} 06:24
p6eval std 27252: OUTPUT«Use of uninitialized value in string eq at STD.pm line 605.␤Argument "CORE.pad" isn't numeric in numeric ne (!=) at STD.pm line 618.␤Can't use string ("CORE.pad") as a HASH ref while "strict refs" in use at STD.pm line 619.␤FAILED 00:02 37m␤»
TimToady std: 1 06:28
p6eval std 27252: OUTPUT«ok 00:02 35m␤»
moritz_ std: DEBUG::EXPR {} 06:29
p6eval std 27253: OUTPUT«##### PARSE FAILED #####␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/AE5RLOQp9x line 1:␤------> DEBUG::EXPR {}␤ expecting any of:␤ infix or meta-infix␤ infix stopper␤ standard stopper␤
..terminator␤FAILED …
TimToady std: class DEBUG::EXPR {} 06:31
p6eval std 27253: OUTPUT«##### PARSE FAILED #####␤Illegal redeclaration of package symbol EXPR (from CORE.pad line 26) at /tmp/lUToJTZFEc line 1:␤------> class DEBUG::EXPR {}␤FAILED 00:02 35m␤»
TimToady still not getting the yml file, hang on
pugs_svn r27254 | lwall++ | [STD/Makefile] copy CORE.yml into snap too 06:32
TimToady now it should report file as CORE.setting rather than CORE.pad 06:33
eternaleye phenny: tell moritz_ I have a patch to apply over your infix:<...> patch to add slurpy handling (RT #66826) - dpaste.com/59930/
phenny eternaleye: I'll pass that on when moritz_ is around.
TimToady std: 54 06:34
p6eval std 27253: OUTPUT«ok 00:02 35m␤»
moritz_ eternaleye: thanks
phenny moritz_: 06:33Z <eternaleye> tell moritz_ I have a patch to apply over your infix:<...> patch to add slurpy handling (RT #66826) - dpaste.com/59930/
eternaleye moritz_: No problem. infix:<...> is my favorite bit of Perl 6! 06:35
moritz_ eternaleye: could you please 'git pull --rebase' and generate the patch again? 06:36
TimToady all list infixes are going to have the same signature problem
eternaleye Ack, I knew I forgot something!
TimToady shouldn't be done with slurpies, but with captures, really 06:37
moritz_ eternaleye: the series patch is applied, but a bit modified, so your patch won't apply cleanly, and git-am is a bitch 06:37
TimToady std: 54
p6eval std 27253: OUTPUT«ok 00:02 35m␤»
moritz_ TimToady:
mv lex snap.new
mv: cannot stat `lex': No such file or directory
make: *** [snap] Error 1
from 'make snap' 06:38
eternaleye moritz_: Holy crap, pmichaud++ fixed it! e0a9d869
moritz_ maybe two concurrrent build processes? 06:38
TimToady how can it not have a lex when it depends on lex/STD/termish? 06:39
yeah, maybe 06:40
eternaleye TimToady: so multi sub infix:<...>( |$lhs, Code $generator ) {...} ? 06:41
TimToady something like that 06:42
TimToady std: 54 06:44
p6eval std 27254: OUTPUT«ok 00:02 35m␤»
TimToady std: class DEBUG::EXPR {}
p6eval std 27254: OUTPUT«##### PARSE FAILED #####␤Illegal redeclaration of package symbol EXPR (from CORE.setting line 376) at /tmp/BS4HLuAUgB line 1:␤------> class DEBUG::EXPR {}␤FAILED 00:02 35m␤»
TimToady yay
STD's setting is now a real Perl 6 program 06:45
well, at least the skeleton of one
eesh, 2:45 am
maybe I'm working my way back toward pacific time :) 06:46
it's only 23:45 at home
.zZ(...) 06:47
dalek ok: 8b83721 | (Hinrik Örn Sigurðsson)++ | (3 files):
Add option to print the path to the target file
06:48
ok: b8799f2 | (Hinrik Örn Sigurðsson)++ | (2 files):
Bail out with an error message when target is unknown
eternaleye moritz_: dpaste.com/59932/
The trailing whitespace was still there, so I could almost leave the commit message unchanged ;D
Oh wait, I forgot the blank line! 06:49
(in the commit message)
nevermind, I seem to be going senile a day before my 19th birthday.
Matt-W eternaleye: it happens to all of us eventually... 06:53
moritz_ eternaleye: your patch makes rakudo die on t/spec/S03-operators/series.t 06:59
ok 2 - gcd with infix:<...> (1)
too many arguments passed (3) - 2 params expected
in sub infix:... (t/spec/S03-operators/series.rakudo:20)
pugs_svn r27255 | azawawi++ | [S:H:P6] pointy blocks are now scoped.. 07:00
eternaleye Strange, one sec... 07:01
waiting for Rakudo to build
azawawi TimToady: hi; is there any online slides and/or recording for your 'STD errors reporting' talk at YAPC? 07:02
eternaleye (I have my laptop clocked down to 800MHz since the heatsink barely works)
moritz_ afk 07:06
Su-Shee good morning. 07:38
moritz_ hi 07:39
eternaleye moritz_: moritz_ Oh geez. .params is an Array of Pair, not a Hash. Therefore, string keys don't work the way I thought 07:40
moritz_ rakudo: (-> $a, *@b { }).params.perl.say
p6eval rakudo 6c43f9: OUTPUT«Method 'params' not found for invocant of class 'Block'␤»
moritz_ rakudo: (-> $a, *@b { }).signature.params.perl.say 07:41
p6eval rakudo 6c43f9: OUTPUT«["name" => "\$a", "multi_invocant" => 1, "nom_type" => Object, "type" => Object, "cons_type" => undef, "named" => 0, "slurpy" => 1, "name" => "\@b", "multi_invocant" => 1, "nom_type" => Object, "type" => Object, "cons_type" => undef]␤»
moritz_ nom_type - that was jnthn, no? :-)
looks like it actually should be a list of hashes 07:42
eternaleye So if it was a list of hashes, it would be'if &foo.signature.params.grep( { $_.<slurpy> !~~ undef } )' 07:47
azawawi moritz_: good morning; nearly there gist.github.com/136358 :) 07:49
moritz_ rakudo: (-> *$a { }).signature.params.perl.say 07:53
p6eval rakudo 6c43f9: OUTPUT«["named" => 0, "name" => "\$a", "multi_invocant" => 1, "nom_type" => Object, "type" => Object, "cons_type" => undef]␤»
moritz_ eternaleye: or $_.exists('slurpy') or so 07:54
eternaleye moritz_: That's nicer
moritz_ wait
or $_.key eq 'slurpy'
moritz_ (or .key eq 'slurpy') 07:54
eternaleye Wouldn't that be $_.keys >>eq 'slurpy', for List of Hash? 07:55
As opposed to List of Pair
$_.key eq 'slurpy' works for what is there now, but if it's _supposed_ to be LoH, then implementing something based on how it is would require reactive fixes later 07:56
moritz_ eternaleye: I was just idly musing about LoH 07:57
eternaleye: I don't think there's a documented API yet, so we'll just make it work with whatever is there now 07:58
eternaleye LoH would make much more sense - List indexed by position in the declaration, Hash keyed by property
moritz_ and don't care about possible future changes
or maybe list of Parameter objct, if we define such a thing
eternaleye moritz_: building and testing now 08:00
zulon hello! 08:06
moritz_ hi
zulon I have one question about sigils: 08:07
basically, sigils say "this objects does this role", right?
so, would it be possible to declare new kinds of sigils, saying "this sigil defines this role"?
and defining a "default" class for new variables using this sigils (just like $vars are Scalar by default) 08:08
moritz_ scalars are Object by default
zulon (and btw, I'd like to say that I find your work on Perl 6 and Rakudo and everything else just awesome)
moritz_ but yes, in principle that's possible
zulon how would this be done? 08:09
by altering the current language?
moritz_ aye
zulon ok
moritz_ it's not implemented anywhere, so I can only speculate
the easiest might be a macro 08:10
zulon a macro?
they can be something else than a sub-like call?
azawawi std: class A is B { }; 08:11
moritz_ yes, they can interpolate directly into the AST
p6eval std 27255: OUTPUT«ok 00:02 36m␤»
zulon (I don't feel I explain myself well, sorry)
azawawi std: class A is B{ };
p6eval std 27255: OUTPUT«ok 00:02 36m␤»
moritz_ or you could try to change the grammar in a more straight-forward way
eternaleye rakudo: say { $_ >= 3 ?? () !! $_ + 1 }.signature.params.perl 08:12
p6eval rakudo 6c43f9: OUTPUT«["optional" => 1, "name" => "\$_", "multi_invocant" => 1, "nom_type" => Object, "type" => Object, "cons_type" => undef]␤»
zulon moritz_: by altering the slang (~ twigil)?
I don't really understand how this works 08:13
moritz_ augment slang Main { token sigil:sym<^> { <sym> } }
eternaleye Hm, somthing's odd with my rakudo. It gives "Method 'perl' not found for invocant of class 'ResizablePMCArray'"
zulon hm
this would declare a ^ sigil ?
moritz_ zulon: but I don't know yet how to get the semantics in 08:13
yes
zulon ok
thanks for the answers :) 08:14
azawawi moritz_: what category does 'self' go into in Perl 6?
moritz_: predefined special variable?
moritz_ azawawi: it's not a variable, I think...
it might be a nullary sub call, like rand 08:15
azawawi takes a look at STD
eternaleye moritz_: could you try dpaste.com/59955/ ? compiling takes forever here and it seems my rakudo is being uncooperative
moritz_ eternaleye: sure 08:16
dalek ok: 43447a6 | (Hinrik Örn Sigurðsson)++ | script/grok:
Fix doc typo
moritz_ eternaleye: too many arguments passed (2) - 1 params expected 08:19
in sub Test::plan (Test.pm:40)
called from Main (t/spec/S03-operators/series.rakudo:6)
now that's just weird.
eternaleye The method 'perl' not found thing? 08:20
moritz_ no, "too many arguments passed"
but why the bloody hell in sub Test::plan?
eternaleye moritz_: try running ` say { $_ >= 3 ?? () !! $_ + 1 }.signature.params.perl` - if it jives that error, it's some crazy spooky action at a distance 08:21
*gives
moritz_ Method 'perl' not found for invocant of class 'ResizablePMCArray' 08:22
dalek ok: 1b75748 | (Hinrik Örn Sigurðsson)++ | (4 files):
Specify Pod encoding
ok: bff6a3a | (Hinrik Örn Sigurðsson)++ | (4 files):
Bump version to 0.06
mberends is it humanly possible to catch up 7.5 days of backlog? 08:23
eternaleye moritz_: Well, I have no idea what's going on there
mberends: Possible, yes. Advisable, probably not 08:24
mberends ok, will heed that advice ;)
moritz_ eternaleye: it uses an interal parrot array that's not properly typemapped to a Rakudo array 08:25
s/Rakudo/Perl 6/ 08:26
pugs_svn r27256 | azawawi++ | [S:H:P6] more p5 emitter code cleanup
r27256 | azawawi++ | [S:H:P6] support 'has' and 'self'
r27256 | azawawi++ | [S:H:P6] no more printing of $r as viv
moritz_ but I don't understand why the error is reported that way. 08:27
eternaleye: ah, there's a syntax error in the setting, you forgot the closing quote for 'slurpy' 08:28
eternaleye Urk 08:29
moritz_ the next problem is .grep: {closure } > 0 08:31
eternaleye ... And all for the want of a quote
moritz_ being parse as .grep: ({closure } > 0)
eternaleye Ah, precedence
moritz_ when I fix that 08:33
get_string_keyed() not implemented in class 'Perl6Pair'
in sub infix:... (t/spec/S03-operators/series.rakudo:21)
eternaleye "For want of a quote the setting was lost, for want of a setting the plan was lost, for want of a plan the test was lost, for want of a test the suite was lost, for want of a suite the Perl was lost, and all for the want of a quote" ;D 08:34
moritz_ :-)
huf and my best christmas was also lost 08:36
eternaleye Well, it's 1:40 here, so I'm gonna sleep a bit 08:42
pugs_svn r27257 | azawawi++ | [S:H:P6] Implemented experimental --find-declaration=variable_name,line :) 09:25
pugs_svn r27258 | azawawi++ | [S:H:P6] cleanup and show the line where variable is declared and then used. 09:43
amoc rakudo: subset Even of Int where {$_%2==0}; Code.isa(Even).say 09:46
p6eval rakudo 6c43f9: OUTPUT«sh: ./perl6: No such file or directory␤»
pugs_svn r27259 | azawawi++ | [S:H:P6] Initial stub implementation of --rename-var=OldName,Line,NewName 09:53
amoc rakudo: say 'it works' 09:58
p6eval rakudo 6c43f9: OUTPUT«it works␤»
pugs_svn r27260 | azawawi++ | [S:H:P6] Added A couple of todos and some documentation... 10:04
Mips128 hi 10:05
mberends Mips128: hi 10:06
Mips128 hi mberends
pugs_svn r27261 | azawawi++ | [S:H:P6] refactored code into 'find_variable_declaration' 10:12
wayland76 'night all 10:25
pugs_svn r27262 | azawawi++ | [S:H:P6] more refactoring to support rename variable 10:29
pugs_svn r27263 | azawawi++ | [S:H:P6] Perl 6 rename lexical variable for all occurrences is online :) Some bugs still exist in some cases. 12:05
r27263 | azawawi++ | [S:H:P6] So be warned. This is an experimental viv STD-based refactoring tool.
azawawi Sample run of experimental refactoring tool: gist.github.com/136440 12:06
moritz_ nice 12:12
masak ahoj, Friday-camels! 12:15
phenny masak: 00:41Z <ingy> tell masak I wanted help on a TestML port. First anyway.
masak phenny: tell ingy I'd be happy to help. where do I sign up? 12:16
phenny masak: I'll pass that on when ingy is around.
masak seems ingy and I only talk through bots nowadays.
not that I mind. :)
TimToady feels more like a Friday camel-patty
TimToady nothing about 4 gallons of coffee won't cure 12:18
amoc +« $◎ while 1; #[The Onion is still getting larger!]
TimToady std: +« $◎ while 1; #[The Onion is still getting larger!]
p6eval std 27262: OUTPUT«##### PARSE FAILED #####␤Anonymous variable requires declarator at /tmp/ELPgcabqSe line 1:␤------> +« $◎ while 1; #[The Onion is still getting ␤ expecting twigil␤FAILED 00:02 38m␤»
TimToady it doesn't think it's alpha, probably 12:19
azawawi shouts "Perl 6 Find variable declaration and Rename variable is online" :)
moritz_ azawawi: now make that a web service... :-) 12:20
azawawi moritz_:sure; once i refactor the refactoring tool :) 12:20
amoc std: my $◎=1,2,3; +« $◎; say ~$◎; #test?
p6eval std 27263: OUTPUT«##### PARSE FAILED #####␤Syntax error (two terms in a row?) at /tmp/xJ7OIfiFYC line 1:␤------> my $◎=1,2,3; +« $◎; say ~$◎; #test?␤ expecting any of:␤ POST␤ infix or meta-infix␤ infix stopper␤ postfix␤ postfix_prefix_meta_operator␤ shape 12:21
..definition␤ standard stoppe…
masak not a very precise error...
amoc std: my $◎=1,2,3; $◎ >>+>> 1; say ~$◎; #may i test again
p6eval std 27263: OUTPUT«##### PARSE FAILED #####␤Syntax error (two terms in a row?) at /tmp/HDZOakuXN6 line 1:␤------> my $◎=1,2,3; $◎ >>+>> 1; say ~$◎; #may i tes␤ expecting any of:␤ POST␤ infix or meta-infix␤ infix stopper␤ postfix␤ postfix_prefix_meta_operator␤
..shape definition␤ standa…
masak amoc: the syntax error is already in the declaration.
amoc er... 12:23
TimToady std: my $ 42
p6eval std 27263: OUTPUT«##### PARSE FAILED #####␤Syntax error (two terms in a row?) at /tmp/bJvlhxqzGM line 1:␤------> my $ 42␤ expecting any of:␤ infix or meta-infix␤ infix stopper␤ standard stopper␤ statement modifier loop␤ terminator␤ trait␤FAILED 00:02 36m␤»
TimToady same error
std: my $ = 42; 12:24
p6eval std 27263: OUTPUT«ok 00:02 36m␤»
TimToady std: my $; 42
amoc std: my $onion=1,2,3; $onion >>+>> 1; say ~$onion; #aha
p6eval std 27263: OUTPUT«##### PARSE FAILED #####␤Obsolete use of $; variable; in Perl 6 please use real multidimensional hashes instead at /tmp/TOLqKURPmQ line 1:␤------> my $; 42␤FAILED 00:02 36m␤»
std 27263: OUTPUT«ok 00:03 40m␤»
TimToady you win
masak the onion takes the game! 12:25
amoc i win! thanks!
TimToady std: constant term:<◎> = 1,2,3; say ~◎; 12:26
p6eval std 27263: OUTPUT«##### PARSE FAILED #####␤Can't understand next input--giving up at /tmp/XcjLybtzmI line 1:␤------> constant term:<◎> = 1,2,3; say ~◎;␤ expecting any of:␤ noun␤ prefix or meta-prefix␤ prefix or noun␤ prefix_postfix_meta_operator␤
..whitespace␤FAILED 00:03 39m␤»
TimToady std: constant term:<◎> = 1,2,3; say ~term:<◎>;
p6eval std 27263: OUTPUT«ok 00:03 39m␤»
TimToady well, term doesn't macroize correctly yet 12:27
not way up there on my list of priorities :)
esp pre coffee 12:28
shower &
masak someone should start a Perl 6 implementation which focused on exploring the macro aspects of Perl 6.
sbp masak: how do you mean? 12:29
masak sbp: I don't know exactly, but even with very few other features, it'd be interesting to explore how defining and using macros will work in practice. 12:30
masak my feeling is that (just like with other parts of the spec so far) an implementation will drive the spec forward in this case. 12:30
sbp yeah, I don't even know how the rest of the spec will work together yet
moritz_ masak: that's a good idea actually.... 12:31
lichtkind masak: you don't even in #now? :)
masak lichtkind: I'm sorry, could you try and rephrase that? 12:32
(it seems there's a verb missing before 'in'.)
lichtkind masak: i mean the november channel but today i have good excuse having patch on my finger
masak I'm actually more confused by that explanation. 12:33
sbp I suppose he meant #nov[ember]?
but typed now due to a plaster on his finger 12:34
lichtkind sbp: yes
sbp is smart
masak sbp: I bow to your superior reading-between-the-lines capabilities. 12:35
sbp \㋡/ 12:36
azawawi TimToady: can viv output pod_comments? It does not seem to do that right now.
sbp macro circumfix:«<!-- -->» ($text) is parsed / .*? / { "" } 12:38
how does this commentify the input?
I don't see where the commentisation enters
sbp oh wait, now I do... 12:38
all it's saying is: when you see <!-- ... -->, change that to "" 12:39
moritz_ it takes care that it returns an empty syntax tree
sbp yeah
so are regular comments really empty in the syntax tree?
moritz_ in the AST at least 12:40
masak what if I actually wanted to harvest information out of a comment? 12:41
sbp I made a programming langauge once that had throwaway comments, and comments which you could harvest. I think that might have been based on the two different types of comments in XQuery; or possibly on Masahide Kanzaki's XSLT documentation tools 12:43
moritz_ masak: dunno, tell it to match with the :keepall modifier? 12:45
masak that might work. 12:47
moritz_ the problem right now is that comments are matched by implicit <.ws> rules, so they don't capture by defintion 12:48
mkfort why is it that I always see boxes in p6eval output. I've set up unicode rxvt, utf-8 screen , utf-8 irssi, the best fonts I can find. It's frustrating
moritz_ so another thing you could do is override the default ws method to conditionally capture things in contexxt variables, or so
mkfort: does your browser display it correctly on irclog.perlgeek.de/perl6/today ? 12:49
mkfort: it's a N/L character indicating a newline
U+2424 SYMBOL FOR NEWLINE 12:50
mkfort ah
TimToady :keepall is probably going away
mkfort I guess terminus and dina don't have that char? at lest I know what it is now 12:51
moritz_ TimToady: so comments should be extracted from .chunks, or so?
TimToady you can always get the comments the way viv -6 does
if you have the original string, and know the positions of the ends, you can always substr 12:52
well, maybe that gets more complicated with textual macros though...
sbp TimToady: viv -6? 12:53
TimToady spits back out the original Perl 6
and viv -5 is a start on spittout out Perl 5 so we can replace gimme5
*spitting
masak is excited by that
I should take those switches for a test run. 12:54
sbp ah, I see it. thanks
azawawi TimToady: i used emit_p5 and removed fixpod... 12:55
TimToady: i guess this voids the warranty :)
TimToady I am a raging bull, and trample anything in my path :) 12:55
especially since I still haven't had my coffee... 12:56
biab &
azawawi literal: ping 13:05
Matt-W hates to think what TimToady is like when he has had his coffee 13:20
TimToady hates to think 13:22
TimToady with or without coffee 13:22
Matt-W Could've fooled me
You still manage to do plenty of it
TimToady it's an accident
Matt-W So this is why you wanted to get the community into the Perl 6 design process then - so you wouldn't have to think about it so much 13:23
TimToady you're catching on
Matt-W Glad to know all this C++ hasn't completely rotted my brain then 13:25
TimToady std: my $x = new Cat('cable'); 13:26
p6eval std 27263: OUTPUT«##### PARSE FAILED #####␤Obsolete use of C++ constructor syntax; in Perl 6 please use method call syntax instead at /tmp/JEVYO6jlwd line 1:␤------> my $x = new Cat('cable');␤FAILED 00:02 36m␤»
Matt-W I like the way it says 'obsolete'
It makes me feel so much better about my day job
'I don't mind that this code is awful, because it's written in an obsolete language anyway'
(right know I really am feeling the lack of regexps, and would much rather be trying to do more improbable things with mixins) 13:27
[bjoern] lisppaste3: url? 13:42
lisppaste3 To use the lisppaste bot, visit paste.lisp.org/new/perl6 and enter your paste.
lisppaste3 [bjoern] pasted "Quick and dirty Perl6 grammar for ABNF (auto-generated)" at paste.lisp.org/display/82550 13:43
PerlJam [bjoern]: don't you really want most of those () to be [] ? 13:45
[bjoern] If it's not "all" then there is a problem with making that decision in the generator
PerlJam Well, I was going to say "all", but I haven't looked at the grammar close enough to be sure. 13:46
TimToady and you can simplify most of the quantifiers to ?, *, or +
[bjoern] conditionals for that are very verbose in XSLT 1.0 syntax, unfortunately... 13:47
(it's generated via an XSLT transformation) 13:48
TimToady this is #perl6, so we won't provide much sympathy :P
PerlJam [bjoern]: while the auto-generated ABNF grammar is neat, a hand-tooled one would be neater (and probably simpler and easier for humans to read)
[bjoern] My purpose is learning Rules, this is just a by-product... 13:50
TimToady given there are no $0 or $1, () to [] seems safe
unless you want them externaly, of course
[bjoern] Well for, say, 13:51
regex defined_as {
((<c_wsp>) ** 0..*('=' | '=/')(<c_wsp>) ** 0..*)
};
the distinction between = and =/ is important
TimToady well, volleyball principle then: better too many than too few (going for the ball)
sbp is there an ABNF test suite? 13:52
PerlJam all those parens make my eyes twitch a little :)
sbp have you run the grammar against any test suite?
TimToady but '** 0..*' ==> '*' is a no-brainer, even if you have to do it with a s/// postprocessor
[bjoern] I'm hoping someone's gonna write a grammar pretty printer :-) 13:53
TimToady as I mentioned, it would be an easy variant of viv -6
[bjoern] I don't know of an ABNF test suite
TimToady just tweak the whitespace as it's coming out
sbp you mean to say the IETF published a language specification with no test suite?
presumably the IETF would not do such a thing
TimToady they've only proven it correct 13:54
sbp you cast slanders, sir. slanders
heh, heh
(the concorde principle)
[bjoern] By test suite I meant something easily automatable
Clearly the RFC series has many sample grammars... 13:55
sbp what about DanC's Javascript thing?
usually he writes test suites for everything
that guy probably writes a test suite for blowing his nose
[bjoern] Principle of Staying Away from DanC's Scribblings. 13:56
sbp hehe 13:57
I can't even find it. it was supposedly here;
http:// homer.w3.org/~connolly/projects/ur...inker.html
s/;/:/
amoc i dont see about 'operator precedences' for user-defined operators in the Synopsis.
moritz_ amoc: grep for 'is tighter' 13:58
PerlJam amoc: there's not something that talks about "is tighter" or "is looser" ?
amoc moritz_: thank you so much!
PerlJam: thanks!
sbp is you specify a discontinuous range of tightness, is that an error or passed over in silence? 13:59
moritz_ range of tightness?
what are you talking about?
sbp tighter than X, looser than Y, where Y is looser than X
moritz_ you only specify one
[bjoern] s/is/if/ 14:00
sbp ah
no, wait, you're wrong
"Both C<tighter> and C<looser> may be specified"
PerlJam you can still do A is tighter than B is tigher than C is looser than A loops
moritz_ one(<tighter looser equiv>)
hm.
sbp S06:1679
moritz_ I don't see much sense in that.
PerlJam right. 14:01
perl allows it though
(at least AFAIK)
sbp I suppose it doesn't matter too much 14:01
people can do things like:
if (a < 0) and (a > 10)
but with integers it's clear. with operator tightness... 14:02
PerlJam sbp: it's one of those "doctor it hurts when I do this" scenarios. Maybe Perl should warn if it can.
And Perl shoudl be able to warn, so forget that I said maybe :) 14:03
pmichaud on my way to cmu for a tour, then to vacation for a few days. I'll be around off-and-on for the weekend 14:04
sbp enjoy, pmichaud
moritz_ pmichaud: have the appropriate amount of fun :-)
pmichaud PerlJam: got a moment?
PerlJam pmichaud: Have more than an appropriate amount of fun :)
pmichaud: sure. 14:05
masak perl6: sub foo($a) { say $a }; foo ("OH HAI") 14:07
p6eval elf 27263, pugs, rakudo 6c43f9: OUTPUT«OH HAI␤»
amoc perl6: sub foo { .say; }; foo; foo(); foo('hi') 14:09
p6eval elf 27263: OUTPUT«Use of uninitialized value in concatenation (.) or string at ./elf_h line 5105.␤syntax error at (eval 127) line 5, near "{->say"␤ at ./elf_h line 5881␤»
..rakudo 6c43f9: OUTPUT«Use of uninitialized value␤␤Use of uninitialized value␤␤Use of uninitialized value␤␤»
..pugs: OUTPUT«␤␤␤»
moritz_ mildew: sub foo($a) { say $a }; foo ("OH HAI")
sbp rakudo: {{{{{say $^h}($^e)}($^l)}($^l)}($^o)}("hello")
p6eval mildew: OUTPUT«OH HAI␤»
rakudo 6c43f9: OUTPUT«hello␤»
TimToady perl6: sub foo($a) { say ~$a }; foo "OH", "HAI" 14:10
p6eval rakudo 6c43f9: OUTPUT«too many arguments passed (2) - 1 params expected␤in sub foo (/tmp/lM03uW1UGk:1)␤called from Main (/tmp/lM03uW1UGk:2)␤» 14:11
..elf 27263, pugs: OUTPUT«OH␤»
TimToady good, S06 is wrong, but rakudo is right
masak specbug!
PerlJam rakudo++ 14:12
TimToady perl6: sub foo($a) { '' }; say ~(foo "OH", "HAI")
p6eval rakudo 6c43f9: OUTPUT«too many arguments passed (2) - 1 params expected␤in sub foo (/tmp/Fwup2HT1ON:1)␤called from Main (/tmp/Fwup2HT1ON:2)␤»
..pugs: OUTPUT« HAI␤»
..elf 27263: OUTPUT«␤»
masak o_O
pmichaud yay, rakudo! 14:13
TimToady unfortunately, pugs is following the spec :/
masak nay, Pugs!
don't follow the spec! :)
amoc o_o...
sbp would ask which bit of S06, but expects the answer to be reported shortly by pugs_svn anyway... 14:14
pmichaud afk for a while (driving) 14:15
moritz_ TimToady: uhm, weren't prototypes abolished? 14:16
sbp rakudo: say &infix:<+>.assuming(1)(2) 14:27
p6eval rakudo 6c43f9: OUTPUT«Method 'assuming' not found for invocant of class 'MultiSub'␤»
sbp I thought this bug had been reported, recently
but I can't find it here: rt.perl.org/rt3/Public/Search/Simpl...q=assuming
any pointers?
moritz_ I can't find it either 14:29
so I guess it's not reported yet
is .assuming defined on multis? 14:30
[bjoern] "Every Callable object has a .assuming method." 14:31
moritz_ ok
masak rakudo: my $a = :x[] 14:35
p6eval rakudo 6c43f9: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/NI6qQ2mYNL:2)␤»
masak submits rakuodbug
pugs_svn r27264 | lwall++ | [S06] only prefix:<foo> makes named unary, not sub foo ($) 14:37
PerlJam weird. I thought that had made it into the spec long ago. 14:38
moritz_ too
TimToady maybe it has it right somewhere else in the spec
the synopses contain lots of misplaced advice :) 14:39
TimToady &foo represents a single object even when there are multiple candidates, so basically .assuming just has to grep the candidate list hidden inside &foo 14:41
sbp dev.pugscode.org/changeset/27264 14:42
masak rakudo: :x[] 14:46
p6eval rakudo 6c43f9: OUTPUT«sh: ./perl6: No such file or directory␤»
masak rakudo: :x[] 14:51
p6eval rakudo 6c43f9: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/6lXbTh3ks4:2)␤»
huf what's PMC? 14:52
sbp should &infix:<+>.assuming(1, 2) work too?
doesn't make much sense to assume all args, but...
jlaire huf: Parrot Magic Cookie 14:52
masak huf: a PMC is a thing inside Parrot that breaks when we do naughty things with Rakudo.
a Null PMC access means I get to submit an RT ticket for free! \o/ 14:53
huf where can i read about this? parrot docs? 14:54
masak huf: yeah. 14:55
PerlJam huf: parrot/docs/pdds/pdd17_pmc.pod 14:56
huf thanks 14:58
sbp hmm. ./src/pmc/perl6multisub.pmc lines 1009-1030 14:59
looks like you get the candidate to invoke
but have to copy a tonne of attributes to it that might have gone walkies
rakudo: say &infix:<+>.perl; 15:00
p6eval rakudo 6c43f9: OUTPUT«{ ... }␤»
sbp .gc wobload 15:01
phenny wobload: 4
sbp finds the assuming definition at ./src/classes/Code.pir lines 100-121 15:02
sbp rakudo: sub plus($a, $b) { return $a + $b }; say assuming(&plus, 1)(2); 15:03
p6eval rakudo 6c43f9: OUTPUT«Could not find non-existent sub assuming␤»
sbp -- 15:05
This file sets up the Perl 6 C<Code> class, the base class
for executable objects.
--
so I guess MultiSub is something more primitive, dispatches to the right Code to invoke... 15:06
moritz_ s/more primitive/different/ ;-)
sbp rakudo: say &infix:<+>.invoke; 15:12
p6eval rakudo 6c43f9: OUTPUT«Method 'invoke' not found for invocant of class 'MultiSub'␤»
moritz_ rakudo: say &infix:<+>(2, 3) 15:14
p6eval rakudo 6c43f9: OUTPUT«5␤»
moritz_ invoke is just the name of the parrot vtable method, ie an implementation detail that should not be exposed 15:15
sbp yeah, just trying to figure out how this works 15:16
I mean, there's a Code.assume
but then TimToady said: 15:40 <TimToady> &foo represents a single object even when there are multiple candidates, so basically .assuming just has to grep the candidate list hidden inside &foo
which I don't get, because I figure that MultiSub should just be minimally wrapping, and handing back a Code object that represents what we actually wanted to refer to 15:17
so obviously I don't understand something (many things)
sbp I was trying to work out why .perl works but .assuming doesn't 15:18
I presume .perl comes from MultiSub, or its superclasses, which is in parrot rather than rakudo 15:19
lichtkind whats the difference between m// and rx//, the one performs regex, second just creates it? 15:20
moritz_ sounds reasonable
sbp but of course, that .perl works and .invoke doesn't means it's not just the C-level methods that are being exposed in rakudo's perl6
moritz_ but in rakudo/parrot things don't need reasons not to work 15:20
lichtkind: aye 15:21
lichtkind moritz_: thanks
sbp takes that point on board... :-)
lichtkind moritz_: but s/// can do both?
masak lichtkind: no. 15:22
lichtkind: it always executes a substitution.
moritz_ right
lichtkind so i store a subst regex also with rx ? 15:23
moritz_ a "subst regex" is just a normal regex
and you can say $str.subst($regex, { substittuion closure }) 15:24
lichtkind moritz_: true, cool now im crealrer on that
clearer
hej p6 is cool 15:25
it makes actually sense
moritz_ that's what I thought at first, too ;-)
sbp rakudo: say &infix:<+>.WHAT; 15:28
p6eval rakudo 6c43f9: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/QQl1FMW8om:2)␤»
sbp rakudo: say &infix:<+>.HOW;
p6eval rakudo 6c43f9: OUTPUT«Null PMC access in isa()␤in Main (/tmp/98iXfEMUj0:2)␤» 15:29
moritz_ rakudo: &infix:<+>.PARROT
p6eval rakudo 6c43f9: ( no output )
moritz_ rakudo: say &infix:<+>.PARROT
p6eval rakudo 6c43f9: OUTPUT«MultiSub␤»
sbp reads parrot/docs/book/ch03_pir.pod 15:35
masak misses jnthn 15:38
pugs_svn r27265 | lwall++ | [Spec] treat all authors equally
r27265 | lwall++ | [Spec] make whitespace unugly
r27265 | lwall++ | [Spec] rename Date to Created
r27265 | lwall++ | [Spec] separate header things you edit from Created
sbp rakudo: say 'a' + { ... }; 15:41
p6eval rakudo 6c43f9: OUTPUT«get_number() not implemented in class 'Sub'␤in Main (/tmp/5VfX5dvDGM:2)␤»
sbp funny
moritz_ aye, it should be Block, not Sub ;-) 15:42
sbp and I was hoping for it to blow up around +, not { ... } casting... :-)
moritz_ uhm, how so?
rakudo: say 'a' + { 1 }; 15:43
p6eval rakudo 6c43f9: OUTPUT«get_number() not implemented in class 'Sub'␤in Main (/tmp/2k1SXY3Ze2:2)␤»
moritz_ + as an (Any, Any) variant
sbp I was hoping to get information about where + is defined
moritz_ + has an (Any, Any) variant
sbp right. didn't know there'd be an (Any, Any)
moritz_ which tries to numify its operands
sbp aye
masak rakudo: sub infix:<wtf>($a, $b) { $a ~ "WTF" ~ $b }; say [wtf] <OMG BBQ PONIES>; 15:46
p6eval rakudo 6c43f9: OUTPUT«sh: ./perl6: No such file or directory␤»
masak g'ah!
PerlJam masak: OMGWTFBBQWTFPONIES 15:47
PerlJam takes off his perl6 interpreter hat. 15:48
masak PerlJam: yep. I just felt like hearing p6eval say it. but thanks. :)
rakudo: sub infix:<wtf>($a, $b) { $a ~ "WTF" ~ $b }; say [wtf] <OMG BBQ PONIES>;
p6eval rakudo 6c43f9: OUTPUT«OMGWTFBBQWTFPONIES␤»
masak :D
rakudo++ 15:49
PerlJam random thought: you know how rules have significant whitespace ... I wonder how useful it would be to have a construct that's like that but in reverse. An implied join(" ") 15:50
I guess I could always define one of those myself.
But often @array.join(",") is really written (poorly) as a loop in other languages and then they remove the extra , that got tacked on the end. 15:51
sbp hmm: ./src/builtins/op.pir:.sub 'infix:+' :multi(_,_) 15:52
this is very simple, so I guess the get_number stuff happens in parrot
PerlJam anyway, we already have many adequate ways to do this. for some reason I wanted some implied-spaces syntax when I say masak's OMG WTF
s/say/saw/ 15:53
masak PerlJam: <some-rule> ** ','
PerlJam masak: not the pattern matching, but the generating stuff with spaces in between.
moritz_ like array stringification?
masak how would that be different from .join?
PerlJam or s/spaces/some arbitrary characters/
moritz_ rakudo: say ~<a b c> 15:54
p6eval rakudo 6c43f9: OUTPUT«a b c␤»
PerlJam masak: it's not. I'm just ruminating on yet another way.
moritz_ rakudo: say <a b c>.join
p6eval rakudo 6c43f9: OUTPUT«abc␤»
PerlJam er, moritz_
too
amoc rakudo: sub infix:<wtf>($a, $b) { $a, "WTF", $b }; say ~( [wtf] <OMG BBQ PONIES> );
p6eval rakudo 6c43f9: OUTPUT«OMG WTF BBQ WTF PONIES␤»
sbp hmm, I see
PerlJam amoc++
sbp Code is defined at the perl6 level
amoc yey
sbp but Sub is defined at the parrot level
so if you want .assuming on all callables, that's not something that you can go to any one place to fix 15:55
PerlJam sbp: until you refactor the code such that that's possible. :)
sbp well, quite...
moritz_ rakudo: say Sub ~~ Callable
p6eval rakudo 6c43f9: OUTPUT«1␤» 15:56
moritz_ rakudo: say Code ~~ Callable
p6eval rakudo 6c43f9: OUTPUT«1␤»
moritz_ rakudo: say Sub ~~ Code
p6eval rakudo 6c43f9: OUTPUT«1␤»
moritz_ rakudo: say { $^a + $^b}.assuming(1).(3)
p6eval rakudo 6c43f9: OUTPUT«4␤»
PerlJam I think the real problem is here ... 15:58
rakudo: say &infix:<+>.WHAT
p6eval rakudo 6c43f9: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/UexpI5KPaU:2)␤»
PerlJam rakudo: multi sub foo($a) { say "ONE"; } ; multi sub foo ($a,$b) { say "TWO"; }; &foo.assuming(1,2).(); 16:00
moritz_ the problem is that from Perl 6 the built-in operators don't look like normal objects
p6eval rakudo 6c43f9: OUTPUT«TWO␤»
PerlJam right
sbp rakudo: MultiSub
p6eval rakudo 6c43f9: OUTPUT«Could not find non-existent sub MultiSub␤»
PerlJam rakudo: multi sub foo($a) { say "ONE"; } ; multi sub foo ($a,$b) { say "TWO"; }; say &foo.WHAT; 16:01
p6eval rakudo 6c43f9: OUTPUT«Multi()␤»
sbp ah!
so &infix:<+> should be a Multi instance
but actually it's a parrot:MultiSub instance? 16:02
PerlJam something like that.
amoc rakudo: 4.does(Int).say; 4.isa(Int).say; # out-topic 16:03
lichtkind mberends: howdy
p6eval rakudo 6c43f9: OUTPUT«1␤1␤»
amoc rakudo: subset Even is Int where { $_ % 2 == 0}; 3.does(Even).say
p6eval rakudo 6c43f9: OUTPUT«Statement not terminated properly at line 2, near "is Int whe"␤in Main (src/gen_setting.pm:3225)␤»
amoc s/out-topic/off-topic/; 16:04
masak amoc: 'of'.
moritz_ perl 6 is not of-topic here ;-) 16:04
*off 16:05
amoc i see! >_<
moritz_ rakudo: class NotAny is Object { }; sub a($x) { say "alive" }; a(NotAny.new) 16:06
p6eval rakudo 6c43f9: OUTPUT«Could not build C3 linearization: ambiguous hierarchy␤in Main (/tmp/bYubaR8GCk:2)␤»
moritz_ bug!
moritz_ rakudo: class NotAny is Object { }; 16:07
p6eval rakudo 6c43f9: OUTPUT«Could not build C3 linearization: ambiguous hierarchy␤in Main (/tmp/dXMaaubcDg:2)␤»
PerlJam that's a parrot bug even 16:08
(maybe)
masak submits 16:12
moritz_ masak: I did alredy 16:13
masak oh, ok.
moritz_ (sorry to meddle with your realm ;) 16:14
masak no problem; but please indicate in-channel next time. :)
moritz_ ok, will do.
kolibrie TimToady: using Cursor.pmc's parse, how can I specify that I want to match the first occurrance of a token after some position? (match at some unknown point not at the beginning of the string) 19:28
kolibrie TimToady: I also noticed that gimme5 translates 'grammar Hello' nicely, but not 'grammar Hello::World' (it does not turn into 'package Hello::World', and the 'use YAML::Syck' line is not added) 19:32
TimToady <?{ self.pos > 42 }> 19:37
er
make that <?{ $¢.pos > 42 }>
current continuation, not the self at the top of the rule... 19:38
TimToady (immutable semantics says those are probably not the same object) 19:38
((if you've already matched something))
kolibrie TimToady: where do I put that? in my rule? 19:40
TimToady yes, it's just an assertion that runs code 19:42
^ is equivalent to <?{ $¢.pod == 0 }> 19:43
.pos rather
TimToady have a fix for the other, checking 19:43
amoc er...
kolibrie TimToady: and if I match, and want to continue where I left off, where is my current pos stored? 19:44
amoc rakudo: my @list = 5,2,"9",True; say @list.sort: { $^a cmp $^b };
p6eval rakudo 6c43f9: OUTPUT«1259␤»
amoc rakudo: Code cmp 4; 19:45
p6eval rakudo 6c43f9: OUTPUT«Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I'␤in Main (/tmp/pXqBGHdfLN:2)␤»
amoc rakudo: my @list = 1,2,Code; say @list.sort: { $^a cmp $^b };
p6eval rakudo 6c43f9: OUTPUT«sh: ./perl6: No such file or directory␤»
TimToady whatever you've just captured, $<foo>.pos 19:45
or { $somevar = $¢.pos } 19:46
amoc the last code emits sth like: *** glibc detected *** rakudo-current: corrupted double-linked list: 0x093ffb30 ***
TimToady where top of rule has :my $somevar; perhaps
amoc submits rakudobug anyway = 19:47
kolibrie TimToady: something like this? rule TOP { <?{ $?.pos >= $<TOP>.pos }> }
pugs_svn r27266 | lwall++ | [gimme5] allow grammar Foo::Bar 19:48
TimToady I think you're not seeing my cent sign
it's not a ?
kolibrie no cent sign here
TimToady when I say ¢, it should be a cent sign 19:49
kolibrie normally sees utf8 just fine
TimToady you can't ref $<TOP> from inside $<TOP>
er, inside TOP
it's not bound to $<TOP> till someone calls <TOP> 19:50
kolibrie I was thinking that. Really I just want :continue (outside my grammar) 19:51
kolibrie pulls r27266
TimToady then you can feed the previous $result in as long as it's still a Cursor and call $result.TOP to continue 19:53
which is basically what the whole grammar is doing to itself all the time 19:55
kolibrie so I take the result from my previous match, and call the TOP (or whatever token I want) on that, instead of calling 'parse' again?
TimToady yes 19:59
the result of a match is simultaneously a Match object, a Cursor object, and a grammar object representing the current language 20:00
kolibrie and to make it skip over non-matching stuff until it gets to the next match, I need to add that line to my rule 20:01
TimToady yes
whichever rule you call, doesn't have to be TOP
kolibrie rule TOP { <?{ $¢.pos >= 0 }> } 20:02
pugs_svn r27267 | kyle++ | [t/spec] Test for RT 54804
kolibrie but in real Perl 6, I should be able to specify that behavior outside my rule by how I call it 20:03
TimToady yes
PerlJam "real Perl 6"? 20:04
kolibrie PerlJam: I'm using gimme5 right now 20:05
TimToady++ # r27266 20:06
TimToady: unfortunately, when I put in that .pos >= 0, I get these kinds of errors: "my" variable $self masks earlier declaration in same scope at ... 20:08
TimToady that usually means you have a missing } 20:09
look for and error message with an earlier line number
*an
or look at what you just changed :)
kolibrie TimToady: here it is: 'Can't modify anonymous list ([]) in list assignment at ..., near "}"' 20:11
and that line is translated weirdly: scalar(do { [qw(?{ $¢.pos )]= 0 }, $C); 20:12
TimToady: nevermind - I had pasted the whole 'rule ...' inside the rule 20:14
the match comes back instantly and is not successful, but when I put the string to match at pos 0, then it matches 20:18
Tene TimToady: got a minute to talk about parsing issues? 20:26
TimToady well, the minutes all come out of the same bag in the long run
Tene TimToady: The Perl 6 grammar is ambiguous about type names vs. function calls, or something, yes? Rakudo, for example, registers class and module names when it parses them and uses those registrations when trying to decide how to parse other things. 20:27
kolibrie TimToady: now I am calling $result->TOP, in a while loop, and it seems to be working 20:28
Tene "Foo::Bar" is parsed differently depending on whether there had been a previous "module Foo::Bar {}" or not, yes? 20:29
TimToady correct 20:31
typenames are treated as standalone terms
we fudge the symbol table to not care which way Foo::Bar() is parsed, however
we don't bother to fudge constants however, so pi() is not going to find the constant 20:32
likewise enums
Tene So, if I dynamically define a namespace at runtime, like with "Foo{$name} := Bar;" or something vaguely like that, should I then be able to call Foo::Bar.new(), or does that need to be ::Foo::Bar.new()?
TimToady has to be ::Foo::Bar if it's not known 20:33
Tene Okay.
TimToady but if it's not known, how do you know to write Foo::Bar ;)
(yes, I know, generic code might be written beforehand...) 20:34
Tene What if the former happened at compile time, before Foo::Bar was parsed?
Is it okay for a Perl 6 to allow that?
TimToady you can always say class Foo::Bar {...} to stub it first also 20:35
well, in theory
the former?
note however that ::Foo means something different within a signature
it means capture the type from the argument
so you have to do the stub declaration if you want to forward reference Foo in a sig 20:36
kolibrie TimToady: hmm, well, it works so long as the string to match is only preceeded by whitespace. As soon as I put any non-space character before it in the string, the match is never successful 20:37
actually, when there is only whitespace in front, it still works without that extra line, so that means that 'rule' is working correctly with whitespace 20:38
but the .pos line is not helping
TimToady sorry, completely borked STD on my system, so I'm a bit distracted :) 20:40
kolibrie no problem - a borked STD needs fixing, definitely 20:41
alester I'm looking for some input, please 20:48
nopaste.com/p/aChIBPMr7
phenny alester: 25 Jun 12:04Z <moritz_> ask alester could you please give me enough privileges to delete spam comments on rakudo.org? (or clean it up yourself, if you have too much time ;-)
alester I'm about to run that on Perlbuz
moritz_: Example of spam comments?
PerlJam alester: that's funny because I already tend to do that these days. So ++ 20:50
alester any enhancements to the text?
PerlJam alester: no. It reads well. 20:51
alester thanks
TimToady for the last 9 years, when I say "Perl", I mean both :)
alester that's just you
You're kinda special.
TimToady Perl and the Art of Motorcycle Destruction 20:52
PerlJam These days when I say "Perl" I'm usually talking about Perl 6, but occasionally I'll mean both (especially when I'm talking about unchanged principles :)
But ambiguity is nice :)
japhb alester: Agreed with PerlJam. I've been doing that for months, not for just keeping Perl 6 in people's brains, but because I talk about both so often that if I don't say "Perl 6" and "Perl 5" (especially >= 5.10) I will hopelessly confuse people. :-) 20:53
moritz_ alester: rakudo.org/node/45#comments
literal alester: I'm wondering why you picked the year 2002 there
moritz_ alester: rakudo.org/node/44#comments
literal I thought the Perl 6 design process began in 2000, and implementation (pugs) in 2005 20:54
PerlJam literal: depends on what you really mean by "in development". Designing is not developing to some but to others it is. 20:55
literal yeah, but something must have caused him to pick 2002, and I'm curious :)
PerlJam literal: and you could say that Perl 6 is the entire reason that parrot even exists.
alester perl FAQ says 2002 is when imp started.
PerlJam literal: when did parrot start again? :) 20:56
and there was an early perl5->perl6 translator someone did in perl 5 back then that fell to the wayside. I wonder when that one was started? 20:57
alester so I should say 2000? 20:58
literal the design has definitely been ongoing since then (the RFCs, etc), don't know about development...
alester spam deleted.
moritz_ alester: thanks 20:59
alester ok gonna publish, with the headline "Let's start saying "Perl 5" to help promote Perl 6." 21:00
kolibrie goes camping &
alester wjat's the % of tests passing these days? 21:10
moritz_ % of what? existing tests?
alester yeah, the spec test
[bjoern] In a grammar, is there a way to say for a regex, never capture this, as opposed to making all the <refs> to it non-capturing?
moritz_ alester: 68%
11548/16909 21:11
[bjoern] (for example, you may allow comments in many places but always want to have them ignored)
moritz_ [bjoern]: not that I know 21:12
pugs_svn r27268 | moritz++ | [t/spec] move eqv.t to S03-operators/ where I'd expect it 21:13
[bjoern] okay
PerlJam [bjoern]: though that does seem like a useful addition. 21:15
moritz_ it requires knowlege of the callee side when you look at the caller 21:16
pugs_svn r27269 | moritz++ | [t/spec] tests for LTM and action methods 21:27
eternaleye TimToady: In talking with moritz_++, we came across that the .params method on a Signature returns an Array of Pair. The problem with this is that it's not exactly clear which elements/properties belong to which parameters. I think waht would make the most sense would probably be a List (indexed by position in the declaration, cf S06:767) of Hash (keyed by property, eg slurpy, positional, named, etc). This would allow an easy 21:31
check for slurpies in, say, infix:<...> by using 'if +&generator.signature.params.grep( *.<slurpy> )'
It's also decidedly clumsy to pull keyed info out of an Array of Pair 21:32
(potentially s/List/Capture/) 21:34
lisppaste3 [bjoern] annotated #82550 "Slightly cleaned up version of ABNF grammar" at paste.lisp.org/display/82550#1
eternaleye [bjoern]: you can make a subrule not capture with a leading dot. For instance, <foo> capures but <.foo> does not 21:46
eternaleye The canonical example is implicit whitespace in 'rule', which is specced as non-capturing and is expressed as <.ws> 21:47
[bjoern]: Never mind, I misunderstood you 21:48
[bjoern] :-)
eternaleye you want something like rule foo :nevercapture { ... } ?
[bjoern] Well, I was wondering if using <.comment> all over instead of plain <comment> is the best way to do this; if there was a :nevercapture, then using that might be better in some cases. 21:50
I see no particular reason why there should be a :nevercapture, so it's not something that I /want/ to have.
eternaleye Ah 21:51
pugs_svn r27270 | kyle++ | [t/spec] Fix the plan I broke in optional.t 22:46
pugs_svn r27271 | lwall++ | [STD] fix bad OUTER link, s/$?TYPE/$?STAB/ 23:11
r27271 | lwall++ | [CORE] remove dups
r27271 | lwall++ | [NULL.pad] add missing links for compiling CORE.setting without warnings
TimToady [bjoern]: you could do it by defining a macro that looks like an assertion, I suppose 23:14
some kind of metachar:«<foo>» rule that beats out < under LTM 23:16
std: 71 23:19
p6eval std 27270: OUTPUT«ok 00:02 35m␤»
TimToady std: 71 23:46
p6eval std 27271: OUTPUT«ok 00:02 35m␤»