Camelia, the Perl 6 bug

IRC log for #perl6, 2012-09-01

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:19 pmichaud Rakudo star released.
00:19 cggoebel joined #perl6
00:19 sorear Sat Sep  1 00:19:37 UTC 2012 :D
00:19 sorear pmichaud++
00:20 colomon pmichaud++
00:27 larks joined #perl6
00:40 cggoebel joined #perl6
00:49 pmichaud I actually had the release done before 00:00; just didn't mention it here until 00:19
00:49 pmichaud I was busy testing the .msi
00:50 mucker joined #perl6
00:50 MikeFair joined #perl6
00:51 MikeFair Hello #perl6
00:51 havenn joined #perl6
00:51 TimToady o/
00:53 sorear Hello MikeFair
00:54 MikeFair So I think I discovered something for my self today
00:55 MikeFair It's something pretty basic to most of you I'm sure, but I think I discovered that the named matches from Grammar.pm become function calls not only in Actions.pm when a match is made, but also in Grammar.pm to be evaluated
00:56 sorear yes.
00:57 MikeFair So I was wondering, are the "rule" and "token" lines the same things as functions?  I mean could I put any kind of code in there that results in the right return response?
00:57 sorear Yes.
00:58 MikeFair So is the response an array or a hash of strings?
00:58 sorear n: grammar G { method foo { return self.cursor(3); } ; token TOP { <.foo> abc } }; say G.parse('123abc')
00:58 p6eval niecza v21-1-ga8aa70b: OUTPUT«#<match from(0) to(6) text(123abc) pos([].list) named({}.hash)>␤»
00:58 sorear n: grammar G { method foo { return self.cursor(3); } ; token TOP { <.foo> abc } }; say G.parse('1234abc')
00:58 p6eval niecza v21-1-ga8aa70b: OUTPUT«Match()␤»
00:59 sorear MikeFair: in Niecza the expected response is a single Cursor/Match object or a (possibly lazy) list thereof
01:00 * MikeFair stares at self.cursor(3) and tries to interpret it.
01:00 sorear Cursors are a little bit lighter but are only useful with non-capturing forms
01:00 sorear self.cursor(3) creates a clone of the current Cursor object and sets its position to 3
01:01 sorear the API of cursor objects is not defined by the spec, Rakudo and Niecza do things differently
01:01 MikeFair So what did it match?  The third position of the cursor clone?
01:02 sorear It didn't "match" anything, it caused <TOP> to skip to character #3
01:03 MikeFair So "self" contains a cursor that was automagically passed to method "foo", what's in $_?
01:04 MikeFair or @_ more specifically ---
01:05 * MikeFair goes to his own command line. :)
01:09 MikeFair bbiaw
01:11 flussence has run() changed in rakudo the last few months? I'm trying to get some old code working and every run returns exit code 255...
01:13 flussence oh, it has. Duh.
01:14 MikeFair joined #perl6
01:31 flussence now I'm stuck. MAIN(*@slurpy) doesn't seem to work...
01:34 japhb flussence, can you gist a golfed version of the problem?
01:35 flussence no need, it'll fit here
01:35 flussence sub MAIN(Bool :$switch, *@slurpy) {}; # perl6 test.p6 --something
01:35 flussence outputs the default built in help
01:35 flussence changing it to *% doesn't work either :(
01:52 FROGGS_ joined #perl6
02:22 Circlepuller joined #perl6
02:22 japhb flussence, sorry that I got pulled away right after my last message; looking now
02:23 japhb flussence, switches need to be before positionals on the command line
02:23 japhb And of course the name of the switch and the named argument need to match.  :-)
02:24 orafu joined #perl6
02:25 flussence how do I get `perl6 test.p6 --switch --something` to work?
02:26 japhb What are you expecting to show up in the slurpy if you only give it options?
02:26 japhb (named options and slurpy args will be handled separately)
02:27 japhb Now, with the MAIN you showed above, I'd expect
02:27 japhb `perl6 test.p6 --switch something some-other-thing stuff` to work
02:27 flussence let me rephrase - how do I get cmdline params that aren't hardcoded in the signature to show up in a *%/*@ variable?
02:28 japhb It sounds like you want both *% and *@ -- or to just process the @*ARGS yourself
02:28 japhb FWIW, the parser is in src/core/Main.pm
02:28 Circlepuller_ joined #perl6
02:30 japhb flussence, look for 'sub process-cmd-args' in that file
02:34 flussence looks like it should work with a *%var, but it isn't... ends up at line 145
02:35 japhb hmmm
02:36 japhb Oh now that's interesting
02:39 japhb Ah.  It appears that at some point someone added the has-unexpected-named-arguments filter, and that function doesn't notice slurpy args
02:39 japhb OK, give me a few minutes to make the change and rebuild, and see if it fixes it.
02:40 immortal joined #perl6
02:40 immortal joined #perl6
02:44 japhb Man I want a faster build box.  :-/
02:48 _jaldhar joined #perl6
03:00 erkan joined #perl6
03:00 erkan joined #perl6
03:00 cggoebel joined #perl6
03:00 sorear MikeFair: there are no other arguments besides 'self'.
03:04 dalek rakudo/nom: b8c0683 | (Geoffrey Broadwell)++ | src/core/Main.pm:
03:04 dalek rakudo/nom: Fix has-unexpected-named-arguments() to notice that named arguments cannot be unexpected if there is a slurpy named parameter
03:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b8c0683f8d
03:04 japhb flussence, try that ^^
03:04 * flussence compiles
03:05 Circlepuller joined #perl6
03:08 jaldhar joined #perl6
03:14 Circlepuller_ joined #perl6
03:16 flussence it works \o/
03:16 flussence japhb++
03:17 jrockway joined #perl6
03:18 japhb excellent!
03:19 * japhb wonders why has-unexpected-named-arguments was added in the first place.  Perhaps trying to work around a limitation in the candidates-matching API?
03:21 flussence it looks like without it the code would spit out a missing multi candidate error instead of &USAGE
03:24 cggoebel joined #perl6
03:25 jaldhar joined #perl6
03:32 tokuhiro_ joined #perl6
03:44 japhb flussence: Hmmm.  I know that it worked without it when I initially wrote that code.  :-)
04:00 kaare_ joined #perl6
04:06 replore joined #perl6
04:19 xinming_ joined #perl6
04:23 replore joined #perl6
04:57 crab2313 joined #perl6
05:08 BlueT_ joined #perl6
05:23 MikeFair sorear: Thanks for the "self is the only argument" comment
05:24 MikeFair So in a grammar when calling a function to make a match, can I backtrack to find a match?
05:26 MikeFair Take this:  I want to match a block by the word "end" with optional tags
05:26 MikeFair like this: [someword] stuffgoeshere end [someword]?
05:27 MikeFair the first someword is option too
05:28 MikeFair stuffgoeshere <statementList>
05:31 MikeFair So my initial thoughts are that my Grammar would be rule findBlock { end <someword> }
05:32 MikeFair method <someword>  <---- Backtrack to see if I can find the matching occurence of someword
05:32 MikeFair Otherwise it's an anonymous block
05:36 replore_ joined #perl6
05:42 stopbit joined #perl6
05:45 moritz \o
05:49 sorear MikeFair: I don't completely understand you
05:49 sorear but I will say: token element { '<' (\w+) '>' <element>* '</' $0 '>' }
05:51 MikeFair Right, the <> are to call the "keywords" function
05:52 MikeFair or if not an exiting keyword to add it to the existing set of keywords
05:52 MikeFair existing not exiting
05:52 MikeFair if something then
05:52 MikeFair statements
05:52 MikeFair end if
05:52 MikeFair <if>
05:53 sorear still not quite following
05:53 MikeFair Well if .... end if is a block
05:53 MikeFair repeat ... end repeat is the same
05:54 MikeFair anyword ... end anyword creates a new kind of block called "anyword" that will be added by the end user at runtime
05:55 MikeFair The end user will publish a function called "anyword" that will get called then
05:55 sorear role userblock { <ident> <block> 'end' $<ident> }
05:55 sorear couldn't be simpler
05:56 sorear s/role/rule/
05:56 MikeFair Do I need to distinguish userblock from <block>
05:56 MikeFair is it ok to be recursive
05:57 MikeFair So that does the match, but how do I turn "<ident>" into a function call with the value of <ident>
05:59 MikeFair I assume it's { <bock_id> <block> 'end $<block_id> }    token block_id { <ident> }  <--- Do something else if this matches?
06:01 MikeFair And technically <ident> is optional, but if present must be evenly paired ( I know theres a rule that makes this easy I just haven't mastered regexes beyond relatively simple pattern testing )
06:05 * MikeFair just stares in awe and wonder for a moment at just how amazing that little but of text is.
06:17 marmay joined #perl6
06:22 tokuhiro_ joined #perl6
06:39 wamba joined #perl6
06:41 MikeFair Is the Perl6 HOW concept a difficult things to implement?  It's EXACTLY how I'd like types in safire to work
06:42 MikeFair How much of that is Rakudo specific code versus Parrot's PMC concept
06:46 moritz it doesn't use PMCs much at all
06:46 moritz basically only as the interface to the garbage collector
06:47 moritz src/Perl6/Metamodel/ has most of the interesting bits
06:49 MikeFair I'm almost of the mind that I want to write my compiler/interpretter in Perl6 and not Parrot....
06:50 MikeFair My language has almsot all the exact same semantics, just a different syntax for it
06:54 sorear MikeFair: if you target parrot it will only run on the parrot VM, if you target perl 6 it will be more flexible
06:55 * MikeFair nods.
06:56 MikeFair Honestly it seems I'm going to be redoing a lot of the same work perl6 has already worked out, like the HOW concept -- it's what I wouldn't I just didn't exactly know how to describe it yet
06:56 MikeFair s/wouldn't/wanted
06:57 MikeFair While I haven't examined them at all yet, the name Role could imply a couple of the other concepts I was wanting to try and create
07:03 MikeFair Will this match what I think it will:
07:03 MikeFair rule import { <start_import> <block_id> <block> [. \n <stop_import> $<block_id> ]? }
07:05 sorear i'm curious what you intend the . to match there
07:05 MikeFair look for <start_import> match followed by a <block_id> match followed by a block, followed by an optional at least one newline with a <stop_using> and corresponding $<block_id>, but do not consume the stop using line
07:05 fgomez joined #perl6
07:05 MikeFair The . is supposed to be the "don't consume the stuff matched in this part"
07:06 sorear ...no.
07:06 moritz no
07:06 moritz it means "don't record the match in $/"
07:06 sorear the . means "match and discard any single character"
07:06 MikeFair Does . always mean that but (.) means record?
07:07 MikeFair or is record and save as an array element different things
07:08 moritz oh, /me ws in the wrong context
07:10 sorear MikeFair: /<.foo>/ /./ 1.0 $foo.bar $.quux 2 .. 5  the . means many different things in Perl 6
07:10 Entonian joined #perl6
07:11 MikeFair hehe -- point taken
07:11 * MikeFair reads through "perlreintro" again. :)
07:11 sorear you're confusing the <.foo> period
07:12 * MikeFair nods.
07:12 sorear which means "don't create $<foo>"
07:12 MikeFair yep sure was
07:12 MikeFair OHHHH!!
07:12 sorear if you don't inspect the resulting Match object, <foo> and <.foo> have identical behavior
07:12 * MikeFair nods.
07:12 MikeFair yep I can see that
07:12 sorear we use <.ws> because $<ws> values are an extravagant waste of memory
07:12 sorear there are a billion of them and we don't need them
07:13 GlitchMr joined #perl6
07:13 MikeFair AND it looks like [^^ <stop_import> $<block_id> ]? is a cleaner way to say what I meant anyway
07:14 sorear I think what you meant was <?before ^^ <stop_import> $<block_id> >
07:14 MikeFair Well except for the "do not consume" part
07:14 sorear <?before STUFF> means "check that STUFF matches, but don't consume it
07:14 sorear "
07:14 MikeFair ahh
07:14 sorear note that <?before [STUFF]? > is useless.  can you guess why?
07:15 MikeFair Well it's an empty match
07:15 MikeFair before nothing is always true
07:15 sorear close... can you tell me what [STUFF]? means?
07:17 MikeFair Well in perl5 it was S | T | U | F | F, but the [] I think now means match this whole block of 'STUFF' but as the ? indicates, optionally
07:17 MikeFair whole block = the following specific characters in the order they appear
07:18 MikeFair at least in this case, but could really be any regex
07:19 * MikeFair invents reading <?before  as "the following regex comes before this regex"
07:21 GlitchMr perl6: print so 'abc' ~~ /:iabc/
07:21 p6eval niecza v21-1-ga8aa70b: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤â�¤Unrecognized regex modifier :iabc at /tmp/9xP9ojlhnt line 1:â�¤------> [32mprint so 'abc' ~~ /:iabc[33mâ��[31m/[0mâ�¤â�¤Action method mod_internal:oops not yet implemented at /tmp/9xP9ojlhnt line 1:â�¤------> [32mprint so 'abc' ~~…
07:21 p6eval ..rakudo b8c068: OUTPUT«True»
07:21 GlitchMr Is it another Rakudo bug?
07:21 sorear yes
07:21 sorear MikeFair: yes
07:21 sorear MikeFair: so [foo]? isn't necessarily an empty match
07:22 sorear it first tries foo, and if that doesn't match, it matches nothing
07:22 awfabian joined #perl6
07:22 sorear perl 6 regular expressions are very operational (except when they aren't)
07:22 MikeFair sorear: So my question then is would <?before <stop_import $<block_id> | $ > be more what I want?
07:22 MikeFair sorear: hehe
07:23 sorear MikeFair: more what you want yeah I think
07:23 MikeFair sorear: (with the ^^ in the ?before clause )
07:23 sorear MikeFair: why do you have the $ case ?
07:23 MikeFair end of file / "string"
07:23 sorear MikeFair: also consider the case of begin foo ... end foobar
07:24 MikeFair Well this case is a bit different
07:24 sorear well, I guess since you're using a rule it's really $<block_id><.ws>
07:24 MikeFair <stop_import> is an optional enclosing line
07:24 sorear and there's no ws after foo in foobar
07:25 MikeFair So I want to match <start_import> to EOF, unless there's a <stop_import> then stop there, but don't capture it so I can use the <stop_import> Action function to close the block
07:26 sorear the word you want is "consume"
07:26 MikeFair so right
07:26 sorear "capture" refers to creating the $<stop_import> variable
07:26 * MikeFair nods
07:26 MikeFair thanks for keeping me honest! :)
07:26 sorear occasionally useful is that <?before captures without consuming
07:27 sorear <?before <foo> > # $<foo> is now valid, even though it's not part of the matched text
07:27 MikeFair Yeah, I can see there's a few places I might need that behavior
07:28 tokuhiro_ joined #perl6
07:28 MikeFair What does the # do? or # a literal
07:28 GlitchMr # is comment
07:30 MikeFair So that will capture foo without consuming the matched <foo>, I see it, though it seems more like an exploited side effect than a by design feature
07:31 GlitchMr But it sort of makes sense
07:31 MikeFair So if I wanted the consumption to stop at <stop_import> $<block_id>  or consume to the end, what would I use?
07:32 MikeFair OR, will it call everything in order.....
07:33 MikeFair So on a successful match, it will first call <start_import> then call everything that happens in <block> then call <stop_import>
07:33 MikeFair so I can go ahead and consume it right now and everything will be fine
07:34 moritz phenny: tell jnthn all spectests pass on rakudo/nqpqast
07:34 phenny moritz: I'll pass that on when jnthn is around.
07:35 SamuraiJack joined #perl6
07:37 GlitchMr perl6: say $*EXECUTABLE_NAME
07:37 p6eval niecza v21-1-ga8aa70b: OUTPUT«/home/p6eval/niecza/run/Niecza.exe␤»
07:37 p6eval ..rakudo b8c068: OUTPUT«./nom-inst/bin/perl6␤»
07:37 GlitchMr ok
07:37 MikeFair ok and should I replace my token ws override method with <.ws>?
07:37 GlitchMr So, Niecza is in this directory
07:38 MikeFair hmm, that won't work
07:39 * MikeFair wonders if there's a way to redefine the "rule" to use <.ws> instead of <ws>
07:40 sorear huh?
07:40 GlitchMr So probably I can do something like alias niecza='env PATH=/home/p6eval/niecza/run /home/p6eval/niecza/run/Niecza.exe'
07:40 sorear "rule" always uses <.ws>
07:41 sorear GlitchMr: you don't evn need the PATH setting, alias niecza=/path/to/Niecza.exe will be enough
07:41 sorear (if you have binfmt_misc, anyway)
07:42 MikeFair sorear: ok thanks, then why did my whitespace usage seem to raise a red flag?
07:42 sorear what red flag?
07:42 GlitchMr oh nice
07:43 GlitchMr It seems to work. I find it weird that it didn't worked on my PC
07:44 sorear Not all Linux systems can just run "/path/to/Niecza.exe myfile.p6"
07:44 GlitchMr What is binfmt_misc anyways?
07:44 GlitchMr Kernel module?
07:44 sorear it depends on the availability of the "binfmt_misc" kernel module which recognizes CLR executables and redirects them to Mono
07:45 GlitchMr Well, I can do ./Niecza.exe
07:45 sorear also you need to have binfmt_misc configured
07:45 sorear ok, then you have that set up
07:45 GlitchMr oh, it works
07:45 GlitchMr glitchmr@strawberry ~> git/niecza/run/Niecza.exe
07:45 GlitchMr niecza>
07:45 GlitchMr It's probably a good thing
07:45 sorear so, what doesn't work and how does it fail?
08:01 sorear sleep&
08:04 birdwindupbird joined #perl6
08:19 Psyche^ joined #perl6
08:41 replore joined #perl6
08:52 GlitchMr sorear: it wasn't working before... but it seems that newest Niecza works
08:54 GlitchMr It made error messages
09:02 jnthn morning o/
09:02 phenny jnthn: 07:34Z <moritz> tell jnthn all spectests pass on rakudo/nqpqast
09:05 jnthn moritz: Great, thanks.
09:05 jnthn A modules test run would be awesome, whenever somebody can get to it :)
09:18 havenn joined #perl6
09:54 PacoAir joined #perl6
10:15 wamba joined #perl6
10:15 wamba left #perl6
10:20 snearch joined #perl6
10:30 spider-mario joined #perl6
10:30 wamba joined #perl6
10:31 wamba left #perl6
10:33 dalek nqp/toqast: 8b9e991 | jnthn++ | src/ (4 files):
10:33 dalek nqp/toqast: Optimize away control exception handlers in while/unit/repeat loops that don't need them.
10:33 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/8b9e9916cf
10:33 dalek nqp/toqast: 794021e | jnthn++ | src/ (3 files):
10:33 dalek nqp/toqast: Optimize away unrequired control exception handlers in for loops.
10:33 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/794021ead4
10:33 jnthn er, *until
10:34 spider-mario hi
10:35 wamba joined #perl6
10:35 spider-mario I’m reading the R* 2012.08 announcement and I think there is a <…> that has not been properly escaped
10:35 spider-mario “Leading whitespace in rules and under :sigspace will no longer be converted to <.ws> . For existing regexes that expect this conversion, add a in front of leading whitespace to make it meta again.”
10:35 spider-mario “add a in front”
10:36 spider-mario the HTML code of the page contains <?>
10:36 MayDaniel joined #perl6
10:36 spider-mario it should probably have been &lt;?&gt;
10:44 snearch joined #perl6
10:45 GlitchMr niecza> use Threads
10:45 GlitchMr Potential difficulties:
10:45 GlitchMr Unsupported use of \ with sigil; nowadays please use \ without sigil at /home/p6eval/niecza/lib/Threads.pm6 line 161:
10:45 GlitchMr ------> sub infix:« <== »(\$output⏏, @input) is Niecza::absprec<f=> is expo
10:45 GlitchMr I'm not sure, but importing module which is part of Niecza shouldn't make warnings?
10:56 immortal joined #perl6
10:56 immortal joined #perl6
11:01 dalek nqp: a6b22f6 | (Elizabeth Mattijsen)++ | / (3 files):
11:01 dalek nqp: Eradicate pir::chopn__Ssi from source, replace by nqp::substring/nqp::chars
11:01 dalek nqp: review: https://github.com/perl6/nqp/commit/a6b22f641f
11:11 dalek nqp: 77c5c40 | (Elizabeth Mattijsen)++ | / (2 files):
11:11 dalek nqp: Eradicated pir::push__vPi from source, replaced by nqp::push_i
11:11 dalek nqp: review: https://github.com/perl6/nqp/commit/77c5c40689
11:16 dalek nqp: 8086f7f | (Elizabeth Mattijsen)++ | / (2 files):
11:16 dalek nqp: Eradciated pir::setattribute__vppsp, replaced by nqp::bindattr
11:16 dalek nqp: review: https://github.com/perl6/nqp/commit/8086f7f9a5
11:24 colomon Is that Liz?
11:24 lizmat yes
11:25 lizmat this is some of the grunt work jnthn and pm though I could do to get started
11:25 colomon lizmat++
11:28 jnthn yay :)
11:30 lizmat please note that last 2 commits were for commented out code already
11:30 lizmat but I thought I do them nonetheless for consistency / future uncommenting
11:32 xinming joined #perl6
11:32 dalek nqp: 994418f | (Elizabeth Mattijsen)++ | / (2 files):
11:32 dalek nqp: Eradicated pir::getattribute__(ppp|PPP)s, replaced by nqp::getattr
11:32 dalek nqp: review: https://github.com/perl6/nqp/commit/994418f123
11:33 lizmat another comment only change
11:35 moritz comments also need maintenance
11:35 GlitchMr perl6: my &reval = &eval; { my $a = "a"; my $b = "b"; print eval '$a'; print reval '$b' }
11:35 p6eval niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties:â�¤  $a is declared but not used at /tmp/f1g12_4_lR line 1:â�¤------> [32mmy &reval = &eval; { my [33mâ��[31m$a = "a"; my $b = "b"; print eval '$a'; [0mâ�¤  $b is declared but not used at /tmp/f1g12_4_lR line 1:â�¤------> [32mmy &reval = &…
11:35 p6eval ..rakudo b8c068: OUTPUT«ab»
11:36 GlitchMr n: my &reval = &eval; { my $a = "a"; my $b = "b"; print eval '$a'; print reval '$b' } # OK not used
11:36 p6eval niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties:â�¤  $a is declared but not used at /tmp/N9iyomeggJ line 1:â�¤------> [32mmy &reval = &eval; { my [33mâ��[31m$a = "a"; my $b = "b"; print eval '$a'; [0mâ�¤  $b is declared but not used at /tmp/N9iyomeggJ line 1:â�¤------> [32mmy &reval = &…
11:37 GlitchMr n: my &reval = &eval; { my $a = "a"; my $b = "b"; $a; $b; print eval '$a'; print reval '$b' }
11:37 p6eval niecza v21-1-ga8aa70b: OUTPUT«ab»
11:37 lizmat perl6: my $a= "a"; print eval '$a'
11:37 p6eval niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties:â�¤  $a is declared but not used at /tmp/FS5V9jsqIk line 1:â�¤------> [32mmy [33mâ��[31m$a= "a"; print eval '$a'[0mâ�¤â�¤a»
11:37 p6eval ..rakudo b8c068: OUTPUT«a»
11:37 GlitchMr declared but not used but used
11:37 lizmat eval being runtime?
11:37 buubot_backup lizmat: ERROR: Search pattern not terminated or ternary operator parsed as search pattern at (eval 20) line 1.
11:38 snearch joined #perl6
11:38 moritz rakudo simply never warns about unused variables
11:38 moritz lizmat: correct
11:38 GlitchMr But well, when you have eval, you cannot expect anything
11:39 dalek nqp: 8681f37 | (Elizabeth Mattijsen)++ | / (2 files):
11:39 dalek nqp: Eradicated pir::set_who__vPP, replaced by nqp::setwho
11:39 dalek nqp: review: https://github.com/perl6/nqp/commit/8681f37fe1
11:39 GlitchMr perl6: { my $val = 42; sub reval { eval '$val' } }; say reval
11:39 p6eval niecza v21-1-ga8aa70b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤      'reval' used at line 1â�¤â�¤Potential difficulties:â�¤  $val is declared but not used at /tmp/wRZ1qk2kh2 line 1:â�¤------> [32m{ my [33mâ��[31m$val = 42; sub reval { eval '$val' } }; [0mâ�¤  &reval is declared bu…
11:39 p6eval ..rakudo b8c068: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&reval' called (line 1)␤»
11:40 GlitchMr perl6: sub reval { state $val = 42; eval '$val' }; say reval
11:40 p6eval niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties:â�¤  $val is declared but not used at /tmp/I3Xe_9p2Ox line 1:â�¤------> [32msub reval { state [33mâ��[31m$val = 42; eval '$val' }; say reval[0mâ�¤â�¤42â�¤Â»
11:40 p6eval ..rakudo b8c068: OUTPUT«42␤»
11:40 GlitchMr eval: use v5.010; sub reval { state $val = 42; eval '$val' }; say reval
11:40 buubot_backup GlitchMr: 42 1
11:40 GlitchMr ok
11:40 GlitchMr eval: use v5.010; { my $val = 42; sub reval { eval '$val' } }; say reval
11:40 buubot_backup GlitchMr:  1
11:41 GlitchMr eval: use v5.010; { my $val = 42; sub reval { $val; eval '$val' } }; say reval
11:41 buubot_backup GlitchMr: 42 1
11:41 lizmat $ perl -wE 'my $c= "c"; say eval q($c)'
11:41 lizmat c
11:41 lizmat seems not to warn in Perl 5 either
11:42 GlitchMr Lexical variables never warn in Perl 5
11:42 GlitchMr It's unimplemented feature as far I know
11:43 sergot hi! o/
11:43 GlitchMr glitchmr@feather ~> perl -wE '$c = "Hello, world!\n"; print eval(q[$c])'
11:43 GlitchMr Name "main::c" used only once: possible typo at -e line 1.
11:43 GlitchMr Hello, world!
11:44 GlitchMr This unimplemented feature is mentioned in perltodo
11:45 GlitchMr Also, https://rt.perl.org/rt3/Publ​ic/Bug/Display.html?id=5087
11:45 lizmat jnthn: Unrecognized nqp:: opcode 'nqp::who'
11:46 lizmat should be the replacement of pir::get_who__PP , but apparently doesn't exist (yet) ?
11:47 GlitchMr Apperently there is CPAN module which implements this: http://search.cpan.org/dist/warni​ngs-unused/lib/warnings/unused.pm
11:47 GlitchMr But it's not part of core
11:47 yarp joined #perl6
11:48 lizmat according to docs/nqp-opcode.txt it should exist (or as nqp::getwho) but apparently something's amiss here
11:49 lizmat skipping pir::get_who__PP, continuing with pir::does
11:52 jnthn lizmat: That's one of the ones that needs the toqast branch merge to happen.
11:52 lizmat ack, moving it to that todo list
11:54 lizmat does the same apply to nqp::islist and nqp::ishash?
11:54 jnthn Think islist is already in place
11:54 jnthn ishash ain't
11:54 lizmat ack
11:54 jnthn Of course, you could always just do this in the branch :)
11:55 jnthn I expect it to merge soon though.
11:55 jnthn Well
11:55 jnthn If the module space tests look good
11:55 lizmat I'll keep it on the todo
11:55 lizmat don't want to add any variables to your tests
11:55 lizmat there is no rush
11:55 jnthn good point
11:58 moritz oh, modules
11:59 moritz I could smoke those
12:02 dalek nqp: fd53616 | (Elizabeth Mattijsen)++ | / (5 files):
12:02 dalek nqp: Eradicated pir::does(...,'array'), replaced by nqp::islist
12:02 dalek nqp: review: https://github.com/perl6/nqp/commit/fd53616f3d
12:02 lizmat this concludes the low hanging fruit for today
12:11 snearch joined #perl6
12:19 JimmyZ joined #perl6
12:40 arnsholt Apparently Rakudo has sprouted a new warning since last I did stuff
12:40 arnsholt What's the "Obsolete use of | or \ with sigil on param" warning mean?
12:41 moritz exactly what it says :-)
12:41 moritz if you use sub f(|$c) { }  you should now write that as  sub f(|c) { }
12:41 arnsholt Oh, right
12:42 arnsholt And same for method foo(\$arr)
12:42 moritz correct
12:42 moritz should i update zavolaj?
12:43 arnsholt I can do it
12:43 arnsholt I'm gonna do some more stuff as well
12:43 arnsholt I found it from my customary pre-hacking make test =)
12:44 moritz that's a very good habit
12:45 arnsholt I try to remember to make sure I don't have any weird uncommited changes or happen to have some weird branch checked out
12:46 moritz jnthn: zavolaj fails tests on toqast because it misses nqp commit 384d3c3107
12:46 arnsholt Sometimes I just leave things in a weird intermediate state when I hit a roadblock. Which leads to weirdness when I come back two weeks later
12:51 tadzik good morning #perl6
12:51 snearch joined #perl6
12:51 moritz \o tadzik
12:52 moritz http://moritz.faui2k3.org/tmp/results.json # result of module smoke on rakudo/nqpqast
12:52 jnthn moritz: Huh...r_elems seems to be in there
12:52 * jnthn merges in latest nqp/master anyway
12:53 jnthn eek, conflicts
12:53 moritz jnthn: oh, my copy of nqp was out of date
12:53 * moritz looks at the test output more closely
12:54 moritz huh, passes now
12:55 moritz uh, wrong branch
12:55 moritz still passes.
12:55 * moritz confused
12:56 jnthn moritz: You're building nqp/toqast and rakudo/nqpqast?
12:57 moritz aye
12:59 tadzik moritz: so the results are correct?
12:59 tadzik locally, Template::Mojo didn't build
13:00 moritz tadzik: I have no idea anymore
13:01 tadzik :) ok
13:01 tadzik I'll see if my rakudo is up to date and will rerun themk
13:02 spider-mario I am under the impression that Rakudo Star 2012.08 requires an already installed rakudo to be built
13:03 spider-mario or even a rakudo star
13:03 xinming joined #perl6
13:04 jnthn spider-mario: No, it's the same as any previous release.
13:04 spider-mario ok
13:04 jnthn (in terms of build procedure)
13:04 JimmyZ joined #perl6
13:04 jnthn Well, pmichaud++ did a bunch of improvements. But it doesn't depend on an existing Rakudo.
13:04 spider-mario it seems to use files from it
13:05 spider-mario I had nqp and 2012.0
13:05 spider-mario oops
13:05 spider-mario I had nqp and rakudo star 2012.07,
13:05 spider-mario I built and installed nqp 2012.08.1 and tried to build rakudo star 2012.08 and it failed with error messages mentionning files from the system-wide rakudo star
13:06 spider-mario so, I’ve rebuilt and installed rakudo star 2012.07 against the new nqp and I am trying to build rakudo star 2012.08
13:06 spider-mario and so far, it works much better
13:06 spider-mario seemingly, at least
13:07 spider-mario actually, before trying with * 2012.07 rebuilt against nqp 2012.08, I tried with it uninstalled
13:07 spider-mario and rakudo star 2012.08 reported missing files
13:08 spider-mario I hope I was just unlucky
13:09 spider-mario maybe there are some weird problems with my environment variables pointing to ~/perl6 or anything
13:11 dalek nqp/toqast: a6b22f6 | (Elizabeth Mattijsen)++ | / (3 files):
13:11 dalek nqp/toqast: Eradicate pir::chopn__Ssi from source, replace by nqp::substring/nqp::chars
13:11 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/a6b22f641f
13:11 dalek nqp/toqast: 77c5c40 | (Elizabeth Mattijsen)++ | / (2 files):
13:11 dalek nqp/toqast: Eradicated pir::push__vPi from source, replaced by nqp::push_i
13:11 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/77c5c40689
13:11 dalek nqp/toqast: 8086f7f | (Elizabeth Mattijsen)++ | / (2 files):
13:11 dalek nqp/toqast: Eradciated pir::setattribute__vppsp, replaced by nqp::bindattr
13:11 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/8086f7f9a5
13:11 dalek nqp/toqast: 994418f | (Elizabeth Mattijsen)++ | / (2 files):
13:11 dalek nqp/toqast: Eradicated pir::getattribute__(ppp|PPP)s, replaced by nqp::getattr
13:11 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/994418f123
13:11 dalek nqp/toqast: 8681f37 | (Elizabeth Mattijsen)++ | / (2 files):
13:11 dalek nqp/toqast: Eradicated pir::set_who__vPP, replaced by nqp::setwho
13:11 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/8681f37fe1
13:11 dalek nqp/toqast: fd53616 | (Elizabeth Mattijsen)++ | / (5 files):
13:11 dalek nqp/toqast: Eradicated pir::does(...,'array'), replaced by nqp::islist
13:11 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/fd53616f3d
13:11 dalek nqp/toqast: 880ec42 | jnthn++ | / (9 files):
13:11 dalek nqp/toqast: Merge latest master into toqast.
13:11 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/880ec42098
13:15 GlitchMr https://github.com/GlitchMr/perl6-Text​-Abbrev/blob/master/lib/Text/Abbrev.pm
13:16 GlitchMr Just wondering, is there any better way of writing "loop (my $len = .chars; $len > 0; --$len) {"
13:16 GlitchMr I cannot use .. because range goes in wrong direction
13:17 xinming joined #perl6
13:19 jnthn ... can go in other direction
13:20 GlitchMr Hmmm, yeah
13:20 jnthn r: my $x = 'omg a kangaroo!'; for $x.chars ^... 0 { $x.substr($_, 1).say }
13:20 p6eval rakudo b8c068: OUTPUT«===SORRY!===␤Confused␤at /tmp/CoaJOB_nwq:1␤»
13:21 jnthn huh, hwat'd I get wrong...
13:21 FROGGS_ three dots?
13:21 jnthn Yeah, sequence
13:22 jnthn r: say 1 ... 10
13:22 p6eval rakudo b8c068: OUTPUT«1 2 3 4 5 6 7 8 9 10␤»
13:22 jnthn r: say 10 ... 1
13:22 p6eval rakudo b8c068: OUTPUT«10 9 8 7 6 5 4 3 2 1␤»
13:22 jnthn r: say 10 ^... 1
13:22 p6eval rakudo b8c068: OUTPUT«===SORRY!===␤Confused␤at /tmp/g8F6G0Ao6j:1␤»
13:22 jnthn r: say 10 ^.. 1
13:22 p6eval rakudo b8c068: OUTPUT«10^..1␤»
13:23 FROGGS_ whats that ^ for?
13:23 jnthn Omit endpoint
13:23 jnthn But it seems Rakudo defines ...^ but not ^...
13:23 spider-mario il worked this time
13:24 spider-mario with a rakudo 2012.07 built against nqp 2012.08 already installed
13:24 GlitchMr Cannot assign a non-Perl 6 value to a Perl 6 container
13:24 GlitchMr Those errors are cryptic
13:24 GlitchMr -        loop (my $len = .chars; $len > 0; --$len) {
13:24 GlitchMr +        for .chars ... 0 -> $len {
13:24 GlitchMr I'm probably doing something wrongly
13:25 GlitchMr It looks like it should work identically, except it doesn't
13:27 GlitchMr oh
13:27 GlitchMr I should type 1, not 0
13:28 GlitchMr except not
13:29 GlitchMr So, in https://github.com/GlitchMr/perl6-Text​-Abbrev/blob/master/lib/Text/Abbrev.pm 'loop (my $len = .chars; $len > 0; --$len) {' works, but 'for .chars ... 1 -> $len {' doesn't making cryptic error messages
13:30 jnthn That's somewhat surprising.
13:32 GlitchMr Perhaps Perl 6 doesn't parse it the way I want
13:32 GlitchMr I don't know...
13:33 GlitchMr for reverse 1 .. .chars -> $len { makes identical error
13:34 JimmyZ it may be a rakudo bug
13:34 GlitchMr > abbrev ':)'
13:34 GlitchMr 2
13:34 GlitchMr 1
13:35 GlitchMr This is how it iteration looks with loop ()
13:35 jnthn r: $_ = 'foobar'; for .chars ... 1 { .say }
13:35 p6eval rakudo b8c068: OUTPUT«6␤5␤4␤3␤2␤1␤»
13:35 GlitchMr This is... confusing
13:35 tadzik r: $_ = 'foobar'; for .chars ... 1 -> $a { $a.say }
13:35 p6eval rakudo b8c068: OUTPUT«6␤5␤4␤3␤2␤1␤»
13:35 tadzik r: $_ = 'foobar'; for .chars ... 0 -> $a { $a.say }
13:35 p6eval rakudo b8c068: OUTPUT«6␤5␤4␤3␤2␤1␤0␤»
13:35 GlitchMr for .chars ... 1 -> $len {} should work identically, except it doesn't
13:36 tadzik r: $_ = 'foobar'; for .chars ... 1 -> $len { $len.say } # just checking :)
13:36 p6eval rakudo b8c068: OUTPUT«6␤5␤4␤3␤2␤1␤»
13:36 GlitchMr I use say on $len, but all I get is number of .chars and crash...
13:36 jnthn r: $_ = 'foobar'; for .chars ... 1 -> $len { say $len }
13:36 p6eval rakudo b8c068: OUTPUT«6␤5␤4␤3␤2␤1␤»
13:36 GlitchMr The code looks like https://github.com/GlitchMr/perl6-Text​-Abbrev/blob/master/lib/Text/Abbrev.pm
13:37 GlitchMr If I will replace 'loop (my $len = .chars; $len > 0; --$len) {' with 'for .chars ... 1 -> $len {' I get error...
13:41 GlitchMr Also, I've noticed that if I will comment out "%result{$abbrev} = $_;" it doesn't happen
13:41 GlitchMr Is it possible that it's connected with $_?
13:42 jnthn That'd be odd.
13:42 jnthn I guess it's possible, but if so it's an odd bug.
13:42 GlitchMr r: for 'cake' { for .chars ... 1 { $_.perl.say } }
13:42 p6eval rakudo b8c068: OUTPUT«4␤3␤2␤1␤»
13:42 GlitchMr r: for 'cake' { for .chars ... 1 -> $len { $_.perl.say } }
13:42 p6eval rakudo b8c068: OUTPUT«"cake"␤"cake"␤"cake"␤"cake"␤»
13:42 GlitchMr huh?
13:43 GlitchMr r: my %hash; for 'cake' { for .chars ... 1 -> $len { %hash{5} = $_ } }
13:43 p6eval rakudo b8c068:  ( no output )
13:43 GlitchMr r: my %hash; for 'cake' { for .chars ... 1 -> $len { %hash{5} = $_ } }; %hash.perl.say
13:43 p6eval rakudo b8c068: OUTPUT«("5" => "cake").hash␤»
13:43 GlitchMr huh?
13:43 jnthn What's surprising?
13:43 huf the outer for's $_ is visible in the inner for
13:43 GlitchMr r: my %hash; for 'cake' { for .chars ... 1 -> $len { %hash{.substr(0, $len)} = $_ } }; %hash.perl.say
13:43 p6eval rakudo b8c068: OUTPUT«("cake" => "cake", "cak" => "cake", "ca" => "cake", "c" => "cake").hash␤»
13:43 huf since the inner for uses $len
13:43 jnthn $_ takes the value from the outer
13:43 GlitchMr what?
13:43 jnthn Unless something else gives it a value.
13:43 GlitchMr What's weirder is that it doesn't happen there
13:43 GlitchMr I will make a test, ok?
13:44 jnthn OK
13:45 * jnthn just discovered the REPL got busted nqpqast and is working on a fix for that atm.
13:45 GlitchMr Null PMC access in find_method('perl')
13:45 GlitchMr huh?
13:46 xphx joined #perl6
13:47 tadzik Parrot's leaking somewhere
13:47 GlitchMr The code looks like http://paste.uk.to/2bddae42
13:47 GlitchMr (after shortening everything)
13:47 tadzik also, Z is not lazy enuff on toqast it seems
13:47 tadzik r: https://gist.github.com/3573589
13:47 GlitchMr perl6: $_ = 'abc'; for .chars ... 1 -> $len { .perl.say; { .perl.say } }
13:47 p6eval rakudo b8c068: OUTPUT«(timeout)»
13:47 p6eval rakudo b8c068: OUTPUT«"abc"␤Mu␤"abc"␤Mu␤"abc"␤Mu␤»
13:47 p6eval ..niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties:â�¤  $len is declared but not used at /tmp/Sshintkvzw line 1:â�¤------> [32m$_ = 'abc'; for .chars ... 1 -> [33mâ��[31m$len { .perl.say; { .perl.say } }[0mâ�¤â�¤"abc"â�¤"abc"â�¤"abc​"â�¤"abc"â�¤"abc"â�¤"abc"â�¤Â»
13:48 tadzik oh, to it's not lazy enough on nom either :)
13:48 GlitchMr perl6: $_ = 'abc'; for 1 -> $len { .perl.say; { .perl.say } }
13:48 p6eval niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties:â�¤  $len is declared but not used at /tmp/3rhIEprUTo line 1:â�¤------> [32m$_ = 'abc'; for 1 -> [33mâ��[31m$len { .perl.say; { .perl.say } }[0mâ�¤â�¤"abc"â�¤"abc"â�¤Â»
13:48 p6eval ..rakudo b8c068: OUTPUT«"abc"␤Mu␤»
13:48 tadzik n: https://gist.github.com/3573589
13:48 GlitchMr rakudo b8c068: OUTPUT«"abc"␤Mu␤»
13:48 p6eval niecza v21-1-ga8aa70b: OUTPUT«(timeout)»
13:48 tadzik huh
13:48 GlitchMr There is something wrong
13:48 tadzik colomon: ping
13:48 GlitchMr Block SHOULDN'T cause $_ to magically disappear
13:49 GlitchMr > $_ = 'abc'; for 1 -> $len { .perl.say; { .perl.say } }
13:49 colomon pong
13:49 GlitchMr "abc"
13:49 GlitchMr Lexical '$_' not found
13:49 GlitchMr what?
13:49 GlitchMr What?
13:49 jnthn ah.
13:49 jnthn GlitchMr: That golfs it nicely.
13:49 GlitchMr Why would $_ disappear just because I have block (if/else) in original code?
13:49 * colomon is having to type around a duplo model Union Pacific Big Boy which is on his desk for some reason.
13:50 GlitchMr This is... weird
13:50 colomon tadzik: pong?
13:50 jnthn GlitchMr: $_ has some special handling. Something isn't quite right with it, it seems
13:51 PacoAir joined #perl6
13:51 colomon nr: $_ = 'abc'; for 1 -> $len { .perl.say; { .perl.say } }
13:51 p6eval niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties:â�¤  $len is declared but not used at /tmp/i9dAWOU3Of line 1:â�¤------> [32m$_ = 'abc'; for 1 -> [33mâ��[31m$len { .perl.say; { .perl.say } }[0mâ�¤â�¤"abc"â�¤"abc"â�¤Â»
13:51 p6eval ..rakudo b8c068: OUTPUT«"abc"␤Mu␤»
13:51 GlitchMr Moooo!
13:51 GlitchMr Perhaps apt-get moo ate it or something.
13:52 tadzik colomon: List::Utils uniq_by hangs on new nom, and when I try to replicate its behaviour, it seems to hang everywhere
13:52 GlitchMr But... this shouldn't happen...
13:52 jnthn GlitchMr: Think I've found out what's going on.
13:52 colomon tadzik: grumble...
13:54 colomon tadzik: can duplicate here
13:54 colomon tadzik: yes, that's a rakudobug
13:55 jnthn New issue in nqpqast branch, or a general issue?
13:55 colomon tadzik: guess I can comment out the offending test.
13:55 FROGGS_ r: class A { has $.b; method new { $!b = 42 } }; my $c = A.new;
13:55 p6eval rakudo b8c068: OUTPUT«Cannot look up attributes in a type object␤  in method new at /tmp/gfZpAu6sbs:1␤  in block  at /tmp/gfZpAu6sbs:1␤␤»
13:55 FROGGS_ whats wrong with that? ó.ò
13:56 tadzik jnthn: seems now, I don't remember smoker hanging on it before
13:56 GlitchMr I will return this bug to Rakudobug, ok?
13:56 GlitchMr s/return/send/
13:56 jnthn GlitchMr: Yeah, please.
13:57 colomon tadzik: workaround pushed.  it's an old rakudobug, btw, going back at least a month...
13:57 jnthn GlitchMr: I've got a potential patch for it already.
13:57 tadzik oh, interesting
14:00 GlitchMr jnthn: it's bug #114696
14:00 GlitchMr I accidentally put there old example with .chars, but whatever (I cannot change it now)
14:08 tokuhiro_ joined #perl6
14:14 spider-mario building rakudo star 2012.08 without an already installed rakudo star definitely doesn’t work
14:14 spider-mario I’ve had the same problem in a chroot with nothing but nqp and rakudo star 2012.07
14:15 yarp joined #perl6
14:17 jnthn tadzik: Was the List::Utils thing the only issue in the test run?
14:17 dalek nqp/toqast: ded87cc | jnthn++ | src/ (2 files):
14:17 dalek nqp/toqast: Fix REPL breakage, and some other hardening.
14:17 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/ded87ccdf8
14:19 jnthn r: for 'foo' { for 10 ... 1 -> $len { .say } }
14:19 p6eval rakudo b8c068: OUTPUT«foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤foo␤»
14:19 tadzik jnthn: it' has jus fienished, generating diff
14:19 jnthn tadzik: ah, awesome
14:19 tadzik hm
14:19 tadzik I need a new backend for Term::ANSIcolor that'll use HTML colours
14:20 tadzik BSON now fails its tests, Exemel now fails its tests, Facter doesn't build anymore, MongoDB doesn't build anymore, Perl6-Math-Quaternion doesn't build anymore
14:23 geekosaur progress! :p
14:23 tadzik investigating other cases
14:25 tadzik jnthn: okay, nothing specific. I say it's a green light from the module system
14:25 MayDaniel joined #perl6
14:26 jnthn tadzik: Huh, you just told me about a bunch of failures?
14:26 tadzik jnthn: not toqast stuff. Thinks like "no .bytes from Str etc
14:27 jnthn tadzik: I guess you built nqpqast from Rakudo, yes? Not toqast?
14:27 tadzik oh, hold on
14:27 tadzik yes
14:27 jnthn tadzik: OK, I'm mostly concerned with regressions between current nom and current nqpqast.
14:27 tadzik hold on, I missed some stuffs
14:28 tadzik http://tjs.azalayah.net/new.html shows that Exemel didn't pass tests before either, so it may be difftool failing
14:28 tadzik but http://tjs.azalayah.net/index.html disagrees. I need to fix this mess :)
14:28 tadzik okay, Exemel seems to be a regression
14:30 tadzik jnthn: Undefined routine '&does' called (line 4)
14:30 tadzik that's nothing new though, ok
14:30 tadzik Exemel parser seems to be the only thing
14:35 jnthn tadzik: OK, I'm confused. Is there bustage or not? :)
14:36 tadzik there is :)
14:37 jnthn tadzik: In Exemel?
14:38 tadzik yes
14:38 * jnthn clones it
14:41 jnthn tadzik: what am I looking for?
14:41 jnthn tadzik: I see test fails
14:41 tadzik No such method 'root' for invocant of type 'Nil'
14:41 tadzik in block  at t/02-parser.t:15
14:41 tadzik yes
14:41 tadzik I assume it's Grammar/Actions not worky
14:42 jnthn right, parse fail or so
14:56 JimmyZ joined #perl6
15:11 mtk joined #perl6
15:12 dalek nqp/toqast: ef77cff | jnthn++ | src/how/NQPClassHOW.pm:
15:12 dalek nqp/toqast: Always re-compute MRO upon composition.
15:12 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/ef77cffd68
15:12 dalek rakudo/nqpqast: e8c76ce | jnthn++ | src/core/you_are_here.pm:
15:12 dalek rakudo/nqpqast: Ensure that Metamodel::GrammarHOW ends up being ~~ Any.
15:12 dalek rakudo/nqpqast: review: https://github.com/rakudo/rakudo/commit/e8c76ce102
15:16 mucker joined #perl6
15:18 am0c_ joined #perl6
15:25 dalek std: 1434468 | larry++ | STD_P5.pm6:
15:25 dalek std: handle backslashes in character classes better
15:25 dalek std: review: https://github.com/perl6/std/commit/14344683c7
15:25 dalek std: bc80c8f | larry++ | STD_P5.pm6:
15:25 dalek std: improve error on range with backslash cclass
15:25 dalek std: review: https://github.com/perl6/std/commit/bc80c8ff85
15:28 dalek std: a025490 | larry++ | STD_P5.pm6:
15:28 dalek std: debug code removal
15:28 dalek std: review: https://github.com/perl6/std/commit/a025490126
15:28 jnthn tadzik: So, I decided to use Grammar::Tracer to figure out what's going on, then realized that it had issues due to a metaclass compatibility issue I've managed to introduce. :/ So, fixing that first.
15:28 tadzik okay
15:28 tadzik hooray, regressions found :)
15:28 tadzik http://cdn.memegenerator.net​/instances/400x/24111566.jpg
15:30 BlueT_ joined #perl6
15:30 jnthn Yeah, this is a fiddly one also...
15:31 jnthn Note to self: put some darn MOP tests into spectest
15:31 tadzik (:
15:34 jnthn ah, yay, the fix helped
15:34 jnthn hm, should be more efficient too
15:36 dalek nqp/toqast: 539f35b | jnthn++ | src/how/NQPClassHOW.pm:
15:36 dalek nqp/toqast: Refactor BUILDPLAN construction so that it respects the desires of different contributing metaclasses.
15:36 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/539f35bfb3
15:36 awfabian joined #perl6
15:36 dalek rakudo/nqpqast: 54f813b | jnthn++ | src/Perl6/Metamodel/BUILDPLAN.pm:
15:36 dalek rakudo/nqpqast: Refactor BUILDPLAN construction so that it respects the desires of different contributing metaclasses.
15:36 dalek rakudo/nqpqast: review: https://github.com/rakudo/rakudo/commit/54f813b518
15:38 birdwindupbird joined #perl6
15:38 jnthn ooh, turns out Grammar::Tracer has never handled backrefs properly either.
15:52 raiph joined #perl6
15:53 raiph gum
15:56 dalek zavolaj/libnames: 3f79122 | (Arne Skjærholt)++ | lib/NativeCall.pm6:
15:56 dalek zavolaj/libnames: Eliminate warnings from updated Rakudo.
15:56 dalek zavolaj/libnames: review: https://github.com/jnthn/zavolaj/commit/3f7912259a
15:56 dalek zavolaj/libnames: aa0436c | (Arne Skjærholt)++ | lib/NativeCall.pm6:
15:56 dalek zavolaj/libnames: Update library name handling to NQP handling extensions.
15:56 dalek zavolaj/libnames: review: https://github.com/jnthn/zavolaj/commit/aa0436cd95
15:56 dalek nqp/dyncall-libnames: 2f6eee9 | (Arne Skjærholt)++ | src/ops/nqp_dyncall.ops:
15:56 dalek nqp/dyncall-libnames: Handle library extensions in nqp_dyncall.ops.
15:56 dalek nqp/dyncall-libnames:
15:56 dalek nqp/dyncall-libnames: This should fix the issue of .bundle vs. .dylib on OS X.
15:56 dalek nqp/dyncall-libnames: review: https://github.com/perl6/nqp/commit/2f6eee931a
15:57 arnsholt Now let's see if it works on OS X as well
15:59 jnthn tadzik: Turns out it fails in attribute parsing, fwiw.
16:00 jnthn Oh, it's wrong under the new sigspace rules...
16:01 jnthn But I didn't think those were implemented yet.
16:03 tadzik hm
16:04 dalek rakudo/nqpqast: cfae063 | jnthn++ | src/ (2 files):
16:04 dalek rakudo/nqpqast: Some extra tweaks to fix BUILDPLAN handling regressions.
16:04 dalek rakudo/nqpqast: review: https://github.com/rakudo/rakudo/commit/cfae0637ca
16:04 jnthn r: my rule foo { b }; say "a b" ~~ /a <&foo>/;
16:04 p6eval rakudo b8c068: OUTPUT«#<failed match>␤»
16:05 jnthn star: my rule foo { b }; say "a b" ~~ /a <&foo>/;
16:05 p6eval star 2012.07: OUTPUT«q[a b]␤␤»
16:05 jnthn r is correct by current spec, afaik
16:06 tadzik hm., I wouldn't expect that
16:06 crab2313 joined #perl6
16:07 TimToady r: my rule foo { '' b }; say "a b" ~~ /a <&foo>/;
16:07 p6eval rakudo b8c068: OUTPUT«「a b」␤␤»
16:07 jnthn Right, if I add a <?> or <.ws> into the Exemel::Grammar in the expected place it parses again.
16:07 * jnthn combs the git log
16:10 jnthn hm, don't spot anything
16:11 jnthn oh, I wonder...
16:12 jnthn hah!
16:12 dalek std: d54dd12 | larry++ | / (2 files):
16:12 dalek std: suppress missing action package warnings
16:12 dalek std: review: https://github.com/perl6/std/commit/d54dd12153
16:12 dalek std: 4c71135 | larry++ | viv:
16:12 dalek std: debug removal
16:12 dalek std: review: https://github.com/perl6/std/commit/4c71135397
16:12 dalek std: ac6e336 | larry++ | STD_P5.pm6:
16:12 dalek std: warning suppression
16:12 dalek std: review: https://github.com/perl6/std/commit/ac6e33656d
16:13 jnthn yeah, accident.
16:13 jnthn Nothing to do with the QAST stuff, but happened when I introduced the :P5 support
16:17 dalek std: 7484f3a | larry++ | viv:
16:17 dalek std: remove dup VAST package
16:17 dalek std: review: https://github.com/perl6/std/commit/7484f3aee8
16:17 dalek rakudo/nqpqast: 0e6dd2e | jnthn++ | src/Perl6/Grammar.pm:
16:17 dalek rakudo/nqpqast: Significant non-whitespace was significant. Fixes accidental change to rule semantics when :P5 was introduced.
16:17 dalek rakudo/nqpqast: review: https://github.com/rakudo/rakudo/commit/0e6dd2ed07
16:18 MikeFair Given the following rule: rule statementBlock { <statement_list> 'end' <!ww>* }
16:18 diakopter TimToady: can you clarify the new non-pragmatized ways of interacting with strings other than codepoint level
16:18 MikeFair What I intend to say is "end is the only thing on the line" (expcepr for whatever <.ws> matches)
16:19 MikeFair is the <!ww>* needed?
16:19 dalek zavolaj/libnames: 20e96d5 | (Arne Skjærholt)++ | t/02-simple-args.t:
16:19 dalek zavolaj/libnames: Add test calling a function from libc.
16:19 dalek zavolaj/libnames:
16:19 dalek zavolaj/libnames: This isn't necessary on Linux, but OS X distinguishes between shared libraries
16:19 dalek zavolaj/libnames: (dylibs) and loadable modules (bundles), which we need to make sure works.
16:19 dalek zavolaj/libnames: This closes #7.
16:19 dalek zavolaj/libnames: review: https://github.com/jnthn/zavolaj/commit/20e96d507c
16:19 MikeFair oh wait!  nm, it's not it's in <ws>
16:21 * MikeFair flip flops.
16:21 jnthn tadzik: Exemel looks good again now. It will need a change in the future, mind.
16:21 jnthn tadzik: Re-testing appreciated, when you get chance.
16:21 tadzik rebulding nom now
16:21 jnthn tadzik: nom? or nqpqast?
16:22 MikeFair I think it is needed because <!ww> will simply stop matching when it hits something else on that line, not fail to match if there is something there
16:22 arnsholt *facepalm* Test works on OS X, but not on Linux, because Linux has OTHER shared-lib naming shenanigans
16:22 tadzik jnthn: erm, nqpqast
16:22 jnthn tadzik: Great, thanks :)
16:22 tadzik jnthn: also, is there a way to get a Parrot-level sub out of an object in Perl 6?
16:22 tadzik I mean, code object
16:22 jnthn tadzik: Only by poking into the internals
16:23 tadzik how deeply?
16:23 jnthn nqp::getattr deeply
16:23 jnthn Get $!do
16:23 jnthn Why do you need to, ooc?
16:23 tadzik surprise
16:36 birdwindupbird joined #perl6
16:48 awfabian joined #perl6
16:51 tadzik sigh
16:51 tadzik I tried using threads on the new Parrot branch, but things segfault
16:53 tadzik jnthn: okay, Exemel is clear on the module smoketest so far
17:03 tadzik jnthn: could you take a look at https://gist.github.com/3580456 ?
17:03 tadzik simple threads example working on parrot-nqp, but not on nqp
17:07 ponbiki joined #perl6
17:11 _jaldhar joined #perl6
17:11 MayDaniel_ joined #perl6
17:12 telex_ joined #perl6
17:18 dalek std: 4f02273 | larry++ | STD_P5.pm6:
17:18 dalek std: bogus warning suppression
17:18 dalek std: review: https://github.com/perl6/std/commit/4f0227314c
17:18 jnthn tadzik: Oddness. Not sure, but it seems to die while trying to throw an exception.
17:18 tadzik yeah
17:19 am0c joined #perl6
17:19 jnthn Does changing it to nqp::say(...) change anything?
17:19 FROGGS_ joined #perl6
17:20 tadzik yes, it makes it work
17:20 tadzik WOO
17:21 tadzik doesn't help the perl6 version though
17:21 jnthn OK, that's...bothersome
17:22 tadzik mayhaps the parrot code object still wants to call perl 6 code objects, and threads don't like that?
17:22 jnthn What if you my $x := 42; and then in the thread say($x) ?
17:22 jnthn e.g. is it something odd with lexical lookups?
17:23 jnthn It's a curious backtrace. It looks like it failed to find say(...)
17:23 jnthn Or died trying to find it
17:23 tadzik still segfaulting
17:24 jnthn Segfaults when you try to say $x?
17:24 jnthn In NQP?
17:24 jnthn Even with nqp::say?
17:24 tadzik https://gist.github.com/3580903
17:24 mtk joined #perl6
17:24 tadzik no, that's in P6
17:24 tadzik nqp works fine
17:25 tadzik https://gist.github.com/3580930
17:25 tadzik and it threads properly :)
17:25 jnthn Well, it doesn't work fine because it didn't find say
17:25 jnthn Try
17:25 tadzik nqp?
17:25 jnthn Yes
17:26 jnthn You changed it to nqp::say
17:26 jnthn And then it worked
17:26 tadzik oh, true
17:26 jnthn Try this
17:26 jnthn my $x := 42;
17:26 jnthn my $a := sub foo() { nqp::say($x); };
17:26 jnthn And shecudling that.
17:26 tadzik segfaults
17:26 diakopter O_O
17:26 jnthn OK, so...it fails at doing lexical lookups between threads? o.O
17:26 tadzik yes :)
17:26 * diakopter looks up shecudling
17:27 jnthn That's not gonna get us far.
17:27 jnthn As in, anywhere.
17:27 tadzik yep
17:27 * jnthn wonders if it's because NQP and Rakudo have custom lexpad PMCs.
17:31 erkan joined #perl6
17:31 erkan joined #perl6
17:32 tadzik could be
17:33 tadzik jnthn: also, when I try the lexical lookup in parrot-nqp, it just silently crashes
17:33 tadzik no error, just doesn't print anything, even stuff from outside threads
17:33 tadzik I'll poke nine when he appears on #parrot
17:33 jnthn oh
17:33 jnthn Well, but parrot-nqp didn't have custom lexpads, iirc
17:34 thou joined #perl6
17:34 tadzik jnthn: okay, green light from the modules this time :)
17:34 tadzik 68 modules ok, 44 not ok (112 total)
17:34 MikeFair Hmm, question, I'm trying to do something like this: rule block { <start_phrase> <stuff> <stop_phrase> }; rule start_phrase { 'start' <ident> }; rule stop phrase {'stop' $<ident_from_start>}
17:34 tadzik that't the best result I remember :)
17:36 MikeFair I want to use <start_phrase> and <stop_phrase> because I want the method call that results from a match. but I'm not sure how to pass back the capture
17:36 jnthn tadzik: OK, will merge. Thanks!
17:37 tadzik are spectests clean now?
17:37 jnthn yes, I temporarily busted something then fixed it :)
17:37 tadzik okay, awesome :)
17:37 MikeFair Alternatively, I could do something like this: rule block { 'start' <ident> <stuff> 'stop' $<ident> { call stop_phrase, stop_phrase passing in ident if this matches } }
17:40 havenn joined #perl6
17:46 jnthn MikeFair: If you want to keep your original factoring, you can likely do it with a contextual.
17:47 jnthn rule block { :my $*ENDER; <start_pharse> <stuff> <stop_phrase> }
17:47 jnthn rule start_phrase { 'start' <ident> { $*ENDER = ~$<ident> } }
17:48 jnthn rule stop_phrase { 'stop' $*ENDER }
17:48 jnthn Or so
17:49 havenn joined #perl6
18:00 dalek evalbot: 4253b69 | GlitchMr++ | evalbot.pl:
18:00 dalek evalbot: Fix evalbot help.
18:00 dalek evalbot:
18:00 dalek evalbot: said() appears to be ran in scalar context. As the result of it, comma
18:00 dalek evalbot: is really comma operator - it means everything before `': $code'` is simply
18:00 dalek evalbot: ignored creating weird help message. This fixes it by using `.`
18:00 dalek evalbot: (concatenation operator) instead of `,` (comma operator).
18:00 dalek evalbot: review: https://github.com/perl6/evalbot/commit/4253b69527
18:02 sergot We have modules.perl6.org generated using Perl 6! :)
18:02 sergot http://feather.perl6.nl/~sergot/modules/
18:02 sergot https://github.com/sergot/modules.perl6.org
18:02 tadzik \o/
18:02 sergot Take a look. :)
18:02 GlitchMr wow, test results :)
18:02 GlitchMr This is amazing :)
18:02 tadzik yep :)
18:02 GlitchMr But I don't like yellow color.
18:02 GlitchMr Perhaps if it would have outline or something
18:03 tadzik yeah, well, I designed it, don't expect too much :)
18:03 GlitchMr It's not bad
18:05 GlitchMr tadzik: http://dl.dropbox.com/u/63913412/shadow.png
18:05 GlitchMr But this probably is even more ugly
18:05 tadzik hm, not bad
18:06 GlitchMr I'm testing stuff
18:06 sergot Only (?) real1m2.862s
18:06 sergot :)
18:06 sergot takes generating it
18:07 tadzik that might be faster than the perl 5 version
18:07 dalek Heuristic branch merge: pushed 174 commits to nqp by jnthn
18:07 GlitchMr http://dl.dropbox.com/u/63913412/outline.png
18:07 tadzik because it uses the github API and has to wait so github doesn't get super angry
18:07 GlitchMr Or this, even uglier option
18:07 dalek Heuristic branch merge: pushed 27 commits to rakudo/nom by jnthn
18:07 jnthn OK, 'tis merged.
18:08 GlitchMr I like this view source thing in Opera.
18:08 tadzik I'm glad you like it :)
18:08 tadzik jnthn++ # future, NOW!
18:09 GlitchMr It allows me to modify documents directly
18:09 dalek rakudo/nom: d776f08 | jnthn++ | docs/ROADMAP:
18:09 dalek rakudo/nom: Remove a ROADMAP item.
18:09 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d776f087d0
18:10 GlitchMr Outline was "text-shadow: 1px 1px 1px #000, 1px -1px 1px #000, -1px 1px 1px #000, -1px -1px 1px #000"
18:10 GlitchMr Shadow was "text-shadow: 3px 3px 5px #888"
18:11 jnthn phenny: tell lizmat le NQP branch merge is done, which unblocks your ops work :)
18:11 phenny jnthn: I'll pass that on when lizmat is around.
18:16 GlitchMr I should make pointless IRC bot in Perl 6
18:16 tadzik :)
18:17 GlitchMr I guess that Rakudo has sockets?
18:17 tadzik it does
18:17 tadzik there are already perl6-based bots running here
18:17 jnthn Sure. And a module for making IRC bots. :)
18:17 tadzik p6rd: next
18:17 tadzik p6rd, where are you?
18:17 jnthn ENOTRUNNING :P
18:17 tadzik cjbot, where are you?
18:17 tadzik /o\
18:18 tadzik GlitchMr: forget I said anything :)
18:18 GlitchMr has $.nick     = "Rakudobot";
18:19 GlitchMr has @.altnicks = $!nick X~ ("_","__",^10);
18:19 GlitchMr $!nick?
18:19 GlitchMr But... isn't it $.nick?
18:19 GlitchMr Would this even work?
18:20 GlitchMr Just wondering, is panda installed on feather or I've to install it myself?
18:24 GlitchMr glitchmr@strawberry ~/g/panda> ./bootstrap.pl
18:24 GlitchMr ==> Bootstrapping Panda
18:24 GlitchMr ===SORRY!===
18:24 GlitchMr error:imcc:The opcode 'perl6_type_check_return_value_p' (perl6_type_check_return_value<1>) was not found. Check the type and number of the arguments
18:24 GlitchMr in file '/home/glitchmr/.perl6/lib/Shell/Command.pir' line 584
18:24 GlitchMr ok...
18:26 havenn joined #perl6
18:26 tadzik hm
18:26 tadzik run rebootstrap.pl
18:26 tadzik I should probably note that in the README
18:31 GlitchMr ==> Reinstalling Acme::Addslashes Config::INI Text::Abbrev Acme::Meow Digest::MD5
18:31 GlitchMr nice
18:33 jnthn walk &
18:33 GlitchMr Elegant. Simple. Probably compiles.
18:33 GlitchMr lol
18:36 tadzik :)
18:48 sorear good * #perl6
18:49 diakopter o/
18:49 GlitchMr * is whatever?
18:49 tadzik yes
18:54 GlitchMr https://gist.github.com/3583210
18:54 GlitchMr That could be fun
18:54 GlitchMr What's so hard about 004 IRC code?
18:55 tadzik I've no eye deer
18:55 GlitchMr https://github.com/TiMBuS/Net--IRC​/blob/master/lib/Net/IRC/Parser.pm
18:55 GlitchMr Gramar for IRC!
18:56 tadzik sure, Grammars are awesome
18:56 GlitchMr :moorcock.freenode.net 004 SixtySixBot moorcock.freenode.net ircd-seven-1.1.3 DOQRSZaghilopswz CFILMPQbcefgijklmnopqrstvz bkloveqjfI
18:56 GlitchMr Now I wonder why it didn't matched
18:57 tadzik use Grammar::Debugger :)
19:00 GlitchMr ===SORRY!===
19:00 GlitchMr Nominal type check failed for parameter '$got'; expected Any but got TracedGrammarHOW instead
19:01 GlitchMr This is Debugger::Tracer
19:01 GlitchMr I meant, Grammer::Tracer
19:01 GlitchMr And Grammar::Debugger shows TOP and doesn't react on anything
19:01 tadzik hm
19:01 tadzik jnthn: ?
19:01 GlitchMr I type "h". Nothing
19:02 GlitchMr I've feeling it should show "> " prompt, except it doesn't
19:02 GlitchMr Or rather, after I press CTRL+D error appears and "> " prompt
19:04 GlitchMr It looks like this: https://gist.github.com/ab67295375366ea9ae91
19:06 GlitchMr But tests pass... oh wait... what tests?
19:06 jnthn I fixed Grammar::Tracer earlier this evening
19:06 GlitchMr Those were tests for Term::AnsiColor
19:07 GlitchMr And Grammar::Tracer doesn't work for me
19:07 jnthn The re-parenting stuff I put in a while ago musta somehow messed it up. It's odd 'cus I remember checking it...
19:07 GlitchMr oh...
19:07 GlitchMr glitchmr@strawberry ~> perl6 -v
19:07 GlitchMr This is perl6 version 2012.08-27-gf3d2b53 built on parrot 4.7.0 revision RELEASE_4_7_0-165-g29796c6
19:07 jnthn Oh, hm
19:07 GlitchMr I've old Rakudo
19:08 jnthn I removed the "is Mu" from it, which should not have been needed, found it broken, fixed the reason it broke without the "is Mu" in Rakudo, and committed the fix.
19:08 jnthn So yeah, it'll only work on latest. Sorry 'bout that.
19:08 GlitchMr Anyways, bye
19:23 aindilis joined #perl6
19:30 immortal joined #perl6
19:30 immortal joined #perl6
19:37 moritz jnthn++ # QAST
19:38 FROGGS_ arnsholt: if I have to pass a pointer to a struct to a c function, and this struct is made within perl, how do I pass its pointer?
19:40 jnthn FROGGS_: If there's no a direct way, a workaround is to create a 1-element CArray
19:42 FROGGS_ jnthn: what do I have to do with the CArray then?
19:43 jnthn my $ptrish = CArray[YourStructType].new();
19:43 jnthn $ptrish[0] = $your_struct;
19:43 moritz (the first = should probably be :=)
19:43 moritz I have no idea how robust zavolaj is when it comes to additional containers
19:44 jnthn I think it copes.
19:44 jnthn If you want to use the @ sigil you certainly need :=
19:44 jnthn For $ then I think assignment is OK.
19:44 FROGGS_ jnthn: and then I have the pointer in $ptrish[0] ?
19:45 moritz no, pass $ptrish in the place where a pointer is expected
19:45 FROGGS_ ahh, got it
19:45 FROGGS_ of course, it points to its first element
19:46 jnthn Pointers and arrays in C are very related :)
19:49 moritz jnthn: I want to fix   constant name = 'foo'; sub ::(name) { }
19:49 moritz jnthn: but I'm having trouble figuring out what the correct fix is
19:49 moritz ::() stuff is parsed by token morename
19:50 jnthn moritz: Probably involves something in class LongName inside of Perl6::World.
19:50 moritz but morename doesn't even its own action method
19:50 * moritz has to wade through the whole thing
19:51 moritz and <longname> doesn't have one either :(
19:52 havenn joined #perl6
19:52 moritz jnthn: I don't think it goes through class LongName
19:53 moritz 'cause the sub declaration parses the name as <deflongname>?
19:53 jnthn Oh, the sub case...
19:53 moritz and that one simply does a 'make ~$<name>' if it's not an operator or anything special
19:53 moritz which is probably wrong :-)
19:53 jnthn The class case works through longname, and should be handled by the logic in disect_longname
19:54 jnthn Of note, the elsif $_<EXPR> { bit
19:54 moritz ok, if I do that case first
19:55 moritz I guess class LongName needs an evaluate_now method or so
19:55 jnthn Then type_name_parts is meant to Do The Right Thing if there's constant bits in there
19:55 jnthn I wonder if
19:55 jnthn if nqp::can($_, 'isa') && $_.isa(QAST::Node) {
19:55 jnthn replace that line with
19:55 jnthn nqp::istype($_, QAST::Node)
19:56 * moritz tries
19:56 jnthn The code looks to be there to handle it, but then it's not quite working.
19:56 moritz oh, which reminds me of a discussion I wanted to have for some time now
19:57 moritz we have several checks of the type    if $something.has_compile_time_value { ... } else { die "OH NOEZ" }
19:57 moritz should we simply evaluate the stuff at compile time? or should we continue to complain?
19:57 moritz currently we don't constant-fold anything in those cases, so even pretty simple stuff dies
19:58 jnthn I think it wants to be done by some constant folding mechanism
19:58 moritz so evaluating stuff at compile time would help
19:58 jnthn But the boundaries are...fuzzy
19:58 moritz OTOH evaluating stuff might surprise the user, especially if variables are involved
19:59 jnthn Right
19:59 jnthn And I don't think we should just try and evaluate anything.
20:00 moritz that's exactly what we do for 'constant' declarators, no?
20:00 havenn joined #perl6
20:01 jnthn True
20:01 moritz $ >./perl6 -e 'constant name = "A"; class ::(name) { }; say A'
20:01 moritz QAST::WVal<-8315598784843782714>()
20:02 moritz so it creates the type, but it gives it the wrong name :-)
20:02 jnthn ...but installs it under the correct name?
20:02 jnthn Oops. :)
20:02 sorear niecza treats a lot of this as BEGIN block
20:02 moritz jnthn: yes
20:02 jnthn moritz: See package_def. Then smack me the appropriate amount for whatever silliness I committed :)
20:03 jnthn (in Grammar.pm)
20:05 moritz jnthn: I kinda suspect it's LongName.name that is being stupid
20:05 moritz jnthn: because it works with @!components, not self.type_name_parts
20:06 jnthn moritz: ah
20:06 jnthn Well, even better then, since that's a more general fix. :)
20:11 moritz otoh scarier, because it affects more code
20:13 jnthn We have a test suite ;)
20:15 moritz without the test suite I wouldn't dare to push 90% of my (non-doc) patches
20:17 dalek rakudo/smoke-me/indirect-class-name: 957a680 | moritz++ | src/Perl6/World.pm:
20:17 dalek rakudo/smoke-me/indirect-class-name: fix type declaration with indirect type name
20:17 dalek rakudo/smoke-me/indirect-class-name:
20:17 dalek rakudo/smoke-me/indirect-class-name: for example   constant name = "A"; class ::(name) { }
20:17 dalek rakudo/smoke-me/indirect-class-name: jnthn++ for steering me in the right direction
20:17 dalek rakudo/smoke-me/indirect-class-name: review: https://github.com/rakudo/rakudo/commit/957a6806b9
20:18 FROGGS_ jnthn: CArray.WHAT tells me it is a CArray+{TypedCArray}(), how should my nativecall sub params look like? It complains when I use CArray, und vars like $a without a type
20:18 jnthn Did you try CArray[YourStructType]
20:18 moritz (pushed to branch because I don't want to run roast on my laptop, when I have a server that can do it much quicker and without burning my lap :-)
20:21 FROGGS_ jnthn: I tried now, but I still get: CStruct Can't perform boxed get on flattened attributes yet
20:22 jnthn That...seems to be more an issue with the CStruct than yoru array warpping of it
20:22 jnthn *wrapping
20:22 FROGGS_ k
20:24 moritz jnthn: for the sub ::(name) { }, I have the evil idea of passing $<deflongname> to $*W.dissect_longname, since it has the same capature structure as longname
20:25 jnthn moritz: That's evil :)
20:25 jnthn But yes, it'd work :)
20:25 moritz well, the alternative is to refactor LongName, or duplicate lots of its code :-)
20:26 jnthn Or add a disect_deflongname that just delegates to dissect_longname with a "it looks the same" comment. :)
20:26 moritz that sounds less evil, yes
20:26 jnthn Wait a moment...
20:27 jnthn oh, grr, deflongname doesn't just delegate to longname
20:27 moritz the only way that longname and deflongname differ is by some look-aheads, afaict
20:27 jnthn oh, because categoricals.
20:27 jnthn Anyway, what I suggested is probably do-able and means if they diverge in the future it's easy to cope somehow :)
20:29 * moritz tries
20:29 zby_home_ joined #perl6
20:31 moritz dies while compiling the setting
20:32 moritz do <foo>* and [ <.bar> <foo>]* produce the same capture structure?
20:33 moritz hm, might be an easy fix
20:33 moritz it died with
20:33 moritz get_iter() not implemented in class 'NQPMu'
20:34 moritz which I guess comes from the   for $name<morename> { }
20:34 pmichaud good afternon, #perl6
20:34 awfabian joined #perl6
20:34 moritz good morning pmichaud :-)
20:35 jnthn o/ pmichaud
20:35 jnthn pmichaud: QAST stuffs merged! :)
20:35 pmichaud jnthn: yes, I was looking at the commit log :)
20:36 moritz I've guarded the loop with   if $name<morename> { }
20:36 moritz now I get
20:36 moritz get_iter() not implemented in class 'NQPMatch'
20:36 moritz for the same for-loop
20:37 jnthn That means you got a single match somewhere you expected something quantified I guess...
20:37 moritz token name { [ | <identifier> <morename>* | <morename>+ ] }
20:37 moritz I can't see how $name<morename> can ever be a single Match
20:37 jnthn Hm. That should be quantified.
20:37 jnthn Right.
20:38 dalek rakudo/nom: 957a680 | moritz++ | src/Perl6/World.pm:
20:38 dalek rakudo/nom: fix type declaration with indirect type name
20:38 dalek rakudo/nom:
20:38 dalek rakudo/nom: for example   constant name = "A"; class ::(name) { }
20:38 dalek rakudo/nom: jnthn++ for steering me in the right direction
20:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/957a6806b9
20:40 arnsholt FROGGS_: The Zavolaj test suite has an example of a function that takes an array of structs as an argument. t/05-arrays.{t,c} TakeAStructArray
20:40 benabik joined #perl6
20:41 moritz something is quite fishy with the deflongname dissecting here :(
20:41 moritz OH MY
20:41 moritz because I pass $<deflongname> to it
20:41 moritz which is an array
20:41 moritz erm, RPA
20:42 jnthn oh!
20:42 FROGGS_ arnholt: I got it right now!
20:42 jnthn That'd do it.
20:43 FROGGS_ jnthn++
20:43 moritz because it's quantified with a ?
20:43 jnthn Yeah
20:43 * moritz wants that fixed :-)
20:43 jnthn We didn't adopt the updated updated updated spec on that yet :P
20:43 pmichaud I didn't want to work on that too heavily while the toqast branch was in progress.
20:43 arnsholt The ? quantifier doesn't wrap things in arrays anymore?
20:44 jnthn arnsholt: It does now, but the spec has gone back to wanting it not to.
20:44 jnthn Which means you now have to remember that the ? quantifier is the odd-one-out.
20:44 moritz and put Nil in if it matched zero times
20:45 jnthn Right.
20:45 jnthn I guess in NQP that has to be an NQPMu.
20:45 * jnthn can't remember the reasoning for ? being different.
20:45 arnsholt Right. I remember thinking it was weird and then realizing it wasn't all that weird anyways
20:46 pmichaud jnthn: think of ? as being "matched/didn't match" and it makes more sense.
20:46 jnthn pmichaud: Yeah, I'd got used to quantifier imples array, though. :)
20:46 jnthn *implies
20:46 pmichaud jnthn: yeah, I understand.  :)
20:46 moritz more like  [ <thing> | <?> ]
20:46 jnthn Anyway, I'll cope :)
20:47 pmichaud I get a rakudo build failure when trying to build with parrot master.
20:47 moritz aaarg
20:47 jnthn Oh?
20:47 moritz my new thing now reads
20:47 moritz $block.name($*W.disect_deflong​name($<deflongname>[0]).name);
20:47 moritz and that dies while compiling the setting
20:47 moritz :<[ ]> cannot be resolved at compile time
20:47 moritz for sub circumfix:<[ ]>
20:47 pmichaud https://gist.github.com/3586825
20:47 jnthn This is Parrot version 4.7.0-devel built for amd64-win32
20:48 jnthn That's the one I've been bulding aginast.
20:48 jnthn pmichaud: urgh
20:49 pmichaud pmichaud@kiwi:~/p6/rakudo$ install/bin/parrot_config git_describe
20:49 pmichaud RELEASE_4_7_0-183-g9eab02c
20:49 pmichaud I'll try just a plain '--gen-parrot' and see what happens.
20:50 jnthn OK
20:50 jnthn I think that's what I did
20:50 pmichaud what version of parrot do you have? (git describe?)
20:51 jnthn RELEASE_4_7_0-165-g29796c6
20:52 pmichaud okay
20:52 pmichaud so, not too much to bisect if it's a recent parrot change causing the issue
20:52 jnthn Aye
20:52 pmichaud yeah, -165 is the one I'm building now.
20:54 * moritz postpones the routine case of ::(name) to tomorrow and goes to sleep
20:54 moritz ~o~
20:54 jnthn 'night, moritz
20:54 jnthn pmichaud: Yeah, looking at that error makes me want a bisect.
20:55 jnthn No hurry though.
20:56 pmichaud I've been seeing lots of commits on the parrot side that make me a little uneasy, so we might not want to wait too long :)
20:56 pmichaud if it goes too long, the bisecting might become harder :)
20:57 pmichaud it looks as though -165 will build on my box
20:57 pmichaud (i.e, I got farther than previously)
20:58 pmichaud yeah, passing 'make test'
20:58 pmichaud trying again with --gen-parrot=master
21:04 jnthn omg, that get_pointer patch made it in
21:05 pmichaud huh, looks like gen-parrot=master is going to build also
21:05 jnthn oh?
21:05 pmichaud so... not sure what happened earlier.
21:05 jnthn Huh.
21:06 pmichaud I'll try once more from clean checkouts
21:06 MikeFair jnthn: BTW, thanks for the advice reagarding 'use a contextual' earlier
21:07 MikeFair These seem to do the trick:
21:07 MikeFair 47 rule start_using { ['start' 'using' <identifier> ] <!ww>? { $*ENDER := $<identifier> } }
21:07 MikeFair 48 rule stop_using { [ 'stop' 'using' <identifier> ]? <!ww>? { $*ENDER eq $<identifier> } }
21:13 replore joined #perl6
21:14 pmichaud yeah, it built this time.  not sure why I had the fail earlier.
21:14 pmichaud oh, wait, I didn't build that part yet. checking
21:15 pmichaud okay, it looks like it'll build.
21:15 jnthn mebbe some old files left around.
21:17 sftp joined #perl6
21:17 MayDaniel joined #perl6
21:22 awfabian joined #perl6
21:32 awfabian joined #perl6
21:32 bruges joined #perl6
21:42 Moukeddar joined #perl6
22:01 masak morning, #perl6
22:02 dalek std: 1748dc5 | larry++ | STD.pm6:
22:02 dalek std: check lexical before package name
22:02 dalek std:
22:02 dalek std: our $i; { my $i; { $i }} incorrectly did not mark usage of lexical $i,
22:02 dalek std: resulting in spurious warning.
22:02 dalek std: review: https://github.com/perl6/std/commit/1748dc5eb3
22:02 dalek std: b178d5b | larry++ | / (2 files):
22:02 dalek std: suppress rest of "unused" warnings in viv
22:02 dalek std:
22:02 dalek std: Some of the warnings were bugs, and others were correct.
22:02 dalek std: review: https://github.com/perl6/std/commit/b178d5b0ad
22:03 tokuhiro_ joined #perl6
22:04 sorear o/ masak
22:07 tokuhiro_ joined #perl6
22:09 fgomez joined #perl6
22:11 jeffreykegler joined #perl6
22:15 awfabian joined #perl6
22:17 xinming joined #perl6
22:23 MikeFair parse
22:39 fgomez joined #perl6
22:44 replore joined #perl6
22:50 Targen_ joined #perl6
23:01 yarp joined #perl6
23:03 masak MikeFair: CHECK FAILED: Undefined routine '&parse' called (line 1)
23:03 MikeFair masak: heh! :)
23:04 MikeFair That was a result of PASTEFAIL
23:04 MikeFair :)
23:05 erkan joined #perl6
23:05 erkan joined #perl6
23:07 cognominal r:  class A { has $!a; submethod BUILD($a) {} }; A.new(1)
23:07 p6eval rakudo 957a68: OUTPUT«Default constructor only takes named arguments␤  in method new at src/gen/CORE.setting:618␤  in block  at /tmp/dy5Ts3sevU:1␤␤»
23:07 cognominal what if I want to use positional arguments in the constructor?
23:09 fgomez joined #perl6
23:10 replore joined #perl6
23:12 telex joined #perl6
23:14 cognominal S12:791 "You may write your own C<new> to override the default". Apparently here is the answer
23:14 masak aye.
23:15 masak you can give .new positional parameters, and some of the core classes do.
23:15 masak it's a bit of a coin with two sides.
23:15 fgomez joined #perl6
23:15 cognominal in the test, new.t has examples
23:16 masak you get a custom interface. that can be both useful and confusing.
23:16 cognominal I want to mimic existing interfaces
23:18 cognominal method new($a, $b) {  self.Mu::new(:x($a), :y($b)); }        # sounds like what I want
23:21 popl joined #perl6
23:25 masak no need to delegate to Mu::new (which isn't an 'our' method anyway, so you can't do it with that syntax)
23:25 masak just call self.bless directly from your .new method
23:26 yarp left #perl6
23:27 Circlepuller joined #perl6
23:27 yarp joined #perl6
23:29 yarp r: 1 .. 5
23:29 p6eval rakudo 957a68:  ( no output )
23:29 yarp r: say 1 .. 5
23:29 p6eval rakudo 957a68: OUTPUT«1..5␤»
23:30 masak r: say (1..5).list
23:30 p6eval rakudo 957a68: OUTPUT«1 2 3 4 5␤»
23:33 yarp I am beginer.
23:35 masak welcome, beginner.
23:36 masak we are friendly. we happily answer your questions.
23:36 masak r: .say for 1..5
23:36 p6eval rakudo 957a68: OUTPUT«1␤2␤3␤4␤5␤»
23:36 masak r: .say for reverse 1..5
23:36 p6eval rakudo 957a68: OUTPUT«5␤4␤3␤2␤1␤»
23:36 masak r: .say for 1..5 Z (10,20 ... 50)
23:36 p6eval rakudo 957a68: OUTPUT«1␤10␤2␤20␤3␤30␤4␤40␤5␤50␤»
23:38 yarp Thanks
23:39 masak r: for 'a'..'b' X 1..5 -> $l, $d { say "$l$d" }
23:39 p6eval rakudo 957a68: OUTPUT«a1␤a2␤a3␤a4␤a5␤b1␤b2␤b3␤b4␤b5␤»
23:40 masak r: .say for 0, 0.1 ... 1.0
23:40 p6eval rakudo 957a68: OUTPUT«0␤0.1␤0.2␤0.3␤0.4␤0.5␤0.6␤0.7␤0.8␤0.9␤1␤»
23:40 masak r: .say for "bbc".."bbw"
23:40 p6eval rakudo 957a68: OUTPUT«bbc␤bbd␤bbe␤bbf␤bbg␤bbh␤bbi␤bbj␤bbk␤bbl​␤bbm␤bbn␤bbo␤bbp␤bbq␤bbr␤bbs␤bbt␤bbu␤bbv␤bbw␤»
23:46 colomon joined #perl6
23:53 masak 'night, #perl6
23:54 colomon \o
23:56 _jaldhar joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs