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